Example #1
0
        public static WorkSurfaceContextViewModel CreateResourceViewModel(IContextualResourceModel resourceModel, bool createDesigner = true)
        {
            var key = WorkSurfaceKeyFactory.CreateKey(resourceModel);

            var workSurfaceVm = new WorkflowDesignerViewModel(resourceModel, createDesigner);

            var contextVm = new WorkSurfaceContextViewModel(key, workSurfaceVm)
            {
                DataListViewModel = DataListViewModelFactory.CreateDataListViewModel(resourceModel)
            };

            return(contextVm);
        }
        public static WorkSurfaceContextViewModel CreateResourceViewModel(IContextualResourceModel resourceModel, bool createDesigner, IPopupController popupController, IAsyncWorker asyncWorker)
        {
            var key = WorkSurfaceKeyFactory.CreateKey(resourceModel);

            var workSurfaceVm = new WorkflowDesignerViewModel(EventPublishers.Aggregator, resourceModel, new WorkflowHelper(), popupController, asyncWorker, createDesigner);

            var contextVm = new WorkSurfaceContextViewModel(key, workSurfaceVm)
            {
                DataListViewModel = DataListViewModelFactory.CreateDataListViewModel(resourceModel)
            };

            return(contextVm);
        }