无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

51

2023-04-03 11:02 作者:涼曦傾顏  | 我要投稿

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;


namespace WindowsFormsApplication09

{

? ? public partial class Form1 : Form

? ? {

? ? ? ? public void SetFont(String fontname)

? ? ? ? {

? ? ? ? ? ? Font ft;

? ? ? ? ? ? textBox1.Text = richTextBox1.SelectionStart.ToString();

? ? ? ? ? ? int start = richTextBox1.SelectionStart;

? ? ? ? ? ? int end = richTextBox1.SelectionStart + richTextBox1.SelectionLength - 1;

? ? ? ? ? ? for (int i = start; i <= end; i++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? richTextBox1.Select(i, 1);

? ? ? ? ? ? ? ? ft = richTextBox1.SelectionFont;

? ? ? ? ? ? ? ? ft = new Font(fontname, ft.Size, ft.Style);

? ? ? ? ? ? ? ? richTextBox1.SelectionFont = ft;

? ? ? ? ? ? }

? ? ? ? ? ? richTextBox1.Select(start, end - start + 1);

? ? ? ? ? ? richTextBox1.Focus();

? ? ? ? }

? ? ? ? //11111111111111111

? ? ? ? public void SetFont(int fontsize)

? ? ? ? {

? ? ? ? ? ? Font ft;

? ? ? ? ? ? textBox1.Text = richTextBox1.SelectionStart.ToString();

? ? ? ? ? ? int start = richTextBox1.SelectionStart;

? ? ? ? ? ? int end = richTextBox1.SelectionStart + richTextBox1.SelectionLength - 1;

? ? ? ? ? ? for (int i = start; i <= end; i++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? richTextBox1.Select(i, 1);

? ? ? ? ? ? ? ? ft = richTextBox1.SelectionFont;

? ? ? ? ? ? ? ? ft = new Font(ft.Name, fontsize, ft.Style);

? ? ? ? ? ? ? ? richTextBox1.SelectionFont = ft;

? ? ? ? ? ? }

? ? ? ? ? ? richTextBox1.Select(start, end - start + 1);

? ? ? ? ? ? richTextBox1.Focus();

? ? ? ? }

? ? ? ? public void SetFont(FontStyle style, char c)

? ? ? ? {

? ? ? ? ? ? Font ft;

? ? ? ? ? ? int start = richTextBox1.SelectionStart;

? ? ? ? ? ? int end = richTextBox1.SelectionStart + richTextBox1.SelectionLength - 1;

? ? ? ? ? ? for (int i = start; i <= end; i++)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? richTextBox1.Select(i, 1);

? ? ? ? ? ? ? ? ft = richTextBox1.SelectionFont;

? ? ? ? ? ? ? ? System.Drawing.FontStyle fs = ft.Style;

? ? ? ? ? ? ? ? if (c == '+') fs = (System.Drawing.FontStyle)(fs | style);

? ? ? ? ? ? ? ? else fs = (System.Drawing.FontStyle)(fs - style);

? ? ? ? ? ? ? ? if (fs.ToString().IndexOf("Strikeout") >= 0)

? ? ? ? ? ? ? ? ? ? fs = (System.Drawing.FontStyle)(fs - FontStyle.Strikeout);

? ? ? ? ? ? ? ? ft = new Font(ft.Name, ft.Size, fs);

? ? ? ? ? ? ? ? richTextBox1.SelectionFont = ft;

? ? ? ? ? ? }

? ? ? ? ? ? richTextBox1.Select(start, end - start + 1);

? ? ? ? ? ? richTextBox1.Focus();

? ? ? ? }

? ? ? ? public Form1()

? ? ? ? {

? ? ? ? ? ? InitializeComponent();

? ? ? ? }


? ? ? ? private void richTextBox1_TextChanged(object sender, EventArgs e)

? ? ? ? {


? ? ? ? }


? ? ? ? private void radioButton1_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? SetFont("宋體");

? ? ? ? }


? ? ? ? private void radioButton6_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? richTextBox1.SelectionColor = Color.Blue;

? ? ? ? }


? ? ? ? private void button3_Click(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? System.Drawing.FontStyle fs = FontStyle.Regular;

? ? ? ? ? ? if (button3.FlatStyle == FlatStyle.Flat)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? button3.FlatStyle = FlatStyle.Standard;

? ? ? ? ? ? ? ? button3.BackColor = Color.White;

? ? ? ? ? ? ? ? fs = System.Drawing.FontStyle.Underline ;

? ? ? ? ? ? ? ? SetFont(fs, '-');

? ? ? ? ? ? }

? ? ? ? ? ? else

