| | |
| | | BuildAllTips(); |
| | | } |
| | | eOutflowStyle _stype = eOutflowStyle.æªç¥; |
| | | //ViewModel.OtuflowParas _otuflowParas = null; |
| | | ViewModel.OtuflowParas _otuflowParas = new OtuflowParas() { Offset = 10, High = 420, Dia = 80, TopValue_left = 80, BtmValue_left = 80, BtmValue_reight = 80, TopValue_reight = 80, H1 = 10, H2 = 10, Septalradius = 10 }; |
| | | sidelineExitControl _sidelineExitControl = null; |
| | | sideCurveExitControl _sideCurveExitControl = null; |
| | | public void SetBindingData(eOutflowStyle style) |
| | | { |
| | | if(_stype == style) |
| | | return; |
| | | |
| | | |
| | | _stype = style; |
| | | |
| | | InitialParasControl( ); |
| | | |
| | | var control = InitialParasControl( ); |
| | | if (control is sidelineExitControl) |
| | | { |
| | | _sidelineExitControl = (sidelineExitControl)control; |
| | | |
| | | _sidelineExitControl.SetBindingData(_otuflowParas); |
| | | if (_stype == eOutflowStyle.ä¸å¿åºå£_åç´æ³å
°é¢æµåº) |
| | | { |
| | | _sidelineExitControl.SetA_state(false); |
| | | } |
| | | else |
| | | { |
| | | _sidelineExitControl.SetA_state(true); |
| | | } |
| | | } |
| | | if (control is sideCurveExitControl) |
| | | { |
| | | _sideCurveExitControl = (sideCurveExitControl)control; |
| | | _sideCurveExitControl.SetBindingData(_otuflowParas); |
| | | } |
| | | |
| | | } |
| | | public ViewModel.OtuflowParas GetBindingData(out string error) |
| | | { |
| | | error = ""; |
| | | if(_stype == eOutflowStyle.ä¾§é¢åºå£_ç´çº¿è¿æ¥) |
| | | { |
| | | _otuflowParas = _sideCurveExitControl.GetBindingData(out error); |
| | | if(_otuflowParas == null) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | _otuflowParas = _sidelineExitControl.GetBindingData(out error); |
| | | if (_otuflowParas == null) |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | return _otuflowParas; |
| | | } |
| | | private Control InitialParasControl( ) |
| | | { |
| | |
| | | switch (_stype) |
| | | { |
| | | case eOutflowStyle.ä¸å¿åºå£_åç´æ³å
°é¢æµåº: |
| | | newControl = new centralExitControl(); |
| | | newControl = new sidelineExitControl(); |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Central-exit.png", 878, 238); |
| | | break; |
| | | case eOutflowStyle.ä¾§é¢åºå£_æ²çº¿è¿æ¥: |
| | | newControl = new sideCurveExitControl(); |
| | | newControl = new sidelineExitControl(); |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Side-exit-curve.png", 878, 238); |
| | | break; |
| | | case eOutflowStyle.ä¾§é¢åºå£_ç´çº¿è¿æ¥: |
| | | newControl = new sidelineExitControl(); |
| | | newControl = new sideCurveExitControl(); |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Side-exit-straight-line.png", 878, 238); |
| | | break; |
| | | default: |