Example #1
0
    static public EvaluatorWindow Show(ServerEvaluator eval)
    {
        if (EvaluatorWindowBox == null)
        {
            EvaluatorWindowBox = new EvaluatorWindow(eval);
        }
        EvaluatorWindowBox.evaluator_window.Show();

        EvaluatorWindowBox.fillDialog();


        return(EvaluatorWindowBox);
    }
Example #2
0
    protected void on_button_accept_clicked(object o, EventArgs args)
    {
        eval.Name      = entry_name.Text.ToString();
        eval.Email     = entry_email.Text.ToString();
        eval.DateBorn  = dateTime;
        eval.CountryID = Convert.ToInt32(
            Util.FindOnArray(':', 2, 0, UtilGtk.ComboGetActive(combo_countries), countries));

        eval.Comments = textview_comments.Buffer.Text;

        if (radio_cp_undef.Active)
        {
            eval.Chronometer = Constants.UndefinedDefault;
        }
        else if (radio_cp1.Active)
        {
            eval.Chronometer = Constants.ChronometerCp1;
        }
        else if (radio_cp2.Active)
        {
            eval.Chronometer = Constants.ChronometerCp2;
        }
        else if (radio_cp3.Active)
        {
            eval.Chronometer = Constants.ChronometerCp3;
        }
        else
        {
            eval.Chronometer = entry_cp_other.Text.ToString();
        }


        if (radio_device_undef.Active)
        {
            eval.Device = Constants.UndefinedDefault;
        }
        else if (radio_contact_steel.Active)
        {
            eval.Device = Constants.DeviceContactSteel;
        }
        else if (radio_contact_modular.Active)
        {
            eval.Device = Constants.DeviceContactCircuit;
        }
        else if (radio_infrared.Active)
        {
            eval.Device = Constants.DeviceInfrared;
        }
        else
        {
            eval.Device = entry_device_other.Text.ToString();
        }


        changed = false;
        if (creating)
        {
            eval.InsertAtDB(false);
            changed = true;
        }
        else
        {
            //1st see if there are changes
            if (eval.Equals(evalBefore))
            {
                //nothing changed
                //
                //new DialogMessage(Constants.MessageTypes.INFO, "nothing changed.\n");
            }
            else
            {
                //changed
                eval.Update(false);
                changed = true;
            }
        }

        fakeButtonAccept.Click();

        EvaluatorWindowBox.evaluator_window.Hide();
        EvaluatorWindowBox = null;
    }
Example #3
0
 protected void on_delete_event(object o, DeleteEventArgs args)
 {
     EvaluatorWindowBox.evaluator_window.Hide();
     EvaluatorWindowBox = null;
 }
Example #4
0
 protected void on_button_cancel_clicked(object o, EventArgs args)
 {
     EvaluatorWindowBox.evaluator_window.Hide();
     EvaluatorWindowBox = null;
 }
Example #5
0
 /*
 //called when only has to be created/updated the evaluator (not update session)
 private void on_menuitem_server_evaluator_data_only (object o, EventArgs args) {
     uploadSessionAfter = false;
     server_evaluator_data ();
 }
 */
 private void server_evaluator_data()
 {
     ServerEvaluator myEval = SqliteServer.SelectEvaluator(1);
     evalWin = EvaluatorWindow.Show(myEval);
     evalWin.FakeButtonAccept.Clicked += new EventHandler(on_evaluator_done);
 }
Example #6
0
 protected void on_delete_event(object o, DeleteEventArgs args)
 {
     EvaluatorWindowBox.evaluator_window.Hide();
     EvaluatorWindowBox = null;
 }
Example #7
0
 protected void on_button_cancel_clicked(object o, EventArgs args)
 {
     EvaluatorWindowBox.evaluator_window.Hide();
     EvaluatorWindowBox = null;
 }
Example #8
0
    protected void on_button_accept_clicked(object o, EventArgs args)
    {
        eval.Name = entry_name.Text.ToString();
        eval.Email = entry_email.Text.ToString();
        eval.DateBorn = dateTime;
        eval.CountryID = Convert.ToInt32(
                Util.FindOnArray(':', 2, 0, UtilGtk.ComboGetActive(combo_countries), countries));

        eval.Comments = textview_comments.Buffer.Text;

        if(radio_cp_undef.Active)
            eval.Chronometer = Constants.UndefinedDefault;
        else if(radio_cp1.Active)
            eval.Chronometer = Constants.ChronometerCp1;
        else if(radio_cp2.Active)
            eval.Chronometer = Constants.ChronometerCp2;
        else if(radio_cp3.Active)
            eval.Chronometer = Constants.ChronometerCp3;
        else
            eval.Chronometer = entry_cp_other.Text.ToString();

        if(radio_device_undef.Active)
            eval.Device = Constants.UndefinedDefault;
        else if(radio_contact_steel.Active)
            eval.Device = Constants.DeviceContactSteel;
        else if(radio_contact_modular.Active)
            eval.Device = Constants.DeviceContactCircuit;
        else if(radio_infrared.Active)
            eval.Device = Constants.DeviceInfrared;
        else
            eval.Device = entry_device_other.Text.ToString();

        changed = false;
        if(creating) {
            eval.InsertAtDB(false);
            changed = true;
        } else {
            //1st see if there are changes
            if(eval.Equals(evalBefore)) {
                //nothing changed
                //
                //new DialogMessage(Constants.MessageTypes.INFO, "nothing changed.\n");
            } else {
                //changed
                eval.Update(false);
                changed = true;
            }
        }

        fakeButtonAccept.Click();

        EvaluatorWindowBox.evaluator_window.Hide();
        EvaluatorWindowBox = null;
    }
Example #9
0
    public static EvaluatorWindow Show(ServerEvaluator eval)
    {
        if (EvaluatorWindowBox == null) {
            EvaluatorWindowBox = new EvaluatorWindow(eval);
        }
        EvaluatorWindowBox.evaluator_window.Show ();

        EvaluatorWindowBox.fillDialog ();

        return EvaluatorWindowBox;
    }