internal async void PopMessage(string msg) { await Dispatcher.RunAsync(CoreDispatcherPriority.High, () => { InAppNotify.Content = msg; InAppNotify.Show(); }); dismissTimer?.Cancel(); dismissTimer = ThreadPoolTimer.CreateTimer(async(x) => { await Dispatcher.RunAsync(CoreDispatcherPriority.High, () => { InAppNotify.Dismiss(); }); }, TimeSpan.FromMilliseconds(3000)); }
internal async void ThrowException(Windows.UI.Xaml.UnhandledExceptionEventArgs e) { await Dispatcher.RunAsync(CoreDispatcherPriority.High, () => { InAppNotify.Content = " Error occured: " + e.Message + "\r\n- " + e.Exception.GetType().ToString(); InAppNotify.Show(); }); dismissTimer?.Cancel(); dismissTimer = ThreadPoolTimer.CreateTimer(async(x) => { await Dispatcher.RunAsync(CoreDispatcherPriority.High, () => { InAppNotify.Dismiss(); }); }, TimeSpan.FromMilliseconds(3000)); }