Beispiel #1
0
        public void RemoveByMu(int mu_id)
        {
            ErrorInfoItem item = this.FindByMu(mu_id);

            if (item != null)
            {
                m_muInfos.Remove(item);
            }
        }
Beispiel #2
0
        /// <summary>
        /// CELLのエラーを設定
        /// CELLエラー発生時によびだされる
        /// </summary>
        public void UpdateCellError(DateTime dt, string message, string coping, Brush brush)
        {
            ErrorInfoItem item = new ErrorInfoItem();

            item.SetBrush(brush);
            item.SetSortKey(dt);

            item.AddTitleValue("CELL", message);
            item.AddTitleValue(Resources.DATETIME, DateTimeUtil.FormatDateTimeString(dt));
            item.AddTitleValue(Resources.COPING, coping);

            m_cellInfos.Add(item);
        }
Beispiel #3
0
        public void UpdateMuError(DateTime dt, Brush brush, int mu_id, string mu_name, string error_message, string fromSectNames, string toSectNames, string hospital_name, string floor_name, long mu_stat_pos_x, long mu_stat_pos_y, string point_name)
        {
            bool          isNew = false;
            ErrorInfoItem item  = this.FindByMu(mu_id);

            if (item == null)
            {
                item  = new ErrorInfoItem();
                isNew = true;
            }
            else
            {
                item.ResetTitleValue();
            }
            item.SetBrush(brush);
            item.SetSortKey(dt);
            item.SetMuId(mu_id);


            item.AddTitleValue(mu_name, error_message);
            item.AddTitleValue(Resources.OCCURENCE_DATETIME, DateTimeUtil.FormatDateTimeString(dt));
            //  発部署
            if (fromSectNames != null)
            {
                item.AddTitleValue(Resources.EHH_REQ_SECT, fromSectNames);
            }
            //  着部署
            if (toSectNames != null)
            {
                item.AddTitleValue(Resources.EHH_TO_SECT, toSectNames);
            }

            //  棟名称-フロア
            if (hospital_name != null && floor_name != null)
            {
                string title = hospital_name + "-" + floor_name;
                string value = "X=" + mu_stat_pos_x + "," + "Y=" + mu_stat_pos_y;
                item.AddTitleValue(title, value);
            }

            //  通過ポイント
            if (point_name != null)
            {
                item.AddTitleValue(Resources.PASSING_POINT, point_name);
            }

            if (isNew)
            {
                m_muInfos.Add(item);
            }
        }
Beispiel #4
0
        private ErrorInfoItem FindByMu(int mu_id)
        {
            ErrorInfoItem foundItem = null;

            foreach (ErrorInfoItem item in m_muInfos)
            {
                if (item.GetMuId() == mu_id)
                {
                    foundItem = item;
                    break;
                }
            }
            return(foundItem);
        }
Beispiel #5
0
        /// <summary>
        /// socket通信エラーを設定
        /// </summary>
        public void UpdateCommuError(DateTime dt, string message, int errorType)
        {
            ErrorInfoItem item = new ErrorInfoItem();

            item.SetBrush(m_red);
            item.SetSortKey(dt);
            item.SetErrorType(errorType);

//            string message = Resources.SOCKET_ERROR;
            string coping = Resources.CHECK_CELL;

            item.AddTitleValue("CELL", message);
            item.AddTitleValue(Resources.DATETIME, DateTimeUtil.FormatDateTimeString(dt));
            item.AddTitleValue(Resources.COPING, coping);

            m_commuInfos.Add(item);
        }