public TimeSeriesPrognosisResultsView() { InitializeComponent(); TrainingHorizonErrorProvider.SetIconAlignment(TrainingHorizonTextBox, ErrorIconAlignment.MiddleLeft); TrainingHorizonErrorProvider.SetIconPadding(TrainingHorizonTextBox, 2); TestHorizonErrorProvider.SetIconAlignment(TestHorizonTextBox, ErrorIconAlignment.MiddleLeft); TestHorizonErrorProvider.SetIconPadding(TestHorizonTextBox, 2); }
private void TrainingHorizonTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { int trainingHorizon; if (!int.TryParse(TrainingHorizonTextBox.Text, out trainingHorizon)) { e.Cancel = true; TrainingHorizonErrorProvider.SetError(TrainingHorizonTextBox, "Please enter a numeric value."); TrainingHorizonTextBox.SelectAll(); } }
private void TrainingHorizonTextBox_Validated(object sender, System.EventArgs e) { Content.TrainingHorizon = int.Parse(TrainingHorizonTextBox.Text); TrainingHorizonErrorProvider.SetError(TrainingHorizonTextBox, string.Empty); TrainingHorizonTextBox.Text = Content.TrainingHorizon.ToString(); }