🔥 删除 Logo 相关代码
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
Imports System.IO.Compression
|
||||
Imports System.Linq.Expressions
|
||||
Imports NAudio.Wave.SampleProviders
|
||||
Imports PCL.ModLoader
|
||||
|
||||
Public Module ModModpack
|
||||
|
||||
@@ -1011,6 +1009,7 @@ Retry:
|
||||
Log($"[Export] 导出整合包(Modrinth):{Version.Path} -> {DestPath},额外版本文件 {Additional.Count} 个")
|
||||
Dim tempDir As String = $"{ExpTempDir}{GetUuid()}\"
|
||||
Log($"[Export] 缓存文件夹:{tempDir}")
|
||||
DeleteDirectory(tempDir)
|
||||
Directory.CreateDirectory(tempDir)
|
||||
|
||||
#Region "0.04-0.40:从 Modrinth 获取 Mod 工程信息,得到 URL"
|
||||
@@ -1074,7 +1073,7 @@ Retry:
|
||||
#End Region
|
||||
|
||||
JumpMod:
|
||||
#Region "0.80-0.90:合并下载链接,写入 Json 文件"
|
||||
#Region "0.80-0.90:合并下载链接,复制 Logo,写入 Json 文件"
|
||||
'获取作为检查目标的加载器和版本
|
||||
Dim ModLoaders = GetTargetModLoaders()
|
||||
Dim McVersion = Version.Version.McName
|
||||
@@ -1111,7 +1110,12 @@ JumpMod:
|
||||
})
|
||||
End If
|
||||
Next
|
||||
Task.Progress = 0.87
|
||||
Task.Progress = 0.86
|
||||
'If Not String.IsNullOrEmpty(Logo) Then
|
||||
' Dim LogoObj As New MyBitmap(Logo)
|
||||
' LogoObj.Save(tempDir & "Logo.png")
|
||||
'End If
|
||||
'Task.Progress = 0.88
|
||||
|
||||
Dim depend As New JObject From {{"minecraft", McVersion}}
|
||||
If Version.Version.HasForge Then depend.Add("forge", Version.Version.ForgeVersion)
|
||||
@@ -1127,6 +1131,7 @@ JumpMod:
|
||||
{"files", files},
|
||||
{"dependencies", depend}
|
||||
}
|
||||
'If Not String.IsNullOrEmpty(Logo) Then json.Add("logo", tempDir & "Logo.png")
|
||||
|
||||
File.WriteAllText(tempDir & "modrinth.index.json", json.ToString)
|
||||
Task.Progress = 0.9
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
PanScroll="{Binding ElementName=PanBack}">
|
||||
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
|
||||
<StackPanel Margin="25,10">
|
||||
<local:MyHint Margin="0,10,0,0" IsWarn="False" Text="当前页面导出的整合包是 Modrinth 格式(.mrpack)。" />
|
||||
|
||||
<local:MyCard Margin="0,15" Title="导出预览">
|
||||
<StackPanel Margin="25,38,15,15">
|
||||
@@ -29,8 +30,8 @@
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
<!--<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />-->
|
||||
<RowDefinition Height="9" />
|
||||
<RowDefinition Height="28" />
|
||||
</Grid.RowDefinitions>
|
||||
@@ -38,7 +39,7 @@
|
||||
<local:MyTextBox Grid.Row="0" x:Name="TbExportName" Grid.ColumnSpan="2" Grid.Column="1" MaxLength="100" ShowValidateResult="True" />
|
||||
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="整合包版本" Margin="0,0,25,0" />
|
||||
<local:MyTextBox Grid.Row="2" x:Name="TbExportVersion" HintText="1.0.0" Grid.ColumnSpan="2" Tag="VersionArgumentTitle" Grid.Column="1" MaxLength="100" />
|
||||
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="图标" Margin="0,0,25,0" />
|
||||
<!--<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="自定义..." />
|
||||
@@ -54,9 +55,9 @@
|
||||
<local:MyComboBoxItem Content="鸡蛋" Tag="pack://application:,,,/images/Blocks/Egg.png" />
|
||||
<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="6" VerticalAlignment="Center" HorizontalAlignment="Left" Text="描述" Margin="0,0,25,0" />
|
||||
<local:MyTextBox Grid.Row="6" x:Name="TbExportDesc" Grid.ColumnSpan="2" Grid.Column="1" TextWrapping="Wrap" VerticalContentAlignment="Top" Padding="0,5" />
|
||||
</local:MyComboBox>-->
|
||||
<TextBlock Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Text="描述" Margin="0,0,25,0" />
|
||||
<local:MyTextBox Grid.Row="4" x:Name="TbExportDesc" Grid.ColumnSpan="2" Grid.Column="1" TextWrapping="Wrap" VerticalContentAlignment="Top" Padding="0,5" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</local:MyCard>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
TbExportName.Text = ""
|
||||
TbExportVersion.Text = ""
|
||||
ComboDisplayLogo.SelectedIndex = 0
|
||||
'ComboDisplayLogo.SelectedIndex = 0
|
||||
CustomLogoVal = Nothing
|
||||
TbExportDesc.Text = ""
|
||||
End If
|
||||
@@ -270,17 +270,17 @@
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub ComboDisplayLogo_SelectionChanged(sender As MyComboBox, e As SelectionChangedEventArgs) Handles ComboDisplayLogo.SelectionChanged
|
||||
If Not AniControlEnabled = 0 Then Exit Sub
|
||||
'选择 自定义 时修改图片
|
||||
If ComboDisplayLogo.SelectedItem Is ItemDisplayLogoCustom Then
|
||||
Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpg;*.gif)|*.png;*.jpg;*.gif", "选择图片")
|
||||
If String.IsNullOrWhiteSpace(FileName) Then Exit Sub
|
||||
CustomLogo = FileName
|
||||
Else
|
||||
CustomLogo = sender.SelectedItem.Tag
|
||||
End If
|
||||
End Sub
|
||||
'Private Sub ComboDisplayLogo_SelectionChanged(sender As MyComboBox, e As SelectionChangedEventArgs) Handles ComboDisplayLogo.SelectionChanged
|
||||
' If Not AniControlEnabled = 0 Then Exit Sub
|
||||
' '选择 自定义 时修改图片
|
||||
' If ComboDisplayLogo.SelectedItem Is ItemDisplayLogoCustom Then
|
||||
' Dim FileName As String = SelectFile("常用图片文件(*.png;*.jpg;*.gif)|*.png;*.jpg;*.gif", "选择图片")
|
||||
' If String.IsNullOrWhiteSpace(FileName) Then Exit Sub
|
||||
' CustomLogo = FileName
|
||||
' Else
|
||||
' CustomLogo = sender.SelectedItem.Tag
|
||||
' End If
|
||||
'End Sub
|
||||
#End Region
|
||||
|
||||
#Region "基本信息"
|
||||
|
||||
Reference in New Issue
Block a user