Beispiel #1
0
 public MainWindowCommand(Action killApplication, AppSettings appSettings)
 {
     var selfPlugin = new SelfPlugin();
     var loader = new PluginLoader(selfPlugin);
     var persistanceHelper = new PersistanceHelper(selfPlugin.XStream);
     appSettings.AppHotkeys = persistanceHelper.LoadOrSaveAndLoad<Hotkeys>(Paths.Instance.AppHotkeys,
                                                                           new KeyboardShortcutChangeCommand(appSettings).Execute);
     Hotkeys hotkeys = appSettings.AppHotkeys;
     displayHotkey = hotkeys.DisplayHotKey;
     controller = new MainWindowController(loader.LaunchablePlugins, loader.CharacterPlugins, loader.LaunchableHandlers, selfPlugin, persistanceHelper,
                                           appSettings);
     this.killApplication = killApplication;
     appSettings.HotkeysChanged += HandleHotkeysChanged;
     window = new MainWindow(controller);
 }
Beispiel #2
0
 public History(File historyFile, XStream xstream, PersistanceHelper persistanceHelper)
 {
     this.historyFile = historyFile;
     this.xstream = xstream;
     dictionary = persistanceHelper.LoadOrSaveAndLoad(Paths.Instance.History, dictionary);
 }