Example #1
0
        protected bool CheckAuth(GpsInfo gpsInfo)
        {
            bool checkAuthState = authorization.CheckPeriod(gpsInfo);

            if (!checkAuthState)
            {
                string AuthCode = authorization.GetAuthorizationCode();
                string message  = string.Format("设备识别码:{0},请联系销售人员激活软件。", AuthCode);
                speaker.PlayAudioAsync(message);
                return(false);
            }

            return(true);
        }
Example #2
0
        public bool CheckPeriod(GpsInfo tempGpsInfo)
        {
            //gps无信号时,禁止使用
            if (tempGpsInfo.FixedSatelliteCount < 2)
            {
                speaker.PlayAudioAsync("GPS无信号,请检查");
                return(false);
            }

            if (isFirstOpen)
            {
                try
                {
                    DateTime tempTime = tempGpsInfo.LocalTime;
                    Logger.DebugFormat("获取当前gps日期:{0}", tempTime);
                    if (tempTime.Year > 2014)
                    {
                        //isFirstOpen = false;
                        if (!ShowInfo(tempTime))
                        {
                            return(false);
                        }
                    }
                }
                catch (Exception ex)
                {
                    string str = ex.Message;
                    Logger.ErrorFormat("获取验证码出错:{0}", ex.Message);
                }
            }
            return(true);
        }
Example #3
0
        protected bool CheckAuth(GpsInfo gpsInfo)
        {
            bool checkAuthState = authorization.CheckPeriod(gpsInfo);

            if (!checkAuthState)
            {
                speaker.PlayAudioAsync("试用已到期请激活");
                return(false);
            }

            return(true);
        }
Example #4
0
        protected bool CheckAuth(GpsInfo gpsInfo)
        {
            bool checkAuthState = authorization.CheckPeriod(gpsInfo);

            if (!checkAuthState)
            {
                // Toast.MakeText(this,"GPS无信号或试用已到期,请检查",ToastLength.Long);
                speaker.PlayAudioAsync("GPS无信号或试用已到期,请检查");
                return(false);
            }

            return(true);
        }
Example #5
0
        public void ExamFinishing()
        {
            mgViewStart.SetImageResource(Resource.Drawable.ks);
            StartEndStatus          = true;
            MapSpinner.Enabled      = true;
            ExamModeSpinner.Enabled = true;
            ExamContext.EndExamTime = DateTime.Now;

            if (ExamContext.ExamScore == 100)
            {
                if (!string.IsNullOrEmpty(ExamSuccessVoice))
                {
                    speaker.PlayAudioAsync(ExamSuccessVoice, SpeechPriority.High);
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(ExamFailVoice))
                {
                    speaker.PlayAudioAsync(ExamFailVoice, SpeechPriority.High);
                }
            }
            EndExam();
        }