Пример #1
0
        private void saveButton_Click(object sender, EventArgs e)
        {
            if (this.runCheckBox.CheckState == CheckState.Checked)
            {
                UtilHelps.AddWhenStart();
            }
            else
            {
                UtilHelps.RemoveWhenStart();
            }

            //DrawTools.DrawSettings.Quality = this.trackBar1.Value;
            DrawTools.DrawSettings.LastUsedColor    = (Color)this.colorComboBox.SelectedItem;
            DrawTools.DrawSettings.LastUsedPenWidth = (int)this.penWidthComboBox.SelectedItem;
            DrawTools.DrawSettings.LastUsedTextSize = (int)this.textsizeComboBox.SelectedItem;

            DrawTools.DrawSettings.Save();

            Config.KeyCode    = Hotkey2.KeyCodeToString(((Keys)hotKeyComboBox.SelectedItem));
            Config.ShiftKey   = shiftCheckBox.Checked;
            Config.ControlKey = controlCheckBox.Checked;
            Config.AltKey     = altCheckBox.Checked;
            Config.WindowsKey = windowsCheckBox.Checked;
            Config.Save();

            ProxyForm.Instance.AppContext.ShowBalloonTip();

            this.Hide();
        }
        /// <summary>
        /// This class should be created and passed into Application.Run( ... )
        /// </summary>
        public CoolShotApplicationContext()
        {
            InitializeContext();

            if (UtilHelps.IsFirstRunApp())
            {
                UtilHelps.AddWhenStart();
            }
        }