| | |
| | | using System; |
| | |  |
| | | |
| | | using DPumpHydr.WinFrmUI.Volute.ViewModel; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.IO; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace DPumpHydr.WinFrmUI.Volute |
| | | namespace DPumpHydr.WinFrmUI.Volute |
| | | { |
| | | public partial class ctrlSetOutflowStyle : UserControl |
| | | public partial class ctrlSetOutflowStyle : ParasInfoBaseCtrl |
| | | { |
| | | public ctrlSetOutflowStyle() |
| | | { |
| | | InitializeComponent(); |
| | | AddControlToPanel(_type, panel); |
| | | BuildAllTips(); |
| | | } |
| | | int _type = 0; |
| | | public void SetBindingData(eOutflowStyle eOutflowStyle) |
| | | { |
| | | if (eOutflowStyle == eOutflowStyle.ä¸å¿åºå£_åç´æ³å
°é¢æµåº) |
| | | { |
| | | _type = 0; |
| | | panel.Controls.Clear(); |
| | | AddControlToPanel(_type, panel); |
| | | } |
| | | if (eOutflowStyle == eOutflowStyle.ä¾§é¢åºå£_æ²çº¿è¿æ¥) |
| | | { |
| | | _type = 1; |
| | | panel.Controls.Clear(); |
| | | AddControlToPanel(_type, panel); |
| | | } |
| | | if (eOutflowStyle == eOutflowStyle.ä¾§é¢åºå£_ç´çº¿è¿æ¥) |
| | | { |
| | | _type = 2; |
| | | panel.Controls.Clear(); |
| | | AddControlToPanel(_type, panel); |
| | | } |
| | | } |
| | | private Control AddControlToPanel(int type, Panel panel) |
| | | { |
| | | Control newControl = null; |
| | | switch (type) |
| | | { |
| | | case 0: |
| | | newControl = new centralExitControl(); |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Central-exit.png", 878, 238); |
| | | break; |
| | | case 1: |
| | | newControl = new sideCurveExitControl(); |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Side-exit-curve.png", 878, 238); |
| | | break; |
| | | case 2: |
| | | newControl = new sidelineExitControl(); |
| | | metroTileæ©æ£ç®¡å½¢ç¶.BackgroundImage = GlobalResource.BuildImage("Side-exit-straight-line.png", 878, 238); |
| | | break; |
| | | default: |
| | | throw new ArgumentException("Invalid control type"); |
| | | } |
| | | |
| | | // å°æ§ä»¶æ·»å å°Panelä¸ |
| | | panel.Controls.Add(newControl); |
| | | newControl.Dock = DockStyle.Top; |
| | | return newControl; |
| | | } |
| | | |
| | | private void ctrlSelectOutflowStyle_Load(object sender, EventArgs e) |
| | | { |
| | | |
| | | |
| | | |
| | | private void BuildAllTips() |
| | | { |
| | | metroToolTip第å
æ¥æç¤º.SetToolTip(this.metroTileæ©æ£ç®¡å½¢ç¶, "æé¢å¾"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | private void mBtnæ´æ°æ¨¡å_Click(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | } |
| | | } |