示例#1
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            var frm = new FormHotKey();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                AddHotKeyItem(frm.HotKeyItem);
            }
        }
示例#2
0
 private void FLPHotKeys_DragDrop(object sender, DragEventArgs e)
 {
     if (e.Data.GetData(DataFormats.FileDrop) is Array files && files.Length > 0)
     {
         var filepath = files.GetValue(0) as string;
         var frm      = new FormHotKey
         {
             HotKeyItem = new HotKeyItem
             {
                 StartupPath = filepath,
             }
         };
         if (frm.ShowDialog() == DialogResult.OK)
         {
             AddHotKeyItem(frm.HotKeyItem);
         }
     }
 }