Exemple #1
0
        void AdditionalTimingClick(object sender, EventArgs e)
        {
            // Get the current value from the database
            Classes.Database d = new SuperPutty.Classes.Database();
            d.Open();
            string key = "additional_timing";
            bool   val = false;

            val = d.GetKey(key) == "" ? false : bool.Parse(d.GetKey(key));

            // If the value is true, then set it to false and uncheck menu item,
            // else, set it to true.
            if (val)
            {
                val = false;
            }
            else
            {
                val = true;
            }

            // Set the menu item check state.
            this.additionalTiming.Checked = val;

            // Update the database
            d.SetKey(key, val.ToString());
        }
Exemple #2
0
 void ToolbarViewSessionsClick(object sender, EventArgs e)
 {
     if (m_Sessions.Visible == false)
     {
         showSessionTreeview();
         Classes.Database d = new SuperPutty.Classes.Database();
         d.Open();
         d.SetKey("ShowSessionTreeview", "true");
     }
 }
Exemple #3
0
        private void firstTimeAutomaticUpdateCheck()
        {
            // Get the current value from the database
            Classes.Database d = new SuperPutty.Classes.Database();
            d.Open();
            string key = "automatic_update_check";
            string val = d.GetKey(key);

            // If the value hasnt been set, then the user has not chosen.
            if (val == "")
            {
                bool enabled = false;
                if (MessageBox.Show("Do you wish to enable automatic update checks?", "SuperPutty", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    enabled = true;
                }

                // Store the users decision
                d.SetKey(key, enabled.ToString());

                MessageBox.Show("You may enable/disable automatic update checks by navigating to the File->Settings menu.", "SuperPutty", MessageBoxButtons.OK);
            }
        }
 void SessionTreeviewFormClosed(object sender, FormClosedEventArgs e)
 {
     Classes.Database d = new SuperPutty.Classes.Database();
         d.Open();
         d.SetKey("ShowSessionTreeview", "false");
 }
 void ToolbarViewSessionsClick(object sender, EventArgs e)
 {
     if (m_Sessions.Visible == false)
     {
         showSessionTreeview();
         Classes.Database d = new SuperPutty.Classes.Database();
         d.Open();
         d.SetKey("ShowSessionTreeview", "true");
     }
 }
        private void firstTimeAutomaticUpdateCheck()
        {
            // Get the current value from the database
            Classes.Database d = new SuperPutty.Classes.Database();
            d.Open();
            string key = "automatic_update_check";
            string val = d.GetKey(key);

            // If the value hasnt been set, then the user has not chosen.
            if (val == "")
            {
                bool enabled = false;
                if (MessageBox.Show("Do you wish to enable automatic update checks?", "SuperPutty", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    enabled = true;
                }

                // Store the users decision
                d.SetKey(key, enabled.ToString());

                MessageBox.Show("You may enable/disable automatic update checks by navigating to the File->Settings menu.", "SuperPutty", MessageBoxButtons.OK);
            }
        }
        void AutomaticUpdateCheckToolStripMenuItemClick(object sender, EventArgs e)
        {
            // Get the current value from the database
            Classes.Database d = new SuperPutty.Classes.Database();
            d.Open();
            string key = "automatic_update_check";
            bool val = false;
            val = d.GetKey(key) == "" ? false : bool.Parse(d.GetKey(key));

            // If the value is true, then set it to false and uncheck menu item,
            // else, set it to true.
            if (val)
            {
                val = false;
            }
            else
            {
                val = true;
            }

            // Set the menu item check state.
            this.automaticUpdateCheckToolStripMenuItem.Checked = val;

            // Update the database
            d.SetKey(key, val.ToString());
        }
Exemple #8
0
 void SessionTreeviewFormClosed(object sender, FormClosedEventArgs e)
 {
     Classes.Database d = new SuperPutty.Classes.Database();
     d.Open();
     d.SetKey("ShowSessionTreeview", "false");
 }