| | |
| | | TextEditMaterial.Properties.Items.Add(imageItem); |
| | | } |
| | | } |
| | | imageComboBoxEditConnectlenght.Properties.AddEnum(typeof(eLengthType)); |
| | | imageComboBoxEditConnectlenght.Properties.AddEnum(typeof(eElbowType)); |
| | | TextEditCaliber.SelectedIndex = 0; |
| | | TextEditMaterial.SelectedIndex = 0; |
| | | this.selectFlagsPopupCtrl1.SetBindingData<AssetsFlags>(); |
| | | } |
| | | |
| | | public event Func<Vmo.AssetsElbowMainVmo, Task<bool>> ReloadDataEvent = null; |
| | |
| | | { |
| | | _ElbowVmo.Angle = angle; |
| | | } |
| | | _ElbowVmo.ElbowLengthType = (eLengthType)this.imageComboBoxEditConnectlenght.EditValue; |
| | | _ElbowVmo.ElbowType = (eElbowType)this.imageComboBoxEditConnectlenght.EditValue; |
| | | _ElbowVmo.Flags = this.selectFlagsPopupCtrl1.SelectedFlags; |
| | | |
| | | if (await this.ReloadDataEvent.Invoke(_ElbowVmo)) |
| | | { |
| | | TipFormHelper.ShowSucceed("添加成功!"); |
| | |
| | | this.DialogResult = DialogResult.OK; |
| | | this.Close(); |
| | | } |
| | | |
| | | private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e) |
| | | { |
| | | var vm = this.treeList1.GetCurrentViewModel(_AssetsElbowCoefficient); |
| | | if (vm == null) |
| | | return; |
| | | this.TextEditCoefficient.Text = vm.MinorLoss.ToString(); |
| | | } |
| | | } |
| | | } |