Esempio n. 1
0
        /// <summary>
        /// 头像点击详情
        /// </summary>
        /// <param name="para">参数</param>
        private void AvatorDetial(string para)
        {
            DataofMember dm = DisplayRoom.members.FirstOrDefault(m => m.userId == Applicate.MyAccount.userId);

            if (GroupItem.Jid.Length > 15 && DisplayRoom.allowSendCard == 0)
            {
                if (DisplayRoom.userId.ToString() != Applicate.MyAccount.userId)
                {
                    return;
                }
            }

            if (para.Length > 15)
            {
                var tmpRoom = new Room().GetRoomIdByJid(para);                            //获取
                GroupChatDetial.GetWindow().Show();
                Messenger.Default.Send(tmpRoom, GroupDetialViewModel.InitialGroupDetial); //初始化群组
                GroupChatDetial.GetWindow().Activate();
            }
            else
            {
                if (Applicate.MyAccount.userId != para) // 点自己的头像不做操作
                {
                    if (para == "10001")
                    {
                        //新的好友不显示个人资料
                    }
                    else
                    {
                        Messenger.Default.Send(para, UserDetailNotifications.ShowUserDetial);
                        UserDetailView.GetWindow().Show();
                    }
                }
            }
        }
Esempio n. 2
0
 public DataofMember GetModel()
 {
     using (var DBContext = new SQLiteDBContext())
     {
         //var result = (
         //    from RoomMember in DBContext.RoomMembers
         //    where RoomMember.groupid == this.groupid
         //    && RoomMember.userId == this.userId
         //    select RoomMember
         //    ).FirstOrDefault();
         //return result;
         DbRawSqlQuery <DataofMember> queue = DBContext.Database.SqlQuery <DataofMember>("SELECT * FROM RoomMember WHERE userId = '" + this.userId + "' and groupid='" + this.groupid + "'");
         DataofMember obj = queue.FirstOrDefault();
         return(obj);
     }
 }
Esempio n. 3
0
        public DataofMember toModel(string strJson)
        {
            DataofMember msgObj = JsonConvert.DeserializeObject <DataofMember>(strJson);

            return(msgObj);
        }
Esempio n. 4
0
 public JsonRoomMember()
 {
     data = new DataofMember();
 }