public void SetMachine(Washingmachine machine)
 {
     ((TurnMachineOn)turnOn).SetWashingMachine(machine);
     ((TurnMachineOff)turnOff).SetWashingMachine(machine);
     ((LoadDetergent)LoadDetergent).SetWashingMachine(machine);
     ((DryMachine)Dry).SetWashingMachine(machine);
     ((StartWashing)StarWashing).SetWashingMachine(machine);
     ((LoadClothes)LoadClothes).SetWashingMachine(machine);
     ((PauseMachine)PauseMachine).SetWashingMachine(machine);
     ((LoadWater)LoadWater).SetWashingMachine(machine);
 }
 public ClientMachine(Washingmachine machine)
 {
     turnOn        = new TurnMachineOn(machine);
     turnOff       = new TurnMachineOff(machine);
     LoadDetergent = new LoadDetergent(machine);
     Dry           = new DryMachine(machine);
     StarWashing   = new StartWashing(machine);
     PauseMachine  = new PauseMachine(machine);
     LoadClothes   = new LoadClothes(machine);
     LoadWater     = new LoadWater(machine);
     _invoker      = new MachineControl();
 }
 public static ClientMachine getClientAndInitializeItsAtributes(Washingmachine machine)
 {
     if (Client == null)
     {
         Client = new ClientMachine(machine);
     }
     else
     {
         Client.SetMachine(machine);
     }
     return(Client);
 }
 public void SetWashingMachine(Washingmachine machine)
 {
     Machine = machine;
 }
 public TurnMachineOff(Washingmachine machine)
 {
     Machine = machine;
 }
Esempio n. 6
0
 public DryMachine(Washingmachine machine)
 {
     Machine = machine;
 }
Esempio n. 7
0
 public PauseMachine(Washingmachine machine)
 {
     Machine = machine;
 }
 public LoadDetergent(Washingmachine machine)
 {
     Machine = machine;
 }
Esempio n. 9
0
 public StartWashing(Washingmachine machine)
 {
     Machine = machine;
 }
Esempio n. 10
0
 public LoadClothes(Washingmachine machine)
 {
     Machine = machine;
 }
Esempio n. 11
0
 public LoadWater(Washingmachine machine)
 {
     Machine = machine;
 }