Example #1
0
        private void NextPage_Click(object sender, EventArgs e)
        {
            switch (formState)
            {
            case 1:
                formState = 2;
                State2();
                cf2 = new ControlsForm2(mainPanel, outputGroupsList);
                cf2.ClearAndStart(outputGroups, mainArray);
                break;

            case 2:
                formState = 3;
                cf3       = new ControlsForm3(mainPanel);
                cf3.ClearAndStart(cf2.ChangeState(), mainArray);
                cf2 = null;
                State3();
                break;

            case 3:
                formState = 1;
                cf3.ChangeState();
                cf3 = null;
                State1();
                break;
            }
        }
Example #2
0
        private void NextPage_Click(object sender, EventArgs e)
        {
            switch (curentLab)
            {
            case 1:
                cf2changeState = cf2.ChangeState();
                cf2            = null;
                State1();
                formState = 1;
                break;

            case 2:
                if (formState == 3)
                {
                    cf3.ChangeState();
                    cf3 = null;
                }
                cf2 = new ControlsForm2(mainPanel, outputGroupsList);
                cf2.ClearAndStart(outputGroups, mainArray);
                State2();
                formState = 2;
                break;

            case 3:
                if (formState == 2)
                {
                    cf2changeState = cf2.ChangeState();
                    cf2            = null;
                }
                else
                {
                    cf4.ChangeState();
                    cf4 = null;
                }
                cf3 = new ControlsForm3(mainPanel);
                cf3.ClearAndStart(cf2changeState, mainArray);
                State3();
                formState = 3;
                break;

            case 4:

                cf4 = new ControlsForm4(mainPanel, outputGroupsList);
                if (formState == 3)
                {
                    cf3changeState = cf3.ChangeState(out relationMatrix);
                    cf3            = null;
                }
                else
                {
                    cf5.ChangeState();
                    cf5 = null;
                }
                cf4.ClearAndStart(mainArray, cf3changeState, relationMatrix);
                //State4();
                formState = 4;
                break;

            case 5:
                cf5 = new ControlsForm5(mainPanel, outputGroupsList);
                if (formState == 4)
                {
                    cf4.ChangeState(out cf4changeState);
                    cf4 = null;
                }
                else
                {
                    cf6.ChangeState();
                    cf6 = null;
                }
                cf5.ClearAndStart(cf4changeState);
                formState = 5;
                break;

            case 6:
                cf6 = new ControlsForm6(mainPanel, outputGroupsList);
                cf5.ChangeState(out cf5changeState);
                cf5 = null;
                cf6.ClearAndStart(mainArray, cf5changeState);
                formState = 6;
                break;
            }
        }