/// <summary> /// 从栏目中删除一个文件 /// </summary> /// <param name="file">文件对象</param> /// <param name="whotkey">热键管理</param> public void DeleteSubItem(ItemSubInfo file, WinHotKey whotkey) { //在删除的同时注销掉热键 if (file.HotKey != null) { whotkey.UnSetHotKey(file.HotKey); } this.SubItems.Remove(file); }
/// <summary> /// 向栏目中添加一个文件 /// </summary> /// <param name="file">文件对象</param> /// <param name="whotkey">热键管理</param> public void AddSubItem(ItemSubInfo file, WinHotKey whotkey) { //在添加的同时注册热键,主要作用于复制 if (file.HotKey != null) { whotkey.SetHotKey(file.HotKey); } this.SubItems.Add(file); }
public SetHotKeyForm(ItemSubInfo f, WinHotKey w) { InitializeComponent(); //相等 this.fi = f; this.wHotKey = w; //设置语言 lang.SetLanguage(this); }
public Settings(IntPtr Handle) { //设置为默认值 this.Category = new Category(); this.FirstRun = true; this.Location = new Point(0, 0); this.ManagerStyle = eStyle.Metro; this.ManagerColorTint = Color.White; this.ButtonCheckedIndex = 0; this.LoadPlugin = true; this.DoubleClickRun = false; this.LinkDragRemove = true; this.TopMost = true; this.LCID = 0; this.HotKey = new HotKey(); this.HotKey.Modifiers = WinHotKey.KeyModifiers.Alt; this.HotKey.Key = Keys.D1; this.WinHotKey = new WinHotKey(Handle); this.WinHotKey.SetHotKey(this.HotKey); this.MainPanelItems = new List <ItemSubInfo>(); }