private void buttonOK_Click(object sender, EventArgs e) { if (this.AutoOn.Checked) { InitializeTimer(); if (timerAutoRefresh.Interval > 0) timerAutoRefresh.Start(); } else timerAutoRefresh.Stop(); this.Hide(); }