Пример #1
0
        /// <summary>
        /// 设置当前的机台信息对象
        /// </summary>
        /// <param name="mpi"></param>
        public static void SetMachineProductionInfo(MachineProductionInfo mpi)
        {
            if (mpi == null)
            {
                return;
            }

            if (Configuration.MachineMap.ContainsKey(mpi.MachineName))
            {
                Machine m = Configuration.MachineMap[mpi.MachineName];
                machineProductionInfo = mpi;
                currentMachineID      = m.MachineID;
            }
        }
Пример #2
0
        /// <summary>
        /// 获取指定机台的数据
        /// </summary>
        /// <param name="machineName"></param>
        /// <returns></returns>
        public static MachineProductionInfo GetMachineProductionInfo(string machineName)
        {
            if (string.IsNullOrEmpty(machineName))
            {
                return(null);
            }

            if (Configuration.MachineMap.ContainsKey(machineName))
            {
                Machine machineN = Configuration.MachineMap[machineName];
                currentMachineID                  = machineN.MachineID;
                machineProductionInfo             = new MachineProductionInfo();
                machineProductionInfo.MachineName = machineName;
            }
            return(machineProductionInfo);
        }