ComboPackShowAndSensitive() public static method

public static ComboPackShowAndSensitive ( Gtk box, Gtk combo ) : void
box Gtk
combo Gtk
return void
コード例 #1
0
    private void createComboSports()
    {
        combo_sports = ComboBox.NewText();
        sports       = SqliteSport.SelectAll();

        //first value has to be any
        sports[0] = Constants.SportUndefinedID + ":" +                                //no problem using the undefinedID
                    Constants.SportAny + ":" + Catalog.GetString(Constants.SportAny); //is "--Any" to be the first in sort

        //create sports translated, only with translated stuff
        sportsTranslated = new String[sports.Length];
        int i = 0;

        foreach (string row in sports)
        {
            string [] myStrFull = row.Split(new char[] { ':' });
            sportsTranslated[i++] = myStrFull[2];
        }

        //sort array (except second row)
        System.Array.Sort(sportsTranslated, 2, sportsTranslated.Length - 2);

        UtilGtk.ComboUpdate(combo_sports, sportsTranslated, "");
        combo_sports.Active = UtilGtk.ComboMakeActive(sportsTranslated,
                                                      Catalog.GetString(Constants.SportAny));

        combo_sports.Changed += new EventHandler(on_combo_sports_changed);

        UtilGtk.ComboPackShowAndSensitive(hbox_combo_sports, combo_sports);
    }
コード例 #2
0
    private void createComboSpeciallities(int sportID)
    {
        combo_speciallities = ComboBox.NewText();
        speciallities       = SqliteSpeciallity.SelectAll(true, sportID);   //show undefined, filter by sport

        //first value has to be any
        speciallities[0] = "-1:" + Constants.Any + ":" + Catalog.GetString(Constants.Any);

        //create speciallities translated, only with translated stuff
        speciallitiesTranslated = new String[speciallities.Length];
        int i = 0;

        foreach (string row in speciallities)
        {
            string [] myStrFull = row.Split(new char[] { ':' });
            speciallitiesTranslated[i++] = myStrFull[2];
        }

        //sort array (except first row)
        System.Array.Sort(speciallities, 1, speciallities.Length - 1);

        UtilGtk.ComboUpdate(combo_speciallities, speciallitiesTranslated, "");
        combo_speciallities.Active = UtilGtk.ComboMakeActive(speciallitiesTranslated,
                                                             Catalog.GetString(Constants.Any));

        hbox_combo_speciallities.PackStart(combo_speciallities, true, true, 0);
        hbox_combo_speciallities.ShowAll();
        combo_speciallities.Sensitive = true;
        combo_speciallities.Changed  += new EventHandler(on_combo_other_changed);
        UtilGtk.ComboPackShowAndSensitive(hbox_combo_speciallities, combo_speciallities);
    }
コード例 #3
0
 private void createComboSexes()
 {
     combo_sexes = ComboBox.NewText();
     UtilGtk.ComboUpdate(combo_sexes, sexes, "");
     combo_sexes.Active   = UtilGtk.ComboMakeActive(sexes, Catalog.GetString(Constants.Any));
     combo_sexes.Changed += new EventHandler(on_combo_other_changed);
     UtilGtk.ComboPackShowAndSensitive(hbox_combo_sexes, combo_sexes);
 }
コード例 #4
0
 private void createComboTestTypes()
 {
     combo_test_types = ComboBox.NewText();
     UtilGtk.ComboUpdate(combo_test_types, testTypes, "");
     combo_test_types.Active   = UtilGtk.ComboMakeActive(testTypes, Catalog.GetString(Constants.UndefinedDefault));
     combo_test_types.Changed += new EventHandler(on_combo_test_types_changed);
     UtilGtk.ComboPackShowAndSensitive(hbox_combo_test_types, combo_test_types);
 }
コード例 #5
0
 private void createComboVariables()
 {
     combo_variables = ComboBox.NewText();
     variables       = Util.StringToStringArray(Constants.UndefinedDefault);
     UtilGtk.ComboUpdate(combo_variables, variables, "");
     combo_variables.Active   = UtilGtk.ComboMakeActive(variables, Catalog.GetString(Constants.UndefinedDefault));
     combo_variables.Changed += new EventHandler(on_combo_other_changed);
     UtilGtk.ComboPackShowAndSensitive(hbox_combo_variables, combo_variables);
 }
