Ejemplo n.º 1
0
        private void OnTurnOn()
        {
            int id1 = Consumers.IndexOf(SelectedConsumer);
            int id2 = SHES.devicesList.IndexOf(SelectedConsumer);

            SHES.devicesList[id2].Working = true;
            Consumers[id1].Working        = true;
        }
Ejemplo n.º 2
0
        private void OnTurnOff()
        {
            int id1 = Consumers.IndexOf(SelectedConsumer);
            int id2 = SHES.devicesList.IndexOf(SelectedConsumer);

            SHES.devicesList[id2].Working     = false;
            SHES.devicesList[id2].Consumption = 0;
            Consumers[id1].Working            = false;
            Consumers[id1].Consumption        = 0;
        }