//------------------------------------------------------------- /// <summary> /// フォームが閉じられた時 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Form1_FormClosed(object sender, FormClosedEventArgs e) { //設定ファイルの保存 PrefFile pref = new PrefFile(); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.Save(); }
protected override void OnFormClosed(FormClosedEventArgs e) { base.OnFormClosed(e); PrefFile pref = new PrefFile(); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.Save(); }
//------------------------------------------------------------- /// <summary> /// フォームが閉じられた時 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { //設定ファイルの保存 PrefFile pref = new PrefFile(); pref.SetSize("Size", this.Size); pref.SetPoint("Point", this.Location); pref.SetNum("index", memoEditList1.SelectedMemoIndex); pref.SetStr("font", memoEditList1.TextFont.Name); pref.SetNum("fontsize", memoEditList1.TextFont.Size); pref.SetBool("IsEncodeUTF-8", encodeUTF8CMenu.Checked); pref.Save(); string pp = Path.Combine(pref.PrefFolder, "Memos.json"); memoEditList1.SaveAll(pp); }