-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
41 lines (39 loc) · 902 Bytes
/
Program.cs
File metadata and controls
41 lines (39 loc) · 902 Bytes
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
using System;
using ConsoleStyleMatrix.Classes;
namespace ConsoleStyleMatrix
{
/// <summary>
/// Ponto de entrada da aplicação Console Style Matrix
/// </summary>
internal class Program
{
static void Main(string[] args)
{
MatrixRain matrixRain = null;
try
{
// Cria e executa a animação Matrix com banner derretendo
matrixRain = new MatrixRain();
matrixRain.RunWithMeltingBanner();
}
catch (Exception ex)
{
Console.Clear();
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("Erro ao executar a animação: " + ex.Message);
Console.WriteLine("\nDetalhes: " + ex.StackTrace);
Console.ResetColor();
Console.WriteLine("\nPressione qualquer tecla para sair...");
Console.ReadKey();
}
finally
{
// Garante limpeza de recursos
if (matrixRain != null)
{
matrixRain.Dispose();
}
}
}
}
}