Exemplo n.º 1
0
        private void LabelMenu__Click(object sender, EventArgs e)
        {
            string tag = "";

            if (sender is Label)
            {
                tag = ((Label)sender).Tag.ToString();
            }
            else if (sender is Panel)
            {
                tag = ((Panel)sender).Tag.ToString();
            }
            string[] ss = tag.Split('@');
            if (ss.Length != 2)
            {
                return;
            }
            string     ModuleName = ss[1];
            string     Module     = ss[0];
            frmAppMain frm        = Pub.GetAppMainForm();

            if (Module == "RSCardOprter")
            {
                byte flag = Convert.ToByte(ModuleName);
                if (frm != null)
                {
                    frm.ExecRSCardOprter(flag);
                }
            }
            else
            {
                ExecModule(frm, ModuleName, Module);
            }
        }
Exemplo n.º 2
0
        protected override void InitForm()
        {
            appMainForm = Pub.GetAppMainForm();
            Pub.SetFormAppIcon(this);
            ToolStripDropDownButton toolDown;
            ToolStripItem           item;

            base.InitForm();
            if (IgnoreSelect)
            {
                SetToolItemState("ItemSelect", false);
                SetToolItemState("ItemUnselect", false);
                SetToolItemState("ItemLine4", false);
            }
            StrPosition = Pub.GetResText(formCode, "ItemPosition", "");
            StrReading  = Pub.GetResText(formCode, "MsgReadingData", "");
            StrReadEnd  = Pub.GetResText(formCode, "MsgReadEndData", "");
            contextMenu.Items.Clear();
            bool HasTAG = ItemTAG1.Visible || ItemTAG2.Visible || ItemTAG3.Visible || ItemTAG4.Visible ||
                          ItemTAG5.Visible || ItemTAG6.Visible || ItemTAG7.Visible;

            for (int i = 0; i < Toolbar.Items.Count; i++)
            {
                if (Toolbar.Items[i] is ToolStripButton)
                {
                    item      = contextMenu.Items.Add(Toolbar.Items[i].Text, Toolbar.Items[i].Image);
                    item.Tag  = Toolbar.Items[i].Name;
                    item.Name = "pop" + Toolbar.Items[i].Name;
                }
                else if (Toolbar.Items[i] is ToolStripSeparator)
                {
                    item      = new ToolStripSeparator();
                    item.Tag  = Toolbar.Items[i].Name;
                    item.Name = "pop" + Toolbar.Items[i].Name;
                    contextMenu.Items.Add(item);
                }
                else if (Toolbar.Items[i] is ToolStripDropDownButton)
                {
                    toolDown = (ToolStripDropDownButton)Toolbar.Items[i];
                    if ((toolDown.DropDownItems.Count > 0) && HasTAG)
                    {
                        item      = new ToolStripSeparator();
                        item.Tag  = "popItemTAGExtLine";
                        item.Name = "popItemTAGExtLine";
                        contextMenu.Items.Add(item);
                    }
                    for (int j = 0; j < toolDown.DropDownItems.Count; j++)
                    {
                        item      = contextMenu.Items.Add(toolDown.DropDownItems[j].Text, toolDown.DropDownItems[j].Image);
                        item.Tag  = null;
                        item.Name = "pop" + toolDown.DropDownItems[j].Name;
                    }
                }
            }
            DeleteLine();
        }
Exemplo n.º 3
0
 private void ExecModule(frmAppMain frm, string ModuleName, string Module)
 {
     if (frm == null)
     {
         frm = Pub.GetAppMainForm();
     }
     if (frm != null)
     {
         frm.ExecModule(ModuleName, Module);
     }
 }
Exemplo n.º 4
0
 private void frmRSEmpCardChange_FormClosed(object sender, FormClosedEventArgs e)
 {
     if (IsChgOk)
     {
         this.DialogResult = DialogResult.OK;
     }
     if (ShowSFAllowance)
     {
         frmAppMain frm = Pub.GetAppMainForm();
         if (frm != null)
         {
             frm.ExecModule("SFAllowance", "SF");
         }
     }
 }
