private void DifferenceCalculatorForm_Resize(object sender, EventArgs e) { if (this.Width <= 826) { return; } if (this.Height <= 200) { return; } ChangesTree.Height = this.Height - 64 - 6 - DatabaseFilter.Height; DatabaseFilter.Location = new Point(ChangesTree.Location.X - 3, ChangesTree.Location.Y + ChangesTree.Height + 6); PanelChangeList.Width = this.Width - 1108 + ChangesTree.Width + RuneDescription.Width - 64 - 84; PanelChangeList.Height = this.Height - 200; if (PanelChangeList.Width > (ButtonPrevious.Width + ButtonCurrent.Width + 16)) { ButtonPrevious.Location = new Point(PanelChangeList.Location.X, PanelChangeList.Location.Y + PanelChangeList.Height); ButtonCurrent.Location = new Point(PanelChangeList.Location.X + PanelChangeList.Width - ButtonCurrent.Width, PanelChangeList.Location.Y + PanelChangeList.Height); } else { ButtonPrevious.Location = new Point(PanelChangeList.Location.X, PanelChangeList.Location.Y + PanelChangeList.Height);//PanelChangeList.Location.X + PanelChangeList.Width - ButtonCurrent.Width, PanelChangeList.Location.Y + PanelChangeList.Height ButtonCurrent.Location = new Point(PanelChangeList.Location.X + PanelChangeList.Width - ButtonCurrent.Width, ButtonPrevious.Location.Y + ButtonPrevious.Height + 3); } RuneDescription.Location = new Point(this.Width - RuneDescription.Width - 16, RuneDescription.Location.Y); RuneDescription.SetHeight(this.Height - 64); }
private void ShowDataElementDescription(Pox.Diff.DifferenceLink link, Pox.Diff.DifferenceLink.ItemType it) { RuneDescription.TracerClear(); if (link == null) { return; } Pox.DataElement elem = null; if (it == Pox.Diff.DifferenceLink.ItemType.PREVIOUS) { if (link.PreviousElement == null) { return; } RuneDescription.database_ref = diff_calculator.PreviousDatabase; elem = link.PreviousElement; } else { if (link.CurrentElement == null) { return; } RuneDescription.database_ref = diff_calculator.CurrentDatabase_ref; elem = link.CurrentElement; } switch (link.ElemType) { case Pox.DataElement.ElementType.CHAMPION: RuneDescription.SetChampionRune(RuneDescription.database_ref.Champions[elem.ID]); break; case Pox.DataElement.ElementType.ABILITY: RuneDescription.SetAbility(RuneDescription.database_ref.Abilities[elem.ID]); break; case Pox.DataElement.ElementType.SPELL: RuneDescription.SetSpellRune(RuneDescription.database_ref.Spells[elem.ID]); break; case Pox.DataElement.ElementType.RELIC: RuneDescription.SetRelicRune(RuneDescription.database_ref.Relics[elem.ID]); break; case Pox.DataElement.ElementType.EQUIPMENT: RuneDescription.SetEquipmentRune(RuneDescription.database_ref.Equipments[elem.ID]); break; default: RuneDescription.ClearDescription(); break; } }