Пример #1
0
        private void OnItemNeeded(ItemNeededEventArgs e)
        {
            var handler = ItemNeeded;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Пример #2
0
        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();
            }
        }