Exemplo n.º 1
0
        public void Show(ChatListForm taskForm)
        {
            this.m_taskForm = taskForm;
            base.Show();
            this.Update();
            string szUserName = null;

            if (SystemParam.Instance.QChatArgs != null)
            {
                szUserName = SystemParam.Instance.QChatArgs.Listener;
            }
            this.Text = string.Format("病历质控沟通提醒消息 - {0}", szUserName);

            this.lblMessageCount.Text = string.Format("         系统共收集到{0}条消息!"
                                                      , MessageHandler.Instance.MessageCount);
            this.btnTimeMessage.Text = string.Format("待读消息:共{0}份, 需要您查看或回复", MessageHandler.Instance.QcMsgChatLogList.Count);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 启动消息检查计时器
        /// </summary>
        public void StartCheckTimer(ChatListForm form)
        {
            if (this.m_chatListForm != form)
            {
                this.m_chatListForm = form;
            }

            //立即启动一次检查
            this.StartTaskCheckThread();

            //读取定时时间设置
            string key      = SystemData.ConfigKey.TASK_REFRESH_INTERVAL;
            int    interval = SystemConfig.Instance.Get(key, 30);

            if (interval <= 0)
            {
                if (this.m_timer != null)
                {
                    this.m_timer.Enabled = false;
                }
                return;
            }
            if (interval > 30)
            {
                interval = 30;
            }

            //初始化Timer计时器
            if (this.m_timer == null)
            {
                this.m_timer       = new System.Windows.Forms.Timer();
                this.m_timer.Tick +=
                    delegate { this.StartTaskCheckThread(); };
            }
            this.m_timer.Interval = interval * 60 * 1000;
            if (!this.m_timer.Enabled)
            {
                this.m_timer.Enabled = true;
            }
        }
Exemplo n.º 3
0
        public void ShowTaskTray(ChatListForm chatListForm)
        {
            if (chatListForm == null || chatListForm.IsDisposed)
            {
                throw new Exception("ChatListForm参数不可访问!");
            }
            this.m_chatListForm = chatListForm;

            if (this.m_taskTray == null)
            {
                this.m_taskTray = new NotifyIcon();
            }
            if (!this.m_taskTray.Visible)
            {
                this.m_taskTray.Visible = true;
            }
            this.LoadPopupMenu();
            this.m_taskTray.Icon               = Heren.MedQC.QuestionChat.Properties.Resources.TaskTray1;
            this.m_taskTray.Text               = "质控问题沟通平台";
            this.m_taskTray.DoubleClick       -= new EventHandler(this.TaskTray_DoubleClick);
            this.m_taskTray.DoubleClick       += new EventHandler(this.TaskTray_DoubleClick);
            this.m_taskTray.BalloonTipClicked -= new EventHandler(this.TaskTray_BalloonTipClicked);
            this.m_taskTray.BalloonTipClicked += new EventHandler(this.TaskTray_BalloonTipClicked);
        }