自动登录CSDN网站,并回复帖子

分享了一个能够自动登录CSDN并回复‘程序人生’板块首篇帖子的小程序,提供了源码下载链接,期待社区反馈和建议。
摘要由CSDN通过智能技术生成

自己写的一个小程序,用来自动登录CSDN网站,并回复“程序人生”板块第一篇帖子。发下源码,大家有什么好的建议,欢迎留言。

点击这里,可以直接下载源码 点击打开链接    http://download.csdn.net/detail/jiajiayouba/5489601

附主要源码:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using mshtml;
using System.Threading;
using System.Configuration;

namespace WinFormSetup
{
    public partial class Form1 : Form
    {
        private int isContinue = 0; //Check the document if ready

        public Form1()
        {
            InitializeComponent();
            this.txtWebSite.Text = "https://passport.csdn.net/account/login";

        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.txtUserName.Text = ConfigHelper.GetValue("userName"); 
            this.txtPwd.Text = ConfigHelper.GetValue("userPwd");
            this.chkRem.Checked = this.txtUserName.Text.Trim() == "" ? false : true;
        }

        /// <summary>
        /// Load Button
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnLoad_Click(object sender, EventArgs e)
        {
            wb.Navigate(this.txtWebSite.Text);
        }

        /// <summary>
        /// Block page pop alert, confirm, modal window
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void wb_Navigated(object sender, WebBrowserNavigatedEventArgs e)
        {
            IHTMLWindow2 win = (IHTMLWindow2)wb.Document.Window.DomWindow;
            string s = "window.alert = null; window.confirm = null;window.open = null;windo
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值