public AddToolStripItemCommand() { ExcuteHandler = () => { string groupId = GetArgument(); if (String.IsNullOrEmpty(groupId)) { Debug.Assert(false, "groupId 为空"); return; } //if (String.IsNullOrEmpty(groupId) == false) //{ // //工具栏项目暂不支持多级 // MessageBox.Show(Language.Current.Explorer_Commands_AddToolStripItemCommand_NotSupportSubItem, // CommonLanguage.Current.MessageCaption_Notice, MessageBoxButtons.OK, MessageBoxIcon.Information); // return; //} using (ToolStripItemEditView view = new ToolStripItemEditView(groupId)) { view.ShowDialog(); } }; }
public EditToolStripItemCommand() { ExcuteHandler = () => { ToolStripItemAbstract entity = GetArgument(); if (entity == null) { return; } using (ToolStripItemEditView view = new ToolStripItemEditView(entity.GroupId)) { view.ToolStripElement = entity; view.ShowDialog(); } }; }