improve:直接调用外部点名

This commit is contained in:
2025-09-13 12:08:45 +08:00
parent c1fcaff28a
commit 99f9886876
6 changed files with 54 additions and 11 deletions
@@ -1096,20 +1096,37 @@ namespace Ink_Canvas
AnimationsHelper.HideWithSlideAndFade(BoardBorderTools);
AnimationsHelper.HideWithSlideAndFade(BoardImageOptionsPanel);
// 检查是否启用了直接调用ClassIsland点名功能
// 检查是否启用了外部点名功能
if (Settings.RandSettings.DirectCallCiRand)
{
try
{
string protocol = "";
switch (Settings.RandSettings.ExternalCallerType)
{
case 0: // ClassIsland点名
protocol = "classisland://plugins/IslandCaller/Simple/1";
break;
case 1: // SecRandom点名
protocol = "secrandom://direct_extraction";
break;
case 2: // NamePicker点名
protocol = "namepicker://";
break;
default:
protocol = "classisland://plugins/IslandCaller/Simple/1";
break;
}
Process.Start(new ProcessStartInfo
{
FileName = "classisland://plugins/IslandCaller/Simple/1",
FileName = protocol,
UseShellExecute = true
});
}
catch (Exception ex)
{
MessageBox.Show("无法调用ClassIsland点名:" + ex.Message);
MessageBox.Show("无法调用外部点名:" + ex.Message);
// 调用失败时回退到默认的随机点名窗口
new RandWindow(Settings, true).ShowDialog();