Ejemplo n.º 1
0
        public static IModelBaseChoiceActionItem Model(this ChoiceActionItem choiceActionItem)
        {
            var modelAction = ((SingleChoiceAction)choiceActionItem.GetPropertyValue("Owner")).Model;
            var nodePath    = choiceActionItem.GetIdPath();

            return((IModelBaseChoiceActionItem)modelAction.ChoiceActionItems.FindNodeByPath(nodePath));
        }
Ejemplo n.º 2
0
 public ASPxMenuItemChoiceActionItem(SingleChoiceAction action, ChoiceActionItem item)
     : base(item, action)
 {
     _currentAction  = action;
     CurrentMenuItem = new MenuItem {
         Name = item.GetIdPath()
     };
     SyncronizeWithItem();
 }
 private void UpdateItem(ChoiceActionItem item, SingleChoiceAction action){
     var nodePath = item.GetIdPath();
     var modelChoiceActionItemActive = action.Model.ChoiceActionItems.FindNodeByPath(nodePath) as IModelChoiceActionItemActive;
     if (modelChoiceActionItemActive != null && modelChoiceActionItemActive.Active!=null) {
         item.Active.BeginUpdate();
         item.Active[GetType().Name] = modelChoiceActionItemActive.Active.Value;
         item.Active.EndUpdate();
     }
 }
Ejemplo n.º 4
0
 public ASPxMenuItemChoiceActionItem(SingleChoiceAction action, ChoiceActionItem item)
     : base(item, action)
 {
     CurrentAction   = action;
     CurrentMenuItem = new DevExpress.Web.MenuItem {
         Name = item.GetIdPath()
     };
     //SyncronizeWithItem();
     SynchronizeWithItem();
 }
        private void UpdateItem(ChoiceActionItem item, SingleChoiceAction action)
        {
            var nodePath = item.GetIdPath();
            var modelChoiceActionItemActive = action.Model.ChoiceActionItems.FindNodeByPath(nodePath) as IModelChoiceActionItemActive;

            if (modelChoiceActionItemActive != null && modelChoiceActionItemActive.Active != null)
            {
                item.Active.BeginUpdate();
                item.Active[GetType().Name] = modelChoiceActionItemActive.Active.Value;
                item.Active.EndUpdate();
            }
        }
Ejemplo n.º 6
0
 public ASPxMenuItemChoiceActionItem(SingleChoiceAction action, ChoiceActionItem item)
     : base(item, action){
     _currentAction = action;
     CurrentMenuItem = new MenuItem{Name = item.GetIdPath()};
     SyncronizeWithItem();
 }