private void UpdateAttri() { if (MenuId >= MenuIdControlAssign.MenuIdMin && MenuId <= MenuIdControlAssign.MenuIdMax) { Warning = "请使用键盘设置快捷键......"; var menu = MenuComponentHolding.GetMenuItemById(MenuId); if (menu != null) { Name = menu.Text; Tooltips = menu.Tooltips; } // var eng = DataHolding.EngHolding.GetEngValue(MenuId); //var eng = I36N.Services.I36N.ConvertByCoding(MenuId.ToString());// // if (!string.IsNullOrEmpty(eng) && !eng.Equals("Missing")) // Name = eng; //if (!string.IsNullOrEmpty(eng.Item2)) // Tooltips = eng.Item2; var shortcut = ServicesShortCuts.GetShortCutValue(MenuId); if (string.IsNullOrEmpty(shortcut)) { shortcut = ""; } ShortCuts = shortcut; _backUpShortCuts = shortcut; return; } Warning = "菜单夹不允许设置快捷键!!!!!!"; Tooltips = ""; Name = "菜单夹不允许设置快捷键!!!!!!"; ShortCuts = ""; }
protected void ExCmdClean() //保存快捷键 { _bolCanSaveAll = true; ServicesShortCuts.UpdateShortCut(MenuId, ""); _backUpShortCuts = ""; ShortCuts = ""; this.UpdateAttri(); }
protected void Ex() //保存快捷键 { _dtOk = DateTime.Now; //var fff = new DataHoldingExtend.MenuShortCutsHoldingExtend(); //fff.AddShortCut(MenuId, ShortCuts); //fff.WriteUpdateDb(MenuId); ServicesShortCuts.UpdateShortCut(MenuId, ShortCuts); _backUpShortCuts = ShortCuts; }
protected void ExSaveAll() //保存快捷键 { _dtSave = DateTime.Now; _bolCanSaveAll = false; //var fff = new DataHoldingExtend.MenuShortCutsHoldingExtend(); //fff.AddShortCut(MenuId, ShortCuts); //fff.WriteUpdateDb(); ServicesShortCuts.UpdateShortCut(MenuId, ShortCuts); _backUpShortCuts = ShortCuts; //EventPublish.PublishEvent(new PublishEventArgs() //{ // EventId = EventIdAssign.MainMenuInstanceUpdateId, // EventType = PublishEventType.Core, //}); }