Example #1
0
 public Import(string type)
 {
     if (type == "Releases")
     {
         if (File.Exists(Environment.CurrentDirectory + @"\resources\Releases.xml"))
         {
             doc = XDocument.Load(Environment.CurrentDirectory + @"\resources\Releases.xml");
         }
         else
         {
             if (!Directory.Exists(Environment.CurrentDirectory + @"\resources\"))
             {
                 Directory.CreateDirectory(Environment.CurrentDirectory + @"\resources\");
             }
             Export export = new Export();
             export.SaveToFile(new List <Release>());
         }
     }
     else
     {
         if (File.Exists(Environment.CurrentDirectory + @"\resources\Relations.xml"))
         {
             doc = XDocument.Load(Environment.CurrentDirectory + @"\resources\Relations.xml");
         }
         else
         {
             if (!Directory.Exists(Environment.CurrentDirectory + @"\resources\"))
             {
                 Directory.CreateDirectory(Environment.CurrentDirectory + @"\resources\");
             }
             Export export = new Export();
             export.SaveToFile(new List <Relation>());
         }
     }
 }
Example #2
0
        public void SaveRelations()
        {
            List_relations = new List <Relation>();
            foreach (Track tr in List_tracks)
            {
                foreach (Relation rel in tr.Relations)
                {
                    List_relations.Add(rel);
                }
            }
            Export export = new Export();

            export.SaveToFile(List_relations);
        }
Example #3
0
        public void SaveReleases()
        {
            Export export = new Export();

            export.SaveToFile(List_releases);
        }