QueryServerWindow.on_entries_required_changed C# (CSharp) Method

on_entries_required_changed() static private method

static private on_entries_required_changed ( object o, EventArgs args ) : void
o object
args EventArgs
return void
    void on_entries_required_changed(object o, EventArgs args)
    {
        bool allOk = true;

        if ( UtilGtk.ComboGetActive(combo_test_types) != Catalog.GetString(Constants.UndefinedDefault) ) {
            image_test_type.Hide();
            combo_tests.Sensitive = true;
            combo_variables.Sensitive = true;
        } else {
            image_test_type.Show();
            combo_tests.Sensitive = false;
            combo_variables.Sensitive = false;
            allOk = false;
        }

        //a continent cannot be searched without selecting the country
        if ( UtilGtk.ComboGetActive(combo_continents) == Catalog.GetString(Constants.Any) ) {
            combo_countries.Sensitive = false;
            image_country.Hide();
        }
        else {
            combo_countries.Sensitive = true;
            if ( UtilGtk.ComboGetActive(combo_countries) == Catalog.GetString(Constants.UndefinedDefault) ) {
                image_country.Show();
                allOk = false;
            } else
                image_country.Hide();
        }

        if(allOk) {
            textViewUpdate(sqlBuildSelect(false));
            button_search.Sensitive = true;
        }
        else {
            textViewUpdate("");
            button_search.Sensitive = false;
        }
    }