public void TracerGoBack() { if (TracerPosition == -1) { return; } TracerViewData tvd = Tracer[TracerPosition]; TracerPosition -= 1; }
// tracer stuff void TracerGoTo(TracerViewData tvd) { while (Tracer.Count > TracerPosition + 1) { Tracer.RemoveAt(TracerPosition + 1); } Tracer.Add(CurrentTracer); TracerPosition += 1; TracerSetDescription(tvd); }
private void AddLink(Point position, TracerViewData tag) { PictureBox pb = new PictureBox() { Location = position, Size = new Size(24, 14), Tag = tag }; pb.Image = Properties.Resources.ImageGoTo; pb.Click += new EventHandler(LinkClicked); pb.Cursor = Cursors.Hand; Links.Add(pb); TextBoxDescription.Controls.Add(pb); pb.BringToFront(); }
private void TracerSetDescription(TracerViewData tvd) { switch (tvd.Type) { case Pox.DataElement.ElementType.CHAMPION: if (database_ref.Champions.ContainsKey(tvd.ID)) { SetChampionRune(database_ref.Champions[tvd.ID]); } break; case Pox.DataElement.ElementType.ABILITY: if (database_ref.Abilities.ContainsKey(tvd.ID)) { SetAbility(database_ref.Abilities[tvd.ID]); } break; case Pox.DataElement.ElementType.SPELL: if (database_ref.Spells.ContainsKey(tvd.ID)) { SetSpellRune(database_ref.Spells[tvd.ID]); } break; case Pox.DataElement.ElementType.RELIC: if (database_ref.Relics.ContainsKey(tvd.ID)) { SetRelicRune(database_ref.Relics[tvd.ID]); } break; case Pox.DataElement.ElementType.EQUIPMENT: if (database_ref.Equipments.ContainsKey(tvd.ID)) { SetEquipmentRune(database_ref.Equipments[tvd.ID]); } break; default: break; } CurrentTracer = tvd; }