/// <summary>
 /// 读卡器初始化
 /// </summary>
 private void InitICCard()
 {
     commclass = new CommClassEmpty(StaticParameter.BaudRate, StaticParameter.DateBits, StaticParameter.StopBits, StaticParameter.Parity, StaticParameter.PortName);
     commclass.RecInvTxt = txtID;
     commclass.alarmSound = alarmSound;
 }
        //#region IC卡相关
        //delegate void ICCardDelegate();
        void InitICCard()
        {
            commclass = new CommClassEmpty(StaticParameter.BaudRate, StaticParameter.DateBits,
                StaticParameter.StopBits, StaticParameter.Parity,StaticParameter.PortName);
            commclass.RecInvTxt = txtID;
            commclass.alarmSound = alarmSound;
            #region IC卡和ID卡合并之前的旧版程序
            /*-----------
            if (StaticParameter.CardType == "IC")
            {
                int iCom,iBoudRate;
                if (int.TryParse(ini.IniReadValue("IcCard", "COM"),out iCom) && int.TryParse(ini.IniReadValue("IcCard", "BoudRate"), out iBoudRate))
                {
                    #region 初始化IC卡读卡器
                    string strPasswordA = CommonMethod.DecryptDES(ini.IniReadValue("IcCard", "PasswordA"), "EncryDes");
                    string strPasswordB = CommonMethod.DecryptDES(ini.IniReadValue("IcCard", "PasswordB"), "EncryDes");

                    //初始化
                    int iInit = this.icCard.Initialize(iCom, iBoudRate, strPasswordA, strPasswordB, StaticParameter.NavicertLength);
                    if (iInit == 0)
                    {
                        alarmSound.Alarm("IC卡读卡器故障");
                        this.lblICCardInit.Visible = false;
                    }
                    else
                    {
                        this.lblICCardInit.Visible = false;
                        //读取到IC卡后要设置的界面元素,比如 煤种,煤矿,车主。。。。
                        int i = 0;
                        this.icCard.ReadBlockData(1, ref i);
                        icCard.SetUIValue += new EventHandler(SetUIICCard);
                    }

                    txtNavicertCode.Focus();
                    #endregion
                }
                else
                {
                    alarmSound.Alarm("IC卡读卡器端口号或者波特率错误");
                }
            }
            else
            {
                string strNavicertsql = "select top 1 BusinName from Sys_Dictionary where BusinTypeID ='1017' and BusinID='2' and IsForBid ='0' order by BusinName desc";

                dNavicert = decimal.Parse(DbHelperSQL.GetSingle(strNavicertsql).ToString());

                txtIDCard.Focus();
                this.lblICCardInit.Visible = false;
            }
            ------*/
            //#endregion
        }