Ejemplo n.º 1
0
 protected async virtual void OnInitializeCompleted(BTInitEventArgs e)
 {
     await mainPage.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, delegate
     {
         InitializeCompleted?.Invoke(this, e);
     });
 }
Ejemplo n.º 2
0
        private void Restart()
        {
            Dispatcher.Invoke(() =>
            {
                int data   = 0;
                string msg = "";

                //说明没有登录
                if (User.Current == null || User.Current.username == "" || User.Current.username == null)
                {
                    data = 0;
                    msg  = "";
                }
                else if (User.Current.credit == null || User.Current.credit == "")
                {
                    data = 1;
                    msg  = "";
                }
                else
                {
                    data = 2;
                    AutoLoginAsync();
                    msg = "";
                }

                Console.WriteLine($"---Com ---Initialize ---{msg}");
                InitializeCompleted?.Invoke(this, new MessageEventArgs(true, msg, data));
            });
        }