protected void Dispose(bool disposing)
        {
            if (!disposed)
            {
                if (disposing)
                {
                    if (this.OperationsSL != null)
                        this.OperationsSL.Dispose();
                    if (this.AgentComponent != null)
                        this.AgentComponent.Dispose();

                }
                this.OperationsSL = null;
                this.AgentComponent = null;
                this.disposed = true;
            }
        }
 public override void LoadContent()
 {
     float screenWidth = (float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferWidth;
     float screenHeight = (float)base.ScreenManager.GraphicsDevice.PresentationParameters.BackBufferHeight;
     Rectangle titleRect = new Rectangle((int)screenWidth / 2 - 200, 44, 400, 80);
     this.TitleBar = new Menu2(base.ScreenManager, titleRect);
     this.TitlePos = new Vector2((float)(titleRect.X + titleRect.Width / 2) - Fonts.Laserian14.MeasureString(Localizer.Token(6089)).X / 2f, (float)(titleRect.Y + titleRect.Height / 2 - Fonts.Laserian14.LineSpacing / 2));
     Rectangle leftRect = new Rectangle((int)screenWidth / 2 - 640, (screenHeight > 768f ? titleRect.Y + titleRect.Height + 5 : 44), 1280, 660);
     this.DMenu = new Menu2(base.ScreenManager, leftRect);
     this.close = new CloseButton(new Rectangle(leftRect.X + leftRect.Width - 40, leftRect.Y + 20, 20, 20));
     this.SelectedInfoRect = new Rectangle(leftRect.X + 60, leftRect.Y + 250, 368, 376);
     this.IntelligenceRect = new Rectangle(this.SelectedInfoRect.X + this.SelectedInfoRect.Width + 30, this.SelectedInfoRect.Y, 368, 376);
     this.OperationsRect = new Rectangle(this.IntelligenceRect.X + this.IntelligenceRect.Width + 30, this.SelectedInfoRect.Y, 368, 376);
     this.OpSLRect = new Rectangle(this.OperationsRect.X + 20, this.OperationsRect.Y + 20, this.OperationsRect.Width - 40, this.OperationsRect.Height - 45);
     Submenu OpSub = new Submenu(base.ScreenManager, this.OpSLRect);
     this.OperationsSL = new ScrollList(OpSub, Fonts.Arial12Bold.LineSpacing + 5);
     Vector2 ExecutePos = new Vector2((float)(this.OperationsRect.X + this.OperationsRect.Width / 2 - 91), (float)(this.OperationsRect.Y + this.OperationsRect.Height - 60));
     this.ExecuteOperation = new DanButton(ExecutePos, "Execute Op")
     {
         Toggled = true
     };
     Rectangle ComponentRect = new Rectangle(this.SelectedInfoRect.X + 20, this.SelectedInfoRect.Y + 35, this.SelectedInfoRect.Width - 40, this.SelectedInfoRect.Height - 95);
     this.AgentComponent = new Ship_Game.AgentComponent(ComponentRect, this);
     foreach (Empire e in EmpireManager.EmpireList)
     {
         if (e != EmpireManager.GetEmpireByName(this.screen.PlayerLoyalty))
         {
             if (e.isFaction || e.MinorRace)
             {
                 continue;
             }
             RaceEntry re = new RaceEntry()
             {
                 e = e
             };
             this.Races.Add(re);
         }
         else
         {
             RaceEntry re = new RaceEntry()
             {
                 e = e
             };
             this.SelectedEmpire = e;
             this.Races.Add(re);
         }
     }
     Vector2 Cursor = new Vector2(screenWidth / 2f - (float)(148 * this.Races.Count / 2), (float)(leftRect.Y + 10));
     int j = 0;
     foreach (RaceEntry re in this.Races)
     {
         re.container = new Rectangle((int)Cursor.X + 10 + j * 148, leftRect.Y + 40, 124, 148);
         j++;
     }
     Rectangle rectangle = new Rectangle();
     this.SpyBudgetSlider = new GenericSlider(rectangle, Localizer.Token(1637), 0f, 100f)
     {
         amount = 0f
     };
     Rectangle rectangle1 = new Rectangle();
     this.CounterSpySlider = new GenericSlider(rectangle1, Localizer.Token(1637), 0f, 100f)
     {
         amount = 0f
     };
     base.ScreenManager.racialMusic.SetVolume(0f);
 }