public void AddMicrowave(string name, string fabricator) { if (!microwaveInfo.ContainsKey(fabricator)) { return; } MicrowaveInfo mi = microwaveInfo[fabricator]; Microwave microwave = new Microwave(name, mi.Volume, mi.Lamp); microwave.OperationDone += (sender) => { //throw new ApplicationException("Микроволновка отработала!!!"); }; AddDevice(microwave); }
private void InitMicrowaveInfo() { microwaveInfo["Whirlpool"] = new MicrowaveInfo(20, new Lamp(25)); microwaveInfo["Panasonic"] = new MicrowaveInfo(19, new Lamp(20)); microwaveInfo["Lg"] = new MicrowaveInfo(23, new Lamp(25)); }
private void InitMicrowaveInfo() { microwaveInfo["Whirlpool"] = new MicrowaveInfo(20, new Lamp(25)); microwaveInfo["Panasonic"] = new MicrowaveInfo(19, new Lamp(20)); microwaveInfo["Lg"] = new MicrowaveInfo(23, new Lamp(25)); }