private void BtnAdd_Click(object sender, EventArgs e) { var frm = new FormHotKey(); if (frm.ShowDialog() == DialogResult.OK) { AddHotKeyItem(frm.HotKeyItem); } }
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); } } }