From 225aa1499e37faf9d38257caabbadc68d78b427e Mon Sep 17 00:00:00 2001 From: Lucas Faria Mendes Date: Mon, 30 Mar 2026 12:29:41 -0300 Subject: decompiler.com --- .../ApplicationHelper.cs | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs (limited to 'Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs') diff --git a/Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs b/Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs new file mode 100644 index 0000000..97acd7d --- /dev/null +++ b/Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs @@ -0,0 +1,54 @@ +using System; +using Agger.Registro; +using Gestor.Common.Helpers; + +namespace Gestor.Application.Helpers; + +public class ApplicationHelper +{ + private static string _numeroSerial; + + private const string ChaveSerial = "NS"; + + public static string NumeroSerial + { + get + { + return _numeroSerial ?? GetSerialNumber(); + } + set + { + _numeroSerial = value; + } + } + + public static bool Conectado { get; set; } = true; + + + public static bool Beta { get; set; } = false; + + + public static long IdFornecedor { get; set; } + + public static string Subkey { get; set; } + + public static DateTime ChecagemVersao { get; set; } = Funcoes.GetNetworkTime(); + + + public static Version Versao { get; set; } + + internal static string GetSerialNumber() + { + //IL_0005: Unknown result type (might be due to invalid IL or missing references) + try + { + string text = new RegistryHelper(Subkey).Read("NS", true); + NumeroSerial = (string.IsNullOrEmpty(text) ? null : EncryptionHelper.Decrypt(text)); + return NumeroSerial; + } + catch (Exception) + { + return null; + } + } +} -- cgit v1.2.3