| | |
| | | using IStation.CalcModel; |
| | | using System.Threading.Tasks; |
| | | using DevExpress.XtraRichEdit.Model; |
| | | using IStation.BLL; |
| | | |
| | | namespace IStation.WinFrmUI.CalcErQu |
| | | { |
| | |
| | | this.winBottomPnl.ButtonUnchecked += new DevExpress.XtraBars.Docking2010.ButtonEventHandler(this.winBottomPnl_ButtonUnchecked); |
| | | this.winBottomPnl.ButtonChecked += new DevExpress.XtraBars.Docking2010.ButtonEventHandler(this.winBottomPnl_ButtonChecked); |
| | | |
| | | |
| | | |
| | | textEdit最高水位限制.Enabled = textEdit最低水位限制.Enabled = checkEdit水位限制.Checked = false; |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | IStation.CalcModel.AnaRequest request = new CalcModel.AnaRequest(); |
| | | request.CalcOptType = GetOptCalcType(); |
| | | request.StartTime = new DateTime(dateEditDay.DateTime.Year, dateEditDay.DateTime.Month, dateEditDay.DateTime.Day, Convert.ToInt32(spinEditStart.EditValue), 0, 0); |
| | | if(Convert.ToInt32(spinEditStart.EditValue)<= Convert.ToInt32(spinEditEnd.EditValue)) |
| | | if(Convert.ToInt32(spinEditStart.EditValue) < Convert.ToInt32(spinEditEnd.EditValue)) |
| | | { |
| | | request.EndTime = new DateTime(dateEditDay.DateTime.Year, dateEditDay.DateTime.Month, dateEditDay.DateTime.Day, Convert.ToInt32(spinEditEnd.EditValue), 0, 0); |
| | | } |
| | | else |
| | | { |
| | | request.EndTime = new DateTime(dateEditDay.DateTime.Year, dateEditDay.DateTime.Month, dateEditDay.DateTime.Day, Convert.ToInt32(spinEditEnd.EditValue), 0, 0); |
| | | request.EndTime.AddDays(1); |
| | | request.EndTime = request.EndTime.AddDays(1); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | if (checkEdit水位限制.Checked) |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(textEdit最高水位限制.Text)) |
| | | { |
| | | if (string.IsNullOrEmpty(textEdit最高水位限制.Text)) |
| | | { |
| | | textEdit最高水位限制.Focus(); |
| | | MessageBox.Show("请输入 最高水位限制"); |
| | | return null; |
| | | } |
| | | |
| | | if (string.IsNullOrEmpty(textEdit最低水位限制.Text)) |
| | | { |
| | | textEdit最低水位限制.Focus(); |
| | | MessageBox.Show("请输入 最低水位限制"); |
| | | return null; |
| | | } |
| | | |
| | | request.MaxLimitWaterBoxLevel = Convert.ToDouble(textEdit最高水位限制.Text); |
| | | request.MinLimitWaterBoxLevel = Convert.ToDouble(textEdit最低水位限制.Text); |
| | | |
| | | if (request.MinLimitWaterBoxLevel > request.MaxLimitWaterBoxLevel) |
| | | {//可以相等 |
| | | textEdit最低水位限制.Focus(); |
| | | MessageBox.Show("请输入合理的 最低水位限制"); |
| | | return null; |
| | | } |
| | | if (!string.IsNullOrEmpty(textEdit最高水位时间.Text)) |
| | | { |
| | | request.MaxLimitWaterBoxTime = textEdit最高水位时间.Text; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | } |
| | | request.ReservoirDropFlow = flow_list; |
| | | |
| | | request.ReservoirMaxLimitHours = reservoirParasRequestCtrl.GetMaxLevelHourValues(); |
| | | request.ReservoirMinLimitHours = reservoirParasRequestCtrl.GetMinLevelHourValues(); |
| | | // request.ReservoirMaxLimitHours = reservoirParasRequestCtrl.GetMaxLevelHourValues(); |
| | | // request.ReservoirMinLimitHours = reservoirParasRequestCtrl.GetMinLevelHourValues(); |
| | | |
| | | return request; |
| | | } |
| | |
| | | //anaSetting.LastReservoirMaxLevel = |
| | | // textEdit最高水位限制.Text; |
| | | //anaSetting.LastTargetTotalFlow = Convert.ToDouble(textEdit供水总量万.Text); |
| | | |
| | | |
| | | //IStation.SettingsHelper.Save(); |
| | | |
| | | |
| | | //PredictWater predictWater = new PredictWater(); |
| | | // //算法 |
| | | //var Predict= predictWater.GetPredictWaterOneDay(new DateTime(2023, 3, 1, 0, 0, 0), new DateTime(2023, 3, 1, 23, 0, 0), 30,out string error); |
| | | // //平均数 |
| | | // var Ana = predictWater.GetAnaWaterOneDay(new DateTime(2023, 3, 1, 0, 0, 0), new DateTime(2023, 3, 1, 23, 0, 0), 30,out string error1); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | if (OnNextPageEvent != null) |
| | | { |
| | |
| | | { |
| | | return checkEdit重新计算方案.Checked; |
| | | } |
| | | |
| | | private void checkEdit水位限制_CheckedChanged(object sender, EventArgs e) |
| | | { |
| | | textEdit最高水位限制.Enabled = |
| | | textEdit最低水位限制.Enabled = |
| | | checkEdit水位限制.Checked; |
| | | } |
| | | |
| | | |
| | | private void BTN计算方案_Click(object sender, EventArgs e) |
| | | { |