ホテル管理システム
ogi
yesterday 1a1c8e71fcd14858f595029f089b2d4a00202b32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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,          //ƒAƒ‹ƒtƒ@ƒxƒbƒg¬
        //Alpha_C = 0x8,          //ƒAƒ‹ƒtƒ@ƒxƒbƒg‘å
        //Kana = 0x10,            //ƒJƒi
        //Half = 0x20,            //”¼Šp
        //Full = 0x40,            //‘SŠp
        //Num_FieldClear = 0x80,  //“ü—͍ő包’´‚¦‚½‚çƒNƒŠƒA
        //Plus_FieldClear = 0x100,//"+"ƒL[‚ŃNƒŠƒA
        //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;
            }
 
        }
    }
}