private void ActionControlsSiteController_CustomizeActionControl(object sender, ActionControlEventArgs e)
 {
     if (e.ActionControl.ActionId == "act_HistDateFilter")
     {
         BarEditItem barItem = (BarEditItem)e.ActionControl.NativeControl;
         barItem.Edit.EditValueChanged += Edit_EditValueChanged;
     }
 }
Esempio n. 2
0
 private void SiteController_CustomizeActionControl(object sender, ActionControlEventArgs e)
 {
     if (e.ActionControl is BarEditItemParametrizedActionControl control)
     {
         if (control.BarItem.Edit is RepositoryItemDateEdit dateEdit)
         {
             var executeButton = RepositoryItemButtonEditAdapter.FindExecuteButton(dateEdit);
             if (executeButton != null)
             {
                 executeButton.Visible = false;
             }
         }
     }
 }
 private void ActionControlsSiteController_CustomizeActionControl(object sender, ActionControlEventArgs e)
 {
     if ((Frame.Template is RibbonForm) && needWordWrapActionsId.Contains(e.ActionControl.ActionId) && (e.ActionControl.NativeControl is BarButtonItem))
     {
         BarItemLink barItemLink = GetBarItemLinkForBarItem((IActionControlsSite)Frame.Template, (BarItem)e.ActionControl.NativeControl);
         if ((barItemLink != null) && (!barItemLink.IsLinkInMenu))
         {
             barItemLink.UserCaption = barItemLink.Item.Caption.Replace(' ', '\n');
         }
     }
     if (beginGroupActionsId.Contains(e.ActionControl.ActionId) && (e.ActionControl.NativeControl is BarItem))
     {
         BarItemLink barItemLink = GetBarItemLinkForBarItem((IActionControlsSite)Frame.Template, (BarItem)e.ActionControl.NativeControl);
         if (barItemLink != null)
         {
             barItemLink.BeginGroup = true;
         }
     }
 }
Esempio n. 4
0
 private void ActionControlsSiteController_CustomizeActionControl(object sender, ActionControlEventArgs e)
 {
     if ((Frame.Template is RibbonForm) && needWordWrapActionsId.Contains(e.ActionControl.ActionId) && (e.ActionControl.NativeControl is BarButtonItem))
     {
         BarItemLink barItemLink = GetBarItemLinkForBarItem((IActionControlsSite)Frame.Template, (BarItem)e.ActionControl.NativeControl);
         if ((barItemLink != null) && (!barItemLink.IsLinkInMenu))
         {
             barItemLink.UserCaption = barItemLink.Item.Caption.Replace(' ', '\n');
         }
     }
     if (beginGroupActionsId.Contains(e.ActionControl.ActionId) && (e.ActionControl.NativeControl is BarItem))
     {
         BarItemLink barItemLink = GetBarItemLinkForBarItem((IActionControlsSite)Frame.Template, (BarItem)e.ActionControl.NativeControl);
         if (barItemLink != null)
         {
             barItemLink.BeginGroup = true;
         }
     }
     if (e.ActionControl.ActionId == "FindBySubjectAction")
     {
         BarEditItem barEditItem = e.ActionControl.NativeControl as BarEditItem;
         if (barEditItem != null)
         {
             RepositoryItemButtonEdit edit = barEditItem.Edit as RepositoryItemButtonEdit;
             if (edit != null)
             {
                 EditorButton executeButton = edit.Buttons.FirstOrDefault(x => (string)x.Tag == "ExecuteButton");
                 if (executeButton != null)
                 {
                     executeButton.Kind = ButtonPredefines.Search;
                 }
             }
         }
     }
 }