Example #1
0
 public IVoluableControl(Device device)
 {
     this.device = device;
     deviceId    = device.Id;
     volDevice   = (IVoluable)device;
     // Initializer();
 }
Example #2
0
        TextBox GenerateVolumeTextBox()
        {
            IVoluable volDevice = (IVoluable)device;
            TextBox   textBox   = new TextBox();

            textBox.ID = "volume" + deviceId.ToString();
            textBox.Attributes.Add("max", "100");
            textBox.Attributes.Add("min", "0");
            textBox.TextMode = TextBoxMode.Number;

            if (device.TurnOn)
            {
                textBox.Text = volDevice.Volume.ToString();

                textBox.Enabled = true;
            }
            else
            {
                textBox.Text    = "off";
                textBox.Enabled = false;
            }
            textBox.CssClass = "intensityInput";

            return(textBox);
        }
 public IVoluableControl(Device device)
 {
     deviceId  = device.Id;
     volDevice = (IVoluable)device;
     Initializer();
 }