tx
2025-04-09 fa7510e1ed63df0366787fa4ed1b3db6426d2b46
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
 
namespace TProduct.WinFrmUI
{
    public partial class InputDoubleCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public InputDoubleCtrl()
        {
            InitializeComponent();
            labelControl1.Text = "";
        }
 
        public double ParaValue { get { return Convert.ToDouble(spinEdit1.Value); } set { spinEdit1.Value = Convert.ToDecimal(value); } }
        public string ParaName { get { return labelControl1.Text; } set { labelControl1.Text = value; } }
 
        private void OnFrmLoad(object sender, EventArgs e)
        {
            // this.BackColor = Color.FromArgb(170, Color.Blue);
            // this.BackColor = Color.Transparent;
            // this.tableLayoutPanel1.BackColor = Color.Transparent;// Color.FromArgb(10, Color.Blue);
 
            spinEdit1.SelectAll();
            spinEdit1.Focus();
        }
 
        //使用方法
        //InputDoubleCtrl ucPara = new InputDoubleCtrl();
        //ucPara.ParaValue = 1000;
        //ucPara.ParaName = "叶轮原始外径";
        //DialogResult resultOk = DevExpress.XtraBars.Docking2010.Customization.FlyoutDialog.Show(this, ucPara);
        //if (resultOk != System.Windows.Forms.DialogResult.OK)
        //    return;
        //maxD2 = ucPara.ParaValue;
        //if (maxD2 < 20)
        //    return;
    }
}