Пример #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            ConfigSave config = Program.MainForm.Config;

            config.Modifiers     = (KeyModifiers)cmbModifiers.SelectedValue;
            config.HotKey        = (Keys)cmbKeys.SelectedValue;
            config.Side          = (int)txtSide.Value;
            config.ShowTime      = (int)txtShow.Value;
            config.ReadModifiers = (KeyModifiers)cmbReadModifiers.SelectedValue;
            config.ReadHotKey    = (Keys)cmbReadKeys.SelectedValue;
            config.FormModifiers = (KeyModifiers)cmbFormModifiers.SelectedValue;
            config.FormHotKey    = (Keys)cmbFormKeys.SelectedValue;
            //config.ListenClipboard = chkListen.Checked;
            config.Password       = txtPwd.Text;
            config.HasPointLine   = chkPoint.Checked;
            config.BackSetColor   = btnBackColor.BackColor;
            config.TextSetColor   = btnTextColor.BackColor;
            config.Twist          = (int)nupTwist.Value;
            config.QRBackSetColor = btnQRBackColor.BackColor;
            config.QRSetColor     = btnQRTextColor.BackColor;
            config.TextFont       = GetSelectFont();
            config.LineCount      = (int)nudLineCount.Value;
            Program.MainForm.ReSetConfig();
            config.SaveConfig();
            this.Close();
        }
Пример #2
0
 /// <summary>
 /// 保存选中的项
 /// </summary>
 private void SaveSelectItem()
 {
     for (int i = 0; i < _toolItems.Length; i++)
     {
         if (_toolItems[i].Checked)
         {
             try
             {
                 _config.OutItem = i;
             }
             catch { }
             break;
         }
     }
     _config.SaveConfig();
 }