Esempio n. 1
0
        protected void InitializeType()
        {
            deviceTypeLabel          = ControlConstructorHelper.GenerateLabel(device.Type);
            deviceTypeLabel.CssClass = "deviceTypeLabel";
            Panel innerpanel = new Panel();

            innerpanel.CssClass = "col-md-12 text-center";
            innerpanel.Controls.Add(deviceTypeLabel);

            Controls.Add(innerpanel);
        }
        public void Initializer()
        {
            currentChannelLabel  = ControlConstructorHelper.GenerateLabel("Current Channel: ");
            channelsDropDownList = GenerateChannelList();

            Panel innerPanel = new Panel();

            innerPanel.CssClass = "text-center innerCtr";
            innerPanel.Controls.Add(currentChannelLabel);
            innerPanel.Controls.Add(channelsDropDownList);

            Controls.Add(innerPanel);
        }
Esempio n. 3
0
        protected void Initializer()
        {
            temperatureLabel   = ControlConstructorHelper.GenerateLabel("Temperature: ");
            temperatureTextBox = GenerateTemperatureTextBox();

            Panel innerPanel = new Panel();

            innerPanel.CssClass = "text-center lampCtr";

            Panel temperaturePanel = new Panel();

            temperaturePanel.CssClass = "col-md-12 row text-center";
            temperaturePanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(temperatureLabel, 7));
            temperaturePanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(temperatureTextBox, 4));
            innerPanel.Controls.Add(temperaturePanel);

            Controls.Add(innerPanel);
        }
Esempio n. 4
0
        protected void Initializer()
        {
            intensityLabel   = ControlConstructorHelper.GenerateLabel("Intensity: ");
            intensityTextBox = GenerateIntensityTextBox();

            Panel innerPanel = new Panel();

            innerPanel.CssClass = "text-center lampCtr";

            Panel intensityPanel = new Panel();

            intensityPanel.CssClass = "col-md-12 row text-center";
            intensityPanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(intensityLabel, 7));
            intensityPanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(intensityTextBox, 4));
            innerPanel.Controls.Add(intensityPanel);

            Controls.Add(innerPanel);
        }
        public void Initializer()
        {
            intensityLabel = ControlConstructorHelper.GenerateLabel("Volume: ");
            volumeTextBox  = GenerateVolumeTextBox();

            Panel innerPanel = new Panel();

            innerPanel.CssClass = "text-center innerCtr";

            Panel valuePanel = new Panel();

            valuePanel.CssClass = "col-md-12 row text-center";
            valuePanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(intensityLabel, 7));
            valuePanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(volumeTextBox, 4));
            innerPanel.Controls.Add(valuePanel);

            Controls.Add(innerPanel);
        }
Esempio n. 6
0
        protected void InitializerBase()
        {
            string id = device.Id.ToString();

            CssClass = "col-md-3 devicePanel";

            if (device.TurnOn)
            {
                switchLabel = ControlConstructorHelper.GenerateLabel("ON" + "<br/>");
            }
            else
            {
                switchLabel = ControlConstructorHelper.GenerateLabel("OFF" + "<br/>");
            }

            consumptionLabel = ControlConstructorHelper.GenerateLabel("Consumption: " + device.Consumption.ToString() + "<span class=\"kW\"> kW*h</span>");
            applyButton      = GenerateApplyButton(id);
            deleteButton     = GenerateDeleteButton(id);
            switchButton     = GenerateSwitchButton(id);

            switchButton.CssClass = " btn switchButton";
            applyButton.CssClass  = "btn btn-primary applyButton";
            deleteButton.CssClass = " btn btn-danger deleteButton";


            Panel innerPanel = new Panel();

            innerPanel.CssClass = "col-md-12 text-center basePanel";
            innerPanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(consumptionLabel, 12));

            Panel panelRow = new Panel();

            panelRow.CssClass = "row";
            panelRow.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(switchButton, 7));
            panelRow.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(switchLabel, 4));

            panelRow.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(applyButton, 6));
            panelRow.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(deleteButton, 6));

            innerPanel.Controls.Add(panelRow);

            Controls.Add(innerPanel);
        }
Esempio n. 7
0
        protected void VolumeInitializer()
        {
            intensityLabel = ControlConstructorHelper.GenerateLabel("Volume: ");
            volumeTextBox  = GenerateVolumeTextBox();
            // deviceTypeLabel = ControlConstructorHelper.GenerateLabel(Device.Type);

            Panel innerPanel = new Panel();

            innerPanel.CssClass = "text-center innerCtr";
            // innerPanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(deviceTypeLabel, 12));

            Panel valuePanel = new Panel();

            valuePanel.CssClass = "col-md-12 row text-center";
            valuePanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(intensityLabel, 7));
            valuePanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(volumeTextBox, 4));
            innerPanel.Controls.Add(valuePanel);

            Controls.Add(innerPanel);
        }
        protected void Initializer()
        {
            Panel innerPanel = new Panel();

            innerPanel.CssClass = "row";


            consumptionTextBox = GenerateConsumptionTextBox();
            dropDeviceList     = GenerateDeviceTypesList();
            addButton          = GenerateAddButton();

            validatorLabel          = new Label();
            validatorLabel.CssClass = "col-md-6 text-center   validatorLabel";


            innerPanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(dropDeviceList, 3));
            innerPanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(consumptionTextBox, 3));
            innerPanel.Controls.Add(ControlConstructorHelper.GenerateBootstrapDiv(addButton, 3));

            Controls.Add(innerPanel);
            Controls.Add(validatorLabel);
        }
        public void InitializeType()
        {
            deviceTypeLabel = ControlConstructorHelper.GenerateLabel(device.Type);

            Controls.Add(deviceTypeLabel);
        }