private void controller_CustomizeWindowCaption(object sender, CustomizeWindowCaptionEventArgs e)
 {
     if (Frame.View != null && Frame.View.ObjectSpace.IsModified)
     {
         e.WindowCaption.FirstPart = DirtyMark + e.WindowCaption.FirstPart;
     }
 }
 private void windowTemplateController_CustomizeWindowCaption(object sender, CustomizeWindowCaptionEventArgs e){
     if (Enabled() && e.WindowCaption.FirstPart != null){
         e.WindowCaption.FirstPart = e.WindowCaption.FirstPart.TrimStart(DirtyMark);
         if (Window.View.ObjectSpace.IsModified){
             e.WindowCaption.FirstPart = String.Format("{0} {1}", DirtyMark, e.WindowCaption.FirstPart);
         }
     }
 }
Beispiel #3
0
 void controller_CustomizeWindowCaption(object sender, CustomizeWindowCaptionEventArgs e)
 {
     if (emp != null && emp.Compania != null)
     {
         e.WindowCaption.Text = string.Format("iCPAC, Facturador: {0}",
                                              emp.Compania.Nombre);
     }
 }
 private void windowTemplateController_CustomizeWindowCaption(object sender, CustomizeWindowCaptionEventArgs e)
 {
     if (Enabled())
     {
         e.WindowCaption.FirstPart = e.WindowCaption.FirstPart.TrimStart(DirtyMark);
         if (Window.View.ObjectSpace.IsModified)
         {
             e.WindowCaption.FirstPart = String.Format("{0} {1}", DirtyMark, e.WindowCaption.FirstPart);
         }
     }
 }
 private void windowTemplateController_CustomizeWindowCaption(object sender, CustomizeWindowCaptionEventArgs e)
 {
     if (Enabled() && e.WindowCaption.FirstPart != null)
     {
         e.WindowCaption.FirstPart = e.WindowCaption.FirstPart.TrimStart(DirtyMark);
         if (Window.View.ObjectSpace.IsModified)
         {
             e.WindowCaption.FirstPart = $"{DirtyMark} {e.WindowCaption.FirstPart}";
         }
     }
 }
 //  онтроллер выводит данные организации в заголовке окна
 void WindowTemplateController_CustomizeWindowCaption(object sender, CustomizeWindowCaptionEventArgs e)
 {
     if (Application.MainWindow != null)
      {
          DevExpress.ExpressApp.View view = Application.MainWindow.View;
          if (view != null)
          {
              if (view.Id == "Workspace")
              {
                  var organization = OrganizationLogic.GetInstance(Application.MainWindow.View.ObjectSpace);
                  if (organization != null)
                  {
                      string name = organization.OrganizationName;
                      if (String.IsNullOrEmpty(name) == true)
                          e.WindowCaption.FirstPart = MitsarDataStudio.Common.Strings.ApplicationMainWindow_DefaultCaption;
                      else
                          e.WindowCaption.FirstPart = name;
                  }
              }
          }
      }
 }