public void Undo(IDataCommand dataCommand)
 {
     ILight light = dataCommand.GetDevice() as ILight;
     if (light != null)
     {
         light.DecrementLight();
     }
 }
 public void Execute(IDataCommand dataCommand)
 {
     IClimatControl control = dataCommand.GetDevice() as IClimatControl;
     if (control != null)
     {
         control.Auto = !control.Auto;
     }
 }
 public void Execute(IDataCommand dataCommand)
 {
     ILight light = dataCommand.GetDevice() as ILight;
     if (light != null)
     {
         light.IncrementLight();
     }
 }
 public void Execute(IDataCommand dataCommand)
 {
     ITemperature control = dataCommand.GetDevice() as ITemperature;
     if (control != null)
     {
         control.IncrementTemperature();
     }
 }
 public void Undo(IDataCommand dataCommand)
 {
     ITemperature control = dataCommand.GetDevice() as ITemperature;
     if (control != null)
     {
         control.DecrementTemperature();
     }
 }
 public void Execute(IDataCommand dataCommand)
 {
     ClimatControl control = dataCommand.GetDevice() as ClimatControl;
     if (control != null)
     {
         control.OnOffHeat();
     }
 }
 public void Execute(IDataCommand dataCommand)
 {
     HouseCinema control = dataCommand.GetDevice() as HouseCinema;
     if (control != null)
     {
         control.OnOffDvd();
     }
 }
Example #8
0
 public void Undo(IDataCommand dataCommand)
 {
     IOnOff onOff = dataCommand.GetDevice() as IOnOff;
     if (onOff != null)
     {
         onOff.On();
     }
 }
 public void Undo(IDataCommand dataCommand)
 {
     IVolume volume = dataCommand.GetDevice() as IVolume;
     if (volume != null)
     {
         volume.DecrementVolume();
     }
 }
 public void Execute(IDataCommand dataCommand)
 {
     IVolume volume = dataCommand.GetDevice() as IVolume;
     if (volume != null)
     {
         volume.IncrementVolume();
     }
 }
Example #11
0
 public void Execute(IDataCommand dataCommand)
 {
     IOnOff onOff = dataCommand.GetDevice() as IOnOff;
     if (onOff != null)
     {
         onOff.Off();
     }
 }
Example #12
0
        public void Execute(IDataCommand dataCommand)
        {
            HouseCinema control = dataCommand.GetDevice() as HouseCinema;

            if (control != null)
            {
                control.OnOffDvd();
            }
        }
Example #13
0
        public void Execute(IDataCommand dataCommand)
        {
            IClimatControl control = dataCommand.GetDevice() as IClimatControl;

            if (control != null)
            {
                control.Auto = !control.Auto;
            }
        }
Example #14
0
        public void Execute(IDataCommand dataCommand)
        {
            ClimatControl control = dataCommand.GetDevice() as ClimatControl;

            if (control != null)
            {
                control.OnOffCond();
            }
        }
        public void Undo(IDataCommand dataCommand)
        {
            ITemperature control = dataCommand.GetDevice() as ITemperature;

            if (control != null)
            {
                control.IncrementTemperature();
            }
        }
        public void Execute(IDataCommand dataCommand)
        {
            ITemperature control = dataCommand.GetDevice() as ITemperature;

            if (control != null)
            {
                control.DecrementTemperature();
            }
        }
Example #17
0
        public void Execute(IDataCommand dataCommand)
        {
            IOnOff onOff = dataCommand.GetDevice() as IOnOff;

            if (onOff != null)
            {
                onOff.Off();
            }
        }
Example #18
0
        public void Undo(IDataCommand dataCommand)
        {
            IOnOff onOff = dataCommand.GetDevice() as IOnOff;

            if (onOff != null)
            {
                onOff.On();
            }
        }
Example #19
0
        public void Execute(IDataCommand dataCommand)
        {
            IVolume volume = dataCommand.GetDevice() as IVolume;

            if (volume != null)
            {
                volume.IncrementVolume();
            }
        }
Example #20
0
        public void Undo(IDataCommand dataCommand)
        {
            IVolume volume = dataCommand.GetDevice() as IVolume;

            if (volume != null)
            {
                volume.DecrementVolume();
            }
        }
        public void Execute(IDataCommand dataCommand)
        {
            ILight light = dataCommand.GetDevice() as ILight;

            if (light != null)
            {
                light.IncrementLight();
            }
        }
        public void Undo(IDataCommand dataCommand)
        {
            ILight light = dataCommand.GetDevice() as ILight;

            if (light != null)
            {
                light.DecrementLight();
            }
        }
Example #23
0
 public void Execute(IDataCommand dataCommand)
 {
     if (!string.IsNullOrEmpty(dataCommand.Value))
     {
         ILight light = dataCommand.GetDevice() as ILight;
         if (light != null)
         {
             light.Brightness = (LightsState)Enum.Parse(typeof(LightsState), dataCommand.Value);
         }
     }
 }
        public void Execute(IDataCommand dataCommand)
        {
            if (!string.IsNullOrEmpty(dataCommand.Value))
            {
                ILight light = dataCommand.GetDevice() as ILight;
                if (light != null)
                {
                    light.Brightness = (LightsState) Enum.Parse(typeof (LightsState), dataCommand.Value);

                }
            }
        }
 public void Undo(IDataCommand dataCommand)
 {
     Device dev = dataCommand.GetDevice();
     if (dev != null)
     {
         Room room = dataCommand.GetRoom();
         if (room != null)
         {
             room.AddDevice(dev);
         }
     }
 }
 public void Execute(IDataCommand dataCommand)
 {
     Device dev = dataCommand.GetDevice();
     if (dev != null)
     {
         Room room = dataCommand.GetRoom();
         if (room != null)
         {
             room.DeleteDevice(dataCommand.DeviceData);
         }
     }
 }
        public void Execute(IDataCommand dataCommand)
        {
            Device dev = dataCommand.GetDevice();

            if (dev != null)
            {
                Room room = dataCommand.GetRoom();
                if (room != null)
                {
                    room.DeleteDevice(dataCommand.DeviceData);
                }
            }
        }
        public void Undo(IDataCommand dataCommand)
        {
            Device dev = dataCommand.GetDevice();

            if (dev != null)
            {
                Room room = dataCommand.GetRoom();
                if (room != null)
                {
                    room.AddDevice(dev);
                }
            }
        }