private void CardMakerMDI_FormClosing(object sender, FormClosingEventArgs e) { CardMakerSettings.IniManager.AutoFlush = false; CardMakerSettings.IniManager.SetValue(Name, IniManager.GetFormSettings(this)); foreach (Form zForm in MdiChildren) { CardMakerSettings.IniManager.SetValue(zForm.Name, IniManager.GetFormSettings(zForm)); CardMakerSettings.IniManager.SetValue(zForm.Name + CardMakerConstants.VISIBLE_SETTING, zForm.Visible.ToString()); } var zBuilder = new StringBuilder(); var dictionaryFilenames = new Dictionary <string, object>(); foreach (string sFile in m_listRecentFiles) { string sLowerFile = sFile.ToLower(); if (dictionaryFilenames.ContainsKey(sLowerFile)) { continue; } dictionaryFilenames.Add(sLowerFile, null); zBuilder.Append(sFile + CardMakerConstants.CHAR_FILE_SPLIT); } CardMakerSettings.IniManager.SetValue(IniSettings.PreviousProjects, zBuilder.ToString()); CardMakerSettings.IniManager.FlushIniSettings(); SaveOnClose(e); }
private void exitMainToolStripMenuItem_Click(object sender, EventArgs e) { m_bRun = false; if (WindowState == FormWindowState.Minimized) { WindowState = m_ePrevWindowState; } KeyCaptureLib.Shutdown(); m_zIniManager.SetValue(Name, IniManager.GetFormSettings(this)); Close(); }