mirror of
https://github.com/2dust/v2rayN.git
synced 2025-04-20 06:02:23 +00:00
The icon of the system proxy can be customized
https://github.com/2dust/v2rayN/issues/6459
This commit is contained in:
parent
b770048f05
commit
db934e70cb
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue