Remaetanju
Remaetanju
CC#
Created by Remaetanju on 1/2/2024 in #help
AOT Compilation trimming
<EnableTrimAnalyzer>true</EnableTrimAnalyzer> seems to be iimportant to always have warnings about trimm in the console <IsTrimmable>true</IsTrimmable> seems important otherwise trimmable assembly doesnt work ?
8 replies
CC#
Created by Remaetanju on 1/2/2024 in #help
AOT Compilation trimming
8 replies
CC#
Created by Remaetanju on 1/2/2024 in #help
AOT Compilation trimming
and the properties i use
8 replies
CC#
Created by Remaetanju on 1/2/2024 in #help
AOT Compilation trimming
Here the complete output I found properties to use and apparently disable trimming on some libraries (exe size going up) (build success but exe crashes later than before without the newly founds properties)
8 replies
CC#
Created by Remaetanju on 1/2/2024 in #help
AOT Compilation trimming
Hi, i tried to use mode partial but seems that the library code is still trimmed. like publishAOT doesnt refer to trimMode and relative settings
8 replies
CC#
Created by Remaetanju on 1/2/2024 in #help
AOT Compilation trimming
Ill give it a try today and come back to u
8 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Forms ProgressBar with MegaApiClient download
MegaApiClient client = new MegaApiClient();
client.LoginAnonymous();
Uri fileLink = new Uri(packurl);

INode node = client.GetNodeFromLink(fileLink);
using (var downloadStream = client.Download(node))
using (var progressionStream = new ProgressionStream(downloadStream, x => HERE.button1_Click())) /* <=== CLICK ON BUTTON INSTEAD OF ConsoleWriteLine
(NOT SURE THIS WORKS?)
*/
using (var fileStream = new FileStream(LCGamePath + "\\" + packname, FileMode.Create))
{
progressionStream.CopyTo(fileStream);
}

client.Logout();
MegaApiClient client = new MegaApiClient();
client.LoginAnonymous();
Uri fileLink = new Uri(packurl);

INode node = client.GetNodeFromLink(fileLink);
using (var downloadStream = client.Download(node))
using (var progressionStream = new ProgressionStream(downloadStream, x => HERE.button1_Click())) /* <=== CLICK ON BUTTON INSTEAD OF ConsoleWriteLine
(NOT SURE THIS WORKS?)
*/
using (var fileStream = new FileStream(LCGamePath + "\\" + packname, FileMode.Create))
{
progressionStream.CopyTo(fileStream);
}

client.Logout();
now with the code upper the object HERE is of type Form1, and i run it before the snippet and then give his public button_1click()
4 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Forms ProgressBar with MegaApiClient download
Ok i got this snippet to run https://net-informations.com/csharp/gui/cs-progressbar.htm and the Design.cs too
4 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Forms ProgressBar with MegaApiClient download
Its probably impossible for a noob to understand anything to progressbar
4 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
thanks again ❤️
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
works like a charm
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
private static string[] SteamPaths
=> new string[]
{
Microsoft.Win32.Registry.GetValue(steamRegKey, steamRegValue, null) as string,
};


static string GamePath()
{
// Attempt to get the Steam path.
string? steamPath = null;

foreach (var steam in SteamPaths.Where(p => !string.IsNullOrEmpty(p)))
if (Directory.Exists(steam))
steamPath = steam;

if (steamPath == null)
return null;

// find game folder through library file
string librarypath = Path.Combine(steamPath, "config", "libraryfolders.vdf");

if (File.Exists(librarypath))
{
var stream = File.OpenRead(librarypath);
var kv = KVSerializer.Create(KVSerializationFormat.KeyValues1Text);
KVObject data = kv.Deserialize(stream);

int i = 0;
while (i < data.Count())
{
var libraryfolder = data[i.ToString()]["path"];
var librarygames = data[i.ToString()]["apps"];

foreach (var game in (IEnumerable<KVObject>)librarygames)
if (game.Name.Contains(appID))
return libraryfolder.ToString() + "\\steamapps\\common\\Lethal Company";
i++;
}
}
private static string[] SteamPaths
=> new string[]
{
Microsoft.Win32.Registry.GetValue(steamRegKey, steamRegValue, null) as string,
};


static string GamePath()
{
// Attempt to get the Steam path.
string? steamPath = null;

foreach (var steam in SteamPaths.Where(p => !string.IsNullOrEmpty(p)))
if (Directory.Exists(steam))
steamPath = steam;

if (steamPath == null)
return null;

// find game folder through library file
string librarypath = Path.Combine(steamPath, "config", "libraryfolders.vdf");

if (File.Exists(librarypath))
{
var stream = File.OpenRead(librarypath);
var kv = KVSerializer.Create(KVSerializationFormat.KeyValues1Text);
KVObject data = kv.Deserialize(stream);

int i = 0;
while (i < data.Count())
{
var libraryfolder = data[i.ToString()]["path"];
var librarygames = data[i.ToString()]["apps"];

foreach (var game in (IEnumerable<KVObject>)librarygames)
if (game.Name.Contains(appID))
return libraryfolder.ToString() + "\\steamapps\\common\\Lethal Company";
i++;
}
}
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
here's what i've came up with:
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
but i think i have everything i need i'll post my code soon 🙂
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
i thought i was crazy x)
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
i should be able to find "BaseInstallFolder" when opening the file right ?
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
// Attempt to find through config file
string configPath = Path.Combine(steamPath, "config", "config.vdf");
// Attempt to find through config file
string configPath = Path.Combine(steamPath, "config", "config.vdf");
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
i opened the file line 50
54 replies
CC#
Created by Remaetanju on 12/28/2023 in #help
Trouble reading registry
54 replies