コード例 #1
0
    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 = "";
    }
コード例 #2
0
    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;
    }