Răsfoiți Sursa

:construction: 添加整合包描述的设置

youzi-2333 2 ani în urmă
părinte
comite
4547b81d68

+ 9 - 4
Plain Craft Launcher 2/Modules/Minecraft/ModModpack.vb

@@ -886,15 +886,19 @@ Retry:
         ''' </summary>
         Public Remain As String()
         ''' <summary>
-        ''' 是否需要保留 PCL 全局设置。仅在压缩包中有效。
+        ''' 是否需要保留 PCL 全局设置。仅在包括 PCL 时有效。
         ''' </summary>
         Public PCLSetupGlobal As Boolean = True
         ''' <summary>
-        ''' 整合包名称。仅在 Modrinth 有效。
+        ''' 整合包名称。
         ''' </summary>
         Public Name As String = ""
         ''' <summary>
-        ''' 版本号。仅在 Modrinth 有效。
+        ''' 整合包描述。
+        ''' </summary>
+        Public Desc As String = ""
+        ''' <summary>
+        ''' 版本号。
         ''' </summary>
         Public VerID As String = ""
         Public Sub New(Version As McVersion,
@@ -903,7 +907,7 @@ Retry:
                        Remain As String(),
                        Optional PCLSetupGlobal As Boolean = True,
                        Optional Name As String = "",
-                       Optional Author As String = "",
+                       Optional Desc As String = "",
                        Optional VerID As String = "")
             Me.Version = Version
             Me.Dest = Dest
@@ -911,6 +915,7 @@ Retry:
             Me.Remain = Remain
             Me.PCLSetupGlobal = PCLSetupGlobal
             Me.Name = Name
+            Me.Desc = Desc
             Me.VerID = VerID
         End Sub
     End Class

+ 8 - 7
Plain Craft Launcher 2/Pages/PageVersion/PageVersionExport.xaml

@@ -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>

+ 7 - 4
Plain Craft Launcher 2/Pages/PageVersion/PageVersionExport.xaml.vb

@@ -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 的路径。