Esempio n. 1
0
        private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Config.Set(plotMenuItem.Name, plotMenuItem.Checked);
            Config.Set(minMenuItem.Name, minMenuItem.Checked);
            Config.Set(maxMenuItem.Name, maxMenuItem.Checked);
            Config.Set(limitMenuItem.Name, limitMenuItem.Checked);

            Config.Set(minTrayMenuItem.Name, minTrayMenuItem.Checked);
            Config.Set(hddMenuItem.Name, hddMenuItem.Checked);

            Config.Set(voltMenuItem.Name, voltMenuItem.Checked);
            Config.Set(clocksMenuItem.Name, clocksMenuItem.Checked);
            Config.Set(loadMenuItem.Name, loadMenuItem.Checked);
            Config.Set(tempMenuItem.Name, tempMenuItem.Checked);
            Config.Set(fansMenuItem.Name, fansMenuItem.Checked);

            if (WindowState != FormWindowState.Minimized)
            {
                Config.Set("mainForm.Location.X", Location.X);
                Config.Set("mainForm.Location.Y", Location.Y);
                Config.Set("mainForm.Width", Width);
                Config.Set("mainForm.Height", Height);
            }

            sensorSystemTray.Dispose();
            notifyIcon.Dispose();

            computer.Close();
        }
Esempio n. 2
0
        private void MainForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            Config.Set(hiddenMenuItem.Name, hiddenMenuItem.Checked);
            Config.Set(plotMenuItem.Name, plotMenuItem.Checked);

            Config.Set(valueMenuItem.Name, valueMenuItem.Checked);
            Config.Set(minMenuItem.Name, minMenuItem.Checked);
            Config.Set(maxMenuItem.Name, maxMenuItem.Checked);
            Config.Set(limitMenuItem.Name, limitMenuItem.Checked);

            Config.Set(startMinMenuItem.Name, startMinMenuItem.Checked);
            Config.Set(minTrayMenuItem.Name, minTrayMenuItem.Checked);
            Config.Set(hddMenuItem.Name, hddMenuItem.Checked);

            if (WindowState != FormWindowState.Minimized)
            {
                Config.Set("mainForm.Location.X", Location.X);
                Config.Set("mainForm.Location.Y", Location.Y);
                Config.Set("mainForm.Width", Width);
                Config.Set("mainForm.Height", Height);
            }

            foreach (TreeColumn column in treeView.Columns)
            {
                Config.Set("treeView.Columns." + column.Header + ".Width",
                           column.Width);
            }

            timer.Enabled = false;

            sensorSystemTray.Dispose();
            notifyIcon.Dispose();
            computer.Close();
        }