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 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; }