/// <summary>
 /// 打开数据库
 /// </summary>
 /// <param name="userId"></param>
 /// <returns></returns>
 public static SystemMsgDB OpenSysMsgDB(string userId)
 {
     if (instance == null)
     {
         instance = new SystemMsgDB(userId);
     }
     return instance;
 }
        private void Form_SystemMsg_Load(object sender, EventArgs e)
        {
            SystemMsgDB sysDB = new SystemMsgDB(myInfo.ID.ToString());
            SysMsg sysmsg = sysDB.getASysMsg();
            if (sysmsg != null)
            {
                if (sysmsg.Type == Constant.MSG_ADDFRIEND_APPLY)
                {
                    //ID卍昵称卍性别卍生日卍地址卍注册时间
                    userInfo = Regex.Split(sysmsg.Content, Constant.SPLIT, RegexOptions.IgnoreCase);
                    soucerUserId = userInfo[0];
                    lbl_userInfo.Text = userInfo[0] + "\n" + userInfo[1];
                    lbl_userName.Text = userInfo[1] + " 请求加您为好友";
                }
                else if(sysmsg.Type==Constant.MSG_ADDFRIEND_AGREE)
                {
                    //ID卍昵称卍性别卍生日卍地址卍注册时间
                    userInfo = Regex.Split(sysmsg.Content, Constant.SPLIT, RegexOptions.IgnoreCase);

                    txbBox_Msg.Visible = false;
                    lbl_userInfo.Text = userInfo[0];
                    lbl_userName.Text = "添加" + userInfo[1] + "为好友成功";
                    radioBtn_agree.Visible = false;
                    radioBtn_refuse.Visible = false;
                    btn_yes.Visible = false;
                    btn_ignore.Visible = false;
                }
            }
            else
            {
                txbBox_Msg.Visible = false;
                lbl_userInfo.Visible = false;
                lbl_userName.Text = "没有未读的系统消息";
                radioBtn_agree.Visible = false;
                radioBtn_refuse.Visible = false;
                btn_yes.Visible = false;
                btn_ignore.Visible = false;
            }
        }