Beispiel #1
0
 private void btnDdelete_Click(object sender, EventArgs e)
 {
     if (currentrecord != null)
     {
         RecordsManager.Remove(currentrecord);
     }
     Reregist();
 }
Beispiel #2
0
        private void frmSettings_Load(object sender, EventArgs e)
        {
            RecordsManager.Add(new Record {
                Id = 1, Command = "cmd", Arguments = "/C ping 217.29.30.220 -t", Modificator = Mdificator.Alt, Key = Keys.Z
            });
            RecordsManager.Add(new Record {
                Id = 2, Command = "cmd", Arguments = "/C ping 217.29.30.220 -t", Modificator = Mdificator.Control, Key = Keys.X
            });

            HotKeyRegistratorManager.Registrator = new HotKeyRegistrator();
            HotKeyRegistratorManager.Registrator.RegisterHotKeys();

            ShowChildForm(new frmDetales());
        }
Beispiel #3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (currentrecord != null)
     {
         currentrecord.Arguments   = txtParams.Text;
         currentrecord.Command     = txtPrograqmm.Text;
         currentrecord.Key         = currentkey == Keys.None?currentrecord.Key:currentkey;
         currentrecord.Modificator = GetIntBySelectedRadio();
         RecordsManager.Edit(currentrecord);
     }
     else
     {
         RecordsManager.Add(new Record {
             Modificator = GetIntBySelectedRadio(), Arguments = txtParams.Text, Command = txtPrograqmm.Text, Key = currentkey, Id = DateTime.Now.Year + DateTime.Now.Month + DateTime.Now.Day + DateTime.Now.Hour + DateTime.Now.Minute + DateTime.Now.Second
         });
     }
     Reregist();
 }