Skip to content

Commit

Permalink
fix save
Browse files Browse the repository at this point in the history
  • Loading branch information
771-8bit committed Dec 18, 2024
1 parent a14e923 commit 4848262
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
15 changes: 11 additions & 4 deletions Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -471,11 +471,18 @@ private void btnSaveRcv_Click(object sender, EventArgs e)

if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
if ((myStream = saveFileDialog1.OpenFile()) != null)
try
{
using (StreamWriter sw = new StreamWriter(saveFileDialog1.FileName, false, Encoding.ASCII))
{
sw.Write(rcvTextBoxScroll.Text);
}

AutoClosingMessageBox.Show("File saved successfully.", "Save File", 1000);
}
catch (Exception ex)
{
myStream.Close();
StreamWriter sw = new StreamWriter(saveFileDialog1.FileName, false, Encoding.ASCII);
sw.Write(rcvTextBoxScroll.Text);
MessageBox.Show($"Failed to save file: {ex.Message}", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
// 既定値にすることができます:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("9.0.0.0")]
[assembly: AssemblyFileVersion("9.0.0.0")]
[assembly: AssemblyVersion("10.0.0.0")]
[assembly: AssemblyFileVersion("10.0.0.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Serial Monitor Essential"
"ProductCode" = "8:{43E2479D-1D6E-44BC-8C6C-966923E18607}"
"PackageCode" = "8:{9772D3F4-3AF0-4CA0-BD1F-027DA38975D0}"
"ProductCode" = "8:{8B0752B6-F129-4B4F-AFA4-92F9001E9904}"
"PackageCode" = "8:{E31E5961-1B96-44B6-93BF-0960D6209F0D}"
"UpgradeCode" = "8:{338C967C-EF5E-41C3-8318-3E58825E8DC2}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:0.0.9"
"ProductVersion" = "8:0.0.10"
"Manufacturer" = "8:771-8bit"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
Expand Down Expand Up @@ -769,7 +769,7 @@
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_8AC95A869D4F4F8990E7F96FC6BB6C99"
{
"SourcePath" = "8:..\\obj\\Release\\SerialMonitorEssential.exe"
"SourcePath" = "8:"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_D500F1F62B1D47B9ADF7D1117899DA7A"
Expand Down

0 comments on commit 4848262

Please sign in to comment.