Exemple #1
0
        private void btnGetVerifyCode_Click(object sender, RoutedEventArgs e)
        {
            AsyncWorker       worker = new AsyncWorker(this);
            JSONResultFormat1 js     = new JSONResultFormat1();

            tbkErrorInfo.Text = "";
            m_nTick           = 0;
            if (tbPhoneNumber.Text.Length == 11)
            {
                btnGetVerifyCode.IsEnabled = false;
                if (false == worker.InvokeSendVerifyCode(VOP.MainWindow.m_RequestManager.SendVerifyCode, tbPhoneNumber.Text, ref js))
                {
                    tbkErrorInfo.Text          = (string)this.FindResource("ResStr_Msg_6");
                    btnGetVerifyCode.IsEnabled = true;
                }
                else
                {
                    timer.Start();
                    tbkErrorInfo.Text = (string)this.FindResource("ResStr_Msg_5");
                }
            }
            else
            {
                tbkErrorInfo.Text = (string)this.FindResource("ResStr_Msg_7");
                tbPhoneNumber.Focus();
            }
        }