public static void ReadSettingsFromTab(CloseActPluginMain p) { cfg = new bool[] { p.SettingsCtr.ChkMinimize.Checked, p.SettingsCtr.ChkClose.Checked, p.SettingsCtr.ChkClear.Checked, p.SettingsCtr.ChkSingleton.Checked }; }
public static void SaveToFile(CloseActPluginMain p) { String settingsFile = Path.Combine(ActGlobals.oFormActMain.AppDataFolder.FullName, "Config\\CloseActPlugin.dat"); try { String s = String.Join(",", cfg); File.WriteAllText(settingsFile, s); } catch (Exception e) { MessageBox.Show(e.Message, "Error occurred during attempt to save settings", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static void ReadFromFile(CloseActPluginMain p) { String settingsFile = Path.Combine(ActGlobals.oFormActMain.AppDataFolder.FullName, "Config\\CloseActPlugin.dat"); try { String[] s = File.ReadAllText(settingsFile).Split(','); for (int i = 0; i < s.Length; i++) { cfg[i] = Boolean.Parse(s[i]); } } catch (Exception) { } p.SettingsCtr.ChkMinimize.Checked = GetMinimizeEnabled(); p.SettingsCtr.ChkClose.Checked = GetCloseEnabled(); p.SettingsCtr.ChkClear.Checked = GetClearEnabled(); p.SettingsCtr.ChkSingleton.Checked = GetSingletonEnabled(); }
public CloseWorker(CloseActPluginMain c) { this.c = c; }
public SettingsPage(CloseActPluginMain p) { InitializeComponent(); this.p = p; }