Ejemplo n.º 1
0
        private void BtnQuery_Click(object sender, EventArgs e)
        {
            DateTime startTime = Convert.ToDateTime(this.DtpStart.Text);
            DateTime endTime   = Convert.ToDateTime(this.DtpEnd.Text);

            int             selectedGroup = this.CmbMachineType.SelectedIndex;
            OEEMachineGroup machinGroup   = machineGroups[selectedGroup];

            int[] energyConsumption = new int[machinGroup.Count];
            List <OEETypes.EnergyConsumption> energyList = new List <OEETypes.EnergyConsumption>();

            int index = 0;

            foreach (OEEMachine machine in machinGroup.Machines)
            {
                energyConsumption[index] = machine.QueryEnergyConsumption(startTime, endTime, ref energyList);
            }

            switch (this.TabEnenryStatus.SelectedIndex)
            {
            case 0:
                ShowEnergyChart(energyConsumption);
                break;

            case 1:
                ShowEnergyList(energyList);
                break;
            }
        }
Ejemplo n.º 2
0
        private void AddMachineGroup()
        {
            if (HAS_CASTING_GROUP > 0)
            {
                _machineGroups[GROUP_CASTING] = new OEEMachineGroup(OEETypes.GROUP_TYPE.CASTING);
            }

            //if (HAS_CUTTER_GROUP > 0)
            //    _machineGroups[GROUP_CUTTER] = new OEEMachineGroup(OEETypes.GROUP_TYPE.CUTTER);

            //if (HAS_PRINTER_GROUP > 0)
            //    _machineGroups[GROUP_PRINTER] = new OEEMachineGroup(OEETypes.GROUP_TYPE.PRINTER);
        }