Thursday, 9 July 2015

C# Text Editor

Order this paper @Essaybay.net...The Best Custom Essay writing service globally
Enhance the Rich Text Editor application so that a user can change the font [2 fonts], font size [2 sizes], and the color [2 colors] of text. See attachment.
Document Preview: 
RichTextEditor/Backup/RichTextEditor.sln RichTextEditor/Backup/RichTextEditor.v11.suo RichTextEditor/Backup/RichTextEditor/Form1.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace RichTextEditor { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void NewButton_Click(object sender, EventArgs e) { RichTextBoxEditor.Clear(); } private void OpenButton_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { RichTextBoxEditor.LoadFile(openFileDialog1.FileName); } } private void SaveAsButton_Click(object sender, EventArgs e) { if (saveFileDialog1.ShowDialog() == DialogResult.OK) { RichTextBoxEditor.SaveFile(saveFileDialog1.FileName); } } private void BoldButton_Click(object sender, EventArgs e) { Font newFont = new Font(RichTextBoxEditor.SelectionFont, (RichTextBoxEditor.SelectionFont.Bold ? RichTextBoxEditor.SelectionFont.Style & ~FontStyle.Bold : RichTextBoxEditor.SelectionFont.Style | FontStyle.Bold)); RichTextBoxEditor.SelectionFont = newFont; } private void ItalicButton_Click(object sender, EventArgs e) { Font newFont = new Font(RichTextBoxEditor.SelectionFont, (RichTextBoxEditor.SelectionFont.Italic ? RichTextBoxEditor.SelectionFont.Style & ~FontStyle.Italic : RichTextBoxEditor.SelectionFont.Style | FontStyle.Italic)); RichTextBoxEditor.SelectionFont = newFont; } private void UnderlineButton_Click(object sender, EventArgs e) { Font newFont = new...
Attachments:

No comments:

Post a Comment