示例#1
0
        public string dq_sfzhm; //用户序列号

        public Login_Form()
        {
            InitializeComponent();
            ModuleSettings settings = ModuleConfig.GetSettings();

            if (settings.Useidcard == 1)
            {
                textBox1.Enabled = false;
                textBox2.Enabled = false;
            }
            userclass  = 1;
            invokeform = new InvokeDelegate(invokeformfun);
            idcardinfo = new CIDCardInfo();
            idcardinfo.InitIDcardDev();
            idcardinfo.OnIDCardReceived += new CIDCardInfo.IDCardRequest(idcardinfo_OnIDCardReceived);
            idcardinfo.Start();
        }
示例#2
0
        public static ModuleSettings GetSettings()
        {
            ModuleSettings data       = null;
            XmlSerializer  serializer = new XmlSerializer(typeof(ModuleSettings));

            try
            {
                string     fileName = "zk.config";
                FileStream fs       = new FileStream(fileName, FileMode.Open);
                data = (ModuleSettings)serializer.Deserialize(fs);
                fs.Close();
            }
            catch
            {
                data = new ModuleSettings();
            }


            return(data);
        }
示例#3
0
        public SetKsxmForm(ModuleSettings settings)
        {
            InitializeComponent();
            this.settings = settings;
            selectlist    = new ArrayList();
            noselectlist  = new ArrayList();
            string[] allxm = { "6:连续障碍", "2:单边桥", "4:直角转弯", "1:侧方位停车", "0:坡道起步", "5:限速通过限宽门", "7:百米加减挡", "8:起伏路驾驶", "3:曲线行驶" };
            string[] str   = settings.DevInfo.Split(',');
            if (settings.DevInfo != string.Empty)
            {
                for (int i = 0; i < str.Length; i++)
                {
                    listBox2.Items.Add(str[i].Substring(1, str[i].Length - 1));
                }

                bool tmpbool = true;
                for (int i = 0; i < allxm.Length; i++)
                {
                    tmpbool = true;
                    for (int j = 0; j < str.Length; j++)
                    {
                        tmpbool = tmpbool && (allxm[i].CompareTo(str[j].Substring(1)) != 0);
                    }
                    if (tmpbool)
                    {
                        listBox1.Items.Add(allxm[i]);
                    }
                }
            }
            else
            {
                for (int i = 0; i < allxm.Length; i++)
                {
                    listBox1.Items.Add(allxm[i]);
                }
            }
        }
示例#4
0
 public Setting_Form()
 {
     InitializeComponent();
     settings = new ModuleSettings();
     settings = ModuleConfig.GetSettings();
 }