mirror of
https://github.com/2dust/v2rayN.git
synced 2025-08-24 03:46:55 +00:00
40 lines
951 B
C#
40 lines
951 B
C#
using System;
|
|
using System.Windows.Forms;
|
|
using v2rayN.Mode;
|
|
|
|
namespace v2rayN.Forms
|
|
{
|
|
public partial class BaseForm : Form
|
|
{
|
|
protected static Config config;
|
|
protected static System.Drawing.Icon icon;
|
|
|
|
public BaseForm()
|
|
{
|
|
InitializeComponent();
|
|
LoadCustomIcon();
|
|
}
|
|
|
|
private void LoadCustomIcon()
|
|
{
|
|
try
|
|
{
|
|
if (icon == null)
|
|
{
|
|
string file = Utils.GetPath(Global.CustomIconName);
|
|
if (!System.IO.File.Exists(file))
|
|
{
|
|
return;
|
|
}
|
|
icon = new System.Drawing.Icon(file);
|
|
}
|
|
this.Icon = icon;
|
|
}
|
|
catch (Exception e)
|
|
{
|
|
Utils.SaveLog($"Loading custom icon failed: {e.Message}");
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|