🚧 添加整合包描述的设置

This commit is contained in:
youzi-2333
2024-07-16 13:18:41 +08:00
parent aacaf792ef
commit 4547b81d68
3 changed files with 24 additions and 15 deletions
@@ -28,14 +28,15 @@
<RowDefinition Height="9" />
<RowDefinition Height="28" />
<RowDefinition Height="9" />
<RowDefinition Height="6" />
<RowDefinition Height="28" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="整合包名称" Margin="0,0,25,0" />
<local:MyTextBox Grid.Row="0" x:Name="TbExportName" Grid.ColumnSpan="2" Tag="VersionArgumentTitle" Grid.Column="1" MaxLength="100" />
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="图标" Margin="0,0,25,0" />
<local:MyComboBox x:Name="ComboDisplayLogo" Grid.Row="2" Grid.ColumnSpan="2" Grid.Column="1">
<local:MyTextBox Grid.Row="0" x:Name="TbExportName" Grid.ColumnSpan="2" Grid.Column="1" MaxLength="100" />
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="描述" Margin="0,0,25,0" />
<local:MyTextBox Grid.Row="2" x:Name="TbExportDesc" Grid.ColumnSpan="2" Grid.Column="1" MaxLength="100" />
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="图标" Margin="0,0,25,0" />
<local:MyComboBox x:Name="ComboDisplayLogo" Grid.Row="4" Grid.ColumnSpan="2" Grid.Column="1">
<local:MyComboBoxItem Content="自动" IsSelected="True" Tag="" />
<!-- 此处需要添加一个自定义图标 -->
<local:MyComboBoxItem x:Name="ItemDisplayLogoCustom" Content="自定义..." />
<local:MyComboBoxItem Content="圆石" Tag="pack://application:,,,/images/Blocks/CobbleStone.png" />
<local:MyComboBoxItem Content="命令方块" Tag="pack://application:,,,/images/Blocks/CommandBlock.png" />
@@ -50,8 +51,8 @@
<local:MyComboBoxItem Content="布料(Fabric)" Tag="pack://application:,,,/images/Blocks/Fabric.png" />
<local:MyComboBoxItem Content="狐狸(NeoForge)" Tag="pack://application:,,,/images/Blocks/NeoForge.png" />
</local:MyComboBox>
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="整合包版本" Margin="0,0,25,0" />
<local:MyTextBox Grid.Row="4" x:Name="TbExportVersion" HintText="1.0.0" Grid.ColumnSpan="2" Tag="VersionArgumentTitle" Grid.Column="1" MaxLength="100" />
<TextBlock Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Text="整合包版本" Margin="0,0,25,0" />
<local:MyTextBox Grid.Row="6" x:Name="TbExportVersion" HintText="1.0.0" Grid.ColumnSpan="2" Tag="VersionArgumentTitle" Grid.Column="1" MaxLength="100" />
</Grid>
</StackPanel>
</local:MyCard>
@@ -1,8 +1,5 @@
Imports System.Runtime.CompilerServices
Public Class PageVersionExport
Public Class PageVersionExport
Private Sub PageVersionExport_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
TbExportName.HintText = PageVersionLeft.Version.Name
Reload()
End Sub
@@ -10,6 +7,8 @@ Public Class PageVersionExport
Public Sub Reload()
AniControlEnabled += 1
TbExportName.HintText = PageVersionLeft.Version.Name
TbExportDesc.HintText = PageVersionLeft.Version.Info
PanDisplayItem.Children.Clear()
ItemVersion = PageSelectRight.McVersionListItem(PageVersionLeft.Version.Load())
ItemVersion.IsHitTestVisible = False
@@ -38,6 +37,10 @@ Public Class PageVersionExport
ItemVersion.Title = If(String.IsNullOrWhiteSpace(sender.Text), PageVersionLeft.Version.Name, sender.Text)
End Sub
Private Sub TbExportDesc_TextChanged(sender As MyTextBox, e As TextChangedEventArgs) Handles TbExportDesc.TextChanged
ItemVersion.Info = If(String.IsNullOrWhiteSpace(sender.Text), PageVersionLeft.Version.Info, sender.Text)
End Sub
Private CustomLogoVal As String
''' <summary>
''' 自定义 Logo 的路径。