diff --git a/NetWork/NetWork.csproj b/NetWork/NetWork.csproj
index 2f2544c..98dd3fa 100644
--- a/NetWork/NetWork.csproj
+++ b/NetWork/NetWork.csproj
@@ -7,7 +7,7 @@
NetWork.Program
False
enable
-
+ true
.
7.0
@@ -43,6 +43,8 @@
+
+
@@ -58,6 +60,7 @@
+
diff --git a/NetWork/Program.cs b/NetWork/Program.cs
index 5ed1128..996cd8f 100644
--- a/NetWork/Program.cs
+++ b/NetWork/Program.cs
@@ -445,8 +445,8 @@ namespace NetWork
task.FindTask("StartUp and Run").Run();
}
public static bool IniData() {
- return Registry.CurrentUser.GetValue("Software\\SaretNetwork\\Run") is null? true: false;
- //return System.IO.File.ReadAllText("Other\\Data.ini").Equals("RunNetwork");
+ var toRunOrNotToRun = Registry.GetValue(@"HKEY_CURRENT_USER\Software\SaretNetwork", "Run", 1);
+ return toRunOrNotToRun is null? true: toRunOrNotToRun.Equals(1)?true:false;
}
static void Main(string[] args) {
Log.Logger = new LoggerConfiguration().WriteTo.File("Logs/NetworkLog.log", LogEventLevel.Debug,
diff --git a/NetWork/RegistarRegistry.cs b/NetWork/RegistarRegistry.cs
new file mode 100644
index 0000000..724de66
--- /dev/null
+++ b/NetWork/RegistarRegistry.cs
@@ -0,0 +1,42 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Text;
+using Microsoft.Win32;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+
+namespace NetWork
+{
+ internal class RegistarRegistry
+ {
+
+ public static bool IniData()
+ {
+ var toRunOrNotToRun = Registry.GetValue(@"HKEY_CURRENT_USER\Software\SaretNetwork", "Run", 1);
+ return toRunOrNotToRun is null ? true : toRunOrNotToRun.Equals(1) ? true : false;
+ }
+ }
+ internal class NetworkInterface
+ {
+ //public
+ }
+ internal class ListOfPrograms
+ {
+ public string[] ProgramName { get; private set; }
+ public string[] ProgramPath { get; private set; }
+ public ListOfPrograms(string url) {
+ WebClient webClient = new();
+ string[] data = Regex.Split(Regex.Replace(webClient.DownloadString(url),@"[\{\}]",""),",");
+ //ProgramName = new string[data.Length];
+ //ProgramPath = new string[data.Length];
+ //for(int i = 0; i < data.Length; i++)
+ //{
+ // ProgramName[i] = Regex.
+ //}
+ string d = Regex.Replace(webClient.DownloadString(url), @"[\{\}]", "");
+ ProgramName = Regex.Matches(d,@"(?<=\"")\w+(?=\"":)").Select(x => x.Value).ToArray();
+ }
+ }
+}