-
Notifications
You must be signed in to change notification settings - Fork 0
/
DSKSO.cs
86 lines (73 loc) · 2.42 KB
/
DSKSO.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
using System;
using System.Security.Cryptography;
using Terminal.Gui;
class DSKSO
{
public static void Dialog()
{
Application.Init();
var ColorDSKSO = new ColorScheme()
{
Normal = Application.Driver.MakeAttribute(Color.White, Color.BrightBlue),
HotNormal = Application.Driver.MakeAttribute(Color.White, Color.Blue),
Focus = Application.Driver.MakeAttribute(Color.Blue, Color.White),
HotFocus = Application.Driver.MakeAttribute(Color.White, Color.Blue),
};
var DSK_SO_DIAG = new Dialog()
{
X = 0,
Y = 1, // Leave space for the title
Width = 65,
Height = 22,
ColorScheme = ColorDSKSO
}; // Crea un nuovo dialogo
var frame = new FrameView("Dischi e Sistema Operativo")
{
X = 0,
Y = 0,
Width = Dim.Fill(),
Height = Dim.Fill(),
CanFocus = true
};
// frame.MouseClick += GOTOCHIUDI;
var ASCIIART = new Label(
" _____ ______ __ __ ______ ______ \r\n/\\ __-. /\\ ___\\ /\\ \\/ / /\\ ___\\ /\\ __ \\ \r\n\\ \\ \\/\\ \\ \\ \\___ \\ \\ \\ _\"-. \\ \\___ \\ \\ \\ \\/\\ \\ \r\n \\ \\____- \\/\\_____\\ \\ \\_\\ \\_\\ \\/\\_____\\ \\ \\_____\\ \r\n \\/____/ \\/_____/ \\/_/\\/_/ \\/_____/ \\/_____/ ")
{
X = 1,
Y = 1,
Width = Dim.Fill() - 1,
Height = Dim.Fill() - 2,
};
var OS = new Button("Sistema Operativo")
{
X = 5,
Y = 8,
};
OS.Clicked += GOTOSO;
void GOTOSO(object sender, EventArgs e)
{
SistemaOperativo();
}
static void SistemaOperativo()
{
SO.Dialog();
}
var VOLDSK = new Button("Dischi e Volumi")
{
X = 5,
Y = 10,
};
VOLDSK.Clicked += GOTODSK;
void GOTODSK(object sender, EventArgs e)
{
Dischi();
}
static void Dischi()
{
DSK.Dialog();
}
frame.Add(ASCIIART, OS, VOLDSK); // Aggiungi il pulsante al frame
DSK_SO_DIAG.Add(frame); // Aggiungi il frame al dialogo
Application.Run(DSK_SO_DIAG);
}
}