Skip to content

Commit

Permalink
feat:SodaCheckBox 更新
Browse files Browse the repository at this point in the history
  • Loading branch information
HRxiaohu committed Jan 30, 2025
1 parent 370591d commit 319afcc
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions Controls/SodaCheckBox.xaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<UserControl x:Class="SodaCL.Controls.SodaCheckBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SodaCL.Controls"
mc:Ignorable="d"
d:DesignHeight="40" d:DesignWidth="125" Loaded="Border_Loaded" VerticalAlignment="Center" HorizontalAlignment="Center">
<Border Name="CheckBox_BgBorder" d:Background="Black" CornerRadius="22" RenderTransformOrigin="{Binding ElementName=CheckBox_Border, Path=RenderTransformOrigin}" Background="{Binding ElementName=CheckBox_Border, Path=Background}" Width="{Binding ElementName=CheckBox_Border, Path=ActualWidth}" Height="{Binding ElementName=CheckBox_Border, Path=ActualHeight}">
<Border Name="CheckBox_BgBorder" d:Background="Black" CornerRadius="22" RenderTransformOrigin="{Binding ElementName=CheckBox_Border, Path=RenderTransformOrigin}" Background="{Binding ElementName=CheckBox_Border, Path=Background}" Width="{Binding ElementName=CheckBox_Border, Path=ActualWidth}" Height="{Binding ElementName=CheckBox_Border, Path=ActualHeight}" HorizontalAlignment="Center" VerticalAlignment="Center">
<Border Name="CheckBox_Border" CornerRadius="20" RenderTransformOrigin="0.5,0.5" Height="40" Width="125"
Background="{DynamicResource Brush_Main}" BorderBrush="{DynamicResource Brush_Main}" BorderThickness="4"
MouseLeftButtonUp="Btn_Border_MouseLeftButtonUp" MouseEnter="Btn_MouseEnter" MouseLeave="Btn_Border_MouseLeave" MouseDown="Btn_Border_MouseDown" MouseUp="Btn_Border_MouseUp" HorizontalAlignment="Center" VerticalAlignment="Center">
Expand All @@ -18,4 +18,4 @@
<ScaleTransform x:Name="CheckBox_BgBorder_Scale" />
</Border.RenderTransform>
</Border>
</UserControl>
</UserControl>
2 changes: 1 addition & 1 deletion MainPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<TextBlock Text="Minecraft 11.45.14" Margin="20,5,0,0" FontSize="14" Height="20" />
</StackPanel>
<StackPanel Height="48" DockPanel.Dock="Right" Orientation="Horizontal" Margin="0,0,20,0" VerticalAlignment="Center">
<soda:SodaCheckBox Margin="0,0,15,0" />
<soda:SodaCheckBox Margin="0,0,15,0" Width="120" Height="40" />
<soda:SodaButton Width="80" Margin="0,0,15,0" Text="Java 测试" Click="EnvironmentCheckButtonClick" />
<soda:SodaButton Width="40" Margin="0,0,15,0" Text="Log" Click="LogFolderOpenerButtonClick" />
<soda:SodaButton x:Name="StartBtn" Width="120" Text="{DynamicResource MainPage_StartGame}" Click="StartBtn_Click" Height="45" ButtonType="Main" />
Expand Down
4 changes: 2 additions & 2 deletions Toolkits/DataTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static void ExtractFile(string resource, string path) {
var res = assembly.GetManifestResourceStream(resource);
var input = new BufferedStream(res);
var output = new FileStream(path, FileMode.Create);
byte[] data = new byte[1024];
var data = new byte[1024];
int lengthEachRead;
while ((lengthEachRead = input.Read(data, 0, data.Length)) > 0) {
output.Write(data, 0, lengthEachRead);
Expand All @@ -30,7 +30,7 @@ public static void ExtractFile(string resource, string path) {
}
catch (Exception ex) {
Logger.Log(false, Logger.ModuleList.IO, Logger.LogInfo.Error, "释放资源文件失败。", ex);
throw ex;
throw;
}
}

Expand Down
4 changes: 2 additions & 2 deletions Toolkits/Setting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public static void SettingInit() {
var xml = new XmlTool(SODACL_SETTINGS);
xml.CreateNode("Settings");
}
catch (Exception ex) {
throw ex;
catch {
throw;
}
}

Expand Down
2 changes: 1 addition & 1 deletion Toolkits/XmlTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public XmlTool(string path) {
}
catch (XmlException ex) {
Logger.Log(false, Logger.ModuleList.IO, Logger.LogInfo.Error, null, ex);
throw ex;
throw;
}
}

Expand Down

0 comments on commit 319afcc

Please sign in to comment.