コード例 #1
0
        /// <summary>
        /// 返回主页
        /// </summary>
        private void NavMainPanelState()
        {
            currentPanel = panelName.mainPanel;
            mainPanel1.BringToFront();
            timerNav.Stop();
            //returnToMainfrm.Visible = false;
            //this.buttonXHome.Visible = false;
            this.Countdown.Visible  = false;
            this.labelXInfo.Visible = true;
            ConsigneeTel            = "";
            TrackingNum             = "";
            courierNum         = "";
            CourierID          = "";
            CourierPwd         = "";
            this.tempPackage   = null;
            this.chooseBoxNum  = 2;
            this.tempChooseBox = null;
            this.tempCourier   = null;

            this.SetButtomButton(false, false, false, false);

            this.cameraService.Close();
            inputPwdPanel1.DisposeQR();
            if (RemoteOpenLogic.GetInstance().IsEnable &&
                RemoteOpenLogic.GetInstance().IsWorking)
            {
                RemoteOpenLogic.GetInstance().StopRemoteOpenListen();
                RemoteOpenLogic.GetInstance().RemoteOpenBoxEvent -= new RemoteOpenLogic.RemoteOpenBoxDelegate(frmMain_RemoteOpenBoxEvent);
            }

            mainPanel1.Focus();//防止后面界面获取焦点
        }
コード例 #2
0
ファイル: CustomerTBVerify.cs プロジェクト: radtek/EUGV2
 private void StopLogic()
 {
     if (RemoteOpenLogic.GetInstance().IsEnable&& RemoteOpenLogic.GetInstance().IsWorking)
     {
         RemoteOpenLogic.GetInstance().StopRemoteOpenListen();
         RemoteOpenLogic.GetInstance().RemoteOpenBoxEvent -= new RemoteOpenLogic.RemoteOpenBoxDelegate(frmMain_RemoteOpenBoxEvent);
     }
     this.DisposeQR();
 }
コード例 #3
0
ファイル: CustomerTBVerify.cs プロジェクト: radtek/EUGV2
 private void StratLogic()
 {
     if (RemoteOpenLogic.GetInstance().IsEnable &&
         RemoteOpenLogic.GetInstance().IsWorking == false)
     {
         RemoteOpenLogic.GetInstance().StartRemoteOpenListen();
         RemoteOpenLogic.GetInstance().RemoteOpenBoxEvent += new RemoteOpenLogic.RemoteOpenBoxDelegate(frmMain_RemoteOpenBoxEvent);
     }
 }
コード例 #4
0
        void frmMain_RemoteOpenBoxEvent(ServerCallback2 sc)
        {
            int boxcode = -1;

            try
            {
                boxcode = Convert.ToInt32(sc.Boxnumber);
            }
            catch (Exception err)
            {
                CLog4net.LogError("frmMain_RemoteOpenBoxEvent " + sc.Boxnumber + " :" + err);
            }

            bool issuccess = cameraService.TakePicture();

            CLog4net.LogInfo("拍照是否成功:" + issuccess.ToString());
            //开箱
            Box box = boxsManager.Find(boxcode);

            if (box.Open())
            {
                //柜子地址
                courierNum = box.CoordinateInfo.X.ToString() + box.CoordinateInfo.Y.ToString();
                //跳转下一页
                NavGetPackageSuccessState();
                string s = String.Format("取件成功,您的包裹在{0}号箱,请关闭柜门,谢谢", courierNum);
                voiceService.BroadcastOnce(s);
                RemoteOpenLogic.GetInstance().Response(sc.Code, true, this.about);
                CLog4net.LogInfo("取件成功");

                boxsManager.ClearBox(boxcode);
            }
            else
            {
                voiceService.BroadcastOnce("开柜失败");
                returnSuccess1.errorMessage("如果储物柜无法打开,请联系管理员");
                CLog4net.LogInfo("如果储物柜无法打开,请联系管理员");
                RemoteOpenLogic.GetInstance().Response(sc.Code, false, this.about);
            }

            Package package = packageManager.TakePackage(boxcode);

            if (package != null)
            {
                ////拍照
                tempPackage = package;
                if (package.Place.Code != box.Code)
                {
                    CLog4net.LogError("服务器与客户端查询箱子不一致,服务器boxcode:" + sc.Boxnumber + " 客户端boxcode:" + package.Place.Code + " 快递号:" + package.SN);
                }
            }
            else
            {
                CLog4net.LogInfo("未找到您的包裹:" + boxcode);
            }
        }
コード例 #5
0
ファイル: CustomerTBVerify.cs プロジェクト: radtek/EUGV2
        void frmMain_RemoteOpenBoxEvent(ServerCallback2 sc)
        {
            int boxcode = -1;

            try
            {
                boxcode = Convert.ToInt32(sc.Boxnumber);
            }
            catch (Exception err)
            {
                CLog4net.LogError("frmMain_RemoteOpenBoxEvent " + sc.Boxnumber + " :" + err);

                return;
            }

            bool issuccess = frmMain.cameraService.TakePicture();

            CLog4net.LogInfo("拍照是否成功:" + issuccess.ToString());
            //开箱
            this.box = frmMain.boxsManager.Find(boxcode);
            if (box.Open())
            {
                RemoteOpenLogic.GetInstance().Response(sc.Code, true, frmMain.about);
                CLog4net.LogInfo("取件成功");

                frmMain.boxsManager.ClearBox(boxcode);
            }
            else
            {
                frmMain.voiceService.BroadcastOnce("开柜失败");
                frmMain.ShowSystemPromptMessage("如果储物柜无法打开,请联系管理员");
                CLog4net.LogInfo("如果储物柜无法打开,请联系管理员");
                RemoteOpenLogic.GetInstance().Response(sc.Code, false, frmMain.about);

                return;
            }

            Package package = frmMain.packageManager.TakePackage(boxcode);

            if (package != null)
            {
                if (package.Place.Code != box.Code)
                {
                    CLog4net.LogError("服务器与客户端查询箱子不一致,服务器boxcode:" + sc.Boxnumber + " 客户端boxcode:" + package.Place.Code + " 快递号:" + package.SN);
                }
            }
            else
            {
                CLog4net.LogInfo("未找到您的包裹:" + boxcode);
            }

            SceneTransitEvent();
        }
コード例 #6
0
        private void NavInputPwdPanelState()
        {
            CLog4net.LogInfo("点击我要取件");
            inputPwdPanel1.BringToFront();
            inputPwdPanel1.inputFocus();
            inputPwdPanel1.errorMessage("");
            currentPanel = panelName.InputPwdPanel;
            resetCountdownAndBack(60, true, true);
            this.inputPwdPanel1.ShowCurrentModle(this.about);
            if (RemoteOpenLogic.GetInstance().IsEnable &&
                RemoteOpenLogic.GetInstance().IsWorking == false)
            {
                RemoteOpenLogic.GetInstance().StartRemoteOpenListen();
                RemoteOpenLogic.GetInstance().RemoteOpenBoxEvent += new RemoteOpenLogic.RemoteOpenBoxDelegate(frmMain_RemoteOpenBoxEvent);
            }

            this.cameraService.Open();
        }