-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hoofdscherm.cs
51 lines (48 loc) · 1.67 KB
/
Hoofdscherm.cs
1
2
3
4
5
6
7
8
9
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
39
40
41
42
43
44
45
46
47
48
49
50
51
using System;
using System.Drawing;
using System.Windows.Forms;
namespace SchetsEditor
{
public class Hoofdscherm : Form
{
MenuStrip menuStrip;
public Hoofdscherm()
{ this.ClientSize = new Size(800, 600);
menuStrip = new MenuStrip();
this.Controls.Add(menuStrip);
this.maakFileMenu();
this.maakHelpMenu();
this.Text = "Schets editor";
this.IsMdiContainer = true;
this.MainMenuStrip = menuStrip;
}
private void maakFileMenu()
{ ToolStripDropDownItem menu;
menu = new ToolStripMenuItem("File");
menu.DropDownItems.Add("Nieuw", null, this.nieuw);
menu.DropDownItems.Add("Exit", null, this.afsluiten);
menuStrip.Items.Add(menu);
}
private void maakHelpMenu()
{ ToolStripDropDownItem menu;
menu = new ToolStripMenuItem("Help");
menu.DropDownItems.Add("Over \"Schets\"", null, this.about);
menuStrip.Items.Add(menu);
}
private void about(object o, EventArgs ea)
{ MessageBox.Show("Schets versie 1.0\n(c) UU Informatica 2010"
, "Over \"Schets\""
, MessageBoxButtons.OK
, MessageBoxIcon.Information
);
}
private void nieuw(object sender, EventArgs e)
{ SchetsWin s = new SchetsWin();
s.MdiParent = this;
s.Show();
}
private void afsluiten(object sender, EventArgs e)
{ this.Close();
}
}
}