summaryrefslogtreecommitdiff
path: root/Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs
diff options
context:
space:
mode:
authorLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 15:29:41 +0000
committerLucas Faria Mendes <lucas.fariamo08@gmail.com>2026-03-30 15:29:41 +0000
commit225aa1499e37faf9d38257caabbadc68d78b427e (patch)
tree102bb7a40c58595348ae9d3c7076201759fe0720 /Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs
parent1f4e14b2e973ee7de337fd4866d9a5ceff5cb6d1 (diff)
downloadgestor-225aa1499e37faf9d38257caabbadc68d78b427e.tar.gz
gestor-225aa1499e37faf9d38257caabbadc68d78b427e.zip
decompiler.com
Diffstat (limited to 'Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs')
-rw-r--r--Decompiler/Gestor.Application.Helpers/ApplicationHelper.cs54
1 files changed, 54 insertions, 0 deletions
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;
+ }
+ }
+}