internal SurfaceDeviceConfiguration(SurfacePositionEntity positionEntity, SurfaceConfiguration surfaceConfiguration)
        {
            PositionEntity = positionEntity;
            Guid           = positionEntity.Guid;

            DeviceId           = positionEntity.DeviceId;
            DeviceName         = positionEntity.DeviceName;
            DeviceModel        = positionEntity.DeviceModel;
            DeviceManufacturer = positionEntity.DeviceManufacturer;

            X        = positionEntity.X;
            Y        = positionEntity.Y;
            Rotation = positionEntity.Rotation;
            ZIndex   = positionEntity.ZIndex;

            Surface = surfaceConfiguration;
        }
        internal SurfaceDeviceConfiguration(IRGBDevice device, int deviceId, SurfaceConfiguration surface)
        {
            PositionEntity = new SurfacePositionEntity();
            Guid           = System.Guid.NewGuid().ToString();

            Device             = device;
            DeviceId           = deviceId;
            DeviceName         = device.DeviceInfo.DeviceName;
            DeviceModel        = device.DeviceInfo.Model;
            DeviceManufacturer = device.DeviceInfo.Manufacturer;

            X        = device.Location.X;
            Y        = device.Location.Y;
            Rotation = 0;
            ZIndex   = 1;

            Surface = surface;

            ApplyToEntity();
        }
 public void Destroy()
 {
     PositionEntity = null;
     Device         = null;
     Surface        = null;
 }