mirror of https://github.com/2dust/v2rayN
The icon of the system proxy can be customized
https://github.com/2dust/v2rayN/issues/6459pull/6465/head
parent
b770048f05
commit
db934e70cb
|
@ -40,6 +40,12 @@ namespace v2rayN.Desktop.Common
|
|||
public static WindowIcon GetAppIcon(ESysProxyType sysProxyType)
|
||||
{
|
||||
var index = (int)sysProxyType + 1;
|
||||
var fileName = Utils.GetPath($"NotifyIcon{index}.ico");
|
||||
if (File.Exists(fileName))
|
||||
{
|
||||
return new(fileName);
|
||||
}
|
||||
|
||||
var uri = new Uri(Path.Combine(Global.AvaAssets, $"NotifyIcon{index}.ico"));
|
||||
using var bitmap = new Bitmap(AssetLoader.Open(uri));
|
||||
return new(bitmap);
|
||||
|
|
Loading…
Reference in New Issue