mirror of
https://github.com/SpaceTimee/Sheas-Cealer.git
synced 2025-07-13 12:52:08 +08:00
1.1.3 -> 1.1.4 第92次更新
This commit is contained in:
parent
64f4bbad02
commit
1a08c65c0d
@ -40,6 +40,8 @@ internal abstract partial class MainConst : MainMultilangConst
|
|||||||
internal static string MihomoConfPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "config.yaml");
|
internal static string MihomoConfPath => Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase!, "config.yaml");
|
||||||
internal static string[] MihomoNameServers => ["https://doh.apad.pro/dns-query", "https://ns.net.kg/dns-query"];
|
internal static string[] MihomoNameServers => ["https://doh.apad.pro/dns-query", "https://ns.net.kg/dns-query"];
|
||||||
|
|
||||||
|
internal static string NotifyIconText => "Sheas Cealer";
|
||||||
|
|
||||||
[GeneratedRegex(@"^(https?:\/\/)?[a-zA-Z0-9](-*[a-zA-Z0-9])*(\.[a-zA-Z0-9](-*[a-zA-Z0-9])*)*(:\d{1,5})?(\/[a-zA-Z0-9.\-_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\%]*)*$")]
|
[GeneratedRegex(@"^(https?:\/\/)?[a-zA-Z0-9](-*[a-zA-Z0-9])*(\.[a-zA-Z0-9](-*[a-zA-Z0-9])*)*(:\d{1,5})?(\/[a-zA-Z0-9.\-_\~\!\$\&\'\(\)\*\+\,\;\=\:\@\%]*)*$")]
|
||||||
internal static partial Regex UpstreamUrlRegex();
|
internal static partial Regex UpstreamUrlRegex();
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ using System.Net;
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Net.NetworkInformation;
|
using System.Net.NetworkInformation;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
|
using System.Reflection;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Security.Cryptography.X509Certificates;
|
using System.Security.Cryptography.X509Certificates;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -760,7 +761,23 @@ public partial class MainWin : Window
|
|||||||
}
|
}
|
||||||
private void MainWin_KeyDown(object sender, KeyEventArgs e)
|
private void MainWin_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.KeyboardDevice.Modifiers == ModifierKeys.Control && e.Key == Key.W)
|
if (e.KeyboardDevice.Modifiers != ModifierKeys.Control)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (e.Key == Key.W)
|
||||||
Application.Current.Shutdown();
|
Application.Current.Shutdown();
|
||||||
|
else if (e.Key == Key.H)
|
||||||
|
{
|
||||||
|
System.Windows.Forms.NotifyIcon notifyIcon = new() { Icon = System.Drawing.Icon.ExtractAssociatedIcon(Assembly.GetExecutingAssembly().Location), Text = MainConst.NotifyIconText, Visible = true };
|
||||||
|
|
||||||
|
notifyIcon.Click += (_, _) =>
|
||||||
|
{
|
||||||
|
Show();
|
||||||
|
|
||||||
|
notifyIcon.Dispose();
|
||||||
|
};
|
||||||
|
|
||||||
|
Hide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user