public bool Link(GDragable g, int Dock, int TheirDock) { int count = this.m_Linked.Count; for (int i = 0; i < count; i++) { Client.Linked linked = (Client.Linked) this.m_Linked[i]; if (linked.Gump == g) { return(false); } } this.m_Linked.Add(new Client.Linked(g, Dock, TheirDock)); return(true); }
public void UpdateLink(Gump gOld, GDragable gNew) { int count = this.m_Linked.Count; for (int i = 0; i < count; i++) { Client.Linked linked2 = (Client.Linked) this.m_Linked[i]; if (linked2.Gump == gOld) { linked2 = (Client.Linked) this.m_Linked[i]; linked2 = (Client.Linked) this.m_Linked[i]; Client.Linked linked = new Client.Linked(gNew, linked2.Dock, linked2.TheirDock); this.m_Linked.RemoveAt(i); this.m_Linked.Add(linked); break; } } }