private void OnItemNeeded(ItemNeededEventArgs e) { var handler = ItemNeeded; if (handler != null) { handler(this, e); } }
private void ContainerEditorAdd(object sender, EventArgs e) { var ea = new ItemNeededEventArgs(); OnItemNeeded(ea); if (ea.BlueprintId != 0) { var blueprintSlot = new BlueprintSlot { GridPosition = _currentCell, BlueprintId = ea.BlueprintId, ItemsCount = ea.Count }; Content.WriteSlot(blueprintSlot); Invalidate(); } }