Ejemplo n.º 1
0
        private void btnMoreDashAction21_Click(object sender, EventArgs e)
        {
            Sensor        sensor     = new Sensor();
            List <Sensor> allSensors = sensor.getAllSensors();

            List <Sensor> allSensorsForTank = new List <Sensor>();

            foreach (Sensor item in allSensors)
            {
                if (item.Location.ToUpper() == lblDashAction1.Text)
                {
                    allSensorsForTank.Add(item);
                }
            }

            frmTankSensorTemplate tankSensor = new frmTankSensorTemplate(allSensorsForTank);

            tankSensor.Show();
            this.Hide();
        }
Ejemplo n.º 2
0
        private void btnMoreDashAction1_Click(object sender, EventArgs e)
        {
            Sensor        sensor     = new Sensor();
            List <Sensor> allSensors = sensor.getAllSensors();

            List <Sensor> allSensorsForTank = new List <Sensor>();

            // Populate list with all sensors for specific tank, to send through to the
            // frmTankSensorTemplate.
            foreach (Sensor item in allSensors)
            {
                if (item.Location.ToUpper() == lblDashAction1.Text)
                {
                    allSensorsForTank.Add(item);
                }
            }

            frmTankSensorTemplate tankSensor = new frmTankSensorTemplate(allSensorsForTank);

            tankSensor.Show();
            this.Hide();
        }