-
Notifications
You must be signed in to change notification settings - Fork 0
/
SYSCOM - Copy.PS1
115 lines (101 loc) · 3.28 KB
/
SYSCOM - Copy.PS1
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
# Imposta i percorsi delle DLL
$assemblyPath = "C:\Users\pierl\Downloads\Terminal.Gui-1.17.0\Terminal.Gui-1.17.0\Terminal.Gui\bin\Debug\netstandard2.0\Terminal.Gui.dll"
$nstackPath = "C:\Users\pierl\Downloads\Terminal.Gui-1.17.0\Terminal.Gui-1.17.0\UnitTests\bin\Debug\net8.0\NStack.dll"
# Importa le DLL
Add-Type -Path $assemblyPath
Add-Type -Path $nstackPath
# Definisci la funzione per mostrare il menu SYSCOM
function Show-SyscomMenu {
[Terminal.Gui.Application]::Init()
$top = [Terminal.Gui.Application]::Top
# Crea una finestra per il menu SYSCOM
$win = New-Object Terminal.Gui.Window -Property @{
Title = "SYSCOM Menu"
X = 0
Y = 1
Width = [Terminal.Gui.Dim]::Fill()
Height = [Terminal.Gui.Dim]::Fill()
}
$top.Add($win)
# Definisci i pulsanti anziché gli elementi di menu
$button1 = New-Object Terminal.Gui.Button -Property @{
X = 0
Y = 1
Width = [Terminal.Gui.Dim]::Fill()
Text = "1. Manutenzione del Sistema Operativo e dei Dischi"
Clicked = {
Write-Host "Manutenzione del Sistema Operativo e dei Dischi"
# Aggiungi qui la logica per la funzione DSK_SO
}
}
$top.Add($button1)
$button2 = New-Object Terminal.Gui.Button -Property @{
X = 0
Y = 2
Width = [Terminal.Gui.Dim]::Fill()
Text = "2. Gestione di Rete e Applicazioni"
Clicked = {
Write-Host "Gestione di Rete e Applicazioni"
# Aggiungi qui la logica per la funzione GestioneReteApplicazioni
}
}
$top.Add($button2)
$button3 = New-Object Terminal.Gui.Button -Property @{
X = 0
Y = 3
Width = [Terminal.Gui.Dim]::Fill()
Text = "3. Sicurezza e Protezione"
Clicked = {
Write-Host "Sicurezza e Protezione"
# Aggiungi qui la logica per la funzione SicurezzaProtezione
}
}
$top.Add($button3)
$button4 = New-Object Terminal.Gui.Button -Property @{
X = 0
Y = 4
Width = [Terminal.Gui.Dim]::Fill()
Text = "FS. Schermo Intero"
Clicked = {
Write-Host "Schermo Intero"
Start-Process -FilePath ".\VISO\F11.vbs"
}
}
$top.Add($button4)
$button5 = New-Object Terminal.Gui.Button -Property @{
X = 0
Y = 5
Width = [Terminal.Gui.Dim]::Fill()
Text = "32. Imposta la risoluzione"
Clicked = {
Write-Host "Imposta la risoluzione"
# Aggiungi qui la logica per la funzione Guida3_2
}
}
$top.Add($button5)
$button6 = New-Object Terminal.Gui.Button -Property @{
X = 0
Y = 6
Width = [Terminal.Gui.Dim]::Fill()
Text = "V0. Info"
Clicked = {
Write-Host "Info"
# Aggiungi qui la logica per la funzione INFO
}
}
$top.Add($button6)
$button7 = New-Object Terminal.Gui.Button -Property @{
X = 0
Y = 7
Width = [Terminal.Gui.Dim]::Fill()
Text = "0. Esci"
Clicked = {
[Terminal.Gui.Application]::RequestStop()
}
}
$top.Add($button7)
# Esegui l'applicazione TUI
[Terminal.Gui.Application]::Run()
}
# Chiamare la funzione per mostrare il menu SYSCOM
Show-SyscomMenu