void CustomProcessSelectedItem(LogicRuleInfo info, IObjectViewRule objectViewRule) {
     var customProcessListViewSelectedItemEventArgs = ((CustomProcessListViewSelectedItemEventArgs) info.EventArgs);
     var type = objectViewRule.ObjectView.ModelClass.TypeInfo.Type;
     var collectionSource = Application.CreateCollectionSource(Application.CreateObjectSpace(type), type,objectViewRule.ObjectView.Id);
     var showViewParameters = customProcessListViewSelectedItemEventArgs.InnerArgs.ShowViewParameters;
     showViewParameters.CreatedView = Application.CreateListView((IModelListView) objectViewRule.ObjectView,collectionSource, true);
     customProcessListViewSelectedItemEventArgs.Handled = true;
 }
        void ProcessActions(LogicRuleInfo info, IObjectViewRule objectViewRule)
        {
            var createdView = ((ActionBaseEventArgs)info.EventArgs).ShowViewParameters.CreatedView;

            if (createdView.Model.GetType() == objectViewRule.ObjectView.GetType())
            {
                createdView.SetModel(objectViewRule.ObjectView);
            }
        }
Example #3
0
        void CustomProcessSelectedItem(LogicRuleInfo info, IObjectViewRule objectViewRule)
        {
            var customProcessListViewSelectedItemEventArgs = ((CustomProcessListViewSelectedItemEventArgs)info.EventArgs);
            var type               = objectViewRule.ObjectView.ModelClass.TypeInfo.Type;
            var collectionSource   = Application.CreateCollectionSource(Application.CreateObjectSpace(type), type, objectViewRule.ObjectView.Id);
            var showViewParameters = customProcessListViewSelectedItemEventArgs.InnerArgs.ShowViewParameters;

            showViewParameters.CreatedView = Application.CreateListView((IModelListView)objectViewRule.ObjectView, collectionSource, true);
            customProcessListViewSelectedItemEventArgs.Handled = true;
        }
        void CustomProcessSelectedItem(LogicRuleInfo info, IObjectViewRule objectViewRule)
        {
            var customProcessListViewSelectedItemEventArgs = ((CustomProcessListViewSelectedItemEventArgs)info.EventArgs);
            var showViewParameters = customProcessListViewSelectedItemEventArgs.InnerArgs.ShowViewParameters;

            showViewParameters.CreatedView = Application.CreateView(objectViewRule.ObjectView);
            if (showViewParameters.CreatedView is DetailView)
            {
                showViewParameters.CreatedView.CurrentObject = showViewParameters.CreatedView.ObjectSpace.GetObject(View.CurrentObject);
            }
            customProcessListViewSelectedItemEventArgs.Handled = true;
        }
Example #5
0
        void CustomizeShowViewParameters(LogicRuleInfo info, IObjectViewRule objectViewRule)
        {
            var customizeShowViewParametersEventArgs = ((CustomizeShowViewParametersEventArgs)info.EventArgs);
            var createdView = customizeShowViewParametersEventArgs.ShowViewParameters.CreatedView;

            if (createdView is DetailView)
            {
                _defaultObjectView = createdView.Model;
                customizeShowViewParametersEventArgs.ShowViewParameters.Controllers.Add(new InfoController(true)
                {
                    Model = _defaultObjectView
                });
                createdView.SetModel(objectViewRule.ObjectView);
            }
        }
 void CustomizeShowViewParameters(LogicRuleInfo info, IObjectViewRule objectViewRule) {
     var customizeShowViewParametersEventArgs = ((CustomizeShowViewParametersEventArgs) info.EventArgs);
     var createdView = customizeShowViewParametersEventArgs.ShowViewParameters.CreatedView;
     if (createdView is DetailView) {
         _defaultObjectView = createdView.Model;
         customizeShowViewParametersEventArgs.ShowViewParameters.Controllers.Add(new InfoController(true){
             Model = _defaultObjectView
         });
         createdView.SetModel(objectViewRule.ObjectView);
     }
 }
 void ProcessActions(LogicRuleInfo info, IObjectViewRule objectViewRule) {
     var createdView = ((ActionBaseEventArgs)info.EventArgs).ShowViewParameters.CreatedView;
     if (createdView.Model.GetType() == objectViewRule.ObjectView.GetType())
         createdView.SetModel(objectViewRule.ObjectView);
 }
Example #8
0
 public static string Get_ActionExecutionContextGroup(IObjectViewRule objectViewRule)
 {
     return(ObjectViewActionExecutionContextsGroupNodeUpdater.ObjectViewActionContext);
 }