? ? ? ? ? ? {

? ? ? ? ? ? ? ? button3.FlatStyle = FlatStyle.Flat;

? ? ? ? ? ? ? ? button3.BackColor = Color.Silver;

? ? ? ? ? ? ? ? fs = System.Drawing.FontStyle.Underline;

? ? ? ? ? ? ? ? SetFont(fs, '+');

? ? ? ? ? ? }

? ? ? ? }

? ? ? ? private void button1_Click(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? System.Drawing.FontStyle fs = FontStyle.Regular;

? ? ? ? ? ? if (button1.FlatStyle == FlatStyle.Flat)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? button1.FlatStyle = FlatStyle.Standard;

? ? ? ? ? ? ? ? button1.BackColor = Color.White;

? ? ? ? ? ? ? ? fs = System.Drawing.FontStyle.Bold;

? ? ? ? ? ? ? ? SetFont(fs, '-');

? ? ? ? ? ? }

? ? ? ? ? ? else

? ? ? ? ? ? {

? ? ? ? ? ? ? ? button1.FlatStyle = FlatStyle.Standard;

? ? ? ? ? ? ? ? button1.BackColor = Color.White;

? ? ? ? ? ? ? ? fs = System.Drawing.FontStyle.Bold;

? ? ? ? ? ? ? ? SetFont(fs, '+');

? ? ? ? ? ? }

? ? ? ? }


? ? ? ? private void button2_Click(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? System.Drawing.FontStyle fs = FontStyle.Regular;

? ? ? ? ? ? if (button2.FlatStyle == FlatStyle.Flat)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? button2.FlatStyle = FlatStyle.Standard;

? ? ? ? ? ? ? ? button2.BackColor = Color.White;

? ? ? ? ? ? ? ? fs = System.Drawing.FontStyle.Italic;

? ? ? ? ? ? ? ? SetFont(fs, '-');

? ? ? ? ? ? }

? ? ? ? ? ? else

? ? ? ? ? ? {

? ? ? ? ? ? ? ? button2.FlatStyle = FlatStyle.Standard;

? ? ? ? ? ? ? ? button2.BackColor = Color.White;

? ? ? ? ? ? ? ? fs = System.Drawing.FontStyle.Italic;

? ? ? ? ? ? ? ? SetFont(fs, '+');

? ? ? ? ? ? }


? ? ? ? }


? ? ? ? private void radioButton2_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? SetFont("楷體_GB2312");

? ? ? ? }


? ? ? ? private void radioButton3_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? SetFont("隸書");

? ? ? ? }


? ? ? ? private void radioButton4_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ??

? ? ? ? ? ? richTextBox1.SelectionColor = Color.Black;

? ? ? ? }


? ? ? ? private void radioButton5_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? richTextBox1.SelectionColor = Color.Red;

? ? ? ? }


? ? ? ? private void radioButton7_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? SetFont(13);

? ? ? ? }


? ? ? ? private void radioButton8_CheckedChanged(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? SetFont(18);

? ? ? ? }

? ? ? ? private void button4_Click(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? try

? ? ? ? ? ? {

? ? ? ? ? ? ? ? richTextBox1.LoadFile(textBox1.Text, RichTextBoxStreamType.RichText);

? ? ? ? ? ? }

? ? ? ? ? ? catch (Exception ex)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? MessageBox.Show("打開文件出現(xiàn)錯(cuò)誤:" + ex.ToString());

? ? ? ? ? ? }

? ? ? ? }

? ? ? ? private void button5_Click(object sender, EventArgs e)

? ? ? ? {

? ? ? ? ? ? ?try

? ? ? ? ? ? {

? ? ? ? ? ? ? ? richTextBox1.SaveFile(textBox2.Text, RichTextBoxStreamType.RichText);

? ? ? ? ? ? }

? ? ? ? ? ? catch (Exception ex)

? ? ? ? ? ? {

? ? ? ? ? ? ? ? MessageBox.Show("保存文件出現(xiàn)錯(cuò)誤:" + ex.ToString());

? ? ? ? ? ? }

? ? ? ? }

? ? ? ? }

? ? }


51的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
林周县| 高要市| 昌吉市| 宁安市| 神木县| 青岛市| 义乌市| 鄂尔多斯市| 广南县| 宜良县| 英超| 青铜峡市| 阿坝县| 惠东县| 环江| 梅州市| 甘肃省| 东兴市| 汉阴县| 南岸区| 安徽省| 南投市| 阳东县| 环江| 滦平县| 越西县| 攀枝花市| 平湖市| 邢台县| 湖南省| 天全县| 英德市| 满城县| 凤台县| 郁南县| 卓资县| 屏东市| 陆丰市| 紫阳县| 容城县| 嘉善县|