using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using DevExpress.XtraEditors; namespace IStation.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; } }