Пример #1
0
        public void ShowCurrentModle(About a)
        {
            switch (a.Model)
            {
            case "a":
                this.qrCodeGraphicControl1.Visible = false;
                ServicesFactory.GetInstance().GetVoicService().BroadcastOnce("请输入取件密码");
                this.labelX3.Text = "请输入取件密码";
                break;

            case "b":
                this.qrCodeGraphicControl1.Visible = true;
                this.qrCodeGraphicControl1.Text    = a.CabinetCode;
                ServicesFactory.GetInstance().GetVoicService().BroadcastOnce("请扫描二维码或输入取件密码");
                this.labelX3.Text = "请扫描二维码或输入取件密码";
                break;

            case "c":
                this.qrCodeGraphicControl1.Visible = false;
                ServicesFactory.GetInstance().GetVoicService().BroadcastOnce("请扫描二维码或输入取件密码");
                this.labelX3.Text = "请扫描二维码或输入取件密码";
                if (this.vguangQR == null)
                {
                    this.vguangQR = new VGuangQR();
                    this.vguangQR.Load();
                    try
                    {
                        //设置扫码成功时的回调
                        VGuangQR.decodeCall = new VGuangQR.DecodeCallBack(decodeCallBackStr);
                        VGuangQR.setDecodeCallBack(VGuangQR.decodeCall);
                        //设置设备状态变化时回调
                        VGuangQR.deviceStatusCall = new VGuangQR.DeviceStatusCallBack(deviceStatusCallBack);
                        VGuangQR.setDeviceStatusCallBack(VGuangQR.deviceStatusCall);
                    }
                    catch (Exception e)
                    {
                        CLog4net.LogError(e);
                    }
                }
                else
                {
                    this.vguangQR.OpenDevice();
                }
                break;

            default:
                this.qrCodeGraphicControl1.Visible = false;
                ServicesFactory.GetInstance().GetVoicService().BroadcastOnce("请输入取件密码");
                this.labelX3.Text = "请输入取件密码";
                break;
            }
        }
Пример #2
0
        private void ShowCurrentModle(About a)
        {
            switch (a.Model)
            {
            case "a":
                this.qr.Visible = false;
                frmMain.voiceService.BroadcastOnce("请输入取件密码");
                break;

            case "b":
                this.qr.Visible = true;
                this.qr.Text    = a.CabinetCode;
                frmMain.voiceService.BroadcastOnce("请扫描二维码或输入取件密码");
                break;

            case "c":
                this.qr.Visible = false;
                frmMain.voiceService.BroadcastOnce("请扫描二维码或输入取件密码");
                if (this.vguangQR == null)
                {
                    this.vguangQR = new VGuangQR();
                    this.vguangQR.Load();
                    try
                    {
                        //设置扫码成功时的回调
                        VGuangQR.decodeCall = new VGuangQR.DecodeCallBack(decodeCallBackStr);
                        VGuangQR.setDecodeCallBack(VGuangQR.decodeCall);
                        //设置设备状态变化时回调
                        VGuangQR.deviceStatusCall = new VGuangQR.DeviceStatusCallBack(deviceStatusCallBack);
                        VGuangQR.setDeviceStatusCallBack(VGuangQR.deviceStatusCall);
                    }
                    catch (Exception e)
                    {
                        CLog4net.LogError(e);
                    }
                }
                else
                {
                    this.vguangQR.OpenDevice();
                }
                break;

            default:
                this.qr.Visible = false;
                frmMain.voiceService.BroadcastOnce("请输入取件密码");
                break;
            }
        }