using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Reflection; using System.Windows.Forms; namespace HotelPms.Share.Windows.Util { [Serializable()] public class InputItem { private bool lbIsChkData = false; private bool lbNotNull = false; private int liMaxKeta = 0; private int liSeparatorLen = 0; private numInputType liInputType = 0; private bool lbIsDate = false; private string lsIn_Range = ""; // '”͈́F "'A','E','F'" OR "'1','2','21'" OR "[1,10]" OR "(1,10)" OR "[1,10)" OR "(1,10]" ‹ó”’‚ÌŽž‚µ‚È‚¢ private string lsDBFieldName = ""; private string lsCtrName = ""; private bool lbIsPrimaryKey = false; private int liIndex = 0; private int liCtrIdx = 0; private string lsText = ""; private string lsTag = ""; private numShowStyle showStyle = 0; private bool enableUpDownKey = false; //ª‚Ɓ«ƒL[‚Łuenterv‚Ɓuescv“¯‚¶—l‚É‚·‚é private ImeMode imeMode = ImeMode.On; private string mstNameCtrl = string.Empty; public ImeMode ImeMode { get { return imeMode; } set { imeMode = value; } } public int CtrIdx { get{return liCtrIdx;} set{liCtrIdx = value;} } public int Index{ get{return liIndex;} set{liIndex = value;} } public bool EnableUpDownKey { get { return enableUpDownKey; } set { enableUpDownKey = value; } } public bool IsChkData { get{return lbIsChkData;} set{lbIsChkData = value;} } public numShowStyle ShowStyle { get { return showStyle; } set { showStyle = value; } } public bool NotNull { get{return lbNotNull;} set{lbNotNull = value;} } public int MaxKeta { get{return liMaxKeta;} set { liMaxKeta = value; int len = liMaxKeta / 3; liSeparatorLen =liMaxKeta + len + (liMaxKeta % 3 == 0 ? (len == 0 ? 0 : -1) : 0); } } public int SeparatorLen { get { return liSeparatorLen; } } public numInputType InputType { get{return liInputType;} set{liInputType = value;} } public bool IsDate { get{return lbIsDate;} set{lbIsDate = value;} } public string In_Range { get{return lsIn_Range;} set{lsIn_Range = value;} } public string DBFieldName { get{return lsDBFieldName;} set{lsDBFieldName = value;} } public string CtrName { get{return lsCtrName;} set{lsCtrName = value;} } public bool IsPrimaryKey { get{return lbIsPrimaryKey;} set{lbIsPrimaryKey = value;} } public string Text { get{return lsText;} set{lsText = value;} } public string MstNameCtrl { get { return mstNameCtrl; } set { mstNameCtrl = value; } } public string Tag { get{return lsTag;} set{lsTag = value;} } public string ShowAllInfo() { try { string wsRet = ""; string wvValue = ""; Type woType = System.Type.GetType("Oat.Library.CommonClass.WinForm.InputItem"); FieldInfo[] woFields = woType.GetFields(BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Static); for (int i = 0; i < woFields.Length; i++) { try { wvValue = woFields[i].GetValue(this).ToString(); } catch { wvValue = ""; } wsRet = wsRet + woFields[i].Name + " = " + wvValue + "\n"; } return wsRet; } catch { return ""; } } public InputItem Clone() { return MemberwiseClone() as InputItem; } } }