protected async virtual void OnInitializeCompleted(BTInitEventArgs e) { await mainPage.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, delegate { InitializeCompleted?.Invoke(this, e); }); }
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)); }); }