private void AddMenus(JaneScript js, bool? ascending) { MenuItem menu1 = js.InsertMenu(MenuNames.MainWnd_MainMenu, "MenuThre", js.MenuIndex(MenuNames.MainWnd_MainMenu, "N28")); MenuItem menu2 = js.InsertMenu(MenuNames.MainWnd_ThreadPopupMenu, "", js.MenuIndex(MenuNames.MainWnd_ThreadPopupMenu, "N9")); this.RegisterMenu(js, menu1, ascending); this.RegisterMenu(js, menu2, ascending); }
private void AddMenu(JaneScript js, string name, Action<MenuItem, PopupTargetInfo> handler) { MenuItem menu1 = js.InsertMenu(MenuNames.MainWnd_ThreadPopupMenu, "", 1000); menu1.Caption = name; menu1.OnClick = handler; base.PersistMenuItem(menu1); }