示例#1
0
 public void SetHighBrightness()
 {
     if (Status)
     {
         level = BrightnessLevel.High;
     }
 }
示例#2
0
 public void SetLowBrightness()
 {
     if (Status)
     {
         level = BrightnessLevel.Low;
     }
 }
示例#3
0
 public void SetMediumBrightness()
 {
     if (Status)
     {
         level = BrightnessLevel.Medium;
     }
 }
示例#4
0
 public TV(bool state, BrightnessLevel brightness, byte chanel)
     : base()
 {
     this.State      = state;
     this.brightness = brightness;
     this.Chanel     = chanel;
 }
示例#5
0
        public override string ToString()
        {
            string state;

            if (this.State)
            {
                state = "включен";
            }
            else
            {
                state = "выключен";
            }
            string brightness;

            if (this.brightness == BrightnessLevel.Low)
            {
                brightness = "слабая";
            }
            else if (this.brightness == BrightnessLevel.Medium)
            {
                brightness = "средняя";
            }
            else
            {
                brightness = "высокая";
            }
            byte chanel;

            if ()
            {
                return("Состояние: " + state + ", яркость: " + brightness + ", текущий канал: " +);
            }
        }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Flash"/> class.
 /// </summary>
 /// <param name="manufacturer">The manufacturer.</param>
 /// <param name="typeReference">The type reference.</param>
 /// <param name="msrp">The MSRP.</param>
 /// <param name="type">The type.</param>
 /// <param name="brightness">The brightness.</param>
 /// <param name="interface">The interface.</param>
 /// <param name="focalDistance">The focal distance.</param>
 /// <param name="redEyeCorrectionEnabled">if set to <c>true</c> [red eye correction enabled].</param>
 public Flash(Company manufacturer, string typeReference, float msrp, FlashType type, BrightnessLevel brightness, Company @interface, int focalDistance, bool redEyeCorrectionEnabled) : base(manufacturer, typeReference, msrp)
 {
     Type                    = type;
     Brightness              = brightness;
     Interface               = @interface;
     FocalDistance           = focalDistance;
     RedEyeCorrectionEnabled = redEyeCorrectionEnabled;
 }
示例#7
0
 public void SetBrightnessLevel(BrightnessLevel level)
 {
     InAppearanceConfigurationMode(() => Send(
                                       0x02, 0xF3, 0x4F, 0x04,
                                       0x01, 0x00, 0x00, 0x00,
                                       (byte)level
                                       ));
 }
 /// <summary>
 /// sets the display dimming
 /// use BrightnessLevel enum as argument
 /// </summary>
 /// <param name="brightnesslevel">brightness level</param>
 public void SetDimming(BrightnessLevel brightnesslevel)
 {
     //create handle for datagram
     Byte[] btDatagram = new Byte[64];
     try
     {
         //create datagram
         btDatagram[0x00] = 0x03;              //count of successive bytes
         btDatagram[0x01] = 0x1b;              //header (fix value)
         btDatagram[0x02] = 0x40;              //command: set display dimming state
         btDatagram[0x03] = Convert.ToByte(brightnesslevel);   //brightness level
         //send command
         SendCommand(btDatagram);
     }
     catch (Exception ex)
     {
         throw new Exception("Setting display brightness failed: ", ex);
     }
 }
示例#9
0
 public Lamp(bool state, BrightnessLevel brightness)
     : base(state)
 {
     Brightness = brightness;
 }
示例#10
0
 public Lamp(bool status, string name, BrightnessLevel level)
     : base(status, name)
 {
     this.level = level;
 }
示例#11
0
        /// <summary>
        /// Brightness level setting
        /// <para>Default = <see cref="BrightnessLevel.Level4Of4"/></para>
        /// </summary>
        /// <param name="device">GU256x128c device</param>
        public static void BrightnessLevelSetting(this Gu256x128c device, BrightnessLevel level)
        {
            var n = (byte)level;

            device.WriteBytes(new byte[] { 0x1F, 0x58, n });
        }
示例#12
0
 public void SetHighBrightness()
 {
     brightness = BrightnessLevel.High;
 }
示例#13
0
 public void SetMediumBrightness()
 {
     brightness = BrightnessLevel.Medium;
 }
示例#14
0
 public void SetLowBrightness()
 {
     brightness = BrightnessLevel.Low;
 }
示例#15
0
 /// <summary>
 /// Returns a brightness level for a Color based on a constant identifier.
 /// Notice: the returned value is for values in [0, 1], but is not bound here;
 /// and may be lower or higher.
 /// </summary>
 public double Brightness(BrightnessLevel brightness)
 => BrightnessScale * ((double)brightness / 255D);
示例#16
0
 public Illuminator(bool state, BrightnessLevel brightness)
     : base()
 {
     this.State      = state;
     this.brightness = brightness;
 }