Exemplo n.º 1
0
 private void PageForm_Load(object sender, System.EventArgs e)
 {
     ActivityForm.Create().Parent = this.activityPanel;
     this.page.OnStateChanged += Page_OnStateChanged;
     this.page.Show(this.pagePanel);
     this.page.OnStateChanged += Page_OnStateChanged;
     this.Text = string.Format("{0} - {1}", this.FileName, this.Title);
 }
Exemplo n.º 2
0
        public static Panel Create()
        {
            var form = new ActivityForm();

            form.activityTreeView.SetWindowTheme("explorer");
            form.activityTreeView.Tag         = Activity.GetExternalActivities();
            form.activityTreeView.ItemDrag   += TreeView1_ItemDrag;
            form.activityTextBox.TextChanged += (sender, e) => form.FilterTreeView();
            form.FilterTreeView();
            return(form.activityPanel);
        }
Exemplo n.º 3
0
        private void PageForm_Load(object sender, System.EventArgs e)
        {
            this.consoleButton.PerformClick();
            ActivityForm.Create().Parent = this.activityPanel;
            this.newButton.PerformClick();
            this.page.OnStateChanged += Page_OnStateChanged;
            if (Environment.GetCommandLineArgs().ElementAtOrDefault(1) is string xmlFile)
            {
                if (Page.Open(xmlFile) is Page xPage)
                {
                    this.page = xPage;
                    this.page.Show(this.pagePanel);
                    this.page.OnStateChanged += Page_OnStateChanged;
                    this.Text = string.Format("{0} - {1}", this.page.FileName, this.Title);
                    this.runButton.PerformClick();
                    var exitOnComplete = true;
                    xPage.OnStateChanged += (ss, ee) =>
                    {
                        switch (xPage.State)
                        {
                        case PageState.Completed:
                            if (exitOnComplete)
                            {
                                Environment.Exit(0);
                            }
                            break;

                        case PageState.Paused:
                        case PageState.Stopped:
                            exitOnComplete = false;
                            break;
                        }
                    };
                }
            }
        }
Exemplo n.º 4
0
 private void PageForm_Load(object sender, System.EventArgs e)
 {
     this.page = new Page();
     this.page.AttachEvents(this.pageCanvas);
     ActivityForm.Create().Parent = this.activityPanel;
 }