Пример #1
0
        public void RefreshResearchingTech()
        {
            string techID = this.App.GameDatabase.GetTechFileID(this.App.GameDatabase.GetPlayerResearchingTechID(this.App.LocalPlayer.ID));
            string str1   = "Tech\\Icons\\question_mark.bmp";
            string str2   = "Tech\\Icons\\question_mark.bmp";

            if (techID != null)
            {
                Tech tech1 = this.App.AssetDatabase.MasterTechTree.Technologies.First <Tech>((Func <Tech, bool>)(tech => tech.Id == techID));
                if (tech1 != null)
                {
                    str1 = tech1.GetProperIconPath();
                    str2 = "Tech\\Icons\\Research_Icon.bmp";
                }
            }
            else
            {
                techID = this.App.GameDatabase.GetTechFileID(this.App.GameDatabase.GetPlayerFeasibilityStudyTechId(this.App.LocalPlayer.ID));
                if (techID != null)
                {
                    Tech techno = this.App.AssetDatabase.MasterTechTree.Technologies.First <Tech>((Func <Tech, bool>)(tech => tech.Id == techID));
                    if (techno != null)
                    {
                        this.App.AssetDatabase.MasterTechTree.TechFamilies.First <TechFamily>((Func <TechFamily, bool>)(x => x.Id == techno.Family));
                        str1 = techno.GetProperIconPath();
                    }
                }
            }
            this.FamilyTexture = str2;
            this.TechTexture   = str1;
        }