Exemplo n.º 1
0
        public App()
        {
            BackgroundTasks.Add(Settings);

            // Basic unhandled exception catchment
            AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException;

            // Get command line arguments and initialize ViewModel
            var arguments = Environment.GetCommandLineArgs().Skip(1).ToList();

            try
            {
                ViewModel = new ApplicationViewModel(arguments, Settings);
                if (ViewModel.Url != null)
                {
                    BackgroundTasks.Add(ViewModel.Url);
                }
            }
            catch (Exception exception)
            {
                ShowExceptionReport(exception);
            }
        }