예제 #1
0
        public NepEntryManager(string _name, string _rootPath, string _dataPath)
        {
            GameScriptEntries   = new Dictionary <string, Entry>();
            SystemScriptEntries = new Dictionary <string, Entry>();
            //EntriesTree = new TreeNode("_zero_");

            Name           = _name;
            RootDirectory  = _rootPath;
            NepDataRootDir = _dataPath;

            {
                NepError error = ValidateDirectoryStructure();
                if (error.ErrorCode != NepErrCode.NoError)
                {
                    Logger.Log(error.ToString());
                    throw new Exception($"Entry Manager '{Name}' instantiation failure.");
                }
            }

            {
                NepError error = PopulateData();
                if (error.ErrorCode != NepErrCode.NoError)
                {
                    Logger.Log(error.ToString());
                    throw new Exception($"Entry Manager '{Name}' data population failure. Please reopen the program.");
                }
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: 3x3y3z3t/NepTrans
        private void SaveProject()
        {
            if (MainGameEntryManager == null)
            {
                return;
            }
            Logger.Log("========================================");
            Logger.Log("    Saving data...");
            NepError err = MainGameEntryManager.SaveData();

            Logger.Log(err.ToString());
        }