Beispiel #1
0
        //
        private void unicodeUTF8ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmCodeView dialogCodeView = new FrmCodeView();

            dialogCodeView.Text = "网页源码(采用UTF-8编码)";
            dialogCodeView.Show();

            StreamReader reader = new StreamReader(pageWebBrowser.DocumentStream, Encoding.UTF8);

            dialogCodeView.setCode = reader.ReadToEnd();
            reader.Close();
        }
Beispiel #2
0
        // 单击简体中文按钮
        private void gb2312Encode_Click(object sender, EventArgs e)
        {
            // 显示网页源码的对话框显示出来
            FrmCodeView dialogCodeView = new FrmCodeView();
            dialogCodeView.Text = "网页源码(采用GB2312编码)";
            dialogCodeView.Show();

            // 把网页源码显示在弹出的窗口中
            // 首先解码
            StreamReader reader = new StreamReader(pageWebBrowser.DocumentStream, Encoding.GetEncoding("GB2312"));
            dialogCodeView.setCode = reader.ReadToEnd();
            reader.Close();
        }
Beispiel #3
0
        // 单击简体中文按钮
        private void gb2312Encode_Click(object sender, EventArgs e)
        {
            // 显示网页源码的对话框显示出来
            FrmCodeView dialogCodeView = new FrmCodeView();

            dialogCodeView.Text = "网页源码(采用GB2312编码)";
            dialogCodeView.Show();

            // 把网页源码显示在弹出的窗口中
            // 首先解码
            StreamReader reader = new StreamReader(pageWebBrowser.DocumentStream, Encoding.GetEncoding("GB2312"));

            dialogCodeView.setCode = reader.ReadToEnd();
            reader.Close();
        }
Beispiel #4
0
        //
        private void unicodeUTF8ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmCodeView dialogCodeView = new FrmCodeView();
            dialogCodeView.Text = "网页源码(采用UTF-8编码)";
            dialogCodeView.Show();

            StreamReader reader = new StreamReader(pageWebBrowser.DocumentStream, Encoding.UTF8);
            dialogCodeView.setCode = reader.ReadToEnd();
            reader.Close();
        }