Exemplo n.º 1
0
 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
     };
 }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
 public CloseWorker(CloseActPluginMain c)
 {
     this.c = c;
 }
Exemplo n.º 5
0
 public SettingsPage(CloseActPluginMain p)
 {
     InitializeComponent();
     this.p = p;
 }