protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (ExperienceBar != null) { if (!ExperienceBar.IsDisposed) { ExperienceBar.Dispose(); } ExperienceBar = null; } if (NewMailIcon != null) { if (!NewMailIcon.IsDisposed) { NewMailIcon.Dispose(); } NewMailIcon = null; } if (ClassLabel != null) { if (!ClassLabel.IsDisposed) { ClassLabel.Dispose(); } ClassLabel = null; } if (LevelLabel != null) { if (!LevelLabel.IsDisposed) { LevelLabel.Dispose(); } LevelLabel = null; } if (ACLabel != null) { if (!ACLabel.IsDisposed) { ACLabel.Dispose(); } ACLabel = null; } if (MRLabel != null) { if (!MRLabel.IsDisposed) { MRLabel.Dispose(); } MRLabel = null; } if (DCLabel != null) { if (!DCLabel.IsDisposed) { DCLabel.Dispose(); } DCLabel = null; } if (MCLabel != null) { if (!MCLabel.IsDisposed) { MCLabel.Dispose(); } MCLabel = null; } if (SCLabel != null) { if (!SCLabel.IsDisposed) { SCLabel.Dispose(); } SCLabel = null; } if (AccuracyLabel != null) { if (!AccuracyLabel.IsDisposed) { AccuracyLabel.Dispose(); } AccuracyLabel = null; } if (AgilityLabel != null) { if (!AgilityLabel.IsDisposed) { AgilityLabel.Dispose(); } AgilityLabel = null; } if (HealthLabel != null) { if (!HealthLabel.IsDisposed) { HealthLabel.Dispose(); } HealthLabel = null; } if (ManaLabel != null) { if (!ManaLabel.IsDisposed) { ManaLabel.Dispose(); } ManaLabel = null; } if (ExperienceLabel != null) { if (!ExperienceLabel.IsDisposed) { ExperienceLabel.Dispose(); } ExperienceLabel = null; } if (AttackModeLabel != null) { if (!AttackModeLabel.IsDisposed) { AttackModeLabel.Dispose(); } AttackModeLabel = null; } if (PetModeLabel != null) { if (!PetModeLabel.IsDisposed) { PetModeLabel.Dispose(); } PetModeLabel = null; } } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { CompanionDisplay = null; CompanionDisplayPoint = Point.Empty; if (CompanionTabControl != null) { if (!CompanionTabControl.IsDisposed) { CompanionTabControl.Dispose(); } CompanionTabControl = null; } if (CompanionBagTab != null) { if (!CompanionBagTab.IsDisposed) { CompanionBagTab.Dispose(); } CompanionBagTab = null; } if (PickUpFilterTab != null) { if (!PickUpFilterTab.IsDisposed) { PickUpFilterTab.Dispose(); } PickUpFilterTab = null; } if (ItemNameFilterTab != null) { if (!ItemNameFilterTab.IsDisposed) { ItemNameFilterTab.Dispose(); } ItemNameFilterTab = null; } if (EquipmentGrid != null) { for (int i = 0; i < EquipmentGrid.Length; i++) { if (EquipmentGrid[i] != null) { if (!EquipmentGrid[i].IsDisposed) { EquipmentGrid[i].Dispose(); } EquipmentGrid[i] = null; } } EquipmentGrid = null; } if (InventoryGrid != null) { if (!InventoryGrid.IsDisposed) { InventoryGrid.Dispose(); } InventoryGrid = null; } if (WeightLabel != null) { if (!WeightLabel.IsDisposed) { WeightLabel.Dispose(); } WeightLabel = null; } if (HungerLabel != null) { if (!HungerLabel.IsDisposed) { HungerLabel.Dispose(); } HungerLabel = null; } if (NameLabel != null) { if (!NameLabel.IsDisposed) { NameLabel.Dispose(); } NameLabel = null; } if (LevelLabel != null) { if (!LevelLabel.IsDisposed) { LevelLabel.Dispose(); } LevelLabel = null; } if (ExperienceLabel != null) { if (!ExperienceLabel.IsDisposed) { ExperienceLabel.Dispose(); } ExperienceLabel = null; } if (Level3Label != null) { if (!Level3Label.IsDisposed) { Level3Label.Dispose(); } Level3Label = null; } if (Level5Label != null) { if (!Level5Label.IsDisposed) { Level5Label.Dispose(); } Level5Label = null; } if (Level7Label != null) { if (!Level7Label.IsDisposed) { Level7Label.Dispose(); } Level7Label = null; } if (Level10Label != null) { if (!Level10Label.IsDisposed) { Level10Label.Dispose(); } Level10Label = null; } if (ModeComboBox != null) { if (!ModeComboBox.IsDisposed) { ModeComboBox.Dispose(); } ModeComboBox = null; } BagWeight = 0; MaxBagWeight = 0; InventorySize = 0; } }