Skip to content

Commit 2636471

Browse files
committed
Primo commit cli
1 parent 7d8bd85 commit 2636471

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1145
-12
lines changed

accorda-cli/accorda-cli.cs

+84-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,84 @@
1-
// See https://aka.ms/new-console-template for more information
2-
Console.WriteLine("Hello, World!");
1+
using System;
2+
using Spectre.Console;
3+
4+
class Program
5+
{
6+
static void Main(string[] args)
7+
{
8+
while (true)
9+
{
10+
AnsiConsole.Clear();
11+
PrintHeader();
12+
PrintMenu();
13+
var choice = PromptInput();
14+
ProcessChoice(choice);
15+
}
16+
}
17+
18+
static void PrintHeader()
19+
{
20+
AnsiConsole.WriteLine();
21+
AnsiConsole.WriteLine("[bold underline green]Guitar Tuner[/]");
22+
AnsiConsole.WriteLine();
23+
}
24+
25+
static void PrintMenu()
26+
{
27+
AnsiConsole.WriteLine("[yellow]Select an option:[/]");
28+
AnsiConsole.WriteLine(" [yellow]1[/] - Tune Guitar");
29+
AnsiConsole.WriteLine(" [yellow]2[/] - Read License");
30+
AnsiConsole.WriteLine(" [yellow]3[/] - Exit");
31+
AnsiConsole.WriteLine();
32+
}
33+
34+
static string PromptInput()
35+
{
36+
return AnsiConsole.Prompt(new TextPrompt<string>("Enter your choice:")
37+
.InvalidChoiceMessage("[red]Invalid choice[/]")
38+
.DefaultValue("1"));
39+
}
40+
41+
static void ProcessChoice(string choice)
42+
{
43+
switch (choice.ToLower())
44+
{
45+
case "1":
46+
TuneGuitar();
47+
break;
48+
case "2":
49+
ReadLicense();
50+
break;
51+
case "3":
52+
Environment.Exit(0);
53+
break;
54+
default:
55+
AnsiConsole.WriteLine("[red]Invalid choice[/]");
56+
break;
57+
}
58+
}
59+
60+
static void TuneGuitar()
61+
{
62+
// Implementare la logica per l'accordatura della chitarra
63+
AnsiConsole.WriteLine("[yellow]Tuning guitar...[/]");
64+
// Simulazione di attesa per 2 secondi
65+
System.Threading.Thread.Sleep(2000);
66+
AnsiConsole.WriteLine("[green]Guitar tuned successfully![/]");
67+
AnsiConsole.WriteLine();
68+
AnsiConsole.WriteLine("[yellow]Press any key to continue...[/]");
69+
Console.ReadKey();
70+
}
71+
72+
static void ReadLicense()
73+
{
74+
// Leggere il testo della licenza dal file o da una risorsa
75+
string licenseText = "License text goes here...";
76+
AnsiConsole.WriteLine();
77+
AnsiConsole.WriteLine("[bold underline]License[/]");
78+
AnsiConsole.WriteLine(licenseText);
79+
AnsiConsole.WriteLine();
80+
AnsiConsole.WriteLine("[yellow]Press any key to continue...[/]");
81+
Console.ReadKey();
82+
}
83+
}
84+

accorda-cli/accorda-cli.csproj

+8
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,12 @@
1919
</None>
2020
</ItemGroup>
2121

