Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.IO;
  11. using System.Xml;
  12.  
  13. namespace Html_and_Xml_Editor
  14. {
  15. public partial class Form1 : Form
  16. {
  17. public Form1()
  18. {
  19. InitializeComponent();
  20. }
  21.  
  22. private void richTextBox1_TextChanged(object sender, EventArgs e)
  23. {
  24. webBrowser1.DocumentText = richTextBox1.Text;
  25. }
  26.  
  27.  
  28. private void saveFileDialog1_FileOk(object sender, CancelEventArgs e)
  29. {
  30. string name = saveFileDialog1.FileName;
  31. File.WriteAllText(name, "test");
  32. }
  33.  
  34.  
  35. private void saveToolStripButton_Click(object sender, EventArgs e)
  36. {
  37. if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
  38. {
  39. File.WriteAllText(saveFileDialog1.FileName, richTextBox1.Text);
  40. }
  41.  
  42. }
  43.  
  44. private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
  45. {
  46. string name = openFileDialog1.FileName;
  47. File.WriteAllText(name, "test");
  48. }
  49.  
  50. private void openToolStripButton_Click(object sender, EventArgs e)
  51. {
  52. openFileDialog1.ShowDialog();
  53. }
  54.  
  55.  
  56.  
  57. private void toolStripStatusLabel1_Click_1(object sender, EventArgs e)
  58. {
  59. this.toolStripStatusLabel1.Text = System.DateTime.Now.ToString();
  60. }
  61.  
  62. private void helpToolStripButton_Click(object sender, EventArgs e)
  63. {
  64.  
  65. }
  66.  
  67. private void toolStripButton1_Click(object sender, EventArgs e)
  68. {
  69.  
  70. }
  71.  
  72. }
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement