mirror of https://github.com/2dust/v2rayN
parent
28aa954f8c
commit
0da9cb45bd
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
|
@ -48,13 +48,16 @@ namespace v2rayN.Desktop.Common
|
|||
break;
|
||||
|
||||
case ESysProxyType.ForcedChange:
|
||||
case ESysProxyType.Pac:
|
||||
index = 2;
|
||||
break;
|
||||
|
||||
case ESysProxyType.Unchanged:
|
||||
index = 3;
|
||||
break;
|
||||
|
||||
case ESysProxyType.Pac:
|
||||
index = 4;
|
||||
break;
|
||||
}
|
||||
var uri = new Uri($"avares://{Assembly.GetExecutingAssembly().GetName().Name}/Assets/NotifyIcon{index}.ico");
|
||||
using var bitmap = new Bitmap(AssetLoader.Open(uri));
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace v2rayN.Handler
|
|||
0 => Properties.Resources.NotifyIcon1,
|
||||
1 => Properties.Resources.NotifyIcon2,
|
||||
2 => Properties.Resources.NotifyIcon3,
|
||||
3 => Properties.Resources.NotifyIcon2,
|
||||
3 => Properties.Resources.NotifyIcon4,
|
||||
_ => Properties.Resources.NotifyIcon1, // default
|
||||
};
|
||||
}
|
||||
|
@ -54,13 +54,16 @@ namespace v2rayN.Handler
|
|||
break;
|
||||
|
||||
case ESysProxyType.ForcedChange:
|
||||
case ESysProxyType.Pac:
|
||||
index = 2;
|
||||
break;
|
||||
|
||||
case ESysProxyType.Unchanged:
|
||||
index = 3;
|
||||
break;
|
||||
|
||||
case ESysProxyType.Pac:
|
||||
index = 4;
|
||||
break;
|
||||
}
|
||||
return BitmapFrame.Create(new Uri($"pack://application:,,,/Resources/NotifyIcon{index}.ico", UriKind.RelativeOrAbsolute));
|
||||
}
|
||||
|
|
|
@ -150,6 +150,16 @@ namespace v2rayN.Properties {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似于 (图标) 的 System.Drawing.Icon 类型的本地化资源。
|
||||
/// </summary>
|
||||
internal static System.Drawing.Icon NotifyIcon4 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("NotifyIcon4", resourceCulture);
|
||||
return ((System.Drawing.Icon)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找 System.Drawing.Bitmap 类型的本地化资源。
|
||||
/// </summary>
|
||||
|
|
|
@ -127,4 +127,7 @@
|
|||
<data name="NotifyIcon3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NotifyIcon3.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="NotifyIcon4" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\NotifyIcon4.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
|
@ -29,6 +29,7 @@
|
|||
<Resource Include="Resources\NotifyIcon1.ico" />
|
||||
<Resource Include="Resources\NotifyIcon2.ico" />
|
||||
<Resource Include="Resources\NotifyIcon3.ico" />
|
||||
<Resource Include="Resources\NotifyIcon4.ico" />
|
||||
<Resource Include="Resources\v2rayN.ico" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
Loading…
Reference in New Issue