Esempio n. 1
0
        private string MedicalSystemMessageServerURL  = AppSettings.MedicalSystemMessageServerURL; //消息平台ip地址

        public TransMessageManager(MED_USERS user)
        {
            curLoginModel = GetCurLoginModel(user);
            string name = this.SetClientName();

            this.connection = new Connection(name, curLoginModel.MessageServerURL);
            this.connection.DelegateSendMessage      += this.DelegateSendMessage;
            this.connection.DelegateConnectionClosed += this.DelegateConnectionClosed;
            this.connection.DelegateOnLine           += this.DelegateOnLine;
            this.connection.DelegateUnLine           += this.DelegateUnLine;
            this.connection.DelegateGetUserList      += this.DelegateGetUserDict;
        }
Esempio n. 2
0
        /// <summary>
        /// 登录消息平台实体类
        /// </summary>
        private LoginModel GetCurLoginModel(MED_USERS user)
        {
            // 自身的ID
            string sessionID = Guid.NewGuid().ToString();
            // 对应的小麦助手的ID
            string childSessionID = Guid.NewGuid().ToString();
            // 一体机的信息
            string information = "平台";

            return(new LoginModel(sessionID,
                                  "Ane",
                                  EnumAppType.Platform,
                                  user.LOGIN_NAME,
                                  user.USER_NAME,
                                  information,
                                  MedicalSystemMessageServerURL,
                                  childSessionID));
        }