コード例 #1
0
 /// <summary>
 /// Sets up a log file
 /// </summary>
 static public void Initialize()
 {
     start = DateTime.Now;
     Pathing.CreateDirectory(Dir);
     CheckFile();
     WriteBeginning();
 }
コード例 #2
0
ファイル: XmlMaker.cs プロジェクト: moondc/Music-Randomizer
        // Creates the xml writer to use, deletes if already existing
        private static XmlWriter getXmlWriter(string dest)
        {
            XmlWriterSettings settings = new XmlWriterSettings();

            settings.Encoding = Encoding.UTF8;
            settings.Indent   = true;
            if (File.Exists(dest))
            {
                File.Delete(dest);
            }
            else if (!Directory.Exists(dest))
            {
                Pathing.CreateDirectory(dest);
            }
            XmlWriter write = XmlWriter.Create(dest + "Songlist.xml", settings);

            return(write);
        }