public void RefreshDisplay()
        {
            List <AdmiralInfo>       list1         = this._app.GameDatabase.GetAdmiralInfosForPlayer(this._playerID).ToList <AdmiralInfo>();
            IEnumerable <SuulkaInfo> playerSuulkas = this._app.GameDatabase.GetPlayerSuulkas(new int?(this._playerID));

            foreach (SuulkaInfo suulkaInfo in playerSuulkas)
            {
                if (suulkaInfo.AdmiralID != 0)
                {
                    list1.Add(this._app.GameDatabase.GetAdmiralInfo(suulkaInfo.AdmiralID));
                }
            }
            List <AdmiralInfo> list2 = list1.ToList <AdmiralInfo>();

            switch (this._currentFilterMode)
            {
            case AdmiralManagerDialog.AdmiralFilterMode.Age:
                list2 = list2.OrderBy <AdmiralInfo, float>((Func <AdmiralInfo, float>)(x => x.Age)).ToList <AdmiralInfo>();
                break;

            case AdmiralManagerDialog.AdmiralFilterMode.Name:
                list2 = list2.OrderBy <AdmiralInfo, string>((Func <AdmiralInfo, string>)(x => x.Name)).ToList <AdmiralInfo>();
                break;

            case AdmiralManagerDialog.AdmiralFilterMode.Location:
                list2 = list2.OrderBy <AdmiralInfo, string>((Func <AdmiralInfo, string>)(x => this.GetLocation(x.ID))).ToList <AdmiralInfo>();
                break;

            case AdmiralManagerDialog.AdmiralFilterMode.Fleet:
                list2 = list2.OrderBy <AdmiralInfo, string>((Func <AdmiralInfo, string>)(x => this.GetFleetName(x.ID))).ToList <AdmiralInfo>();
                break;
            }
            this._app.UI.ClearItemsTopLayer(this._app.UI.Path(this.ID, "pnlAdmirals.admiralList"));
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "currentNumAdmirals"), "text", string.Format(App.Localize("@NUMBER_OF_ADMIRALS"), (object)list2.Count <AdmiralInfo>().ToString(), (object)GameSession.GetPlayerMaxAdmirals(this._app.GameDatabase, this._playerID).ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "capturedAdmirals"), "text", string.Format(App.Localize("@NUMBER_OF_CAPTURED_ADMIRALS"), (object)list2.Count <AdmiralInfo>().ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(this.ID, "enemyAdmirals"), "text", string.Format(App.Localize("@NUMBER_OF_ENEMY_ADMIRALS")));
            int index = 0;

            foreach (AdmiralInfo admiralInfo in list2)
            {
                AdmiralInfo admiral = admiralInfo;
                if (index + 1 > this._buttonMap.Count)
                {
                    this._buttonMap.Add(admiral.ID);
                }
                else
                {
                    this._buttonMap[index] = admiral.ID;
                }
                this._app.UI.AddItem(this._app.UI.Path(this.ID, "pnlAdmirals.admiralList"), "", admiral.ID, "");
                string itemGlobalId1 = this._app.UI.GetItemGlobalID(this._app.UI.Path(this.ID, "pnlAdmirals.admiralList"), "", admiral.ID, "");
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem.expand_button"), false);
                string str = "Deep Space";
                if (admiral.HomeworldID.HasValue)
                {
                    str = this._app.GameDatabase.GetOrbitalObjectInfo(admiral.HomeworldID.Value).Name;
                }
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "dissolveButton"), "id", "dissolveButton" + index.ToString());
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "cancelMissionButton"), "id", "cancelMissionButton" + index.ToString());
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "createFleetButton"), "id", "createFleetButton" + index.ToString());
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "createEngramButton"), "id", "createEngramButton" + index.ToString());
                if (!admiral.Engram && this._app.GameDatabase.PlayerHasTech(this._app.LocalPlayer.ID, "CCC_Personality_Engrams"))
                {
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createEngramButton" + index.ToString()), true);
                }
                else
                {
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createEngramButton" + index.ToString()), false);
                }
                FleetInfo fleetInfoByAdmiralId = this._app.GameDatabase.GetFleetInfoByAdmiralID(admiral.ID, FleetType.FL_NORMAL);
                if (fleetInfoByAdmiralId != null)
                {
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem.expand_button"), false);
                    this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                    this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                    this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                    this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                    PlayerInfo playerInfo = this._app.GameDatabase.GetPlayerInfo(fleetInfoByAdmiralId.PlayerID);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.disabled.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue * 0.5f);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.disabled.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue * 0.5f);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.disabled.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue * 0.5f);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
                    StarSystemInfo starSystemInfo = this._app.GameDatabase.GetStarSystemInfo(fleetInfoByAdmiralId.SystemID);
                    str = !(starSystemInfo != (StarSystemInfo)null) ? "Deep Space" : starSystemInfo.Name;
                    MissionInfo missionByFleetId = this._app.GameDatabase.GetMissionByFleetID(fleetInfoByAdmiralId.ID);
                    if (missionByFleetId != null)
                    {
                        this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.sub_title"), "text", fleetInfoByAdmiralId.Name);
                        this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "cancelMissionButton" + index.ToString()), true);
                    }
                    else
                    {
                        this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem.on_mission"), false);
                        this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "cancelMissionButton" + index.ToString()), false);
                    }
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createFleetButton" + index.ToString()), false);
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem"), true);
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "dissolveButton" + index.ToString()), (missionByFleetId != null ? 0 : (!playerSuulkas.Any <SuulkaInfo>((Func <SuulkaInfo, bool>)(x => x.AdmiralID == admiral.ID)) ? 1 : 0)) != 0);
                }
                else
                {
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem"), false);
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "dissolveButton" + index.ToString()), false);
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createFleetButton" + index.ToString()), (!playerSuulkas.Any <SuulkaInfo>((Func <SuulkaInfo, bool>)(x => x.AdmiralID == admiral.ID)) ? 1 : 0) != 0);
                }
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralName"), "text", string.Format(App.Localize("@ADMIRAL_DIALOG_NAME_COLON"), (object)admiral.Name));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralLocation"), "text", string.Format(App.Localize("@ADMIRAL_DIALOG_LOCATION_COLON"), (object)str));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralAge"), "text", string.Format(App.Localize("@ADMIRAL_DIALOG_AGE_COLON"), (object)((int)admiral.Age).ToString()));
                string admiralAvatar = Kerberos.Sots.StarFleet.StarFleet.GetAdmiralAvatar(this._app, admiral.ID);
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralImage"), "sprite", admiralAvatar);
                IEnumerable <AdmiralInfo.TraitType> admiralTraits = this._app.GameDatabase.GetAdmiralTraits(admiral.ID);
                this._app.UI.ClearItems(this._app.UI.Path(itemGlobalId1, "admiralTraits"));
                int userItemId = 0;
                foreach (AdmiralInfo.TraitType traitType in admiralTraits)
                {
                    string admiralTraitText = OverlayMission.GetAdmiralTraitText(traitType);
                    if (traitType != admiralTraits.Last <AdmiralInfo.TraitType>())
                    {
                        admiralTraitText += ", ";
                    }
                    this._app.UI.AddItem(this._app.UI.Path(itemGlobalId1, "admiralTraits"), "", userItemId, "");
                    string itemGlobalId2 = this._app.UI.GetItemGlobalID(this._app.UI.Path(itemGlobalId1, "admiralTraits"), "", userItemId, "");
                    ++userItemId;
                    this._app.UI.SetPropertyString(itemGlobalId2, "text", admiralTraitText);
                    if (AdmiralInfo.IsGoodTrait(traitType))
                    {
                        this._app.UI.SetPropertyColorNormalized(itemGlobalId2, "color", new Vector3(0.0f, 1f, 0.0f));
                    }
                    else
                    {
                        this._app.UI.SetPropertyColorNormalized(itemGlobalId2, "color", new Vector3(1f, 0.0f, 0.0f));
                    }
                    this._app.UI.SetTooltip(itemGlobalId2, AdmiralInfo.GetTraitDescription(traitType, this._app.GameDatabase.GetLevelForAdmiralTrait(admiral.ID, traitType)));
                }
                string itemGlobalId3 = this._app.UI.GetItemGlobalID(this._app.UI.Path(itemGlobalId1, "infoList"), "", 0, "");
                this._app.UI.Send((object)"SetSelected", (object)itemGlobalId3, (object)true);
                string propertyValue = admiral.HomeworldID.HasValue ? string.Format(App.Localize("@ADMIRAL_BIRTHPLANET_X"), (object)this._app.GameDatabase.GetOrbitalObjectInfo(admiral.HomeworldID.Value).Name) : App.Localize("@ADMIRAL_BORN_IN_SPACE");
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralBirthPlanet"), "text", propertyValue);
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralYears"), "text", string.Format(App.Localize("@YEARS_AS_ADMIRAL"), (object)((this._app.GameDatabase.GetTurnCount() - admiral.TurnCreated) / 4).ToString()));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralLoyalty"), "text", string.Format(App.Localize("@ADMIRAL_LOYALTY"), (object)admiral.Loyalty.ToString()));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralReaction"), "text", string.Format(App.Localize("@ADMIRAL_REACTION"), (object)admiral.ReactionBonus.ToString()));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralEvasion"), "text", string.Format(App.Localize("@ADMIRAL_EVASION"), (object)admiral.EvasionBonus.ToString()));
                string itemGlobalId4 = this._app.UI.GetItemGlobalID(this._app.UI.Path(itemGlobalId1, "infoList"), "", 1, "");
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "battlesWon"), "text", string.Format(App.Localize("@ADMIRAL_BATTLES_WON"), (object)admiral.BattlesWon.ToString()));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "battlesFought"), "text", string.Format(App.Localize("@ADMIRAL_BATTLES_FOUGHT"), (object)admiral.BattlesFought.ToString()));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "missionsAssigned"), "text", string.Format(App.Localize("@ADMIRAL_MISSIONS_ASSIGNED"), (object)admiral.MissionsAssigned.ToString()));
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "missionsAccomplished"), "text", string.Format(App.Localize("@ADMIRAL_MISSIONS_ACCOMPLISHED"), (object)admiral.MissionsAccomplished.ToString()));
                ++index;
            }
        }
        public void RefreshAdmiral(int admiralID)
        {
            string      itemGlobalId1 = this._app.UI.GetItemGlobalID(this._app.UI.Path(this.ID, "pnlAdmirals.admiralList"), "", admiralID, "");
            AdmiralInfo admiralInfo   = this._app.GameDatabase.GetAdmiralInfo(admiralID);
            int         num1          = this._buttonMap.IndexOf(admiralID);

            this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem.expand_button"), false);
            string    str = App.Localize("@ADMIRAL_IN_DEEP_SPACE");
            FleetInfo fleetInfoByAdmiralId = this._app.GameDatabase.GetFleetInfoByAdmiralID(admiralID, FleetType.FL_NORMAL);

            if (fleetInfoByAdmiralId != null)
            {
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem.expand_button"), false);
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.listitem_name"), "text", fleetInfoByAdmiralId.Name);
                StarSystemInfo starSystemInfo = this._app.GameDatabase.GetStarSystemInfo(fleetInfoByAdmiralId.SystemID);
                str = !(starSystemInfo != (StarSystemInfo)null) ? App.Localize("@ADMIRAL_IN_DEEP_SPACE") : starSystemInfo.Name;
                MissionInfo missionByFleetId = this._app.GameDatabase.GetMissionByFleetID(fleetInfoByAdmiralId.ID);
                if (missionByFleetId != null)
                {
                    this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "fleetitem.sub_title"), "text", fleetInfoByAdmiralId.Name);
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "cancelMissionButton" + num1.ToString()), true);
                }
                else
                {
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem.on_mission"), false);
                    this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "cancelMissionButton" + num1.ToString()), false);
                }
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createFleetButton" + num1.ToString()), false);
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem"), true);
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "dissolveButton" + num1.ToString()), (missionByFleetId == null ? 1 : 0) != 0);
            }
            else
            {
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "fleetitem"), false);
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "dissolveButton" + num1.ToString()), false);
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createFleetButton" + num1.ToString()), true);
            }
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralName"), "text", string.Format(App.Localize("@ADMIRAL_DIALOG_NAME_COLON"), (object)admiralInfo.Name));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralLocation"), "text", string.Format(App.Localize("@ADMIRAL_DIALOG_LOCATION_COLON"), (object)str));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralAge"), "text", string.Format(App.Localize("@ADMIRAL_DIALOG_AGE_COLON"), (object)((int)admiralInfo.Age).ToString()));
            string admiralAvatar = Kerberos.Sots.StarFleet.StarFleet.GetAdmiralAvatar(this._app, admiralInfo.ID);

            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId1, "admiralImage"), "sprite", admiralAvatar);
            if (!admiralInfo.Engram && this._app.GameDatabase.PlayerHasTech(this._app.LocalPlayer.ID, "CCC_Personality_Engrams"))
            {
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createEngramButton" + num1.ToString()), true);
            }
            else
            {
                this._app.UI.SetVisible(this._app.UI.Path(itemGlobalId1, "createEngramButton" + num1.ToString()), false);
            }
            IEnumerable <AdmiralInfo.TraitType> admiralTraits = this._app.GameDatabase.GetAdmiralTraits(admiralInfo.ID);

            this._app.UI.ClearItems(this._app.UI.Path(itemGlobalId1, "admiralTraits"));
            int userItemId = 0;

            foreach (AdmiralInfo.TraitType traitType in admiralTraits)
            {
                string admiralTraitText = OverlayMission.GetAdmiralTraitText(traitType);
                if (traitType != admiralTraits.Last <AdmiralInfo.TraitType>())
                {
                    admiralTraitText += ", ";
                }
                this._app.UI.AddItem(this._app.UI.Path(itemGlobalId1, "admiralTraits"), "", userItemId, "");
                string itemGlobalId2 = this._app.UI.GetItemGlobalID(this._app.UI.Path(itemGlobalId1, "admiralTraits"), "", userItemId, "");
                ++userItemId;
                this._app.UI.SetPropertyString(itemGlobalId2, "text", admiralTraitText);
                if (AdmiralInfo.IsGoodTrait(traitType))
                {
                    this._app.UI.SetPropertyColorNormalized(itemGlobalId2, "color", new Vector3(0.0f, 1f, 0.0f));
                }
                else
                {
                    this._app.UI.SetPropertyColorNormalized(itemGlobalId2, "color", new Vector3(1f, 0.0f, 0.0f));
                }
                this._app.UI.SetPropertyString(itemGlobalId2, "tooltip", AdmiralInfo.GetTraitDescription(traitType, this._app.GameDatabase.GetLevelForAdmiralTrait(admiralInfo.ID, traitType)));
            }
            string itemGlobalId3 = this._app.UI.GetItemGlobalID(this._app.UI.Path(itemGlobalId1, "infoList"), "", 0, "");

            this._app.UI.Send((object)"SetSelected", (object)itemGlobalId3, (object)true);
            string propertyValue = admiralInfo.HomeworldID.HasValue ? "Birth Planet: " + this._app.GameDatabase.GetOrbitalObjectInfo(admiralInfo.HomeworldID.Value).Name : "Born in Deep Space";

            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralBirthPlanet"), "text", propertyValue);
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralYears"), "text", string.Format(App.Localize("@YEARS_AS_ADMIRAL"), (object)((this._app.GameDatabase.GetTurnCount() - admiralInfo.TurnCreated) / 4).ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralLoyalty"), "text", string.Format(App.Localize("@ADMIRAL_LOYALTY"), (object)admiralInfo.Loyalty.ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralReaction"), "text", string.Format(App.Localize("@ADMIRAL_REACTION"), (object)admiralInfo.ReactionBonus.ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId3, "admiralEvasion"), "text", string.Format(App.Localize("@ADMIRAL_EVASION"), (object)admiralInfo.EvasionBonus.ToString()));
            string itemGlobalId4 = this._app.UI.GetItemGlobalID(this._app.UI.Path(itemGlobalId1, "infoList"), "", 1, "");

            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "battlesWon"), "text", string.Format(App.Localize("@ADMIRAL_BATTLES_WON"), (object)admiralInfo.BattlesWon.ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "battlesFought"), "text", string.Format(App.Localize("@ADMIRAL_BATTLES_FOUGHT"), (object)admiralInfo.BattlesFought.ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "missionsAssigned"), "text", string.Format(App.Localize("@ADMIRAL_MISSIONS_ASSIGNED"), (object)admiralInfo.MissionsAssigned.ToString()));
            this._app.UI.SetPropertyString(this._app.UI.Path(itemGlobalId4, "missionsAccomplished"), "text", string.Format(App.Localize("@ADMIRAL_MISSIONS_ACCOMPLISHED"), (object)admiralInfo.MissionsAccomplished.ToString()));
            int        num2       = num1 + 1;
            PlayerInfo playerInfo = this._app.GameDatabase.GetPlayerInfo(admiralInfo.PlayerID);

            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.idle.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.mouse_over.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.disabled.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue * 0.5f);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.disabled.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue * 0.5f);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_idle.disabled.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue * 0.5f);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.idle.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.colony_insert.LC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.colony_insert.RC"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
            this._app.UI.SetPropertyColor(this._app.UI.Path(itemGlobalId1, "fleetitem.header_sel.mouse_over.list_item.colony_insert.BG"), "color", playerInfo.PrimaryColor * (float)byte.MaxValue);
        }