开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 1723|回复: 3
收起左侧

[C#求助] c#多线程求助

[复制链接]
结帖率:25% (1/4)
发表于 2013-1-14 00:46:00 | 显示全部楼层 |阅读模式   山东省日照市
本帖最后由 缒忆 于 2013-1-14 00:47 编辑

       private void KnSkysl()
        {
            Debug.Print(";;");
            string KnSkyCotent, sid, ruin, nr;
            int Listindex, Listindex1;
            string lsid = this.textBox2.Text;
            while (KnSkyStop != 0)
            {
                CookieContainer KnSkyCoo = new CookieContainer();
                lock (KnSkyObject)
                {
                    if (KnSkyIndex2 + 1 < this.listView1.Items.Count)
                    {
                        Listindex = KnSkyIndex;
                        KnSkyIndex++;
                        sid = this.listView1.Items[Listindex].SubItems[1].Text;
                        ruin = this.listView1.Items[Listindex].SubItems[2].Text;
                    }
                    else
                    {
                        KnSkyIndex = 0;
                        Listindex = KnSkyIndex;
                        sid = this.listView1.Items[Listindex].SubItems[1].Text;
                        ruin = this.listView1.Items[Listindex].SubItems[2].Text;
                    }
                    if (KnSkyIndex1 + 1 < this.listBox1.Items.Count)
                    {
                        Listindex1 = KnSkyIndex1;
                        KnSkyIndex1++;
                        nr = Convert.ToString(this.listBox1.Items[Listindex1]);
                    }
                    else
                    {
                        KnSkyIndex1 = 0;
                        Listindex1 = KnSkyIndex1;
                        nr = Convert.ToString(this.listBox1.Items[Listindex1]);
                    }
                    
                    
                }
                Debug.Print(sid, ruin, nr);
                KnSkyCotent = XGmk.XGmkHttpPOST("http://chat.3g.qq.com/chatroom/talk.jsp?sid=" + sid + "&roomId=" + lsid, "msg=" + nr + "&talkType=1&ruin=" + ruin + "&recId=77866491", KnSkyIP, KnSkyCoo, 50000);
                if (this.checkBox1.Checked == true)
                {
                    KnSkyCotent = Regex.Replace(KnSkyCotent, Environment.NewLine, "");
                    KnSkyCotent = Regex.Replace(KnSkyCotent, "</p>", Environment.NewLine);
                    KnSkyCotent = Regex.Replace(KnSkyCotent, "<br/>", Environment.NewLine);
                    KnSkyCotent = Regex.Replace(KnSkyCotent, "</title>([\\S\\s]*)<body>", "");
                    this.textBox1.Text = Regex.Replace(KnSkyCotent, "<(.|\n)+?>", "");
                }
                this.groupBox3.Text = "正在第" + Convert.ToString(Listindex) + "发言。。。";

            }
        }        
写了个多线程POST提交的程序。可是使用到这个功能时程序就跑不起来了,小弟请教一下各位,马麻烦指点迷津,帮忙看看是哪错了
发表于 2013-1-28 18:01:27 | 显示全部楼层   四川省成都市
这个源码下来
看看
就ko了
http://bbs.125.la/thread-13630112-1-1.html
回复 支持 反对

使用道具 举报

结帖率:67% (2/3)
发表于 2013-1-27 12:35:28 | 显示全部楼层   陕西省宝鸡市
"msg="改为"&msg="
回复 支持 反对

使用道具 举报

结帖率:86% (6/7)
发表于 2013-1-14 08:11:37 | 显示全部楼层   北京市北京市
3GQQ聊天室发言
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 诚聘英才| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 800073686,邮箱:800073686@b.qq.com
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表