Ejemplo n.º 1
0
 private void buttonMore_Click(object sender, EventArgs e)
 {
     CreateStep(-1, null);
     curprog.Add(null);
     RepositionGroups();
     panelVScroll.ToEnd();       // tell it to scroll to end
 }
Ejemplo n.º 2
0
        void LoadProgram(ActionProgram prog)
        {
            foreach (Group g in groups)
            {
                g.panel.Controls.Clear();
                panelVScroll.Controls.Remove(g.panel);
            }

            groups.Clear();

            curprog = new ActionProgram(prog.Name);

            initialprogname = textBoxBorderName.Text = prog.Name;

            SuspendLayout();
            panelVScroll.SuspendLayout();

            Action ac;
            int    step = 0;

            while ((ac = prog.GetStep(step)) != null)
            {
                Action ca = Action.CreateCopy(ac);// COPY it.. so we can modify without altering current
                curprog.Add(ca);
                CreateStep(-1, ca);
                step++;
            }

            RepositionGroups();
            panelVScroll.ResumeLayout();
            ResumeLayout();
        }
Ejemplo n.º 3
0
        public ActionProgram GetProgram()      // call only when OK returned
        {
            ActionProgram ap = new ActionProgram(curprog.Name, curprog.StoredInFile);

            Action ac;
            int    step = 0;

            while ((ac = curprog.GetStep(step++)) != null)
            {
                if (ac != null)
                {
                    ap.Add(ac);
                }
            }

            return(ap);
        }