public override void OnClientAreaChanged(Rectangle oValue, Rectangle nValue) { base.OnClientAreaChanged(oValue, nValue); if (Links == null) { return; } Grid?.Dispose(); Grid = new DXItemGrid { Parent = this, Location = ClientArea.Location, GridSize = new Size(Math.Max(1, (ClientArea.Size.Width) / (DXItemCell.CellWidth - 1)), Math.Max(1, ClientArea.Size.Height / (DXItemCell.CellHeight - 1))), GridType = GridType.Belt, AllowLink = false, }; for (int i = 0; i < Grid.Grid.Length; i++) { new DXLabel { Parent = Grid.Grid[i], Text = ((i + 1) % 10).ToString(), Font = new Font(Config.FontName, CEnvir.FontSize(8F), FontStyle.Italic), IsControl = false, Location = new Point(-2, -1) }; } UpdateLinks(); }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (Links != null) { for (int i = 0; i < Links.Length; i++) { Links[i] = null; } Links = null; } if (Grid != null) { if (!Grid.IsDisposed) { Grid.Dispose(); } Grid = null; } } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (Grid != null) { if (!Grid.IsDisposed) { Grid.Dispose(); } Grid = null; } if (GoldLabel != null) { if (!GoldLabel.IsDisposed) { GoldLabel.Dispose(); } GoldLabel = null; } if (WeightLabel != null) { if (!WeightLabel.IsDisposed) { WeightLabel.Dispose(); } WeightLabel = null; } if (FragmentButton != null) { if (!FragmentButton.IsDisposed) { FragmentButton.Dispose(); } FragmentButton = null; } } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (Grid != null) { if (!Grid.IsDisposed) { Grid.Dispose(); } Grid = null; } } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { if (Grid != null) { if (!Grid.IsDisposed) { Grid.Dispose(); } Grid = null; } if (TitleLabel != null) { if (!TitleLabel.IsDisposed) { TitleLabel.Dispose(); } TitleLabel = null; } if (GoldLabel != null) { if (!GoldLabel.IsDisposed) { GoldLabel.Dispose(); } GoldLabel = null; } if (GameGoldLabel != null) { if (!GameGoldLabel.IsDisposed) { GameGoldLabel.Dispose(); } GameGoldLabel = null; } if (WeightLabel != null) { if (!WeightLabel.IsDisposed) { WeightLabel.Dispose(); } WeightLabel = null; } if (CurrencyLabel != null) { if (!CurrencyLabel.IsDisposed) { CurrencyLabel.Dispose(); } CurrencyLabel = null; } if (CloseButton != null) { if (!CloseButton.IsDisposed) { CloseButton.Dispose(); } CloseButton = null; } if (SortButton != null) { if (!SortButton.IsDisposed) { SortButton.Dispose(); } SortButton = null; } if (TrashButton != null) { if (!TrashButton.IsDisposed) { TrashButton.Dispose(); } TrashButton = null; } if (GoldTitle != null) { if (!GoldTitle.IsDisposed) { GoldTitle.Dispose(); } GameGoldTitle = null; } if (GameGoldTitle != null) { if (!GameGoldTitle.IsDisposed) { GameGoldTitle.Dispose(); } GameGoldTitle = 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; } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (disposing) { IsTrading = false; PlayerItems = null; if (UserLabel != null) { if (!UserLabel.IsDisposed) { UserLabel.Dispose(); } UserLabel = null; } if (PlayerLabel != null) { if (!PlayerLabel.IsDisposed) { PlayerLabel.Dispose(); } PlayerLabel = null; } if (UserGrid != null) { if (!UserGrid.IsDisposed) { UserGrid.Dispose(); } UserGrid = null; } if (PlayerGrid != null) { if (!PlayerGrid.IsDisposed) { PlayerGrid.Dispose(); } PlayerGrid = null; } if (UserGoldLabel != null) { if (!UserGoldLabel.IsDisposed) { UserGoldLabel.Dispose(); } UserGoldLabel = null; } if (PlayerGoldLabel != null) { if (!PlayerGoldLabel.IsDisposed) { PlayerGoldLabel.Dispose(); } PlayerGoldLabel = null; } if (ConfirmButton != null) { if (!ConfirmButton.IsDisposed) { ConfirmButton.Dispose(); } ConfirmButton = null; } } }