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