예제 #1
0
        // метод викликається при створенні форми (перед відображенням)
        private void SettingsDialog_Load(object sender, EventArgs e)
        {
            comboBoxCity.DataSource    = new BindingSource(OpenWeather.GetCities(language), null);
            comboBoxCity.DisplayMember = "Key";
            comboBoxCity.ValueMember   = "Value";
            comboBoxCity.SelectedValue = Properties.Settings.Default.OWCity;

            comboBoxLanguage.DataSource   = Enum.GetValues(typeof(OWLanguage));
            comboBoxLanguage.SelectedItem = language;

            maskedTextBoxPort.Text = Properties.Settings.Default.ProxyPort.ToString();

            if (!checkBoxProxy.Checked)
            {
                EnabledAuthorizedControls(false);
            }

            SetFormPosition();
            timerForVisible.Start();
        }