コード例 #6
0
 private void createComboAges1()
 {
     combo_ages1 = ComboBox.NewText();
     UtilGtk.ComboUpdate(combo_ages1, ages1, "");
     combo_ages1.Active   = UtilGtk.ComboMakeActive(ages1, Catalog.GetString(Constants.Any));
     combo_ages1.Changed += new EventHandler(on_combo_ages1_changed);
     UtilGtk.ComboPackShowAndSensitive(hbox_combo_ages1, combo_ages1);
     spin_ages1.Sensitive    = false;
     label_age_and.Sensitive = false;
 }
コード例 #7
0
 private void createComboAges2()
 {
     combo_ages2 = ComboBox.NewText();
     string [] ages2 = Util.StringToStringArray(Constants.Any);
     UtilGtk.ComboUpdate(combo_ages2, ages2, "");
     combo_ages2.Active   = UtilGtk.ComboMakeActive(ages2, Catalog.GetString(Constants.Any));
     combo_ages2.Changed += new EventHandler(on_combo_ages2_changed);
     UtilGtk.ComboPackShowAndSensitive(hbox_combo_ages2, combo_ages2);
     combo_ages2.Sensitive = false;
     spin_ages2.Sensitive  = false;
 }
コード例 #8
0
    private void createComboEvaluators()
    {
        combo_evaluators = ComboBox.NewText();

        //first value (any) should be translated
        evaluators[0] = Constants.AnyID.ToString() + ":" + Catalog.GetString(Constants.Any);

        UtilGtk.ComboUpdate(combo_evaluators, evaluators, "");
        combo_evaluators.Active   = UtilGtk.ComboMakeActive(combo_evaluators, Catalog.GetString(Constants.Any));
        combo_evaluators.Changed += new EventHandler(on_combo_other_changed);
        UtilGtk.ComboPackShowAndSensitive(hbox_combo_evaluators, combo_evaluators);
    }
コード例 #9
0
    private void createComboCountries()
    {
        combo_countries = ComboBox.NewText();

        countries = new String[1];
        //record countries with id:english name:translatedName
        countries [0] = Constants.CountryUndefinedID + ":" + Constants.CountryUndefined + ":" + Catalog.GetString(Constants.CountryUndefined);

        string [] myCountries = new String[1];
        myCountries [0] = Catalog.GetString(Constants.CountryUndefined);
        UtilGtk.ComboUpdate(combo_countries, myCountries, "");
        combo_countries.Active = UtilGtk.ComboMakeActive(myCountries,
                                                         Catalog.GetString(Constants.CountryUndefined));

        combo_countries.Changed += new EventHandler(on_combo_other_changed);
        UtilGtk.ComboPackShowAndSensitive(hbox_combo_countries, combo_countries);
    }
コード例 #10
0
    private void createComboLevels()
    {
        combo_levels = ComboBox.NewText();
        levels       = Constants.Levels;

        //first value has to be any (but is ok to put the id value of the LevelUndefinedID)
        levels[0] = Constants.LevelUndefinedID.ToString() + ":" + Catalog.GetString(Constants.Any);

        UtilGtk.ComboUpdate(combo_levels, levels, "");
        combo_levels.Active = UtilGtk.ComboMakeActive(levels,
                                                      Constants.LevelUndefinedID.ToString() + ":" +
                                                      Catalog.GetString(Constants.Any));

        hbox_combo_levels.PackStart(combo_levels, true, true, 0);
        hbox_combo_levels.ShowAll();
        combo_levels.Sensitive = false;         //level is shown when sport is not "undefined" and not "none"
        combo_levels.Changed  += new EventHandler(on_combo_other_changed);
        UtilGtk.ComboPackShowAndSensitive(hbox_combo_levels, combo_levels);
    }
コード例 #11
0
    private void createComboContinents()
    {
        combo_continents = ComboBox.NewText();
        continents       = Constants.Continents;
        //first value has to be any
        continents[0] = Constants.Any + ":" + Catalog.GetString(Constants.Any);

        //create continentsTranslated, only with translated stuff
        continentsTranslated = new String[Constants.Continents.Length];
        int i = 0;

        foreach (string continent in continents)
        {
            continentsTranslated[i++] = Util.FetchName(continent);
        }

        UtilGtk.ComboUpdate(combo_continents, continentsTranslated, "");
        combo_continents.Active = UtilGtk.ComboMakeActive(continentsTranslated,
                                                          Catalog.GetString(Constants.Any));

        combo_continents.Changed += new EventHandler(on_combo_continents_changed);
        UtilGtk.ComboPackShowAndSensitive(hbox_combo_continents, combo_continents);
    }