protected override void OnStartup(StartupEventArgs e)
        {
            try
            {
                _applicationInsightHelper = new ApplicationInsightHelper();
                _context = new DataContext(_applicationInsightHelper);

                //We use this to get access to unhandled exceptions so we can report app crashes to the Telemetry client
                var currentDomain = AppDomain.CurrentDomain;
                currentDomain.UnhandledException += CurrentDomain_UnhandledException;
                currentDomain.ProcessExit += CurrentDomain_ProcessExit;

                var mainWindow = new MainWindow(_context, _applicationInsightHelper);
                mainWindow.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            try
            {
                _applicationInsightHelper = new ApplicationInsightHelper();
                _context = new DataContext(_applicationInsightHelper);


                //We use this to get access to unhandled exceptions so we can report app crashes to the Telemetry client
                var currentDomain = AppDomain.CurrentDomain;
                currentDomain.UnhandledException += CurrentDomain_UnhandledException;
                currentDomain.ProcessExit        += CurrentDomain_ProcessExit;

                var mainWindow = new MainWindow(_context, _applicationInsightHelper);
                mainWindow.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Beispiel #3
0
 public DataContext(ApplicationInsightHelper applicationInsightHelper)
 {
     _applicationInsightHelper = applicationInsightHelper;
     GatherDetails();
 }
 public DataContext(ApplicationInsightHelper applicationInsightHelper)
 {
     _applicationInsightHelper = applicationInsightHelper;
     GatherDetails();
 }