Ejemplo n.º 1
0
 public void InitComboRecentHomes(EditorConfig Config)
 {
     comboBoxRecentHomes.Items.Clear();
     foreach (var home in Config.RecentHomes)
     {
         comboBoxRecentHomes.Items.Add(home);
     }
     if (comboBoxRecentHomes.Items.Count > 0)
     {
         comboBoxRecentHomes.SelectedIndex = 0;
     }
 }
Ejemplo n.º 2
0
 private void LoadConfigEditor()
 {
     try
     {
         string json = Encoding.UTF8.GetString(System.IO.File.ReadAllBytes(GetConfigFileFullName()));
         ConfigEditor = JsonSerializer.Deserialize <EditorConfig>(json);
     }
     catch (Exception)
     {
         //MessageBox.Show(ex.ToString());
     }
     if (null == ConfigEditor)
     {
         ConfigEditor = new EditorConfig()
         {
             RecentHomes = new List <string>()
         }
     }
     ;
 }