| | |
| | | public EditExchangerMainDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.treeList1.InitialMultiColSettings(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | } |
| | | |
| | |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | if (_ExchangerVmo.Material == null) |
| | | if (_ExchangerVmo.Material == null || _ExchangerVmo.Material == string.Empty) |
| | | { |
| | | TextEditMaterial.EditValue = "默认"; |
| | | } |
| | |
| | | return; |
| | | |
| | | var select = GetCoefficientByMaterial(TextEditMaterial.Text); |
| | | if (select == null) |
| | | if (select !=null) |
| | | { |
| | | this.TextEditMinorLoss.Text = string.Empty; |
| | | this.TextEditMinorLoss.Text = select.MinorLoss.ToString(); |
| | | return; |
| | | } |
| | | this.TextEditMinorLoss.Text = select.MinorLoss.ToString(); |
| | | } |
| | | |
| | | //找到最相近的材料 |
| | |
| | | this.DialogResult = DialogResult.OK; |
| | | this.Close(); |
| | | } |
| | | |
| | | private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) |
| | | { |
| | | var vm = this.treeList1.GetCurrentViewModel(_AssetsExchangerCoefficient); |
| | | if (vm == null) |
| | | return; |
| | | this.TextEditMinorLoss.Text = vm.MinorLoss.ToString(); |
| | | } |
| | | } |
| | | } |