Example #1
0
    private void loadDo()
    {
        TreeModel model;
        TreeIter  iter;

        if (treeview_load.Selection.GetSelected(out model, out iter))
        {
            int uniqueID = UtilGtk.GetSelectedRowUniqueID(
                treeview_load, store_load, store_load_uniqueID_col);

            if (uniqueID > 0)
            {
                ExecuteAutoSQL eaSQL = SqliteExecuteAuto.Select(false, uniqueID)[0];

                foreach (int i in eaSQL.Serie1IDs)
                {
                    button_simulate_exercise_clicked(i, 1);                     //first treeview
                }
                mode = eaSQL.Mode;
                if (mode == ExecuteAuto.ModeTypes.BY_SETS)
                {
                    foreach (int i in eaSQL.Serie2IDs)
                    {
                        button_simulate_exercise_clicked(i, 2);
                    }
                    foreach (int i in eaSQL.Serie3IDs)
                    {
                        button_simulate_exercise_clicked(i, 3);
                    }
                }
            }
        }
    }
Example #2
0
 public ExecuteAutoSQL(int uniqueID, string name, ExecuteAuto.ModeTypes mode, string description,
                       List <int> serie1IDs, List <int> serie2IDs, List <int> serie3IDs)
 {
     this.uniqueID    = uniqueID;
     this.name        = name;
     this.mode        = mode;
     this.description = description;
     this.serie1IDs   = serie1IDs;
     this.serie2IDs   = serie2IDs;
     this.serie3IDs   = serie3IDs;
 }
Example #3
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
        }
    }
Example #4
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
        }
    }
Example #5
0
    private void loadDo()
    {
        TreeModel model;
        TreeIter iter;

        if (treeview_load.Selection.GetSelected (out model, out iter)) {
            int uniqueID = UtilGtk.GetSelectedRowUniqueID(
                    treeview_load, store_load, store_load_uniqueID_col);

            if(uniqueID > 0) {
                ExecuteAutoSQL eaSQL = SqliteExecuteAuto.Select(false, uniqueID)[0];

                foreach(int i in eaSQL.Serie1IDs)
                    button_simulate_exercise_clicked(i, 1); //first treeview

                mode = eaSQL.Mode;
                if(mode == ExecuteAuto.ModeTypes.BY_SETS) {
                    foreach(int i in eaSQL.Serie2IDs)
                        button_simulate_exercise_clicked(i, 2);
                    foreach(int i in eaSQL.Serie3IDs)
                        button_simulate_exercise_clicked(i, 3);
                }
            }
        }
    }
Example #6
0
    public ExecuteAutoSQL(int uniqueID, string name, ExecuteAuto.ModeTypes mode, string description, 
			List<int> serie1IDs, List<int> serie2IDs, List<int> serie3IDs)
    {
        this.uniqueID = uniqueID;
        this.name = name;
        this.mode = mode;
        this.description = description;
        this.serie1IDs = serie1IDs;
        this.serie2IDs = serie2IDs;
        this.serie3IDs = serie3IDs;
    }