Пример #1
0
        private void CreateControls()
        {
            _panel          = new Panel();
            _panel.CssClass = "panLamp";

            _label          = new Label();
            _label.Text     = _data.Device.Name;
            _label.CssClass = "nameDevice";
            _panel.Controls.Add(_label);

            _image          = new Image();
            _image.CssClass = "imgBt";
            _panel.Controls.Add(_image);

            _imBt          = new ImageButton();
            _imBt.CssClass = "imgBt";
            _imBt.Click   += imBt_Click;
            _panel.Controls.Add(_imBt);

            _lightContol = new LightContol(_data);
            _panel.Controls.Add(_lightContol);

            _volume = new VolumeContol(_data);
            _panel.Controls.Add(_volume);

            SetImageUrl();

            Controls.Add(_panel);
        }
Пример #2
0
        private void CreateControls()
        {
            _panel = new Panel();
            _panel.ID = "panel";
            _panel.CssClass = "panLamp";

            _label = new Label();
            _label.Text = _data.Device.Name;
            _label.CssClass = "nameDevice";
            _panel.Controls.Add(_label);

            _image = new Image();
            _image.CssClass = "imgBt";
            _panel.Controls.Add(_image);

            _imBt = new ImageButton();
            _imBt.CssClass = "imgBt";
            _imBt.Click += imBt_Click;
            _panel.Controls.Add(_imBt);

            _lightContol = new LightContol(_data);
            _panel.Controls.Add(_lightContol);

            SetImageUrl();

            Controls.Add(_panel);
        }