Beispiel #1
0
        public void RequestCallback(object response)
        {
            OperationTimer.Stop();

            UserIDBox.IsEnabled    = true;
            UserPassword.IsEnabled = true;
            OKButton.IsEnabled     = true;
            CancelButton.IsEnabled = true;

            ProgressWaitBar.Visibility      = Visibility.Collapsed;
            ProgressWaitBar.IsIndeterminate = false;
            ProgressWaitBar.ShowPaused      = false;
            ProgressWaitBar.ShowError       = false;

            LoginResponse res = response as LoginResponse;

            if (LoginResult.Success != res.LoginResult)
            {
                RunningDatas.ErrorNotify("用户无法验证登录");
                return;
            }

            LocalDB.AddAccount(Request.UserID, Request.UserPW, Request.UserIDType);

            _ = Dispatcher.RunAsync
                (
                Windows.UI.Core.CoreDispatcherPriority.Normal,
                new Windows.UI.Core.DispatchedHandler(() =>
            {
                Hide();
            }
                                                      ));
        }