Exemplo n.º 5
0
        private void FaCard(bool IsBatch, string Oprt)
        {
            frmAppMain frm = Pub.GetAppMainForm();

            if (SystemInfo.CardKey == "")
            {
                Pub.ShowErrorMsg(Pub.GetResText(formCode, "ErrorCardkey", ""));
                if (frm != null)
                {
                    frm.ExecModule("SYOption", "");
                }
                return;
            }
            if (SystemInfo.DealersCode == "")
            {
                Pub.ShowErrorMsg(Pub.GetResText(formCode, "ErrorDealersCode", ""));
                if (frm != null)
                {
                    frm.ExecModule("SYOption", "");
                }
                return;
            }
            if (SystemInfo.CustomersCode == 0)
            {
                Pub.ShowErrorMsg(Pub.GetResText(formCode, "ErrorCustomersCode", ""));
                if (frm != null)
                {
                    frm.ExecModule("SYOption", "");
                }
                return;
            }
            if (!DeviceObject.objCPIC.IsOnline())
            {
                lblMsg.Text = Pub.GetResText(formCode, "ReadCardError1", "");
                return;
            }
            DateTime d   = new DateTime();
            DateTime Fad = new DateTime();

            if (!db.GetServerDate(ref d))
            {
                return;
            }
            Fad = d;
            if (Pub.MessageBoxShowQuestion(string.Format(Pub.GetResText(formCode, "MsgServerDate", ""), d)))
            {
                return;
            }
            double DepositMoney = 0;

            double.TryParse(CurrencyToStringEx(ItemMoneyText.Text), out DepositMoney);
            if (DepositMoney < 0)
            {
                DepositMoney = 0.00;
            }
            DataTable dt = (DataTable)bindingSource.DataSource;
            DataRow   dr = null;

            IsFaCard = true;
            RefreshForm(true);
            string   EmpSysID        = "";
            string   CardSectorNo    = "";
            int      CardStatusID    = 0;
            string   msg             = "";
            int      DepositDiscount = 0;
            int      UseTimes        = 0;
            int      reStatus        = 0;
            DateTime CardStartDate   = new DateTime();
            DateTime CardEndDate     = new DateTime();
            bool     IsFirst         = true;
            long     CardDays        = 0;
            string   CardPWD         = "";
            string   EmpNo           = "";
            string   EmpName         = "";
            byte     CardTypeID      = 0;
            double   CardStored      = 0.00;
            double   DiscountM       = 0.00;
            bool     CardCheckOrder  = false;
            string   CardNoDays      = "";
            int      cardRet         = 0;
            string   CardData10;
            string   CardDataH;
            string   CardData8;
            string   CardNo10;
            string   CardNoH;
            string   CardNo8;
            string   UseEmpNo         = "";
            string   ErrMsg           = "";
            double   CardFee          = 0;
            bool     IsLock           = false;
            string   LockOprtNo       = "";
            string   LockComputerName = "";
            int      currRow          = bindingSource.Position;
            string   MacTAG           = DeviceObject.objCPIC.GetMacTAG();

            HSUNFK.TCardPubData pubData = new HSUNFK.TCardPubData();
            HSUNFK.TCardSFData  sfData  = new HSUNFK.TCardSFData();
            HSUNFK.TCardSKData  skData  = new HSUNFK.TCardSKData();
            bool IsError     = false;
            bool IsValidCard = false;

            while (IsFaCard)
            {
                for (int i = currRow; i < dt.Rows.Count; i++)
                {
AgainCard:
                    bindingSource.Position = i;
                    dataGrid.CurrentCell   = dataGrid.SelectedRows[0].Cells[0];
                    Application.DoEvents();
                    dr       = dt.Rows[i];
                    EmpSysID = dr["EmpSysID"].ToString();
                    if (!db.EmpGetCardStatusIDByEmpSysID(EmpSysID, ref CardStatusID, ref IsLock, ref LockOprtNo, ref LockComputerName))
                    {
                        continue;
                    }
                    if (IsLock || ((CardStatusID != 10) && (CardStatusID != 60)))
                    {
                        continue;
                    }
                    CardSectorNo  = dr["CardSectorNo"].ToString();
                    CardStartDate = (DateTime)dr["CardStartDate"];
                    CardEndDate   = (DateTime)dr["CardEndDate"];
                    CardPWD       = dr["CardPWD"].ToString();
                    if ((CardPWD == "") || (!Pub.IsNumeric(CardPWD)))
                    {
                        CardPWD = "000000";
                    }
                    if (Convert.ToInt32(CardPWD) > 999999)
                    {
                        CardPWD = "000000";
                    }
                    EmpNo           = dr["EmpNo"].ToString();
                    EmpName         = dr["EmpName"].ToString();
                    CardTypeID      = Convert.ToByte(dr["CardTypeID"]);
                    DepositDiscount = 0;

                    if (!dr.IsNull("DepositDiscount"))
                    {
                        DepositDiscount = Convert.ToInt32(dr["DepositDiscount"].ToString());
                    }
                    CardFee = 0;
                    if (!dr.IsNull("CardFee"))
                    {
                        CardFee = Convert.ToDouble(dr["CardFee"].ToString());
                    }
                    UseTimes = 0;
                    if (!dr.IsNull("CardUseTimes"))
                    {
                        UseTimes = Convert.ToInt32(dr["CardUseTimes"].ToString());
                    }
                    CardStored = 0.00;
                    if (!dr.IsNull("CardStored"))
                    {
                        CardStored = Convert.ToDouble(dr["CardStored"]);
                    }
                    if (!IsBatch && (DepositMoney > 0))
                    {
                        CardStored = DepositMoney;
                        if (SystemInfo.FaCardFee)
                        {
                            CardStored -= CardFee;
                        }
                        if (CardStored < 0)
                        {
                            CardFee    = 0;
                            CardStored = 0;
                        }
                    }
                    DiscountM = CardStored;
                    double tmpMoney = 0;
                    byte   discFlag = db.GetDiscDiscount(CardStored, CardTypeID, ref tmpMoney);
                    if (discFlag == 2)
                    {
                        break;
                    }
                    if (discFlag == 1)
                    {
                        DiscountM = DiscountM + tmpMoney;
                    }
                    else if (DepositDiscount > 0)
                    {
                        DiscountM = CardStored * DepositDiscount / 100;
                    }
                    CardCheckOrder = false;
                    if (!dr.IsNull("CardCheckOrder"))
                    {
                        CardCheckOrder = Pub.ValueToBool(dr["CardCheckOrder"]);
                    }
                    if (IsFirst)
                    {
                        IsFirst  = false;
                        CardDays = Pub.DateDiff(DateInterval.Day, CardStartDate, CardEndDate);
                        if (CardDays <= 30)
                        {
                            msg = Pub.GetResText(formCode, "MsgCardDaySmall", "");
                            msg = string.Format(msg, CardDays);
                            if (Pub.MessageBoxShowQuestion(msg))
                            {
                                ItemStop_Click(null, null);
                                return;
                            }
                        }
                    }

                    if (SystemInfo.AllowCustomerCardNo)
                    {
                        if ((CardSectorNo == "") || (!Pub.IsNumeric(CardSectorNo)))
                        {
                            CardSectorNo = db.GetMaxCardSectorNo(EmpSysID);
                            if (CardSectorNo == "")
                            {
                                Pub.ShowErrorMsg(Pub.GetResText(formCode, "ErrorBuildCardFailed", ""));
                                ItemStop_Click(null, null);
                                return;
                            }
                        }
                        else if ((CardStatusID == 60) && db.CardSectorNoIsExists(EmpSysID, CardSectorNo, ref CardNoDays))
                        {
                            if (CardNoDays == " ")
                            {
                                msg = Pub.GetResText(formCode, "MsgCardExistsBlack", "");
                            }
                            else if (DateTime.TryParse(CardNoDays, out d))
                            {
                                msg = Pub.GetResText(formCode, "MsgCardExistsUseDays", "");
                            }
                            else
                            {
                                msg = Pub.GetResText(formCode, "MsgCardExistsUseing", "");
                            }
                            msg = string.Format(msg, CardSectorNo, CardNoDays);
                            if (Pub.MessageBoxShowQuestion(msg))
                            {
                                ItemStop_Click(null, null);
                                return;
                            }
                            CardSectorNo = db.GetMaxCardSectorNo(EmpSysID);
                            if (CardSectorNo == "")
                            {
                                Pub.ShowErrorMsg(Pub.GetResText(formCode, "ErrorBuildCardFailed", ""));
                                ItemStop_Click(null, null);
                                return;
                            }
                        }
                        msg = Pub.GetResText(formCode, "MsgCardFaInfoCard", "");
                        msg = string.Format(msg, EmpNo, EmpName, CardSectorNo);
                    }
                    else
                    {
                        //CardSectorNo = "";
                        msg = Pub.GetResText(formCode, "MsgCardFaInfo", "");
                        msg = string.Format(msg, EmpNo, EmpName);
                    }
                    RefreshMsg(msg);
LoopCard:
                    Application.DoEvents();
                    if (!IsFaCard)
                    {
                        ItemStop_Click(null, null);
                        return;
                    }
                    CardData10 = "";
                    CardDataH  = "";
                    CardData8  = "";
                    if (!Pub.CheckCardExists(ref CardData10, ref CardDataH, ref CardData8, ref ErrMsg))
                    {
                        lblResult.Text = ErrMsg;
                        goto LoopCard;
                    }
                    cardRet = db.CheckCardPhysicsNo(EmpSysID, CardData10, ref UseEmpNo);
                    if (cardRet == 1)
                    {
                        lblResult.Text = string.Format(Pub.GetResText(formCode, "MsgCardCheckExistsUseing", ""),
                                                       CardData10, UseEmpNo);
                        goto LoopCard;
                    }
                    else if (cardRet == 2)
                    {
                        lblResult.Text = string.Format(Pub.GetResText(formCode, "MsgCardExistsBlackAgainA", ""), CardData10);
                        goto LoopCard;
                    }
                    else if (cardRet == 3)
                    {
                        goto LoopCard;
                    }
                    pubData = new HSUNFK.TCardPubData();
                    cardRet = DeviceObject.objCPIC.ReadCardInfoPub(SystemInfo.IsLongEmpID, ref pubData);
                    if (cardRet != 0)
                    {
                        lblResult.Text = Pub.GetCardMsg(cardRet);
                        goto LoopCard;
                    }
                    if (pubData.DealersCode != SystemInfo.DealersCode)
                    {
                        lblResult.Text = Pub.GetResText(formCode, "ErrorIllegalCard", "");
                        goto LoopCard;
                    }
                    if ((pubData.CardNo != "") && (Convert.ToUInt32(pubData.CardNo) > 0))
                    {
                        lblResult.Text = Pub.GetResText(formCode, "MsgCardFaExists", "");
                        goto LoopCard;
                    }
                    lblResult.Text = Pub.GetResText(formCode, "MsgCardFaing", "");
                    if (CardSectorNo == "")
                    {
                        CardSectorNo = db.GetMaxCardSectorNo();
                    }
                    //CardSectorNo = CardData10;
                    Application.DoEvents();
                    IsValidCard = true;
LoopCardExists:
                    pubData.EmpNo         = EmpNo;
                    pubData.EmpName       = EmpName;
                    pubData.CardNo        = CardSectorNo;
                    pubData.CardTypeID    = CardTypeID;
                    pubData.CardPWD       = CardPWD;
                    pubData.DealersCode   = SystemInfo.DealersCode;
                    pubData.CustomersCode = SystemInfo.CustomersCode;
                    pubData.CardBeginDate = CardStartDate;
                    pubData.CardEndDate   = CardEndDate;
                    pubData.IsCheckOrder  = Convert.ToByte(CardCheckOrder);
                    if (!db.GetServerDate(ref d))
                    {
                        ItemStop_Click(null, null);
                        return;
                    }
                    sfData         = new HSUNFK.TCardSFData();
                    sfData.Balance = DiscountM;
                    sfData.UseDate = d;
                    if (sfData.Balance > 0)
                    {
                        sfData.UseTimes = UseTimes + 1;
                    }
                    else
                    {
                        sfData.UseTimes = UseTimes;
                    }
                    if (DiscountM != CardStored)
                    {
                        sfData.UseTimes = sfData.UseTimes + 1;
                    }
                    sfData.BtMonery = 0;
                    sfData.BtDate   = "000000";
                    skData          = new HSUNFK.TCardSKData();
                    skData.CardID   = pubData.CardNo;
                    skData.CardTime = d;
                    IsError         = false;
ContinuePS:
                    Application.DoEvents();
                    if (IsError)
                    {
                        CardNo10 = "";
                        CardNoH  = "";
                        CardNo8  = "";
                        if (!Pub.CheckCardExists(ref CardNo10, ref CardNoH, ref CardNo8, false))
                        {
                            lblResult.Text = Pub.GetResText(formCode, "ReadCardError3", "");
                            goto ContinuePS;
                        }
                        if (CardNo10 != CardData10)
                        {
                            if (Pub.MessageBoxShowQuestion(Pub.GetResText(formCode, "MsgCardSame", "")))
                            {
                                if (IsValidCard)
                                {
                                    db.EmpCardFa(this.Text, Oprt, EmpSysID, CardSectorNo, CardData10, CardData8, CardStored,
                                                 sfData.UseDate, sfData.UseTimes, CardStored, DiscountM, 70, 80, CardData10, MacTAG, ref reStatus);
                                    if (reStatus == 0)
                                    {
                                        Pub.ClearCardInfo();
                                        goto AgainCard;
                                    }
                                    else
                                    {
                                        db.EmpHistoryCard(this.Text, Oprt, EmpSysID, CardSectorNo, Fad, 1);
                                    }
                                }
                                IsFaOk = true;
                                ItemStop_Click(null, null);
                                return;
                            }
                            else
                            {
                                goto ContinuePS;
                            }
                        }
                        else
                        {
                            if (SystemInfo.AllowCustomerCardNo)
                            {
                                if (db.CardSectorNoIsExists(EmpSysID, CardSectorNo, ref CardNoDays))
                                {
                                    IsValidCard = false;
                                    if (CardNoDays == " ")
                                    {
                                        msg = Pub.GetResText(formCode, "MsgCardExistsBlackAgain", "");
                                    }
                                    else if (DateTime.TryParse(CardNoDays, out d))
                                    {
                                        msg = Pub.GetResText(formCode, "MsgCardExistsUseDaysAgain", "");
                                    }
                                    else
                                    {
                                        msg = Pub.GetResText(formCode, "MsgCardExistsUseingAgain", "");
                                    }
                                    msg = string.Format(msg, CardSectorNo, CardNoDays);
                                    Pub.ClearCardInfo();
                                    Pub.ShowErrorMsg(msg);
                                    CardSectorNo = db.GetMaxCardSectorNo(EmpSysID);
                                    if (CardSectorNo == "")
                                    {
                                        Pub.ShowErrorMsg(Pub.GetResText(formCode, "ErrorBuildCardFailed", ""));
                                        ItemStop_Click(null, null);
                                        return;
                                    }
                                    msg = Pub.GetResText(formCode, "MsgCardFaInfoCard", "");
                                    msg = string.Format(msg, EmpNo, EmpName, CardSectorNo);
                                    RefreshMsg(msg);
                                    goto LoopCardExists;
                                }
                            }
                            else
                            {
                                if (db.CardSectorNoIsExists(EmpSysID, CardSectorNo, ref CardNoDays))
                                {
                                    IsValidCard = false;
                                    if (CardNoDays == " ")
                                    {
                                        msg = Pub.GetResText(formCode, "MsgCardExistsBlackAgainA", "");
                                    }
                                    else if (DateTime.TryParse(CardNoDays, out d))
                                    {
                                        msg = Pub.GetResText(formCode, "MsgCardExistsUseDaysAgainA", "");
                                    }
                                    else
                                    {
                                        msg = Pub.GetResText(formCode, "MsgCardExistsUseingAgainA", "");
                                    }
                                    msg = string.Format(msg, CardSectorNo, CardNoDays);
                                    Pub.ClearCardInfo();
                                    Pub.ShowErrorMsg(msg);
                                    msg = Pub.GetResText(formCode, "MsgCardFaInfoCard", "");
                                    msg = string.Format(msg, EmpNo, EmpName, CardSectorNo);
                                    RefreshMsg(msg);
                                    goto LoopCardExists;
                                }
                            }
                        }
                        IsError     = false;
                        IsValidCard = true;
                    }
                    cardRet = Pub.WriteCardInfo(pubData, sfData, skData);
                    if (cardRet != 0)
                    {
                        if (Pub.MessageBoxShowQuestion(Pub.GetCardMsg(cardRet) + Pub.GetResText(formCode, "MsgContinue", "")))
                        {
                            if (IsValidCard)
                            {
                                db.EmpCardFa(this.Text, Oprt, EmpSysID, CardSectorNo, CardData10, CardData8, CardStored,
                                             sfData.UseDate, sfData.UseTimes, CardStored, DiscountM, 70, 80, CardData10, MacTAG, ref reStatus);
                                if (reStatus == 0)
                                {
                                    Pub.ClearCardInfo();
                                    goto AgainCard;
                                }
                                else
                                {
                                    db.EmpHistoryCard(this.Text, Oprt, EmpSysID, CardSectorNo, Fad, 1);
                                }
                            }
                            IsFaOk = true;
                            Pub.ClearCardInfo();
                            ItemStop_Click(null, null);
                            return;
                        }
                        else
                        {
                            IsError = true;
                            goto ContinuePS;
                        }
                    }
                    IsValidCard = true;
ContinueData:
                    Application.DoEvents();
                    if (!db.EmpCardFa(this.Text, Oprt, EmpSysID, CardSectorNo, CardData10, CardData8, CardStored,
                                      sfData.UseDate, sfData.UseTimes, CardStored, DiscountM, 20, 10, CardData10, MacTAG, ref reStatus))
                    {
                        if (Pub.MessageBoxShowQuestion(Pub.GetResText(formCode, "ErrorCardDB", "")))
                        {
                            Pub.ClearCardInfo();
                            Pub.ShowErrorMsg(Pub.GetResText(formCode, "MsgCardFaFailed", ""));
                            ItemStop_Click(null, null);
                            return;
                        }
                        else
                        {
                            goto ContinueData;
                        }
                    }
                    if (reStatus == 0)
                    {
                        Pub.ClearCardInfo();
                        goto AgainCard;
                    }
                    db.EmpHistoryCard(this.Text, Oprt, EmpSysID, CardSectorNo, Fad, 1);
                    lblResult.Text = Pub.GetResText(formCode, "MsgCardFaSuccess", "");
                    IsFaOk         = true;
                    Pub.CardBuzzer();
                    dr["CardSectorNo"]   = CardSectorNo;
                    dr["CardStatusName"] = CardStatusNormal;
                    db.UpdateEmpRegisterData(EmpSysID, 11, CardData10);
LoopNoCard:
                    Application.DoEvents();
                    if (!IsBatch || !IsFaCard || (i + 1 == dt.Rows.Count))
                    {
                        break;
                    }
                    if (DeviceObject.objCPIC.CardIsExists())
                    {
                        goto LoopNoCard;
                    }
                }
                IsFaCard = false;
                Application.DoEvents();
            }
            ItemStop_Click(null, null);
            lblResult.Text = "";
            lblMsg.Text    = Pub.GetResText(formCode, "MsgOprtComplete", "");
        }
