Пример #1
0
        public static void OpenTheFrqForm()
        {
            string              frStr  = HTTPUtil.SendGetRequest(Util.GetHttpUrl() + "/friendsreq/getall/" + GlobalClass.CurrentUser.Id);
            List <FriendsReq>   frList = FriendsReq.GetListByStr(frStr);
            CheckFriendsReqForm fr     = new CheckFriendsReqForm();

            fr.Init(frList);
            fr.ShowDialog();
            string result = HTTPUtil.SendGetRequest(Util.GetHttpUrl() + "/getfriendsbyid/" + GlobalClass.CurrentUser.Id);

            if (result != "获取失败!")
            {
                GlobalClass.CurrentUser.Friends = result;
                GlobalClass.Groups = Util.GetGroups(result);
                GlobalClass.mf.Invoke((MethodInvoker) delegate
                {
                    GlobalClass.mf.InitTree();
                });
            }
        }
Пример #2
0
        private void FRBtn_Click(object sender, EventArgs e)
        {
            if (nf != null)
            {
                nf.Close();
            }
            Id_Messages.TryRemove(0, out List <MessageType> list);
            string              frStr  = HTTPUtil.SendGetRequest(Util.GetHttpUrl() + "/friendsreq/getall/" + GlobalClass.CurrentUser.Id);
            List <FriendsReq>   frList = FriendsReq.GetListByStr(frStr);
            CheckFriendsReqForm fr     = new CheckFriendsReqForm();

            fr.Init(frList);
            fr.ShowDialog();
            string result = HTTPUtil.SendGetRequest(Util.GetHttpUrl() + "/getfriendsbyid/" + user.Id);

            if (result != "获取失败!")
            {
                GlobalClass.CurrentUser.Friends = result;
                GlobalClass.Groups = Util.GetGroups(user.Friends);
                InitTree();
            }
        }