private void OnAdvancementTabSelected(UXCheckbox checkbox, bool selected)
 {
     if (this.activeAdvancementTab != null && this.activeAdvancementTab.ShouldBlockTabChanges())
     {
         checkbox.Selected = !selected;
         return;
     }
     if (selected)
     {
         SquadAdvancementBaseTab squadAdvancementBaseTab = (SquadAdvancementBaseTab)checkbox.Tag;
         if (squadAdvancementBaseTab != this.activeAdvancementTab)
         {
             this.activeAdvancementTab.Visible = false;
             squadAdvancementBaseTab.Visible   = true;
             this.activeAdvancementTab         = squadAdvancementBaseTab;
             Service.Get <EventManager>().SendEvent(EventId.SquadAdvancementTabSelected, this);
         }
     }
 }
        private void InitPerkTabs()
        {
            this.allAdvancementTabs.Clear();
            this.tabActivate                  = this.screen.GetElement <UXCheckbox>("TabActivatePerks");
            this.tabUpgrade                   = this.screen.GetElement <UXCheckbox>("TabUpgradePerks");
            this.tabActivate.OnSelected       = new UXCheckboxSelectedDelegate(this.OnAdvancementTabSelected);
            this.tabUpgrade.OnSelected        = new UXCheckboxSelectedDelegate(this.OnAdvancementTabSelected);
            this.perkTabsGroup                = this.screen.GetElement <UXElement>("TabGroupPerks");
            this.perkTabsGroup.Visible        = true;
            this.perkUpgradeGroup             = this.screen.GetElement <UXElement>("UpgradeMainGroupPerks");
            this.perkUpgradeGroup.Visible     = false;
            this.activeAdvancementTab         = this.CreateAndAddActivateTab(this.screen);
            this.activeAdvancementTab.Visible = true;
            this.tabActivate.Tag              = this.activeAdvancementTab;
            SquadAdvancementBaseTab squadAdvancementBaseTab = this.CreateAndAddUpgradeTab(this.screen);

            squadAdvancementBaseTab.Visible = false;
            this.tabUpgrade.Tag             = squadAdvancementBaseTab;
        }