private void Get_LibrarySystemBookInfo(object obj) { User user = (User)obj; string data = user.data; string username = string.Empty; string url = string.Empty; string res = string.Empty; if (string.IsNullOrEmpty(data)) { data = string.Empty; } Regex reg = new Regex(@"username=(.+?)&url=(.+)"); MatchCollection mcResul = reg.Matches(data); if (mcResul.Count > 0) { username = mcResul[0].Groups[1].Value; url = mcResul[0].Groups[2].Value; } AddContent("收到 [" + user.client.Client.RemoteEndPoint + "][" + username + "] 请求图书馆详细信息检索"); res = new LibrarySystemBookInfo().Get(username, url); SendToClient(user, res); AddContent("已向 [" + user.client.Client.RemoteEndPoint + "][" + username + "] 发送图书馆详细信息检索结果"); RemoveUser(user); }
private void Get_LibrarySystemBookInfo(object obj) { MissionInfo info = (MissionInfo)obj; string data = info.MissionData; string username = string.Empty; string url = string.Empty; string res = string.Empty; if (string.IsNullOrEmpty(data)) { data = string.Empty; } Regex reg = new Regex(@"username=(.+?)&url=(.+)"); MatchCollection mcResul = reg.Matches(data); if (mcResul.Count > 0) { username = mcResul[0].Groups[1].Value; url = mcResul[0].Groups[2].Value; } AddTalkMessage("收到 [" + username + "] 请求图书馆详细信息检索"); res = new LibrarySystemBookInfo().Get(username, url); SendMessage(info.MissionID + "," + res); AddTalkMessage("已向 [" + username + "] 发送图书馆详细信息检索结果"); }
private void button2_Click(object sender, EventArgs e) { LibrarySystemBookInfo lsbi = new LibrarySystemBookInfo(); textBox1.Text = lsbi.Get("username", "item.php?marc_no=0000081144"); }