Exemple #1
0
        /// <summary>
        /// 設置機台信息單元
        /// </summary>
        /// <param name="eventMachineMessageInfo">事件信息</param>
        /// <param name="messageCell">信息單元</param>
        void SetMachineMessageCell(EventMachineMessageInfo eventMachineMessageInfo, MachineMessageCell messageCell)
        {
            if (eventMachineMessageInfo == null || messageCell == null)
            {
                return;
            }

            switch (eventMachineMessageInfo.StatusType)
            {
                case MessageStatusType.Normal:
                    messageCell.MessageStatusType = MachineMessageStatusType.Normal;
                    break;
                case MessageStatusType.Exception:
                    messageCell.MessageStatusType = MachineMessageStatusType.Exception;
                    break;

                default:
                    messageCell.MessageStatusType = MachineMessageStatusType.Default;
                    break;
            }
            messageCell.Message = eventMachineMessageInfo.MessageContent;
        }
Exemple #2
0
        /// <summary>
        /// 機台消息事件
        /// </summary>
        /// <param name="messageType">消息類型</param>
        /// <param name="statusType">狀態類型</param>
        /// <param name="content">消息內容</param>
        private void OnMachineMessage(MachineMessageType messageType, MessageStatusType statusType, string content)
        {
            if (this.MachineMessageEvent != null)
            {
                EventMachineMessageInfo messageInfo = new EventMachineMessageInfo();

                messageInfo.MessageType = messageType;
                messageInfo.MachineNo = this._ControlCenter.MachineNo;
                messageInfo.StatusType = statusType;
                messageInfo.MessageContent = content;

                EventBaseInfo<EventMachineMessageInfo> baseInfo = new EventBaseInfo<EventMachineMessageInfo>();
                baseInfo.ObjectInformation = messageInfo;

                this.MachineMessageEvent(this, baseInfo);
            }
        }