public DisplayStrategy(ITestTreeView view, ITestModel model) { _view = view; _model = model; _settings = new SettingsModel(_model.GetService <ISettings>()); this.Tree = view.Tree; }
private void OpenExtensionsDialogCommand_Execute() { using (var addinsView = new AddinsView()) { var dialog = new AddinsPresenter(addinsView, _model.GetService <Engine.IExtensionService>()); dialog.Show(); } }
private void MainForm_Load(object sender, System.EventArgs e) { var recentFileService = _model.GetService <IRecentFiles>(); var location = _model.Settings.Gui.MainForm.Location; var size = _model.Settings.Gui.MainForm.Size; if (size == Size.Empty) { size = _view.Size; } if (size.Width < 160) { size.Width = 160; } if (size.Height < 32) { size.Height = 32; } if (!IsVisiblePosition(location, size)) { location = new Point(0, 0); } _view.Location = location; _view.Size = size; // Set to maximized if required if (_model.Settings.Gui.MainForm.Maximized) { _view.WindowState = FormWindowState.Maximized; } // Set the font to use _view.Font = _model.Settings.Gui.MainForm.Font; if (_options.InputFiles.Count > 0) { _model.LoadTests(MakeTestPackage(_options.InputFiles, _options)); } else if (!_options.NoLoad && recentFileService.Entries.Count > 0) { var entry = recentFileService.Entries[0]; if (!string.IsNullOrEmpty(entry) && System.IO.File.Exists(entry)) { _model.LoadTests(MakeTestPackage(entry, _options)); } } if (_options.RunAllTests && _model.IsPackageLoaded) { _model.RunTests(TestFilter.Empty); } }
public TreeViewPresenter(ITestTreeView treeView, ITestModel model) { _view = treeView; _model = model; Settings = new Settings.TestTreeSettings(_model.GetService <ISettings>()); InitializeRunCommands(); WireUpEvents(); }
public MainPresenter(IMainView view, ITestModel model) { _view = view; _model = model; _settings = new SettingsModel(_model.GetService <ISettings>()); InitializeMainMenu(); WireUpEvents(); }
public MainPresenter(IMainView view, ITestModel model, GuiOptions options) { _view = view; _model = model; _options = options; _recentFilesService = _model.GetService<IRecentFiles>(); InitializeMainMenu(); WireUpEvents(); }
public MainPresenter(IMainView view, ITestModel model, GuiOptions options) { _view = view; _model = model; _options = options; _recentFilesService = _model.GetService <IRecentFiles>(); InitializeMainMenu(); WireUpEvents(); }
public TreeViewPresenter(ITestTreeView treeView, ITestModel model) { _view = treeView; _model = model; var settingsService = _model.GetService <ISettings>(); Settings = new Settings.TestTreeSettings(settingsService); SelectedCategorySettings = new Settings.TestCategorySettings(settingsService); InitializeRunCommands(); WireUpEvents(); }