Exemplo n.º 1
0
        private static void AddSource(string file, Dictionary <string, ArtiSwDescription> sources)
        {
            if (sources.ContainsKey(file))
            {
                return; // Already exists
            }
            var desc = new ArtiSwDescription(File.ReadAllText(file));

            sources.Add(file, desc);
        }
Exemplo n.º 2
0
 public void AddSource(string file, string json = null)
 {
     if (!_sources.ContainsKey(file))
     {
         if (json == null && !File.Exists(file))
         {
             MessageBox.Show(file, "File missing", MessageBoxButtons.OK, MessageBoxIcon.Error);
             return;
         }
         var desc = new ArtiSwDescription(json ?? File.ReadAllText(file));
         _sources.Add(file, desc);
         Dirty = true;
     }
 }