| | |
| | | using System.Drawing; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Text; |
| | | using System.Windows.Forms; |
| | | using DPumpHydr.WinFrmUI.Volute.ViewModel; |
| | | using static System.Runtime.InteropServices.JavaScript.JSType; |
| | | using DPumpHydr.WinFrmUI.Volute.ViewModel; |
| | | |
| | | namespace DPumpHydr.WinFrmUI.Volute |
| | | { |
| | |
| | | } |
| | | }; |
| | | } |
| | | eOutflowStyle _stype = eOutflowStyle.æªç¥; |
| | | |
| | | public Func<ViewModel.OtuflowParas, ViewModel.OtuflowParasCalcReponse> OnRefreshShape3D = null; |
| | | public Func<ViewModel.OtuflowParas, ViewModel.OtuflowParasCalcReponse> OnRefreshShape2D = null; |
| | | ViewModel.OtuflowParas _outflowParas = null; |
| | |
| | | //æ§ä»¶ |
| | | SetOutflowParasCtrl1 _sidelineExitControl = null; |
| | | SetOutflowParasCtrl2 _sideCurveExitControl = null; |
| | | |
| | | eOutflowStyle _stype = eOutflowStyle.æªç¥; |
| | | public eOutflowStyle CurrentOutflowStyle |
| | | { |
| | | get |
| | | { |
| | | return _stype; |
| | | } |
| | | } |
| | | public void SetOutflowStyle(eOutflowStyle style) |
| | | { |
| | | if (_stype == style) |
| | |
| | | |
| | | if (_sidelineExitControl == null) |
| | | { |
| | | _sidelineExitControl = new SetOutflowParasCtrl1(); |
| | | _sidelineExitControl = new SetOutflowParasCtrl1() { Name = "SetOutflowParasCtrl1" }; |
| | | _sidelineExitControl.OnRefreshShape += (para) => |
| | | { |
| | | if (OnRefreshShape2D != null) |
| | |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Side-exit-curve.png", 878, 238); |
| | | if (_sidelineExitControl == null) |
| | | { |
| | | _sidelineExitControl = new SetOutflowParasCtrl1(); |
| | | _sidelineExitControl = new SetOutflowParasCtrl1() { Name= "SetOutflowParasCtrl1" }; |
| | | _sidelineExitControl.OnRefreshShape += (para) => |
| | | { |
| | | if (OnRefreshShape2D != null) |
| | |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Side-exit-straight-line.png", 878, 238); |
| | | |
| | | if (_sideCurveExitControl == null) |
| | | _sideCurveExitControl = new SetOutflowParasCtrl2(); |
| | | _sideCurveExitControl.Dock = DockStyle.Top; |
| | | { |
| | | _sideCurveExitControl = new SetOutflowParasCtrl2() { Name = "SetOutflowParasCtrl2" }; |
| | | _sideCurveExitControl.OnRefreshShape += (para) => |
| | | { |
| | | if (OnRefreshShape2D != null) |
| | | return OnRefreshShape2D(para); |
| | | else |
| | | return null; |
| | | }; |
| | | _sideCurveExitControl.Dock = DockStyle.Top; |
| | | } |
| | | |
| | | tabPage1.Controls.Add(_sideCurveExitControl); |
| | | return; |
| | | default: |
| | | throw new ArgumentException("Invalid control type"); |
| | | } |
| | | } |
| | | |
| | | public void SetBindingData( |
| | | eOutflowStyle style, |
| | | ViewModel.HdrBaseInfo hdrBaseInfo, |
| | | ViewModel.GeomBaseInfo geomBaseInfo, |
| | | ViewModel.SectionBundleInfo sectionBundleInfo) |
| | | { |
| | | if(_outflowParas == null) |
| | | { |
| | | InitialParas(style, hdrBaseInfo, geomBaseInfo, sectionBundleInfo); |
| | | } |
| | | else |
| | | { |
| | | if (_stype == style) |
| | | return; |
| | | if(_stype == eOutflowStyle.ä¾§é¢åºå£_ç´çº¿è¿æ¥) |
| | | { |
| | | if(style != eOutflowStyle.ä¾§é¢åºå£_ç´çº¿è¿æ¥) |
| | | { |
| | | InitialParas(style, hdrBaseInfo, geomBaseInfo, sectionBundleInfo); |
| | | } |
| | | else |
| | | { |
| | | SetOutflowStyle(style); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | if (style == eOutflowStyle.ä¾§é¢åºå£_ç´çº¿è¿æ¥) |
| | | { |
| | | InitialParas(style, hdrBaseInfo, geomBaseInfo, sectionBundleInfo); |
| | | } |
| | | else |
| | | { |
| | | SetOutflowStyle(style); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | public void InitialParas( |
| | | eOutflowStyle style, |
| | | ViewModel.HdrBaseInfo hdrBaseInfo, |