コード例 #1
0
        void GetKnownFiles()
        {
            SavedQSFiles.Clear();
            SavedASFiles.Clear();
            string saveFolder = KSPUtil.ApplicationRootPath + "saves/" + HighLogic.SaveFolder + "/";

            if (System.IO.File.Exists(saveFolder + "DQS_DataBase.cfg"))
            {
                ConfigNode database = ConfigNode.Load(saveFolder + "DQS_DataBase.cfg");
                ConfigNode QSDB, ASDB;
                if (database.HasNode("QuickSaves"))
                {
                    QSDB         = database.GetNode("QuickSaves");
                    SavedQSFiles = QSDB.GetValues("file").ToList();
                }
                if (database.HasNode("AutoSaves"))
                {
                    ASDB         = database.GetNode("AutoSaves");
                    SavedASFiles = ASDB.GetValues("file").ToList();
                }
            }
        }
コード例 #2
0
        void GetKnownFiles()
        {
            SavedQSFiles.Clear();
            SavedASFiles.Clear();
            string saveFolder = SaveFolder;

            if (System.IO.File.Exists(saveFolder + "DQS_DataBase.cfg"))
            {
                ConfigNode database = ConfigNode.Load(saveFolder + "DQS_DataBase.cfg");
                ConfigNode QSDB, ASDB;
                if (database.HasNode("QuickSaves"))
                {
                    QSDB         = database.GetNode("QuickSaves");
                    SavedQSFiles = QSDB.GetValues("file").ToList();
                }
                if (database.HasNode("AutoSaves"))
                {
                    ASDB         = database.GetNode("AutoSaves");
                    SavedASFiles = ASDB.GetValues("file").ToList();
                }
            }
        }