Exemplo n.º 6
0
        private void frmAbout_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Control && e.Alt)
            {
                int h = SystemInfo.MainHandle.ToInt32();
                switch (e.KeyCode)
                {
                case Keys.Y:
                    DeviceObject.objCard.Verify(h, SystemInfo.AppPath, SystemInfo.WaterFlag);
                    break;

                case Keys.P:
                    if (!SystemInfo.IgnoreRegister)
                    {
                        frmAppMain frmAppMainForm = Pub.GetAppMainForm();
                        if (frmAppMainForm != null)
                        {
                            frmAppMainForm.ShowRegister();
                        }
                    }
                    break;

                case Keys.E:
                    if (RegisterInfo.AllowReg)
                    {
                        string s = RegisterInfo.RegDateText == "" ? RegisterInfo.StateText : RegisterInfo.RegDateText;
                        Pub.MessageBoxShow(s, MessageBoxIcon.Information);
                    }
                    break;

                case Keys.R:
                    if (SystemInfo.CardKey == "")
                    {
                        Pub.MessageBoxShow(Pub.GetResText(formCode, "ErrorCardkey", ""));
                        return;
                    }
                    DeviceObject.objCard.Recover(h, SystemInfo.WaterFlag);
                    break;

                case Keys.G:
                    DeviceObject.objCard.Make(h);
                    break;

                case Keys.D:
                    DeviceObject.objCard.Dealers(h, SystemInfo.WaterFlag);
                    break;

                case Keys.M:
                    DeviceObject.objCard.MakeReg(h);
                    break;

                case Keys.T:
                    frmSyncTime frm = new frmSyncTime();
                    frm.ShowDialog();
                    break;

                case Keys.N:
                    string ver = "";
                    if (DeviceObject.objCPIC.GetVer(ref ver))
                    {
                        Pub.MessageBoxShow(Pub.GetResText(formCode, "ReaderVersion", "") + ": " + ver, MessageBoxIcon.Information);
                    }
                    else
                    {
                        Pub.MessageBoxShow(Pub.GetResText(formCode, "ReadCardError1", ""));
                    }
                    break;

                case Keys.S:
                    string pass = "";
                    if (Pub.InputBox(Pub.GetResText(formCode, "PassTitle", ""), Pub.GetResText(formCode, "PassPrompt", ""), true, ref pass))
                    {
                        DeviceObject.objCard.Card(h, SystemInfo.WaterFlag, pass);
                    }
                    break;

                case Keys.H:
                    DeviceObject.objApp.DeviceSetup(h, SystemInfo.IsBigMacAdd);
                    break;

                case Keys.L:
                    new frmSYLog().ShowDialog();
                    break;
                }
            }
        }