Example #1
0
        private void emailSettingsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            emailSettings es2 = new emailSettings();

            es2.selectTab(0);
            es2.ShowDialog();
        }
Example #2
0
        // ------------------------------------------------------------------------------------------- //
        private void btn_emailSettings_Click(object sender, EventArgs e)
        {
            // Settings button pressed
            Form eS = new emailSettings();

            eS.ShowDialog();
        }
Example #3
0
        public mainForm()
        {
            InitializeComponent();
            this.MaximizeBox = false;
            // If it's the first time the program has run, specify a default password into the config,
            // And display an informational message.

            /* If you have downloaded this from GitHub, please modify StringEncryption.cs, and provide
             * an encryption key. Then modify the next line of code with Password using a password generated
             * with your key! Otherwise the program won't be able to decrypt it.
             */
            if (Properties.Settings.Default.firstRun == true)
            {
                Properties.Settings.Default.Password = ""; // <--- Modify this!
                Properties.Settings.Default.Save();
                DialogResult results = MessageBox.Show("You must configure settings before running this application", "Battery Notification", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);
                if (results == DialogResult.OK)
                {
                    // If the "OK" button is pressed.
                    emailSettings eS = new emailSettings();
                    eS.ShowDialog();
                }
                else
                {
                    // If the 'Cancel' button is pressed'.
                    Environment.Exit(0);
                }
            }
            // Set the initial power status label.
            if (System.Windows.Forms.SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Offline)
            {
                lbl_status.Text = "Battery Power";
                logging.writeLog("Application started, computer on battery power.");
            }
            else
            {
                lbl_status.Text = "Main Power";
                logging.writeLog("Application started, computer on main power");
            }
        }