22+
<ItemGroup>
23+
<PackageReference Include="NAudio" Version="2.2.1" />
24+
<PackageReference Include="Spectre.Console" Version="0.48.0" />
25+
<PackageReference Include="Spectre.Console.Cli" Version="0.48.0" />
26+
<PackageReference Include="Spectre.Console.Json" Version="0.48.0" />
27+
<PackageReference Include="Spectre.Console.Testing" Version="0.48.0" />
28+
</ItemGroup>
29+
2230
</Project>
33.5 KB
Binary file not shown.
184 KB
Binary file not shown.
45.5 KB
Binary file not shown.
175 KB
Binary file not shown.
56 KB
Binary file not shown.
7.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,275 @@
1+
{
2+
"runtimeTarget": {
3+
"name": ".NETCoreApp,Version=v8.0",
4+
"signature": ""
5+
},
6+
"compilationOptions": {},
7+
"targets": {
8+
".NETCoreApp,Version=v8.0": {
9+
"accorda-cli/1.0.0": {
10+
"dependencies": {
11+
"NAudio": "2.2.1",
12+
"Spectre.Console": "0.48.0",
13+
"Spectre.Console.Cli": "0.48.0",
14+
"Spectre.Console.Json": "0.48.0",
15+
"Spectre.Console.Testing": "0.48.0"
16+
},
17+
"runtime": {
18+
"accorda-cli.dll": {}
19+
}
20+
},
21+
"Microsoft.NETCore.Platforms/3.1.0": {},
22+
"Microsoft.Win32.Registry/4.7.0": {
23+
"dependencies": {
24+
"System.Security.AccessControl": "4.7.0",
25+
"System.Security.Principal.Windows": "4.7.0"
26+
}
27+
},
28+
"NAudio/2.2.1": {
29+
"dependencies": {
30+
"NAudio.Asio": "2.2.1",
31+
"NAudio.Core": "2.2.1",
32+
"NAudio.Midi": "2.2.1",
33+
"NAudio.Wasapi": "2.2.1",
34+
"NAudio.WinMM": "2.2.1"
35+
},
36+
"runtime": {
37+
"lib/net6.0/NAudio.dll": {
38+
"assemblyVersion": "2.2.1.0",
39+
"fileVersion": "2.2.1.0"
40+
}
41+
}
42+
},
43+
"NAudio.Asio/2.2.1": {
44+
"dependencies": {
45+
"Microsoft.Win32.Registry": "4.7.0",
46+
"NAudio.Core": "2.2.1"
47+
},
48+
"runtime": {
49+
"lib/netstandard2.0/NAudio.Asio.dll": {
50+
"assemblyVersion": "2.2.1.0",
51+
"fileVersion": "2.2.1.0"
52+
}
53+
}
54+
},
55+
"NAudio.Core/2.2.1": {
56+
"runtime": {
57+
"lib/netstandard2.0/NAudio.Core.dll": {
58+
"assemblyVersion": "2.2.1.0",
59+
"fileVersion": "2.2.1.0"
60+
}
61+
}
62+
},
63+
"NAudio.Midi/2.2.1": {
64+
"dependencies": {
65+
"NAudio.Core": "2.2.1"
66+
},
67+
"runtime": {
68+
"lib/netstandard2.0/NAudio.Midi.dll": {
69+
"assemblyVersion": "2.2.1.0",
70+
"fileVersion": "2.2.1.0"
71+
}
72+
}
73+
},
74+
"NAudio.Wasapi/2.2.1": {
75+
"dependencies": {
76+
"NAudio.Core": "2.2.1"
77+
},
78+
"runtime": {
79+
"lib/netstandard2.0/NAudio.Wasapi.dll": {
80+
"assemblyVersion": "2.2.1.0",
81+
"fileVersion": "2.2.1.0"
82+
}
83+
}
84+
},
85+
"NAudio.WinMM/2.2.1": {
86+
"dependencies": {
87+
"Microsoft.Win32.Registry": "4.7.0",
88+
"NAudio.Core": "2.2.1"
89+
},
90+
"runtime": {
91+
"lib/netstandard2.0/NAudio.WinMM.dll": {
92+
"assemblyVersion": "2.2.1.0",
93+
"fileVersion": "2.2.1.0"
94+
}
95+
}
96+
},
97+
"Spectre.Console/0.48.0": {
98+
"dependencies": {
99+
"System.Memory": "4.5.5"
100+
},
101+
"runtime": {
102+
"lib/net8.0/Spectre.Console.dll": {
103+
"assemblyVersion": "0.0.0.0",
104+
"fileVersion": "0.48.0.0"
105+
}
106+
}
107+
},
108+
"Spectre.Console.Cli/0.48.0": {
109+
"dependencies": {
110+
"Spectre.Console": "0.48.0"
111+
},
112+
"runtime": {
113+
"lib/net8.0/Spectre.Console.Cli.dll": {
114+
"assemblyVersion": "0.0.0.0",
115+
"fileVersion": "0.48.0.0"
116+
}
117+
},
118+
"resources": {
119+
"lib/net8.0/de/Spectre.Console.Cli.resources.dll": {
120+
"locale": "de"
121+
},
122+
"lib/net8.0/fr/Spectre.Console.Cli.resources.dll": {
123+
"locale": "fr"
124+
},
125+
"lib/net8.0/sv/Spectre.Console.Cli.resources.dll": {
126+
"locale": "sv"
127+
}
128+
}
129+
},
130+
"Spectre.Console.Json/0.48.0": {
131+
"dependencies": {
132+
"Spectre.Console": "0.48.0"
133+
},
134+
"runtime": {
135+
"lib/net8.0/Spectre.Console.Json.dll": {
136+
"assemblyVersion": "0.0.0.0",
137+
"fileVersion": "0.48.0.0"
138+
}
139+
}
140+
},
141+
"Spectre.Console.Testing/0.48.0": {
142+
"dependencies": {
143+
"Spectre.Console": "0.48.0",
144+
"Spectre.Console.Cli": "0.48.0"
145+
},
146+
"runtime": {
147+
"lib/net8.0/Spectre.Console.Testing.dll": {
148+
"assemblyVersion": "0.0.0.0",
149+
"fileVersion": "0.48.0.0"
150+
}
151+
}
152+
},
153+
"System.Memory/4.5.5": {},
154+
"System.Security.AccessControl/4.7.0": {
155+
"dependencies": {
156+
"Microsoft.NETCore.Platforms": "3.1.0",
157+
"System.Security.Principal.Windows": "4.7.0"
158+
}
159+
},
160+
"System.Security.Principal.Windows/4.7.0": {}
161+
}
162+
},
163+
"libraries": {
164+
"accorda-cli/1.0.0": {
165+
"type": "project",
166+
"serviceable": false,
167+
"sha512": ""
168+
},
169+
"Microsoft.NETCore.Platforms/3.1.0": {
170+
"type": "package",
171+
"serviceable": true,
172+
"sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
173+
"path": "microsoft.netcore.platforms/3.1.0",
174+
"hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
175+
},
176+
"Microsoft.Win32.Registry/4.7.0": {
177+
"type": "package",
178+
"serviceable": true,
179+
"sha512": "sha512-KSrRMb5vNi0CWSGG1++id2ZOs/1QhRqROt+qgbEAdQuGjGrFcl4AOl4/exGPUYz2wUnU42nvJqon1T3U0kPXLA==",
180+
"path": "microsoft.win32.registry/4.7.0",
181+
"hashPath": "microsoft.win32.registry.4.7.0.nupkg.sha512"
182+
},
183+
"NAudio/2.2.1": {
184+
"type": "package",
185+
"serviceable": true,
186+
"sha512": "sha512-c0DzwiyyklM0TP39Y7RObwO3QkWecgM6H60ikiEnsV/aEAJPbj5MFCLaD8BSfKuZe0HGuh9GRGWWlJmSxDc9MA==",
187+
"path": "naudio/2.2.1",
188+
"hashPath": "naudio.2.2.1.nupkg.sha512"
189+
},
190+
"NAudio.Asio/2.2.1": {
191+
"type": "package",
192+
"serviceable": true,
193+
"sha512": "sha512-hQglyOT5iT3XuGpBP8ZG0+aoqwRfidHjTNehpoWwX0g6KJEgtH2VaqM2nuJ2mheKZa/IBqB4YQTZVvrIapzfOA==",
194+
"path": "naudio.asio/2.2.1",
195+
"hashPath": "naudio.asio.2.2.1.nupkg.sha512"
196+
},
197+
"NAudio.Core/2.2.1": {
198+
"type": "package",
199+
"serviceable": true,
200+
"sha512": "sha512-GgkdP6K/7FqXFo7uHvoqGZTJvW4z8g2IffhOO4JHaLzKCdDOUEzVKtveoZkCuUX8eV2HAINqi7VFqlFndrnz/g==",
201+
"path": "naudio.core/2.2.1",
202+
"hashPath": "naudio.core.2.2.1.nupkg.sha512"
203+
},
204+
"NAudio.Midi/2.2.1": {
205+
"type": "package",
206+
"serviceable": true,
207+
"sha512": "sha512-6r23ylGo5aeP02WFXsPquz0T0hFJWyh+7t++tz19tc3Kr38NHm+Z9j+FiAv+xkH8tZqXJqus9Q8p6u7bidIgbw==",
208+
"path": "naudio.midi/2.2.1",
209+
"hashPath": "naudio.midi.2.2.1.nupkg.sha512"
210+
},
211+
"NAudio.Wasapi/2.2.1": {
212+
"type": "package",
213+
"serviceable": true,
214+
"sha512": "sha512-lFfXoqacZZe0WqNChJgGYI+XV/n/61LzPHT3C1CJp4khoxeo2sziyX5wzNYWeCMNbsWxFvT3b3iXeY1UYjBhZw==",
215+
"path": "naudio.wasapi/2.2.1",
216+
"hashPath": "naudio.wasapi.2.2.1.nupkg.sha512"
217+
},
218+
"NAudio.WinMM/2.2.1": {
219+
"type": "package",
220+
"serviceable": true,
221+
"sha512": "sha512-xFHRFwH4x6aq3IxRbewvO33ugJRvZFEOfO62i7uQJRUNW2cnu6BeBTHUS0JD5KBucZbHZaYqxQG8dwZ47ezQuQ==",
222+
"path": "naudio.winmm/2.2.1",
223+
"hashPath": "naudio.winmm.2.2.1.nupkg.sha512"
224+
},
225+
"Spectre.Console/0.48.0": {
226+
"type": "package",
227+
"serviceable": true,
228+
"sha512": "sha512-4Mc1UT7Azgtyb8FyNwK5FZmoZbKuT5PmY7ZwaKUytjD5kGFMNBACpOZTwYtkuY377YkYtZYBeDDTJUwTW86QXw==",
229+
"path": "spectre.console/0.48.0",
230+
"hashPath": "spectre.console.0.48.0.nupkg.sha512"
231+
},
232+
"Spectre.Console.Cli/0.48.0": {
233+
"type": "package",
234+
"serviceable": true,
235+
"sha512": "sha512-HNoDxAOTODQ9h+4K5Cs2caW8kIicRKw5SS4vgEEkJtnTp7/4XR8OIGvCjVi09w3m+xn4lTlkS0ENy2ktGz4HRw==",
236+
"path": "spectre.console.cli/0.48.0",
237+
"hashPath": "spectre.console.cli.0.48.0.nupkg.sha512"
238+
},
239+
"Spectre.Console.Json/0.48.0": {
240+
"type": "package",
241+
"serviceable": true,
242+
"sha512": "sha512-I6g4FkdQ3ONcPe5rmLQHU0ZesU/JGKFb9EDBDcjyUExLykLBmXn6yymej12fBd3//2T9yybqdAFTZ8+4/GVsTw==",
243+
"path": "spectre.console.json/0.48.0",
244+
"hashPath": "spectre.console.json.0.48.0.nupkg.sha512"
245+
},
246+
"Spectre.Console.Testing/0.48.0": {
247+
"type": "package",
248+
"serviceable": true,
249+
"sha512": "sha512-j4KOoZlcARoIV0Q4g1r6HLxYfjLiK1RX67E5VtRNL08709+a031Cgn9DTjTWn8D1fgOc38sVYx7VksMIkPRW2Q==",
250+
"path": "spectre.console.testing/0.48.0",
251+
"hashPath": "spectre.console.testing.0.48.0.nupkg.sha512"
252+
},
253+
"System.Memory/4.5.5": {
254+
"type": "package",
255+
"serviceable": true,
256+
"sha512": "sha512-XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==",
257+
"path": "system.memory/4.5.5",
258+
"hashPath": "system.memory.4.5.5.nupkg.sha512"
259+
},
260+
"System.Security.AccessControl/4.7.0": {
261+
"type": "package",
262+
"serviceable": true,
263+
"sha512": "sha512-JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==",
264+
"path": "system.security.accesscontrol/4.7.0",
265+
"hashPath": "system.security.accesscontrol.4.7.0.nupkg.sha512"
266+
},
267+
"System.Security.Principal.Windows/4.7.0": {
268+
"type": "package",
269+
"serviceable": true,
270+
"sha512": "sha512-ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==",
271+
"path": "system.security.principal.windows/4.7.0",
272+
"hashPath": "system.security.principal.windows.4.7.0.nupkg.sha512"
273+
}
274+
}
275+
}
9.5 KB
Binary file not shown.
140 KB
Binary file not shown.
12.6 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"runtimeOptions": {
3+
"tfm": "net8.0",
4+
"framework": {
5+
"name": "Microsoft.NETCore.App",
6+
"version": "8.0.0"
7+
},
8+
"configProperties": {
9+
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": false
10+
}
11+
}
12+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.

accorda-cli/obj/Debug/net8.0/accorda-.F6A54A75.Up2Date

Whitespace-only changes.

accorda-cli/obj/Debug/net8.0/accorda-cli.AssemblyInfo.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
[assembly: System.Reflection.AssemblyCompanyAttribute("accorda-cli")]
1515
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
1616
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
17-
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+aa2f59693ba199c1c97ede6c668daceb30f44ea4")]
17+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+7d8bd854d670730fa091c1dab19d770eb4359adb")]
1818
[assembly: System.Reflection.AssemblyProductAttribute("accorda-cli")]
1919
[assembly: System.Reflection.AssemblyTitleAttribute("accorda-cli")]
2020
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

0 commit comments

Comments
 (0)