- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
using System;
using System.Drawing;
using System.Windows.Forms;
class HTMLCheapRedactor
{
[STAThread]
static void Main(string[] args)
{
Application.EnableVisualStyles();
Form a = new Form() { Text = "HTML Doc" },
b = new Form() { Text = "HTML Code" };
var web = new WebBrowser() { Dock = DockStyle.Fill };
var txt = new TextBox()
{
Multiline = true,
Dock = DockStyle.Fill,
ScrollBars = ScrollBars.Both,
Font = new Font("Consolas", 12f),
WordWrap = false,
AcceptsTab = true
};
web.DataBindings.Add(new Binding("DocumentText", txt, "Text"));
a.Controls.Add(web);
b.Controls.Add(txt);
b.Show();
b.AddOwnedForm(a);
txt.Text = @"<html>
<head>
<title>Hello World!</title>
</head>
<body>
Hello World!
</body>
</html>";
Application.Run(a);
}
}