Exemplo n.º 1
0
 private static void SetChineseCmd_Update(object sender, CommandUpdateArgs e)
 {
     if (LanguageOption.CurrentLanguage == LanguageType.Chinese)
     {
         e.Info.Checked = true;
     }
     else
     {
         e.Info.Checked = false;
     }
 }
Exemplo n.º 2
0
 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;
     }
 }
Exemplo n.º 3
0
 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;
     }
 }
Exemplo n.º 4
0
 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;
     }
 }
Exemplo n.º 5
0
 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;
 }
Exemplo n.º 6
0
 private static void DisableAndBypass_CanExecute(object sender, CommandUpdateArgs e)
 {
     e.Info.Bypass  = true;
     e.Info.Enabled = false;
 }
Exemplo n.º 7
0
 private static void RedoCmd_CanExecute(object sender, CommandUpdateArgs e)
 {
     e.Info.Enabled = GlobalCommandHandle.taskService.CanRedo((object)Services.Workbench.ActiveDocument);
 }