private void FireDropOccurredEvent(IRiotDroppable drop) { if (this.DropOccurred != null) { this.DropOccurred(this, drop); } return; }
/// <summary> /// Sets the currently represented entity /// </summary> /// <param name="new_drop">Entity to represent</param> public void Set(IRiotDroppable new_drop) { if (this.drop != new_drop) { this.drop = new_drop; this.UpdateData(); this.FireDropOccurredEvent(this.drop); } return; }
protected override void OnDragDrop(DragEventArgs e) { base.OnDragDrop(e); switch (this.Type) { default: case DataTypes.Champion: this.drop = (IRiotDroppable)e.Data.GetData(typeof(ChampionInfo)); break; case DataTypes.ItemBuy: case DataTypes.Item: this.drop = (IRiotDroppable)e.Data.GetData(typeof(ItemInfo)); break; } this.UpdateData(); this.FireDropOccurredEvent(this.drop); return; }
/// <summary> /// Removes the currently represented entity /// </summary> public void Clear() { this.drop = null; this.UpdateData(); this.FireDropOccurredEvent(this.drop); }