Ejemplo n.º 1
0
        private NetAction AddASubButton(StateButton subButton, IActionDelegate actionDelegate, NetAction action)
        {
            if (subButton.Key == string.Empty)
            {
                return(null);
            }

            NetAction subAction = new NetAction(subButton.Key, subButton.Key == "ViewStyle" ? null : actionDelegate);

            subAction.Text        = subButton.Caption;
            subAction.IsEnabled   = subButton.IsEnable;
            subAction.IsVisible   = subButton.Visible;
            subAction.ToolTipText = subButton.ToolTip;
            subAction.Image       = subButton.Image;
            subAction.SetGroup    = subButton.SetGroup;
            subAction.Catalog     = subButton.Category;
            subAction.Style       = subButton.ButtonStyle;
            subAction.IsChecked   = subButton.IsChecked;
            if (subAction.Id == this.ReportViewControl.CurrentID)
            {
                subAction.IsChecked = true;
            }
            subAction.Tag = action;


            subButton.VisibleChanged -= new VisibleChangedHandler(StateButtonVisibleChanged);
            subButton.VisibleChanged += new VisibleChangedHandler(StateButtonVisibleChanged);

            action.Actions.Add(subAction);
            return(subAction);
        }
Ejemplo n.º 2
0
 private void RunAllActions(List <IAction> actions, IActionDelegate i)
 {
     foreach (var item in actions)
     {
         i.Invoke(item);
     }
 }
Ejemplo n.º 3
0
 private void AddSubButtons(StateButton sb, IActionDelegate actionDelegate, NetAction action)
 {
     foreach (StateButton subButton in sb.Buttons)
     {
         NetAction subaction = AddASubButton(subButton, actionDelegate, action);
         AddSubButtons(subButton, actionDelegate, subaction);
     }
 }