コード例 #1
0
        private void SetFormLocation()
        {
            WeatherForm weatherForm = MainForm.GetForm <WeatherForm>();

            if (weatherForm != null)
            {
                weatherForm.SetLocation(cBoxWeatherScreen.SelectedIndex, cBoxWeatherLocation.SelectedIndex);
            }
        }
コード例 #2
0
        private void checkWeatherAlwaysTop_CheckedChanged(object sender, EventArgs e)
        {
            SettingsHelper.SetSettings("IsWeatherAlwaysTop", checkBoxWeatherAlwaysTop.Checked);
            WeatherForm weatherForm = MainForm.GetForm <WeatherForm>();

            if (weatherForm != null)
            {
                weatherForm.TopMost = checkBoxWeatherAlwaysTop.Checked;
            }
        }
コード例 #3
0
        private void cBoxWeatherRefresh_SelectedValueChanged(object sender, EventArgs e)
        {
            int refreshRate = Int32.Parse(cBoxWeatherRefresh.SelectedText);

            SettingsHelper.SetSettings("WeatherRefreshRate", refreshRate);
            WeatherForm weatherForm = MainForm.GetForm <WeatherForm>();

            if (weatherForm != null)
            {
                weatherForm.WeatherControl.SetRefreshRate(refreshRate);
            }
        }
コード例 #4
0
        private void checkBoxWeatherShow_CheckedChanged(object sender, EventArgs e)
        {
            SettingsHelper.SetSettings("IsWeatherShow", checkBoxWeatherShow.Checked);
            WeatherForm weatherForm = MainForm.GetForm <WeatherForm>();

            if (weatherForm != null)
            {
                if (checkBoxWeatherShow.Checked)
                {
                    weatherForm.Show();
                }
                else
                {
                    weatherForm.Hide();
                }
            }
        }