public TestTargetService(IUIServiceHost uiServiceHost)
        {
            Argument.IsNotNull(() => uiServiceHost);

            _uiServiceHost = uiServiceHost;

            uiServiceHost.UpdateResult += OnUpdatedResult;
        }
        public LogEntriesViewModel(ICommandManager commandManager, IUIServiceHost uiServiceHost)
        {
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => uiServiceHost);

            _uiServiceHost = uiServiceHost;

            LogEntries = new ObservableCollection<LogEntry>();

            ClearLog = new Command(OnClearLogExecute);

            commandManager.RegisterCommand("Log.Clear", ClearLog, this);
        }
Ejemplo n.º 3
0
        public TypesViewModel(IOpenFileService openFileService, IPleaseWaitService pleaseWaitService,
            IUIServiceHost uiServiceHost, IReflectionService reflectionService, ICommandManager commandManager)
        {
            Argument.IsNotNull(() => openFileService);
            Argument.IsNotNull(() => pleaseWaitService);
            Argument.IsNotNull(() => uiServiceHost);
            Argument.IsNotNull(() => reflectionService);
            Argument.IsNotNull(() => commandManager);

            _openFileService = openFileService;
            _pleaseWaitService = pleaseWaitService;
            _uiServiceHost = uiServiceHost;
            _reflectionService = reflectionService;

            Assemblies = new List<AssemblyEntry>();

            FileOpen = new Command(OnFileOpenExecute);
            ClearFilter = new Command(OnClearFilterExecute);

            commandManager.RegisterCommand("File.Open", FileOpen, this);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainViewModel" /> class.
        /// </summary>
        public MainViewModel(IUIServiceHost uiServiceHost, IMessageService messageService,
            ISelectDirectoryService selectDirectoryService, ICommandManager commandManager, ISettings settings)
        {
            Argument.IsNotNull(() => uiServiceHost);
            Argument.IsNotNull(() => messageService);
            Argument.IsNotNull(() => selectDirectoryService);
            Argument.IsNotNull(() => commandManager);
            Argument.IsNotNull(() => settings);

            _uiServiceHost = uiServiceHost;
            _messageService = messageService;
            _selectDirectoryService = selectDirectoryService;
            Settings = settings;

            BenchmarkResults = new ObservableCollection<BenchmarkResult>();

            CloseBenchmarkResult = new Command<BenchmarkResult>(OnCloseBenchmarkResultExecute);
            SwitchTimeAxis = new Command(OnSwitchTimeAxisExecute);
            SaveAllResults = new Command(OnSaveAllResultsExecute);
            ChangeDefaultAxis = new Command(OnChangeDefaultAxisExecute);

            commandManager.RegisterCommand("File.SaveAllResults", SaveAllResults, this);
            commandManager.RegisterCommand("Options.ChangeDefaultAxis", ChangeDefaultAxis, this);
        }