コード例 #1
0
        public static string createGroup(string name, string hostid, string password)
        {
            GroupChat group = new GroupChat(name);

            group.hostid   = hostid;
            group.password = password;
            StaticData.groups.Add(group.id, group);
            return(group.id);
        }
コード例 #2
0
        // GET: PublicChat
        public async Task <ActionResult> joingroup(string groupid, string pass, string userid)
        {
            if (StaticData.checkPassword(groupid, pass))
            {
                GroupChat group = StaticData.getGroup(groupid);
                ViewBag.groupname = group.name;
                ViewBag.pass      = pass;
                ViewBag.id        = groupid;

                await StaticData.addUsertoGroup(userid, groupid);

                return(PartialView("Index"));
            }
            else
            {
                return(HttpNotFound());
            }
        }