Example #1
0
 public PressGui()
 {
     InitializeComponent();
     _workflowRuntime = new WorkflowRuntime();
     _instance = _workflowRuntime.CreateWorkflow(typeof(PressFlow));
     _flow = _instance.GetWorkflowDefinition() as PressFlow;
     InitFlow();
     InitUI();
     RunUI();
 }
Example #2
0
        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;
        }
Example #3
0
 private void InitFlow()
 {
     _flow = PressFlow.DoLoad();
     _flow.StateChanged += new EventHandler(_flow_StateChanged);
 }
Example #4
0
 public static PressFlow LoadString(string path)
 {
     PressFlow flow = new PressFlow();
     return flow;
 }