mirror of
https://github.com/2dust/v2rayN.git
synced 2025-07-01 04:22:10 +00:00
37 lines
833 B
C#
37 lines
833 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using v2rayN.Mode;
|
|
|
|
namespace v2rayN.Forms
|
|
{
|
|
public partial class BaseForm : Form
|
|
{
|
|
protected static Config config;
|
|
|
|
public BaseForm()
|
|
{
|
|
InitializeComponent();
|
|
LoadCustomIcon();
|
|
}
|
|
|
|
private void LoadCustomIcon()
|
|
{
|
|
try
|
|
{
|
|
string file = Utils.GetPath(Global.CustomIconName);
|
|
if (System.IO.File.Exists(file))
|
|
{
|
|
Icon = new System.Drawing.Icon(file);
|
|
return;
|
|
}
|
|
|
|
Icon = Properties.Resources.NotifyIcon1;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Utils.SaveLog($"Loading custom icon failed: {e.Message}");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|