示例#1
0
 private async void btnAdd_Click(object sender, EventArgs e)
 {
     frmShortKey frm = new frmShortKey();
     frm.SetShortKey(new ShortKey(), true);
     if (frm.ShowDialog() == DialogResult.OK)
     {
         await ShortKeyConfiguration.AddShortKey(frm.GetShortKey());
         RefreshAll();
     }
 }
示例#2
0
        private async void btnAdd_Click(object sender, EventArgs e)
        {
            frmShortKey frm = new frmShortKey();

            frm.SetShortKey(new ShortKey(), true);
            if (frm.ShowDialog() == DialogResult.OK)
            {
                await ShortKeyConfiguration.AddShortKey(frm.GetShortKey());

                RefreshAll();
            }
        }
示例#3
0
 private async void btnEdit_Click(object sender, EventArgs e)
 {
     if (gridShortKeys.SelectedRows.Count > 0)
     {
         frmShortKey frm = new frmShortKey();
         frm.SetShortKey(GetSelectedItem(), false);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             await ShortKeyConfiguration.UpdateShortKey(frm.GetShortKey());
             RefreshAll();
         }
     }
 }
示例#4
0
        private async void btnEdit_Click(object sender, EventArgs e)
        {
            if (gridShortKeys.SelectedRows.Count > 0)
            {
                frmShortKey frm = new frmShortKey();
                frm.SetShortKey(GetSelectedItem(), false);
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    await ShortKeyConfiguration.UpdateShortKey(frm.GetShortKey());

                    RefreshAll();
                }
            }
        }