public MainShellViewModel(IResultFactory resultFactory, IEventAggregator eventAggregator, IPersistanceManager persistanceManager, ISettingsManager settingsManager, MainMenuViewModel mainMenuViewModel, IEnumerable <PanelViewModel> panels, IFileSystem fileSystem, ScriptDialogStrategy scriptDialogStrategy, IPaths paths, IParser parser, IPortable portable ) : base(resultFactory) { this.eventAggregator = eventAggregator; eventAggregator.Subscribe(this); this.persistanceManager = persistanceManager; this.settingsManager = settingsManager; this.fileSystem = fileSystem; this.scriptDialogStrategy = scriptDialogStrategy; this.paths = paths; this.parser = parser; Scripts = new BindableCollection <ScriptEditorViewModel>(); Tools = new BindableCollection <PanelViewModel>(panels); Menu = mainMenuViewModel; Menu.Plugins = settingsManager.ListConfigurablePluginSettings().Select(ps => new PluginSettingsMenuViewModel(ps)); Menu.HelpFiles = settingsManager.ListPluginSettingsWithHelpFile().Select(ps => new PluginHelpFileViewModel(ps)).ToList(); Menu.Views = Tools; DisplayName = string.Format("FreePIE - Programmable Input Emulator{0}", portable.IsPortable ? " (Portable mode)" : null); }
public MainShellViewModel(IResultFactory resultFactory, IEventAggregator eventAggregator, IPersistanceManager persistanceManager, ISettingsManager settingsManager, MainMenuViewModel mainMenuViewModel, ConsoleViewModel consoleViewModel, ErrorViewModel errorViewModel, WatchesViewModel watchesViewModel, IFileSystem fileSystem, ScriptDialogStrategy scriptDialogStrategy, IPaths paths ) : base(resultFactory) { this.eventAggregator = eventAggregator; eventAggregator.Subscribe(this); this.persistanceManager = persistanceManager; this.fileSystem = fileSystem; this.scriptDialogStrategy = scriptDialogStrategy; this.paths = paths; Scripts = new BindableCollection <ScriptEditorViewModel>(); Tools = new BindableCollection <PanelViewModel> { consoleViewModel, errorViewModel, watchesViewModel }; Menu = mainMenuViewModel; Menu.Plugins = settingsManager.ListConfigurablePluginSettings().Select(ps => new PluginSettingsMenuViewModel(ps)); Menu.HelpFiles = settingsManager.ListPluginSettingsWithHelpFile().Select(ps => new PluginHelpFileViewModel(ps)).ToList(); Menu.Views = Tools; DisplayName = "FreePIE - Programmable Input Emulator"; }
public WatchesViewModel(IEventAggregator eventAggregator) { Watches = new BindableCollection <WatchViewModel>(); eventAggregator.Subscribe(this); messages = new Dictionary <string, object>(); ThreadPool.QueueUserWorkItem(x => { while (true) { if (clearWatches) { clearWatches = false; Watches.Clear(); } foreach (var message in messages) { AddWatch(message.Key, message.Value); } Thread.Sleep(20); } }); Title = "Watch"; IconName = "watch-16.png"; }
public ErrorsViewModel(IEventAggregator eventAggregator) { eventAggregator.Subscribe(this); Errors = new BindableCollection <ErrorViewModel>(); Title = "Error"; IconName = "error-16.png"; }
public TrayIconViewModel(IResultFactory resultFactory, IEventAggregator eventAggregator, MainShellViewModel shellViewModel, ISettingsManager settingsManager ) { this.resultFactory = resultFactory; this.shellViewModel = shellViewModel; this.settingsManager = settingsManager; this.eventAggregator = eventAggregator; this.eventAggregator.Subscribe(this); }
public MainMenuViewModel(IResultFactory resultFactory, IEventAggregator eventAggregator, Func <IScriptEngine> scriptEngineFactory, IFileSystem fileSystem) { eventAggregator.Subscribe(this); this.resultFactory = resultFactory; this.eventAggregator = eventAggregator; this.scriptEngineFactory = scriptEngineFactory; this.fileSystem = fileSystem; }
public MainMenuViewModel(IResultFactory resultFactory, IEventAggregator eventAggregator, Func <IScriptEngine> scriptEngineFactory, Func <ScriptEditorViewModel> scriptEditorFactory, IFileSystem fileSystem, ScriptDialogStrategy scriptDialogStrategy) { eventAggregator.Subscribe(this); this.resultFactory = resultFactory; this.eventAggregator = eventAggregator; this.scriptEngineFactory = scriptEngineFactory; this.scriptEditorFactory = scriptEditorFactory; this.fileSystem = fileSystem; this.scriptDialogStrategy = scriptDialogStrategy; }
public MainMenuViewModel(IResultFactory resultFactory, IEventAggregator eventAggregator, Func <IScriptEngine> scriptEngineFactory, Func <ScriptEditorViewModel> scriptEditorFactory, IFileSystem fileSystem, ScriptDialogStrategy scriptDialogStrategy, ISettingsManager settings) { eventAggregator.Subscribe(this); this.resultFactory = resultFactory; this.eventAggregator = eventAggregator; this.scriptEngineFactory = scriptEngineFactory; this.scriptEditorFactory = scriptEditorFactory; this.fileSystem = fileSystem; this.scriptDialogStrategy = scriptDialogStrategy; this.settingsManager = settings; RecentScripts = new BindableCollection <RecentFileViewModel>(ListRecentFiles()); }
public ErrorViewModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; eventAggregator.Subscribe(this); }
public CurveViewModel(IEventAggregator eventAggregator) { this.eventAggregator = eventAggregator; }
public CurveViewModel(IEventAggregator eventAggregator, IResultFactory resultFactory) { this.eventAggregator = eventAggregator; this.resultFactory = resultFactory; }
public CurveSettingsViewModel(IResultFactory resultFactory, ISettingsManager settingsManager, Func <CurveViewModel> curveModelFactory, IEventAggregator eventAggregator) : base(resultFactory) { this.settingsManager = settingsManager; this.curveModelFactory = curveModelFactory; DisplayName = "Curve settings"; CreateCurvesModel(); eventAggregator.Subscribe(this); }
public SystemHelper(IThreadTimingFactory threadTimingFactory, IEventAggregator eventAggregator) { this.threadTimingFactory = threadTimingFactory; this.eventAggregator = eventAggregator; }