v2rayN/v2rayN/v2rayN/Forms/BaseForm.cs
2022-06-22 09:48:00 +08:00

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}");
}
}
}
}