mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-19 14:53:50 +02:00
Use image cache from chromium
This commit is contained in:
16
AppApi.cs
16
AppApi.cs
@@ -210,22 +210,10 @@ namespace VRCX
|
||||
return CpuMonitor.Instance.CpuUsage;
|
||||
}
|
||||
|
||||
public bool CacheImage(string ImageURL, string AppVersion)
|
||||
public void CacheImage(string Base64File)
|
||||
{
|
||||
String Icon = Path.Combine(Program.BaseDirectory, "cache\\toast");
|
||||
try
|
||||
{
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
client.Headers.Add("user-agent", AppVersion);
|
||||
client.DownloadFile(ImageURL, Icon);
|
||||
}
|
||||
}
|
||||
catch (WebException)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
File.WriteAllBytes(Icon, Convert.FromBase64String(Base64File));
|
||||
}
|
||||
|
||||
public void DesktopNotification(string BoldText, string Text, bool Image)
|
||||
|
||||
Reference in New Issue
Block a user