| | |
| | | this.DescriptionTextEdit.Text = _TankVmo.Description; |
| | | this.TextEditKeyWord.Text = string.Join(",", _TankVmo.KeyWord); |
| | | this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(_TankVmo.Flags); |
| | | this.textEditDN.Text = _TankVmo.DN.ToString(); |
| | | this.textEditMinLevel.Text = _TankVmo.MinLevel.ToString(); |
| | | this.textEditMinVol.Text = _TankVmo.MinVol.ToString(); |
| | | this.textEditVoerFlow.Checked = _TankVmo.OverFlow; |
| | | } |
| | | |
| | | public event Func<Vmo.AssetsTankMainVmo, Task<bool>> ReloadDataEvent = null; |
| | |
| | | _TankVmo.Description = DescriptionTextEdit.Text.Trim(); |
| | | _TankVmo.Name = TextEditName.Text.Trim(); |
| | | _TankVmo.KeyWord = TextEditKeyWord.Text.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries).ToList(); |
| | | |
| | | _TankVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; |
| | | if (double.TryParse(this.textEditDN.Text, out double DN)) |
| | | { |
| | | _TankVmo.DN = DN; |
| | | } |
| | | if (double.TryParse(this.textEditMinLevel.Text, out double MinLevel)) |
| | | { |
| | | _TankVmo.MinLevel = MinLevel; |
| | | } |
| | | if (double.TryParse(this.textEditMinVol.Text, out double MinVol)) |
| | | { |
| | | _TankVmo.MinVol = MinVol; |
| | | } |
| | | _TankVmo.OverFlow = this.textEditVoerFlow.Checked; |
| | | if (await this.ReloadDataEvent.Invoke(_TankVmo)) |
| | | { |
| | | TipFormHelper.ShowSucceed("修改成功!"); |