コード例 #1
0
    private void on_button_next_clicked(object o, EventArgs args)
    {
        if (notebook_main.CurrentPage == 0)
        {
            if (radio_load.Active)
            {
                loadDo();                 //this also defines the 'mode' variable
            }
            else
            {
                mode = ExecuteAuto.ModeTypes.BY_PERSONS;
                if (radio_by_tests.Active)
                {
                    mode = ExecuteAuto.ModeTypes.BY_TESTS;
                }
                else if (radio_by_sets.Active)
                {
                    mode = ExecuteAuto.ModeTypes.BY_SETS;
                }

                //next button will be sensitive when first test is added
                button_next.Sensitive = false;
            }

            showSeriesStuff(mode == ExecuteAuto.ModeTypes.BY_SETS);
            notebook_main.NextPage();
        }
        else if (notebook_main.CurrentPage == 1)
        {
            ArrayList persons = SqlitePersonSession.SelectCurrentSessionPersons(
                sessionID,
                false);                         //means: do not returnPersonAndPSlist
            orderedData = ExecuteAuto.CreateOrder(mode, persons,
                                                  treeviewSerie1Array, treeviewSerie2Array, treeviewSerie3Array);

            createTreeviewResult(mode == ExecuteAuto.ModeTypes.BY_SETS);
            fillTreeviewResult();

            button_next.Label = Catalog.GetString("Accept");
            if (orderedData.Count == 0)
            {
                button_next.Sensitive = false;
            }

            notebook_main.NextPage();
        }
        else                          // notebook_main.CurrentPage == 2
        {
            FakeButtonAccept.Click(); //signal to read orderedData
        }
    }