using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
|
namespace HotelPms.Share.Windows.Component.PropertyDialog
|
{
|
public partial class FormInputType : Form
|
{
|
private string m_InputType = string.Empty;
|
|
//None = 0x1, //ÁÉȵ
|
//Num = 0x2, //
|
//Alpha_S = 0x4, //At@xbg¬
|
//Alpha_C = 0x8, //At@xbgå
|
//Kana = 0x10, //Ji
|
//Half = 0x20, //¼p
|
//Full = 0x40, //Sp
|
//Num_FieldClear = 0x80, //üÍÅå
´¦½çNA
|
//Plus_FieldClear = 0x100,//"+"L[ÅNA
|
//Space = 0x200, //ó
|
//Colon = 0x400, //":"ðÂ\
|
//Subtract = 0x800, //"-"
|
//DotSendKeys = 0x1000, //"."¨"000"Æ·é
|
//Dot = 0x2000, //"."
|
//Slash = 0x4000, //"/"
|
//Comma = 0x8000, //"," J}
|
|
private string[] m_TypeList = new string[] { "0x1", "0x2", "0x4", "0x8", "0x10", "0x20", "0x40", "0x200", "0x400", "0x800", "0x1000", "0x2000", "0x80", "0x100", "0x4000", "0x8000" };
|
|
public string InputType
|
{
|
get { return m_InputType; }
|
set { m_InputType = value; }
|
}
|
|
public FormInputType(string inputType)
|
{
|
m_InputType = inputType;
|
InitializeComponent();
|
}
|
|
private void button1_Click(object sender, EventArgs e)
|
{
|
m_InputType = string.Empty;
|
for (int i = 1; i <= 15; i++)
|
{
|
CheckBox obj = this.Controls[string.Format("chkType{0}", i)] as CheckBox;
|
if (obj.Checked)
|
{
|
if (m_InputType.Length > 0) { m_InputType += ","; }
|
m_InputType += m_TypeList[i];
|
}
|
}
|
if (m_InputType.Length == 0) { m_InputType = "0x1"; }
|
this.DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
|
private void button2_Click(object sender, EventArgs e)
|
{
|
this.Close();
|
}
|
|
private void FormInputType_Load(object sender, EventArgs e)
|
{
|
if (m_InputType.Length == 0) { return; }
|
string[] dataList = m_InputType.Split(new char[] { ',' });
|
foreach (string item in dataList)
|
{
|
int index = Array.IndexOf(m_TypeList, item);
|
if (index <= 0) { continue; }
|
(this.Controls[string.Format("chkType{0}", index)] as CheckBox).Checked = true;
|
}
|
|
}
|
}
|
}
|