public MechanicalDraftPerformanceCurveTabPage(ApplicationSettings applicationSettings) { InitializeComponent(); IsInternationalSystemOfUnits_IS_ = (applicationSettings.UnitsSelection == UnitsSelection.International_System_Of_Units_SI); MechanicalDraftPerformanceCurveViewModel = new MechanicalDraftPerformanceCurveViewModel(IsDemo, IsInternationalSystemOfUnits_IS_); MechanicalDraftPerformanceCurveTowerDesignViewModel = new MechanicalDraftPerformanceCurveTowerDesignViewModel(IsDemo, IsInternationalSystemOfUnits_IS_); Setup(); }
private void PerformanceCurveTestWaterFlowRate_Validating(object sender, CancelEventArgs e) { string errorMessage = string.Empty; if (!MechanicalDraftPerformanceCurveViewModel.WaterFlowRateDataValueUpdateValue(PerformanceCurveTestWaterFlowRate.Text, out errorMessage)) { // Cancel the event and select the text to be corrected by the user. e.Cancel = true; PerformanceCurveTestWaterFlowRate.Select(0, PerformanceCurveTestWaterFlowRate.Text.Length); // Set the ErrorProvider error with the text to display. this.errorProvider1.SetError(PerformanceCurveTestWaterFlowRate, errorMessage); } }