public MainPageViewModel(IWebInterAction webAct) { WebInterAct = webAct; this.AddNewCommand = new RelayCommand<WorkflowInfo>(this.AddNewCommandExecuted, p => { return true; }); }
public WorkflowPartManager(IWebInterAction client) : base() { this._webMethod = client; this.UpdatesRouteDataPoints = false; }
public WorkflowTextEditingTool(IWebInterAction client) : base() { _webMethod = client; }
public DiagramPageViewModel(WorkflowInfo info, IWebInterAction client) { this._clientProxy = client; InitCommand(); this.WfInfo = info; this.Key = info.Key; this.Name = info.Name; if (!string.IsNullOrEmpty(info.GraphDescription)) { DiagramModel.Load<ActivityNode, ActivityLink>( XElement.Parse(info.GraphDescription), WorkflowUtils.DIAGRAM_XELEMENT_NODENAME, WorkflowUtils.DIAGRAM_XELEMENT_LINKNAME); foreach (var node in (ObservableCollection<ActivityNode>)DiagramModel.NodesSource) { var actInfo = info.Activities.SingleOrDefault(p => p.Key == node.Key); if (actInfo != null) { node.Category = actInfo.ActivityType.ToString(); if (actInfo.BranchProcessTemplates == null) continue; if (actInfo.BranchProcessTemplates.Count > 0) { node.WfHasBranchProcess = true; } } } //为兼容2011-04-22之前保存的数据 foreach (var link in (ObservableCollection<ActivityLink>)DiagramModel.LinksSource) { if (link.From == "N0" && link.FromPort == "portTop") { link.FromPort = "portBottom"; } } return; } foreach (ActivityInfo activity in info.Activities) { ActivityNode item = new ActivityNode() { Key = activity.Key, Category = activity.ActivityType.ToString(), WfName = activity.Name, WfDescription = activity.Description, WfEnabled = activity.Enabled }; this.DiagramModel.AddNode(item); } foreach (var transition in info.Transitions) { this.DiagramModel.AddLink(new ActivityLink() { Key = transition.Key, Text = transition.Name, From = transition.FromActivityKey, To = transition.ToActivityKey }); } }
public DiagramPageViewModel(WorkflowInfo info, IWebInterAction client) { this._clientProxy = client; InitCommand(); this.WfInfo = info; this.Key = info.Key; this.Name = info.Name; if (!string.IsNullOrEmpty(info.GraphDescription)) { DiagramModel.Load <ActivityNode, ActivityLink>( XElement.Parse(info.GraphDescription), WorkflowUtils.DIAGRAM_XELEMENT_NODENAME, WorkflowUtils.DIAGRAM_XELEMENT_LINKNAME); foreach (var node in (ObservableCollection <ActivityNode>)DiagramModel.NodesSource) { var actInfo = info.Activities.SingleOrDefault(p => p.Key == node.Key); if (actInfo != null) { node.Category = actInfo.ActivityType.ToString(); if (actInfo.BranchProcessTemplates == null) { continue; } if (actInfo.BranchProcessTemplates.Count > 0) { node.WfHasBranchProcess = true; } } } //为兼容2011-04-22之前保存的数据 foreach (var link in (ObservableCollection <ActivityLink>)DiagramModel.LinksSource) { if (link.From == "N0" && link.FromPort == "portTop") { link.FromPort = "portBottom"; } } return; } foreach (ActivityInfo activity in info.Activities) { ActivityNode item = new ActivityNode() { Key = activity.Key, Category = activity.ActivityType.ToString(), WfName = activity.Name, WfDescription = activity.Description, WfEnabled = activity.Enabled }; this.DiagramModel.AddNode(item); } foreach (var transition in info.Transitions) { this.DiagramModel.AddLink(new ActivityLink() { Key = transition.Key, Text = transition.Name, From = transition.FromActivityKey, To = transition.ToActivityKey }); } }
public MainPageViewModel(IWebInterAction webAct) { WebInterAct = webAct; this.AddNewCommand = new RelayCommand <WorkflowInfo>(this.AddNewCommandExecuted, p => { return(true); }); }