Esempio n. 1
0
        /// <summary>
        /// 处理来自命令行的系统启动消息数据
        /// </summary>
        /// <param name="hSatrtupData">启动消息数据</param>
        public void HandleStartupMessage(IntPtr hSatrtupData)
        {
            StartupArgs argsHelper = new StartupArgs();

            try
            {
                argsHelper.ParsePtrArgs(hSatrtupData);
            }
            catch (Exception ex)
            {
                TrayIconHandler.Instance.ShowTrayPopupTip("错误的启动参数", ex.Message);
                return;
            }
            if (argsHelper.QChatArgs.ArgType == "1")
            {
                this.SwtichUserInfo(argsHelper.QChatArgs);
            }
            else
            {
                SystemParam.Instance.QChatArgs = argsHelper.QChatArgs;
                TrayIconHandler.Instance.CloseTaskTray();
                QCQuestionChatForm form = new QCQuestionChatForm();
                form.PatientID = argsHelper.QChatArgs.PatientID;
                form.VisitID   = argsHelper.QChatArgs.VisitID;
                form.Sender    = argsHelper.QChatArgs.Sender;
                form.Listener  = argsHelper.QChatArgs.Listener;
                form.MsgID     = argsHelper.QChatArgs.MsgID;
                form.Show();
            }
        }
Esempio n. 2
0
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 0)
            {
                return;
            }
            QcMsgChatLog msg = this.dataGridView1.Rows[e.RowIndex].Tag as QcMsgChatLog;

            if (msg == null)
            {
                return;
            }
            QCQuestionChatForm form = new QCQuestionChatForm();

            form.PatientID = msg.PatientID;
            form.VisitID   = msg.VisitID;
            form.Sender    = msg.Listener;//弹出对话框,此处接收者、发送者应互换
            form.Listener  = msg.Sender;
            form.MsgID     = msg.MsgID;
            if (form.ShowDialog() == DialogResult.OK)
            {
                if (this.chkSearch.Checked
                    )
                {
                    this.SearchHistoryMsg();
                }
                else
                {
                    if (MessageHandler.Instance.IsRunning)
                    {
                        MessageHandler.Instance.StopCheckTimer();
                    }
                    MessageHandler.Instance.StartCheckTimer(this);
                }
            }
        }