// To refactor - use already read config from Connect.cs private void ReadConfiguration() { try { var userPreference = HuntingDog.DogFace.UserPreferencesStorage.Load(); Config.ConfigPersistor pers = new Config.ConfigPersistor(); _cfg = pers.Restore <Config.DogConfig>(userPreference); } catch (Exception ex) { //log.Error("ReadConfiguration: failed", ex); } }
private void ReadShortcutCommandBinding() { try { var userPreference = UserPreferencesStorage.Load(); Config.ConfigPersistor pers = new Config.ConfigPersistor(); var cfg = pers.Restore <Config.DogConfig>(userPreference); if (cfg.LaunchingHotKey.Length == 1) { LaunchingHotKey = cfg.LaunchingHotKey; } } catch (Exception ex) { log.Error("ReadShortcutCommandBinding: failed", ex); } }