public MainForm()
{
this.Text = "Bit Orchestra";
this.Width = 640;
this.Height = 480;
this._Sound = new Sound();
this._Saved = true;
try
{
this.Icon = Icon.ExtractAssociatedIcon(System.Reflection.Assembly.GetExecutingAssembly().Location);
}
catch
{
}
// Text area
TextBox text = new TextBox();
text.Dock = DockStyle.Fill;
text.Font = new Font(FontFamily.GenericMonospace, 12.0f);
text.Multiline = true;
text.ScrollBars = ScrollBars.Vertical;
this.Controls.Add(text);
text.TextChanged += this._TextChanged;
text.ContextMenu = new ContextMenu(new MenuItem[]
{
new MenuItem("Cut", this._CutClick),
new MenuItem("Copy", this._CopyClick),
new MenuItem("Paste", this._PasteClick),
new MenuItem("Play This", this._PlayThisClick, Shortcut.F6),
});
this._Text = text;
// Menu
MenuStrip menu = new MenuStrip();
menu.Items.Add(new ToolStripMenuItem("Save", null, this._SaveClick, Keys.Control | Keys.S));
menu.Items.Add(new ToolStripMenuItem("Load", null, this._LoadClick, Keys.Control | Keys.L));
menu.Items.Add(new ToolStripMenuItem("Export", null, this._ExportClick, Keys.Control | Keys.E));
menu.Items.Add(this._PlayStop = new ToolStripMenuItem(_PlayText, null, this._PlayStopClick, Keys.F5));
this.Controls.Add(menu);
this._Menu = menu;
}