private void FormMain_FormClosing(object sender, FormClosingEventArgs e) { e.Cancel = false == SaveAll(); if (e.Cancel) { return; } if (false == LoadCancel) { ConfigEditor.FormMainLocation = this.Location; ConfigEditor.FormMainSize = this.Size; ConfigEditor.FormMainState = this.WindowState; ConfigEditor.FormErrorLocation = FormError.Location; ConfigEditor.FormErrorSize = FormError.Size; ConfigEditor.FormErrorState = FormError.WindowState; SaveConfig(); } FormDefine?.Dispose(); FormDefine = null; FormError.Dispose(); FormMain.Instance = null; }
public FormMain() { InitializeComponent(); LoadConfigEditor(); PropertyManager = new Property.Manager(); FormError = new FormError(); FormPopupListBox = new FormPopupListBox(); Instance = this; }