-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
418 changed files
with
2,170 additions
and
382,869 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using Microsoft.Win32; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LABLibary.Assistant | ||
{ | ||
public class ProductRegistration | ||
{ | ||
public static void RegisterProduct(string productName, string productVersion, string productLocation) | ||
{ | ||
using (RegistryKey key = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\" + productName)) | ||
{ | ||
key.SetValue("DisplayName", productName); | ||
key.SetValue("DisplayVersion", productVersion); | ||
key.SetValue("Publisher", "Your company name here"); | ||
key.SetValue("InstallLocation", Path.GetDirectoryName(productLocation)); | ||
key.SetValue("UninstallString", "\"" + productLocation + "\" /uninstall"); | ||
key.SetValue("QuietUninstallString", "\"" + productLocation + "\" /uninstall /quiet"); | ||
key.SetValue("SystemComponent", 0); | ||
key.SetValue("EstimatedSize", new FileInfo(productLocation).Length / 1024); | ||
|
||
string iconLocation = productLocation + ",0"; | ||
if (File.Exists(iconLocation)) | ||
{ | ||
key.SetValue("DisplayIcon", iconLocation); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LABLibary.Assistant | ||
{ | ||
public class SafeDelete | ||
{ | ||
public static void SafeDeleteFile(string filePath, Action<int> progressCallback = null, Action<string> errorCallback = null) | ||
{ | ||
try | ||
{ | ||
if (!File.Exists(filePath)) | ||
{ | ||
errorCallback?.Invoke($"File not found: {filePath}"); | ||
return; | ||
} | ||
|
||
long fileSize = new FileInfo(filePath).Length; | ||
long bytesDeleted = 0; | ||
|
||
using (FileStream stream = new FileStream(filePath, FileMode.Open, FileAccess.Write)) | ||
{ | ||
byte[] buffer = new byte[1024]; | ||
Random rand = new Random(); | ||
|
||
while (stream.Position < fileSize) | ||
{ | ||
rand.NextBytes(buffer); | ||
stream.Write(buffer, 0, buffer.Length); | ||
bytesDeleted += buffer.Length; | ||
|
||
int progressPercentage = (int)((float)bytesDeleted / (float)fileSize * 100); | ||
progressCallback?.Invoke(progressPercentage); | ||
} | ||
} | ||
|
||
|
||
File.Delete(filePath); | ||
|
||
if (File.Exists(filePath)) | ||
{ | ||
errorCallback?.Invoke($"Failed to delete File: {filePath}"); | ||
return; | ||
} | ||
|
||
progressCallback?.Invoke(100); | ||
} | ||
catch (Exception ex) | ||
{ | ||
errorCallback?.Invoke($"Failed to delete File: {ex.Message}"); | ||
} | ||
} | ||
|
||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using IWshRuntimeLibrary; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace LABLibary.Assistant | ||
{ | ||
public class ShortcutCreator | ||
{ | ||
public static void CreateShortcut(string shortcutName, string targetFile) | ||
{ | ||
string shortcutPath = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu) + "\\" + shortcutName + ".lnk"; | ||
|
||
IWshShell wshShell = new WshShell(); | ||
IWshShortcut shortcut = (IWshShortcut)wshShell.CreateShortcut(shortcutPath); | ||
|
||
shortcut.TargetPath = targetFile; | ||
shortcut.WorkingDirectory = Path.GetDirectoryName(targetFile); | ||
shortcut.WindowStyle = 1; // Normal window | ||
shortcut.Description = "Shortcut created using C#"; // Optional | ||
shortcut.IconLocation = targetFile + ",0"; // Optional | ||
|
||
shortcut.Save(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-90.1 KB
(52%)
LABLibary/obj/Debug/net7.0/LABLibary.csproj.AssemblyReference.cache
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
LABLibary/obj/Debug/net7.0/LABLibary.csproj.CoreCompileInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
ddff964fa4fdf5de7e5802fc0afb07ac031564bf | ||
72c0e94d43073bdceb517e9980fb176894561dda |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+0 Bytes
(100%)
Project/bin/Debug/net6.0-windows/ICSharpCode.TextEditor.dll
Binary file not shown.
Binary file modified
BIN
-24 Bytes
(100%)
Project/bin/Debug/net6.0-windows/ICSharpCode.TextEditor.pdb
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Project/obj/Debug/net6.0-windows/ICSharpCode.TextEditor.AssemblyInfoInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
74cb95763fd3724fad3ec42d66daf25d36709278 | ||
40defa38826414244f4df0337e97e78aa4454e02 |
Binary file modified
BIN
+71 Bytes
(110%)
Project/obj/Debug/net6.0-windows/ICSharpCode.TextEditor.assets.cache
Binary file not shown.
Binary file modified
BIN
-103 KB
(50%)
Project/obj/Debug/net6.0-windows/ICSharpCode.TextEditor.csproj.AssemblyReference.cache
Binary file not shown.
Binary file modified
BIN
+732 Bytes
(160%)
Project/obj/Debug/net6.0-windows/ICSharpCode.TextEditor.csproj.GenerateResource.cache
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Project/obj/Debug/net6.0-windows/ICSharpCode.TextEditor.dll
Binary file not shown.
Binary file modified
BIN
-24 Bytes
(100%)
Project/obj/Debug/net6.0-windows/ICSharpCode.TextEditor.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion
2
Project/obj/Debug/net6.0-windows/ICSharpCode.TextEditor.sourcelink.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"documents":{"C:\\Users\\joeva\\Documents\\GitHub\\LILO-LocalServer\\*":"https://raw.githubusercontent.com/JW-Limited/LILO-LocalServer/cf146f203283bc8a3a233ed95eaba240f9af71c8/*"}} | ||
{"documents":{"C:\\Users\\joeva\\Documents\\GitHub\\LILO-LocalServer\\*":"https://raw.githubusercontent.com/JW-Limited/LILO-LocalServer/a1d932530eb865da9d93a6a132e1769f1d48c8f8/*"}} |
Binary file modified
BIN
+0 Bytes
(100%)
Project/obj/Debug/net6.0-windows/ref/ICSharpCode.TextEditor.dll
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
Project/obj/Debug/net6.0-windows/refint/ICSharpCode.TextEditor.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.