using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using DevExpress.XtraEditors; using Lskj.Business.Impl; using Lskj.Control; namespace Lskj.SweepCode.Control { public partial class SweepControl : UserControl { public SweepControl() { InitializeComponent(); } /// /// 控件 /// /// The title label object. public ButtonEdit ObjButtonEdit { get { return buttonEdit1; } } /// /// 控件的输入值 /// /// The title label object. public string ObjSweepControlText { get { return buttonEdit1.Text; } } /// /// 标题对象 /// /// The title label object. public Label TitleLabelObj { get { return lbTitle; } } /// /// 设置控件的排序值 /// /// The title label object. public string orderId; /// /// 控件公共回车事件 /// /// The KeyEventHandler KeyDown. public event KeyEventHandler KeyDown; /// /// 是否清空数据(默认清空,配置为1就不清空) /// public bool isEmptyData = true; /// /// 是否扫码后获取焦点(默认获取,配置为1就不获取) /// public bool isGainFocus = true; /// /// 扫码后刷新主表 /// public bool RefreshMain = false; /// /// 扫码后等待时间(等待时间结束前,当前控件不允许扫码,单位为秒) /// public int WaitingTime = 0; /// /// 字体大小 /// /// The size of the control. public int FontSize { get { return FontSize; } set { if (value > 0) { this.lbTitle.Font = new Font(this.lbTitle.Font.FontFamily, value); this.buttonEdit1.Font = new Font(this.buttonEdit1.Font.FontFamily, value); } } } private void buttonEdit1_KeyDown(object sender, KeyEventArgs e) { try { if (KeyDown != null) { KeyDown(this, e); } } catch (Exception ex) { string Message = ErrorMessage.PromptErrorMessage(ex); MessageUtil.Show(Message,ex.Message); } } } }