예제 #1
0
        protected override void Perform(BooterHelper.BootFile file, XmlDbRow row)
        {
            BooterHelper.DataBootFile careerFile = new BooterHelper.DataBootFile(file.ToString(), row.GetString("Careers"), false);
            if (!careerFile.IsValid)
            {
                BooterLogger.AddError(file.ToString() + ": Unknown Careers File " + row.GetString("Careers"));
                return;
            }

            BooterHelper.DataBootFile careerEventsFile = new BooterHelper.DataBootFile(careerFile.ToString(), row.GetString("CareerEvents"), false);

            if (careerEventsFile.IsValid)
            {
                foreach (Career career in CareerManager.CareerList)
                {
                    XmlDbTable table3 = careerEventsFile.GetTable(career.Guid.ToString());
                    if (table3 != null)
                    {
                        LoadCareerEvents(career, careerEventsFile, table3);
                    }
                }
            }

            BooterHelper.DataBootTable table = new BooterHelper.DataBootTable(careerFile, "CareerList");
            if (!table.IsValid)
            {
                BooterLogger.AddError(file.ToString() + ": No CareerList " + careerFile.ToString());
                return;
            }

            table.Load(new CareerLoader(careerEventsFile).LoadCareer);
        }
예제 #2
0
        public void ParseIntervals()
        {
            mIntervals = new List <SpeedInterval>();

            BooterHelper.DataBootFile speedFile = new BooterHelper.DataBootFile("NRaas.RelativityTuning", "NRaas.RelativityTuning", false);
            if (!speedFile.IsValid)
            {
                return;
            }

            BooterHelper.DataBootTable table = new BooterHelper.DataBootTable(speedFile, "Speeds");
            if (!table.IsValid)
            {
                return;
            }

            table.Load(Perform);

            mIntervals.Sort(new Comparison <SpeedInterval>(SpeedInterval.OnSort));
        }