Advertisement
alexdevillx

RTF Editor

Jun 16th, 2011
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.67 KB | None | 0 0
  1. //--------------------------------------------------------------\
  2. //| Простой RTF редактор, написанный на C#.                     |
  3. //| (C) Alex.Devil.LX 15/06/2011                                |
  4. //| http://www.alexdevillx.blogspot.com                         |
  5. //| Email: alex.devil.lx@gmail.com                              |
  6. //\-------------------------------------------------------------/
  7.  
  8.  
  9.  
  10.  
  11. using System;
  12. using System.Collections.Generic;
  13. using System.ComponentModel;
  14. using System.Data;
  15. using System.Drawing;
  16. using System.Linq;
  17. using System.Text;
  18. using System.Windows.Forms;
  19. using System.Diagnostics;
  20.  
  21. namespace Csharp_TextPad
  22. {
  23.     public partial class Form1 : Form
  24.     {
  25.         public Form1()
  26.         {
  27.             InitializeComponent();
  28.         }
  29.  
  30.         private void оПрограммеToolStripMenuItem_Click(object sender, EventArgs e)
  31.         {
  32.             AboutBox1 CallAboutBox = new AboutBox1();
  33.             CallAboutBox.Show();
  34.         }
  35.  
  36.         private void скачатьИсходникToolStripMenuItem_Click(object sender, EventArgs e)
  37.         {
  38.             Process.Start ("Iexplore.exe", "http://alexdevillx.blogspot.com");
  39.         }
  40.  
  41.         private void новыйToolStripMenuItem_Click(object sender, EventArgs e)
  42.         {
  43.             richTextBox1 = null;
  44.         }
  45.  
  46.         private void шрифтToolStripMenuItem_Click(object sender, EventArgs e)
  47.         {
  48.             fontDialog1.ShowDialog();
  49.             richTextBox1.Font = fontDialog1.Font;
  50.             richTextBox1.ForeColor = fontDialog1.Color;
  51.         }
  52.  
  53.         private void цветФонаToolStripMenuItem_Click(object sender, EventArgs e)
  54.         {
  55.             colorDialog1.ShowDialog();
  56.             richTextBox1.BackColor = colorDialog1.Color;
  57.         }
  58.  
  59.         private void вырезатьToolStripMenuItem_Click(object sender, EventArgs e)
  60.         {
  61.             richTextBox1.Cut();
  62.         }
  63.  
  64.         private void копироватьToolStripMenuItem_Click(object sender, EventArgs e)
  65.         {
  66.             richTextBox1.Copy();
  67.         }
  68.  
  69.         private void вставитьToolStripMenuItem_Click(object sender, EventArgs e)
  70.         {
  71.             richTextBox1.Paste();
  72.         }
  73.  
  74.         private void открытьToolStripMenuItem_Click(object sender, EventArgs e)
  75.         {
  76.             openFileDialog1.ShowDialog();
  77.             richTextBox1.LoadFile(openFileDialog1.FileName);
  78.         }
  79.  
  80.         private void сохранитьToolStripMenuItem_Click(object sender, EventArgs e)
  81.         {
  82.             saveFileDialog1.ShowDialog();
  83.             richTextBox1.SaveFile(saveFileDialog1.FileName);
  84.         }
  85.     }
  86. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement