private void SetFormLocation() { WeatherForm weatherForm = MainForm.GetForm <WeatherForm>(); if (weatherForm != null) { weatherForm.SetLocation(cBoxWeatherScreen.SelectedIndex, cBoxWeatherLocation.SelectedIndex); } }
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; } }
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); } }
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(); } } }