Exemplo n.º 1
0
        public LoginVerifyWindow()
        {
            InitializeComponent();
            Task.Run(async() =>
            {
                await Task.Delay(TimeSpan.FromSeconds(1));
                Dispatcher.Invoke(() =>
                {
                    MainTransitioner.SelectedIndex++;
                });
                await Task.Delay(TimeSpan.FromSeconds(1));
                var verify = LoginManager.LoginVerify(true);
                Dispatcher.Invoke(() =>
                {
                    if (verify)
                    {
                        MainTextBlock.Text = "验证完成! 祝你游戏愉快";
                        AnimeBar.FadeOut();
                        SuccessIcon.FadeIn();
                    }
                    else
                    {
                        MainTextBlock.Text = "很抱歉, 验证失败";
                        AnimeBar.FadeOut();
                        ErrorIcon.FadeIn();
                    }
                });
                await Task.Delay(TimeSpan.FromSeconds(1));

                Dispatcher.Invoke(() =>
                {
                    MainTransitioner.SelectedIndex++;
                });
                await Task.Delay(TimeSpan.FromSeconds(2));
                Dispatcher.Invoke(this.Close);
            });
        }
Exemplo n.º 2
0
 public void OnWindowsClose(object sender, CancelEventArgs e)
 {
     SuccessIcon.Dispose();
 }