public void SetHighBrightness() { if (Status) { level = BrightnessLevel.High; } }
public void SetLowBrightness() { if (Status) { level = BrightnessLevel.Low; } }
public void SetMediumBrightness() { if (Status) { level = BrightnessLevel.Medium; } }
public TV(bool state, BrightnessLevel brightness, byte chanel) : base() { this.State = state; this.brightness = brightness; this.Chanel = chanel; }
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 + ", текущий канал: " +); } }
/// <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; }
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); } }
public Lamp(bool state, BrightnessLevel brightness) : base(state) { Brightness = brightness; }
public Lamp(bool status, string name, BrightnessLevel level) : base(status, name) { this.level = level; }
/// <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 }); }
public void SetHighBrightness() { brightness = BrightnessLevel.High; }
public void SetMediumBrightness() { brightness = BrightnessLevel.Medium; }
public void SetLowBrightness() { brightness = BrightnessLevel.Low; }
/// <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);
public Illuminator(bool state, BrightnessLevel brightness) : base() { this.State = state; this.brightness = brightness; }