예제 #1
0
        static internal void DeleteStartupParamsFile()
        {
            string StartupParamsFilePath = StartupParams.GetStartupParamsFilePath();

            if (System.IO.File.Exists(StartupParamsFilePath))
            {
                System.IO.File.Delete(StartupParamsFilePath);
            }
        }
예제 #2
0
        static internal void WriteStartupParamsToFile(string[] args)
        {
            XDocument StartupParamsXmlDoc = GetStartupParamsXml(args);

            // Save the XML to the file.
            if (StartupParamsXmlDoc != null)
            {
                StartupParamsXmlDoc.Save(StartupParams.GetStartupParamsFilePath());
            }
        }
예제 #3
0
        static internal XDocument ReadStartupParamsFromFile(bool DeleteAfterRead = false)
        {
            XDocument StartupParamsXmlDoc   = null;
            string    StartupParamsFilePath = StartupParams.GetStartupParamsFilePath();

            if (System.IO.File.Exists(StartupParamsFilePath))
            {
                StartupParamsXmlDoc = XDocument.Load(StartupParamsFilePath);
                if (DeleteAfterRead)
                {
                    DeleteStartupParamsFile();
                }
            }

            return(StartupParamsXmlDoc);
        }