Skip to content

Commit

Permalink
清理, 以及版本号调至0.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Saplonily committed Jan 6, 2023
1 parent d8499a8 commit 5bc229b
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 58 deletions.
2 changes: 1 addition & 1 deletion SaladimQBot.Core/SaladimQBot.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Title>SaladimQBot.Core</Title>
<Authors>Saplonily</Authors>
<PackAsTool>False</PackAsTool>
<Version>0.4.0</Version>
<Version>0.4.1</Version>
<PackageProjectUrl>https://github.com/saladim-org/Saladim.QBot</PackageProjectUrl>
<RepositoryUrl>https://github.com/saladim-org/Saladim.QBot</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
2 changes: 1 addition & 1 deletion SaladimQBot.Extensions/SaladimQBot.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<LangVersion>preview</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Version>0.4.0</Version>
<Version>0.4.1</Version>
<Title>SaladimQBot.Extensions</Title>
<Authors>Saplonily</Authors>
<Company>Saplonily</Company>
Expand Down
2 changes: 1 addition & 1 deletion SaladimQBot.GoCqHttp/SaladimQBot.GoCqHttp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Title>SaladimQBot.GoCqHttp</Title>
<Authors>Saplonily</Authors>
<PackAsTool>False</PackAsTool>
<Version>0.4.0</Version>
<Version>0.4.1</Version>
<PackageProjectUrl>https://github.com/saladim-org/Saladim.QBot</PackageProjectUrl>
<RepositoryUrl>https://github.com/saladim-org/Saladim.QBot</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
2 changes: 1 addition & 1 deletion SaladimQBot.Shared/SaladimQBot.Shared.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Title>SaladimQBot.Shared</Title>
<Authors>Saplonily</Authors>
<PackAsTool>False</PackAsTool>
<Version>0.4.0</Version>
<Version>0.4.1</Version>
<PackageProjectUrl>https://github.com/saladim-org/Saladim.QBot</PackageProjectUrl>
<RepositoryUrl>https://github.com/saladim-org/Saladim.QBot</RepositoryUrl>
<RepositoryType>git</RepositoryType>
Expand Down
24 changes: 2 additions & 22 deletions SaladimWpf/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,6 @@
</StackPanel>
</Border>
</TabItem>
<TabItem Header="猜数自动机控制" HorizontalAlignment="Center">
<Border Padding="10">
<StackPanel>
<WrapPanel Margin="5">
<CheckBox x:Name="GuessNumBotCheckBox"
Content="猜数自动机开启状态"
VerticalAlignment="Center"
VerticalContentAlignment="Center"
Checked="GuessNumBotCheckBox_Checked"
Unchecked="GuessNumBotCheckBox_Unchecked"
Style="{StaticResource MaterialDesignCheckBox}"/>
</WrapPanel>
<WrapPanel Margin="5">
<TextBlock Text="猜数延迟(ms):" TextAlignment="Center" VerticalAlignment="Center"/>
<TextBox x:Name="GuessNumBotDelayTextBox" Text="" MinWidth="120" Margin="5"/>
<Button x:Name="UpdateGuessNumBotDelay" Content="更新延迟" Click="UpdateGuessNumBotDelay_Click"
Style="{StaticResource MaterialDesignFlatButton}"/>
</WrapPanel>
</StackPanel>
</Border>
</TabItem>
</TabControl>
<TextBlock Text="控制台日志" TextAlignment="Center" VerticalAlignment="Center" FontSize="20"/>
<TextBox Grid.Row="1" Grid.Column="0"
Expand All @@ -89,7 +68,8 @@
Style="{StaticResource MaterialDesignTextBox}"
Foreground="Black"
BorderBrush="Gray" BorderThickness="1"
HorizontalScrollBarVisibility="Auto"/>
HorizontalScrollBarVisibility="Auto"
/>
</Grid>
</Grid>
</Window>
28 changes: 0 additions & 28 deletions SaladimWpf/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,41 +34,13 @@ public MainWindow()

}

private void UpdateGuessNumBotDelay_Click(object sender, RoutedEventArgs e)
{
e.Handled = true;
if (int.TryParse(GuessNumBotDelayTextBox.Text, out int v))
{
swpfService.GuessNumberBotDelay = v;
logger.LogInfo("WpfConsole", $"更新完成! 延迟为{v}ms");
}
else
{
logger.LogInfo("WpfConsole", $"更新失败! 解析值时出错");
}
}

private void ClearOutPutButton_Click(object sender, RoutedEventArgs e)
{
e.Handled = true;
TextBoxLogging.Text = "";
logger.LogInfo("WpfConsole", "Wpf控制台清空完成.");
}

private void GuessNumBotCheckBox_Checked(object sender, RoutedEventArgs e)
{
e.Handled = true;
swpfService.OpenGuessNumberBot = true;
logger.LogInfo("WpfConsole", "开启自动猜数.");
}

private void GuessNumBotCheckBox_Unchecked(object sender, RoutedEventArgs e)
{
e.Handled = true;
swpfService.OpenGuessNumberBot = false;
logger.LogInfo("WpfConsole", "关闭自动猜数.");
}

private async void ClientStateCheckBox_Checked(object sender, RoutedEventArgs e)
{
e.Handled = true;
Expand Down
4 changes: 0 additions & 4 deletions SaladimWpf/Services/SaladimWpfService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ public class SaladimWpfService : IClientService

public IClient Client { get; }

public bool OpenGuessNumberBot { get; set; }

public int GuessNumberBotDelay { get; set; }

public SaladimWpfService(
SaladimWpfServiceConfig config,
SalLoggerService loggerService,
Expand Down

0 comments on commit 5bc229b

Please sign in to comment.