Пример #1
0
 // 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);
     }
 }
Пример #2
0
        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);
            }
        }