-
Notifications
You must be signed in to change notification settings - Fork 0
/
Settings.cs
71 lines (61 loc) · 1.95 KB
/
Settings.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Windows.Forms;
namespace Sport
{
public class MDI
{
public bool _hasWindows = false;
private System.Windows.Forms.Form _parentMDI;
private MenuItem WindowMenu;
public void AddWindows(System.Windows.Forms.Form parentMDI, System.Windows.Forms.MainMenu mnuMain)
{
_parentMDI = parentMDI;
WindowMenu = new MenuItem();
WindowMenu.Text = "&Fenster";
WindowMenu.MenuItems.Add("Überlappend", Cascade_Click);
WindowMenu.MenuItems.Add("Untereinander", TileH_Click);
WindowMenu.MenuItems.Add("Nebeneinander", TileV_Click);
WindowMenu.MdiList = true;
mnuMain.MenuItems.Add(WindowMenu);
}
private void Cascade_Click(object sender, EventArgs e)
{
if (_parentMDI.MdiChildren.Length == 0)
_hasWindows = false;
else
{
_hasWindows = true;
_parentMDI.LayoutMdi(MdiLayout.Cascade);
}
}
private void TileH_Click(object sender, EventArgs e)
{
if (_parentMDI.MdiChildren.Length == 0)
_hasWindows = false;
else
{
_hasWindows = true;
_parentMDI.LayoutMdi(MdiLayout.TileHorizontal);
}
}
private void TileV_Click(object sender, EventArgs e)
{
if (_parentMDI.MdiChildren.Length == 0)
_hasWindows = false;
else
{
_hasWindows = true;
_parentMDI.LayoutMdi(MdiLayout.TileVertical);
}
}
}
/// <summary>
/// Summary description for Settings.
/// </summary>
public class Settings
{
public static string DataDirectory { get; set; }
public static string Jahr { get; set; }
public static bool IsMdiLayout { get; set; } = false;
}
}