public void View(Constants.BellModes bellMode, bool volumeOn)
    {
        //this.volumeOn = volumeOn;

        //when user "deleted_event" the window
        if (RepetitiveConditionsWindowBox == null)
        {
            RepetitiveConditionsWindowBox = new RepetitiveConditionsWindow();
        }
        RepetitiveConditionsWindowBox.showWidgets(bellMode);
        RepetitiveConditionsWindowBox.repetitive_conditions.Show();
        RepetitiveConditionsWindowBox.volumeOn = volumeOn;
    }
    void showWidgets(Constants.BellModes bellMode, Constants.EncoderVariablesCapture encoderMainVariable, EncoderRhythm encoderRhythm)
    {
        frame_best_and_worst.Hide();
        frame_conditions.Hide();
        hbox_jump_best_worst.Hide();
        hbox_run_best_worst.Hide();
        hbox_jump_conditions.Hide();
        hbox_run_conditions.Hide();
        frame_encoder_automatic_conditions.Hide();
        vbox_encoder_manual.Hide();
        notebook_encoder_conditions.Hide();
        vbox_encoder_stuff.Hide();

        notebook_main.GetNthPage(RHYTHMPAGE).Hide();
        notebook_main.ShowTabs = false;

        if (bellMode == Constants.BellModes.JUMPS)
        {
            frame_best_and_worst.Show();
            hbox_jump_best_worst.Show();
            hbox_jump_conditions.Show();
            frame_conditions.Show();
        }
        else if (bellMode == Constants.BellModes.RUNS)
        {
            frame_best_and_worst.Show();
            hbox_run_best_worst.Show();
            hbox_run_conditions.Show();
            frame_conditions.Show();
        }
        else             //encoder (grav and inertial)
        {
            vbox_encoder_stuff.Show();
            frame_encoder_automatic_conditions.Show();
            notebook_main.ShowTabs = true;

            vbox_encoder_manual.Show();
            if (checkbutton_encoder_show_manual_feedback.Active)
            {
                notebook_encoder_conditions.Show();
            }

            combo_encoder_main_variable.Active = UtilGtk.ComboMakeActive(combo_encoder_main_variable,
                                                                         Constants.GetEncoderVariablesCapture(encoderMainVariable));

            notebook_main.GetNthPage(RHYTHMPAGE).Show();
            encoder_rhythm_set_values(encoderRhythm);
        }

        label_test_sound_result.Text = "";
    }
    public void View(Constants.BellModes bellMode, bool volumeOn, Preferences.GstreamerTypes gstreamer,
                     Constants.EncoderVariablesCapture encoderMainVariable, EncoderRhythm encoderRhythm)
    {
        //when user "deleted_event" the window
        if (RepetitiveConditionsWindowBox == null)
        {
            RepetitiveConditionsWindowBox = new RepetitiveConditionsWindow();
        }
        RepetitiveConditionsWindowBox.showWidgets(bellMode, encoderMainVariable, encoderRhythm);

        RepetitiveConditionsWindowBox.repetitive_conditions.Show();
        RepetitiveConditionsWindowBox.volumeOn  = volumeOn;
        RepetitiveConditionsWindowBox.gstreamer = gstreamer;
    }
    void showWidgets(Constants.BellModes bellMode)
    {
        frame_best_and_worst.Hide();
        frame_conditions.Hide();
        hbox_jump_best_worst.Hide();
        hbox_run_best_worst.Hide();
        hbox_jump_conditions.Hide();
        hbox_run_conditions.Hide();
        frame_encoder_automatic_conditions.Hide();
        vbox_encoder_manual.Hide();
        notebook_encoder_conditions.Hide();

        if (bellMode == Constants.BellModes.JUMPS)
        {
            frame_best_and_worst.Show();
            hbox_jump_best_worst.Show();
            hbox_jump_conditions.Show();
            frame_conditions.Show();
        }
        else if (bellMode == Constants.BellModes.RUNS)
        {
            frame_best_and_worst.Show();
            hbox_run_best_worst.Show();
            hbox_run_conditions.Show();
            frame_conditions.Show();
        }
        else                                             //encoder
        {
            notebook_encoder_conditions.CurrentPage = 3; //power
            frame_encoder_automatic_conditions.Show();
            vbox_encoder_manual.Show();
            if (checkbutton_encoder_show_manual_feedback.Active)
            {
                notebook_encoder_conditions.Show();
            }
        }
    }
    public bool FeedbackActive(Constants.BellModes bellMode)
    {
        if (bellMode == Constants.BellModes.JUMPS)
        {
            if (checkbutton_height_greater.Active || checkbutton_height_lower.Active ||
                checkbutton_tf_greater.Active || checkbutton_tf_lower.Active ||
                checkbutton_tc_lower.Active || checkbutton_tc_greater.Active ||
                checkbutton_tf_tc_greater.Active || checkbutton_tf_tc_lower.Active)
            {
                return(true);
            }
        }
        else if (bellMode == Constants.BellModes.RUNS)
        {
            if (checkbutton_time_lower.Active || checkbutton_time_greater.Active)
            {
                return(true);
            }
        }
        else           //encoder (grav and inertial)
        {
            if (checkbutton_encoder_automatic_greater.Active || checkbutton_encoder_automatic_lower.Active ||
                checkbutton_encoder_height_higher.Active || checkbutton_encoder_height_lower.Active ||
                checkbutton_encoder_mean_speed_higher.Active || checkbutton_encoder_mean_speed_lower.Active ||
                checkbutton_encoder_max_speed_higher.Active || checkbutton_encoder_max_speed_lower.Active ||
                checkbutton_encoder_mean_force_higher.Active || checkbutton_encoder_mean_force_lower.Active ||
                checkbutton_encoder_max_force_higher.Active || checkbutton_encoder_max_force_lower.Active ||
                checkbutton_encoder_power_higher.Active || checkbutton_encoder_power_lower.Active ||
                checkbutton_encoder_peakpower_higher.Active || checkbutton_encoder_peakpower_lower.Active)
            {
                return(true);
            }
        }

        return(false);
    }