This commit is contained in:
2025-08-24 00:05:26 +08:00
parent bd4e1c1810
commit 83529cfe09
3 changed files with 38 additions and 13 deletions
@@ -997,7 +997,7 @@ namespace Ink_Canvas
{ {
Process.Start(new ProcessStartInfo Process.Start(new ProcessStartInfo
{ {
FileName = "classisland://plugins/IslandCaller/Run", FileName = "classisland://plugins/IslandCaller/Simple/1",
UseShellExecute = true UseShellExecute = true
}); });
} }
+16 -8
View File
@@ -103,14 +103,22 @@
<TextBlock Text="开抽" Foreground="White" FontSize="32" Margin="-1,-1,4,0" VerticalAlignment="Center"/> <TextBlock Text="开抽" Foreground="White" FontSize="32" Margin="-1,-1,4,0" VerticalAlignment="Center"/>
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</Border> </Border>
<Border x:Name="BorderBtnIslandCaller" MouseUp="BorderBtnIslandCaller_MouseUp" Background="#00B894" Height="50" Width="200" CornerRadius="25" Margin="0,16,0,0"> <ui:SimpleStackPanel Orientation="Horizontal" Spacing="8" Margin="0,16,0,0" HorizontalAlignment="Center">
<ui:SimpleStackPanel Margin="3,0" Spacing="12" Orientation="Horizontal" HorizontalAlignment="Center"> <ComboBox Name="ComboBoxCallerType" Width="120" Height="50" VerticalAlignment="Center"
<Viewbox Margin="0,10"> IsEditable="False" IsReadOnly="True" SelectedIndex="0">
<ui:SymbolIcon Symbol="Globe" Foreground="White"/> <ComboBoxItem>ClassIsland点名</ComboBoxItem>
</Viewbox> <ComboBoxItem>SecRandom点名</ComboBoxItem>
<TextBlock Text="ClassIsland点名" Foreground="White" FontSize="18" Margin="-1,-1,4,0" VerticalAlignment="Center"/> <ComboBoxItem>NamePicker点名</ComboBoxItem>
</ui:SimpleStackPanel> </ComboBox>
</Border> <Border x:Name="BorderBtnExternalCaller" MouseUp="BorderBtnExternalCaller_MouseUp" Background="#00B894" Height="50" Width="120" CornerRadius="25">
<ui:SimpleStackPanel Margin="3,0" Spacing="8" Orientation="Horizontal" HorizontalAlignment="Center">
<Viewbox Margin="0,10">
<ui:SymbolIcon Symbol="Globe" Foreground="White"/>
</Viewbox>
<TextBlock Text="外部点名" Foreground="White" FontSize="16" Margin="-1,-1,4,0" VerticalAlignment="Center"/>
</ui:SimpleStackPanel>
</Border>
</ui:SimpleStackPanel>
</ui:SimpleStackPanel> </ui:SimpleStackPanel>
</Grid> </Grid>
<Border UseLayoutRounding="True" Canvas.Bottom="8" Canvas.Right="8" x:Name="BorderBtnHelp" MouseUp="BorderBtnHelp_MouseUp" Background="#FBFBFD" Grid.Column="1" Margin="10,10,60,10" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Right" CornerRadius="20"> <Border UseLayoutRounding="True" Canvas.Bottom="8" Canvas.Right="8" x:Name="BorderBtnHelp" MouseUp="BorderBtnHelp_MouseUp" Background="#FBFBFD" Grid.Column="1" Margin="10,10,60,10" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Right" CornerRadius="20">
+21 -4
View File
@@ -295,13 +295,13 @@ namespace Ink_Canvas
// 将 isIslandCallerFirstClick 设为静态字段,实现全局记录 // 将 isIslandCallerFirstClick 设为静态字段,实现全局记录
private static bool isIslandCallerFirstClick = true; private static bool isIslandCallerFirstClick = true;
private void BorderBtnIslandCaller_MouseUp(object sender, MouseButtonEventArgs e) private void BorderBtnExternalCaller_MouseUp(object sender, MouseButtonEventArgs e)
{ {
if (isIslandCallerFirstClick) if (isIslandCallerFirstClick)
{ {
MessageBox.Show( MessageBox.Show(
"首次使用ClassIsland点名功能,请确保已安装ClassIsland和Island caller插件。\n" + "首次使用外部点名功能,请确保已安装相应的点名软件。\n" +
"如未安装,请前往官网下载并安装后再使用。如果安装请再次点击此按钮。", "如未安装,请前往官网下载并安装后再使用。如果安装请再次点击此按钮。",
"提示", MessageBoxButton.OK, MessageBoxImage.Information); "提示", MessageBoxButton.OK, MessageBoxImage.Information);
isIslandCallerFirstClick = false; isIslandCallerFirstClick = false;
return; return;
@@ -309,9 +309,26 @@ namespace Ink_Canvas
try try
{ {
string protocol = "";
switch (ComboBoxCallerType.SelectedIndex)
{
case 0: // ClassIsland点名
protocol = "classisland://plugins/IslandCaller/Simple/1";
break;
case 1: // SecRandom点名
protocol = "secrandom://pumping?action=start";
break;
case 2: // NamePicker点名
protocol = "namepicker://调起没有浮窗的NamePicker";
break;
default:
protocol = "classisland://plugins/IslandCaller/Simple/1";
break;
}
Process.Start(new ProcessStartInfo Process.Start(new ProcessStartInfo
{ {
FileName = "classisland://plugins/IslandCaller/Run", FileName = protocol,
UseShellExecute = true UseShellExecute = true
}); });
} }