示例#1
0
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            var settings = LoadSettings();

            // Alternative to StartupUri in App.xaml
            //StartupUri = new Uri("View/MainWindow.xaml", UriKind.Relative);

            var messageBoxService = new MessageBoxService();
            var processHelper     = new ProcessHelper();
            var inspectionProcess = new InspectionProcess(messageBoxService);
            var controller        = new ApplicationController(inspectionProcess);
            var snapshotManager   = new SnapshotManager(processHelper, settings);
            var settingsViewModel = new SettingsViewModel(settings, controller, snapshotManager);
            var vm = new MainViewModel(inspectionProcess, snapshotManager, settingsViewModel, controller);


            var main = new MainWindow();

            main.DataContext = vm;
            main.Show();
        }
示例#2
0
 public ApplicationController(InspectionProcess inspectionProcess)
 {
     _inspectionProcess = inspectionProcess;
 }