public MainViewModel(IEventBus eventBus, ICopyCollection copyCollection, ISettingCollection settingCollection, IPluginLoader pluginLoader) { this.eventBus = eventBus; this.copyCollection = copyCollection; this.settingCollection = settingCollection; this.pluginLoader = pluginLoader; Initialize(); }
public MainViewModel(IEventBus eventBus, IShortcutCollection <string, ILaunchShortcut> shortcutCollection, IShortcutExecutor shortcutExecutor, ISettingCollection settingCollection, IPluginLoader pluginLoader) { this.eventBus = eventBus; this.shortcutCollection = shortcutCollection; this.shortcutExecutor = shortcutExecutor; this.settingCollection = settingCollection; this.pluginLoader = pluginLoader; Initialize(); }
public SettingsViewModel(ISettingCollection settingCollection) { this.settingCollection = settingCollection; this.settingCollection.Load(); ModifierKeys = Enum.GetValues(typeof(ModifierKeys)).Cast <ModifierKeys>().ToList(); Keys = Enum.GetValues(typeof(Keys)).Cast <Keys>().ToList(); Enum.TryParse(this.settingCollection.Settings.FirstOrDefault(x => x.Key == "Modifier1").Value, out ModifierKeys modifierKey1); Modifier1 = modifierKey1; Enum.TryParse(this.settingCollection.Settings.FirstOrDefault(x => x.Key == "Modifier2").Value, out ModifierKeys modifierKey2); Modifier2 = modifierKey2; Enum.TryParse(this.settingCollection.Settings.FirstOrDefault(x => x.Key == "Key").Value, out Keys key); Key = key; SaveCommand = new ActionCommand(x => { this.settingCollection.Save(Modifier1, Modifier2, Key); MessageBox.Show("Settings saved!"); }); }
public void save(ISettingCollection <TKey, TValue, TCollectionId> settings) { throw new NotImplementedException(); }