コード例 #1
0
 // Code to execute when the application is launching (eg, from Start)
 // This code will not execute when the application is reactivated
 private void Application_Launching(object sender, LaunchingEventArgs e)
 {
     LittleWatson.CheckForPreviousException("Todo.txt Windows Phone 7 error report",
                                            "*****@*****.**");
     Messenger.Default.Send(new ApplicationReadyMessage());
     Messenger.Default.Send(new ApplicationStartedMessage());
 }
コード例 #2
0
        void CallLoadFunctions(object sender, RoutedEventArgs e)
        {
            if (_initialised)
            {
                return;
            }

            if (!CheckForLogin())
            {
                return;
            }


            var frame = Application.Current.RootVisual as PhoneApplicationFrame;

            frame.Background = Config.Background.GetBrush();

            viewModel.RaiseLoggedInChange();
            viewModel.OnLoad();

            GeolocationPrompt();

            CreateStoryboards();

            ThreadPool.QueueUserWorkItem((threadContext) =>
            {
                CreateTile();
                ShowFollowMessage();
                if (Config.PushEnabled == true || (Config.PushEnabled == null && AskForPushPermission()))
                {
                    PushNotifications.AutoRegisterForNotifications();
                }
                UsernameProvider.FillUserNames(Config.Accounts);
#if DEBUG
                var list = Logger.ReadAll();
                if (list != null)
                {
                    EmailComposeTask email = new EmailComposeTask();
                    email.To        = "*****@*****.**";
                    email.Subject   = "Ocell Error Report";
                    string contents = "";
                    foreach (var line in list)
                    {
                        contents += line + Environment.NewLine;
                    }
                    email.Body = contents;
                    //Dispatcher.BeginInvoke(() => email.Show());
                    Logger.Clear();
                    Logger.Save();
                }
#endif
                LittleWatson.CheckForPreviousException();
            });

            _initialised = true;
        }
コード例 #3
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            if (e.IsNavigationInitiator == false)
            {
                LittleWatson.CheckForPreviousException(true);

                if (isLoaded == false)
                {
                    LoadData();
                }
            }
        }
コード例 #4
0
ファイル: App.xaml.cs プロジェクト: mbmccormick/Bootstrap
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            LittleWatson.ReportException(e.ExceptionObject, null);

            RootFrame.Dispatcher.BeginInvoke(() =>
            {
                LittleWatson.CheckForPreviousException(false);
            });

            e.Handled = true;

            if (UnhandledExceptionHandled != null)
            {
                UnhandledExceptionHandled(sender, e);
            }

            if (Debugger.IsAttached)
            {
                // An unhandled exception has occurred; break into the debugger
                Debugger.Break();
            }
        }
コード例 #5
0
        private void PhoneApplicationPage_Loaded_1(object sender, RoutedEventArgs e)
        {
            if (App.IsAppJustLaunched || App.IsAppJustResumedFromTombStone)
            {
                if (App.IsAppJustLaunched)
                {
                    App.IsAppJustLaunched = false;
                }
                if (App.IsAppJustResumedFromTombStone)
                {
                    App.IsAppJustResumedFromTombStone = false;
                }

                BackgroundTileUpdater.UpdateTiles(new OnTileUpdateCompletedEventHandler(OnTileUpdateComplete));
                BackgroundAgentRescheduler.RescheduleAgent();
                LittleWatson.CheckForPreviousException();

                if (App.NeedSettingsPage)
                {
                    App.NeedSettingsPage = false;
                    NavigationService.Navigate(new Uri("/SettingsPage.xaml", UriKind.RelativeOrAbsolute));
                }
            }
        }
コード例 #6
0
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     LittleWatson.CheckForPreviousException();
 }