private void butChangeTime_Click(object sender, EventArgs e) { FormTimePick FormTP = new FormTimePick(true); if (_updateTime != DateTime.MinValue) { FormTP.SelectedDTime = _updateTime; } FormTP.ShowDialog(); if (FormTP.DialogResult == DialogResult.OK) { _updateTime = FormTP.SelectedDTime; textUpdateTime.Text = _updateTime.ToString(); } }
private void butChangeTime_Click(object sender, EventArgs e) { FormTimePick FormTP = new FormTimePick(true); if (_updateTime != DateTime.MinValue) { FormTP.SelectedDTime = _updateTime; } FormTP.ShowDialog(); if (FormTP.DialogResult == DialogResult.OK) { _updateTime = FormTP.SelectedDTime; textUpdateTime.Text = _updateTime.ToString(); if (Prefs.UpdateDateT(PrefName.UpdateDateTime, _updateTime)) { //Updating to db now in case the user does not have enough permission to click the OK button on this form. Cursor = Cursors.WaitCursor; DataValid.SetInvalid(InvalidType.Prefs); Cursor = Cursors.Default; } } }