| | |
| | | { |
| | | InitializeComponent(); |
| | | this.elbowsMatchingCtrl1.RowClickEvent += RowClickEvent; |
| | | this.fourLinkMatchingCtrl1.RowClickEvent += RowClickEvent; |
| | | this.pipeLineMatchingCtrl1.RowClickEvent += RowClickEvent; |
| | | this.pumpMatchingCtrl1.RowClickEvent += RowClickEvent; |
| | | this.threeLinkMatchingCtrl1.RowClickEvent += RowClickEvent; |
| | | this.valveMatchingCtrl1.RowClickEvent += RowClickEvent; |
| | | } |
| | | |
| | | private void RowClickEvent(string code) |
| | |
| | | |
| | | public event Action<string> FormRowClickEvent = null; |
| | | |
| | | public event Func<AssetsAutoMatchingViewModel, bool> RelaodEvent = null; |
| | | |
| | | private BLL.PumpMain _pumpMain = null; |
| | | |
| | | private BLL.AdaptingManage _adaptingManage = null; |
| | |
| | | |
| | | private BLL.ValveMain _valveMain = null; |
| | | |
| | | public void SetBindingData(AssetsAutoMatchingViewModel inputViewModel) |
| | | private AssetsAutoMatchingViewModel _assetsAutoMatching = null; |
| | | |
| | | public async void SetBindingData(AssetsAutoMatchingViewModel inputViewModel) |
| | | { |
| | | _assetsAutoMatching = inputViewModel; |
| | | this.elbowsMatchingCtrl1.SetBindingData(inputViewModel.ElbowsMatchingModels); |
| | | this.pipeLineMatchingCtrl1.SetBindingData(inputViewModel.PipeLineMatchingModels); |
| | | this.pumpMatchingCtrl1.SetBindingData(inputViewModel.PumpMatchingModels); |
| | | this.threeLinkMatchingCtrl1.SetBindingData(inputViewModel.ThreeLinkMatchingModels); |
| | | this.fourLinkMatchingCtrl1.SetBindingData(inputViewModel.FourLinkMatchingModels); |
| | | this.valveMatchingCtrl1.SetBindingData(inputViewModel.ValveMatchingModels); |
| | | await SetMatching(inputViewModel); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 初始化 |
| | | /// 自动匹配 |
| | | /// </summary> |
| | | public async Task<AssetsAutoMatchingViewModel> SetMatching(AssetsAutoMatchingViewModel input) |
| | | { |
| | |
| | | assetsAutoMatching.ValveMatchingModels = valveMatching; |
| | | return assetsAutoMatching; |
| | | } |
| | | |
| | | //确定 |
| | | private void btnComplete_Click(object sender, EventArgs e) |
| | | { |
| | | if (RelaodEvent.Invoke(_assetsAutoMatching)) |
| | | { |
| | | TipFormHelper.ShowSucceed("修改成功!"); |
| | | } |
| | | else |
| | | { |
| | | TipFormHelper.ShowError("修改失败!"); |
| | | } |
| | | } |
| | | } |
| | | } |