private static void SetChineseCmd_Update(object sender, CommandUpdateArgs e) { if (LanguageOption.CurrentLanguage == LanguageType.Chinese) { e.Info.Checked = true; } else { e.Info.Checked = false; } }
private static void HasSolution_CanExecute(object sender, CommandUpdateArgs e) { GlobalCommandHandle.PropertyPad_ReleaseFocus_BeforSaveCmd(); if (Services.ProjectOperations.CurrentSelectedSolution != null) { e.Info.Enabled = true; } else { e.Info.Enabled = false; } }
private static void CloseCmd_CanExecute(object sender, CommandUpdateArgs args) { if (Services.ProjectOperations.CurrentSelectedSolution != null && Services.Workbench.ActiveDocument != null) { args.Info.Text = LanguageInfo.Dialog_ButtonClose + " " + Path.GetFileName(Services.Workbench.ActiveDocument.Name); args.Info.Enabled = true; } else { args.Info.Enabled = false; } }
private static void HasDocument_CanExecute(object sender, CommandUpdateArgs args) { GlobalCommandHandle.PropertyPad_ReleaseFocus_BeforSaveCmd(); if (Services.ProjectOperations.CurrentSelectedSolution == null) { args.Info.Enabled = false; } else { args.Info.Enabled = Services.Workbench.ActiveDocument != null; } }
private static void SaveCmd_CanExecute(object sender, CommandUpdateArgs args) { GlobalCommandHandle.PropertyPad_ReleaseFocus_BeforSaveCmd(); if (Services.ProjectOperations.CurrentSelectedSolution != null && Services.Workbench.ActiveDocument != null) { args.Info.Text = LanguageInfo.Command_Save + " " + Path.GetFileName(Services.Workbench.ActiveDocument.Name); if (Services.Workbench.ActiveDocument.IsDirty) { args.Info.Enabled = true; return; } } args.Info.Enabled = false; }
private static void DisableAndBypass_CanExecute(object sender, CommandUpdateArgs e) { e.Info.Bypass = true; e.Info.Enabled = false; }
private static void RedoCmd_CanExecute(object sender, CommandUpdateArgs e) { e.Info.Enabled = GlobalCommandHandle.taskService.CanRedo((object)Services.Workbench.ActiveDocument); }