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 SetDoubleDlg : DevExpress.XtraEditors.XtraForm
|
{
|
public SetDoubleDlg()
|
{
|
InitializeComponent();
|
}
|
|
public void IsInt()
|
{
|
spinEdit1.Properties.IsFloatValue = false;
|
}
|
|
public double Number { get { return Convert.ToDouble(spinEdit1.Value); } set { spinEdit1.Value = Convert.ToDecimal(value); } }
|
//{ get { return spinEdit1.GetValue(); } set { spinEdit1.SetValue(value); } }
|
public void SetNumberRange(double min,double max)
|
{
|
spinEdit1.Properties.MinValue = Convert.ToDecimal( min);
|
spinEdit1.Properties.MaxValue = Convert.ToDecimal(max);
|
}
|
|
private void simpleButton2_Click(object sender, EventArgs e)
|
{
|
this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.Close();
|
}
|
|
private void simpleButton1_Click(object sender, EventArgs e)
|
{
|
this.DialogResult = System.Windows.Forms.DialogResult.OK;
|
this.Close();
|
}
|
|
private void OnDlgLoad(object sender, EventArgs e)
|
{
|
spinEdit1.Focus();
|
spinEdit1.SelectAll();
|
}
|
|
private void SetDoubleDlg_Shown(object sender, EventArgs e)
|
{
|
spinEdit1.Focus();
|
spinEdit1.SelectAll();
|
}
|
}
|
}
|