mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 02:55:38 +08:00
更新GUI,完成自动关机功能
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:MeoAsstGui"
|
||||
mc:Ignorable="d"
|
||||
Title="Meo明日方舟辅助" Height="500" Width="400" Loaded="OnLoaded">
|
||||
Title="Meo明日方舟辅助" Height="520" Width="410" Loaded="OnLoaded">
|
||||
<Grid>
|
||||
<CheckBox x:Name="checkBox_useMedicine" Content="吃理智药" HorizontalAlignment="Left" Margin="50,100,0,0" VerticalAlignment="Top" Checked="checkBox_useMedicine_Checked" Unchecked="checkBox_useMedicine_Checked" IsChecked="True"/>
|
||||
<CheckBox x:Name="checkBox_useStone" Content="吃石头" HorizontalAlignment="Left" Margin="50,150,0,0" VerticalAlignment="Top" Checked="checkBox_useStone_Checked" Unchecked="checkBox_useStone_Checked"/>
|
||||
<TextBox x:Name="textBox_useStone" HorizontalAlignment="Left" Height="23" Margin="112,148,0,0" TextWrapping="Wrap" Text="0" VerticalAlignment="Top" Width="47" TextChanged="textBox_useStone_TextChanged" InputMethod.IsInputMethodEnabled="False"/>
|
||||
<Label x:Name="label_stoneNumber" Content="颗" HorizontalAlignment="Left" Margin="164,144,0,0" VerticalAlignment="Top" RenderTransformOrigin="-5.771,-6.291"/>
|
||||
<Button x:Name="button_startSanity" Content="开始刷理智" HorizontalAlignment="Left" Margin="51,300,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_startSanity"/>
|
||||
<Button x:Name="button_startSanity" Content="开始刷理智" HorizontalAlignment="Left" Margin="50,300,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_startSanity"/>
|
||||
<Button x:Name="button_stop" Content="停止" HorizontalAlignment="Left" Margin="50,380,0,0" VerticalAlignment="Top" Width="300" Height="50" Click="button_Click_stop"/>
|
||||
<Label x:Name="catch_status" Content="" HorizontalAlignment="Left" Margin="50,30,0,0" VerticalAlignment="Top"/>
|
||||
<Button x:Name="button_visit" Content="访问基建" HorizontalAlignment="Left" Margin="230,300,0,0" VerticalAlignment="Top" Width="120" Height="50" Click="button_Click_visit"/>
|
||||
|
||||
@@ -29,9 +29,9 @@ namespace MeoAsstGui
|
||||
[DllImport("MeoAssistance.dll")] static private extern void AsstStart(IntPtr ptr, string task);
|
||||
[DllImport("MeoAssistance.dll")] static private extern void AsstStop(IntPtr ptr);
|
||||
[DllImport("MeoAssistance.dll")] static private extern bool AsstSetParam(IntPtr p_asst, string type, string param, string value);
|
||||
[DllImport("MeoAssistance.dll")]
|
||||
[DllImport("MeoAssistance.dll")]
|
||||
static private extern bool AsstGetParam(
|
||||
IntPtr p_asst, string type, string param,
|
||||
IntPtr p_asst, string type, string param,
|
||||
[In, Out] StringBuilder lp_string, int buffer_size);
|
||||
|
||||
|
||||
@@ -138,10 +138,16 @@ namespace MeoAsstGui
|
||||
if (int.Parse(buff_running.ToString()) == 0)
|
||||
{
|
||||
update_times.Stop();
|
||||
label_status.Content = "已完成,自动停止";
|
||||
label_status.Content = "已刷完,自动停止";
|
||||
if (checkBox_shutdown.IsChecked == true)
|
||||
{
|
||||
// TODO:弹窗确认,倒计时,准备关机
|
||||
System.Diagnostics.Process.Start("shutdown.exe", "-s -t 60");
|
||||
|
||||
MessageBoxResult result = MessageBox.Show("已刷完,即将关机,是否取消?", "提示", MessageBoxButton.OK);
|
||||
if (result == MessageBoxResult.OK)
|
||||
{
|
||||
System.Diagnostics.Process.Start("shutdown.exe", "-a");
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
Title="有新版本" Height="500" Width="400">
|
||||
<Grid>
|
||||
<Label x:Name="label_tag" Content="" HorizontalAlignment="Center" Margin="10,25,10.333,0" VerticalAlignment="Top" Height="50" Width="373" FontSize="24"/>
|
||||
<Label x:Name="label_body" Content="" HorizontalAlignment="Left" Margin="50,80,0,0" VerticalAlignment="Top" Height="281" Width="290" FontSize="16"/>
|
||||
<Label x:Name="label_body" Content="" HorizontalAlignment="Left" Margin="50,80,-656.667,0" VerticalAlignment="Top" Height="281" Width="1000" FontSize="16"/>
|
||||
<Button x:Name="button_confirm" Content="前往下载" HorizontalAlignment="Left" Margin="50,366,0,0" VerticalAlignment="Top" Width="120" Height="60" Click="button_confirm_Click"/>
|
||||
<Button x:Name="button_cancer" Content="下次一定" HorizontalAlignment="Left" Margin="220,366,0,0" VerticalAlignment="Top" Width="120" Height="60" Click="button_cancer_Click"/>
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ A game assistance for Arknights
|
||||
- 可设置是否吃完理智药
|
||||
- 可设置是否吃石头以及数量
|
||||
- 可设置刷的次数(可以用来刷剿灭)
|
||||
- 可设置刷完自动关机
|
||||
- 支持剿灭模式
|
||||
- 支持打完升级了的情况
|
||||
- 支持代理失败的情况,会自动放弃本次行动
|
||||
@@ -102,7 +103,7 @@ A game assistance for Arknights
|
||||
- [x] 基本图形化界面
|
||||
- [ ] 图形化界面进一步完善
|
||||
- [ ] 日志打印,错误提示
|
||||
- [ ] 刷完自动关机功能
|
||||
- [x] 刷完自动关机功能
|
||||
- [ ] ~~操作随机延时支持设置~~
|
||||
- [ ] 刷理智
|
||||
- [x] 支持剿灭
|
||||
|
||||
Reference in New Issue
Block a user