private void FrmAeroSideBar_FormClosing(object sender, FormClosingEventArgs e) { hiddenBar.Close(); try { StreamWriter outfile = new StreamWriter(notePath); outfile.Write(txtNote.Text); outfile.Close(); } catch { MessageBox.Show("Barn's SideBar: Error: Couldn't wrote .note-file at: " + notePath, "Barn's SideBar: Error writing .note", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void FrmAeroSideBar_FormClosing(object sender, FormClosingEventArgs e) { hiddenBar.Close(); try { StreamWriter outfile = new StreamWriter(notePath); outfile.Write(txtNote.Text); outfile.Close(); } catch { MessageBox.Show("Barn's SideBar: ERROR: Couldn't write note to file: " + notePath); } }