public Printer() { PaperAmount = 0; YellowInk = new Ink(InkColor.Yellow); MagentaInk = new Ink(InkColor.Magenta); CyanInk = new Ink(InkColor.Cyan); BlackInk = new Ink(InkColor.Black); OutOfPaper += OutOfPaperEventHandler; OutOfInk += OutOfInkEventHandler; }
private bool IsInkEnough(Ink ink) { bool enough = true; if (ink.Amount < 1) { OutOfInk?.Invoke(this, new OutOfInkEventArgs(ink.Color)); enough = false; } return(enough); }