Exemple #1
0
        private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            _sr.InteractiveTask(() =>
            {
                int ret;

                _sr.Procedure = null;
                var local     = new LogoutProcedure();

                try
                {
                    ret = local.Step1();
                }
                catch (HttpRequestException ex)
                {
                    ret = 02_0000 + (int)(ex.Data["StatusCode"]);
                }
                catch (Exception)
                {
                    ret = 02_0000;
                }

                if (CheckVendor.NotValidResponseCode(ret))
                {
                    Growl.Error(MessageVendor.FormatError(ret));
                }
                else
                {
                    ApiVendor.SetRenew(null);
                    SubwindowNavigator.Navigate(SubwindowPage.LoggedOut);
                }
            });
            _sr.InteractiveTask(() => SubwindowNavigator.Navigate(SubwindowPage.LoggedOut));
        }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     _sr.InteractiveTask(() =>
     {
         SubwindowNavigator.Navigate(SubwindowPage.LoggedIn);
     });
 }
        public PageRegister1(SubwindowRouter sr)
        {
            _sr = sr;
            InitializeComponent();

            _sr.InteractiveTask(() =>
            {
                _sr.Service   = null;
                _sr.Character = null;

                if (!SubwindowDataCollector.Collect(5 * 60 * 1000, out _sr.Service, out _sr.Character))
                {
                    Growl.Error("等待超时,请返回上一页重试");

                    return;
                }

                if (_sr.Service != null && _sr.Character != null)
                {
                    SubwindowNavigator.Navigate(SubwindowPage.Register2);
                }
            });
        }
Exemple #4
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     _sr.InteractiveTask(() => SubwindowNavigator.Navigate(SubwindowPage.Consent));
 }
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     _sr.InteractiveTask(() => SubwindowNavigator.Navigate(SubwindowPage.RecoveryEmail1));
 }