public PressGui() { InitializeComponent(); _workflowRuntime = new WorkflowRuntime(); _instance = _workflowRuntime.CreateWorkflow(typeof(PressFlow)); _flow = _instance.GetWorkflowDefinition() as PressFlow; InitFlow(); InitUI(); RunUI(); }
public static PressFlow DoLoad() { PressFlow p = new PressFlow(); p._buttons.Add("b1"); p._buttons.Add("b2"); p.AddState("state1", new ImageState("file")); p.AddState("state2", new AnimationState("file2", 50)); p.AddTransition("state1", "b2", "state2"); p.AddTransition("state2", "b1", "state1"); p.SetInitial("state1"); return p; }
private void InitFlow() { _flow = PressFlow.DoLoad(); _flow.StateChanged += new EventHandler(_flow_StateChanged); }
public static PressFlow LoadString(string path) { PressFlow flow = new PressFlow(); return flow; }