Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

导出整合包 复活 #4758

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
09e896d
:construction: 导出整合包:压缩包
youzi-2333 Jul 9, 2024
ad41b4e
:art: 修复工程设置问题
youzi-2333 Jul 9, 2024
87e1fb0
:bug: 修复导出压缩包的问题
youzi-2333 Jul 10, 2024
49db568
:sparkles: 导出整合包:Modrinth
youzi-2333 Jul 11, 2024
92f3018
:sparkles: 完成 UI
youzi-2333 Jul 11, 2024
bc58fda
Update Plain Craft Launcher 2/Pages/PageVersion/PageVersionExport.xam…
youzi-2333 Jul 11, 2024
a74e59b
:speech_balloon: 更新文案
youzi-2333 Jul 11, 2024
dce9892
:twisted_rightwards_arrows: Merge from remote
youzi-2333 Jul 11, 2024
05b175b
:rewind: 回滚 vbproj 文件
youzi-2333 Jul 11, 2024
b7118be
:speech_balloon: 修改包含存档的 Tooltip
youzi-2333 Jul 11, 2024
4c69def
:sparkles: 对齐 mr 整合包的输入框
youzi-2333 Jul 11, 2024
32803b1
:ok_hand: 排除 HMCL 版本配置
youzi-2333 Jul 11, 2024
ae4f1b8
:ok_hand: 排除 `log4j2.xml`
youzi-2333 Jul 11, 2024
b28c707
修改了导出整合包UI
luolinlin768 Jul 12, 2024
465a381
在基础选项里添加了服务器文件的选择,优化了基础选项里的排版
huchengtao736 Jul 12, 2024
c4974bb
删除了多余的换行
huchengtao736 Jul 12, 2024
82c398d
更改了一些错误,修改了标题,添加了提示,修改了间距
huchengtao736 Jul 12, 2024
bc5b37c
修改了文案
huchengtao736 Jul 12, 2024
1284f46
修改了“导出整合包”的和边界的距离,21改为20
huchengtao736 Jul 12, 2024
a1b9830
Revert "修改了“导出整合包”的和边界的距离,21改为20"
huchengtao736 Jul 12, 2024
6850cd6
修改了“包含启动器”和“启动器全局配置”的位置
huchengtao736 Jul 12, 2024
ca07edc
:construction: 修改一些龙猫的审查
youzi-2333 Jul 12, 2024
00fdf1f
:twisted_rightwards_arrows: Merge from luolinlin768/feat-98 to youzi-…
youzi-2333 Jul 12, 2024
33581b5
Merge branch 'luolinlin768-feat-98' into feat-98
youzi-2333 Jul 12, 2024
13d0cb7
:bug: 修复问题
youzi-2333 Jul 15, 2024
aacaf79
:bug: 修复图标设置的问题
youzi-2333 Jul 15, 2024
4547b81
:construction: 添加整合包描述的设置
youzi-2333 Jul 16, 2024
3bd39de
:bug: 修复整合包描述 Reload 时被覆盖的问题
youzi-2333 Jul 18, 2024
898f534
:children_crossing: 修复一些问题
youzi-2333 Jul 18, 2024
de9afd3
:construction: UI 设计(未完成)
youzi-2333 Jul 19, 2024
3d18a5a
:construction: UI 设计(未完成)
youzi-2333 Jul 21, 2024
43511b0
:bug: 空文件夹总是判定为被选中
youzi-2333 Jul 22, 2024
1095a33
:boom: :children_crossing: 显示部分选中的文件夹
youzi-2333 Jul 23, 2024
6808620
:bug: 空文件夹造成选中判断错误
youzi-2333 Jul 23, 2024
690e73e
:children_crossing: 优化弹出 explorer
youzi-2333 Jul 25, 2024
86bace4
:ok_hand: 修改 LTCatt 的审核
youzi-2333 Jul 31, 2024
ddfc689
:bug: 修复一些问题
youzi-2333 Aug 20, 2024
ef5b0ba
fix: 搁这最强大脑呢?
tangge233 Aug 20, 2024
37eacb0
comment: 同步下注释
tangge233 Aug 20, 2024
10e4bc0
:bug: Tag: resources -> resourcepacks
youzi-2333 Aug 20, 2024
f27822b
:speech_balloon: 高级选项提示文案
youzi-3222 Oct 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 23 additions & 7 deletions Plain Craft Launcher 2/Controls/MyListItem.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,16 @@
Return _Checked
End Get
Set(value As Boolean)
SetChecked(value, False, True)
SetChecked(value, False, True, _Half)
End Set
End Property
Private _Half As Boolean = False
Public Property Half As Boolean
Get
Return _Half
End Get
Set(value As Boolean)
SetChecked(_Checked, False, True, value)
End Set
End Property
''' <summary>
Expand All @@ -353,7 +362,8 @@
''' <param name="value">新的 Checked 属性。</param>
''' <param name="user">是否由用户引发。</param>
''' <param name="anime">是否执行动画。</param>
Public Sub SetChecked(value As Boolean, user As Boolean, anime As Boolean)
''' <param name="half">是否为部分选中。</param>
Public Sub SetChecked(value As Boolean, user As Boolean, anime As Boolean, Optional half As Boolean = False)
Try

'自定义属性基础
Expand All @@ -371,8 +381,9 @@
End If
_Checked = value
Else
If value = _Checked Then Exit Sub
If value = _Checked AndAlso half = _Half Then Exit Sub
_Checked = value
_Half = half
If IsInitialized Then
RaiseEvent Changed(Me, ChangedEventArgs)
If ChangedEventArgs.Handled Then
Expand Down Expand Up @@ -436,9 +447,9 @@
'由无变有
If Not IsNothing(RectCheck) Then
Dim Delta = ActualHeight - RectCheck.ActualHeight - 12
Anim.Add(AaHeight(RectCheck, Delta * 0.4, 200,, New AniEaseOutFluent(AniEasePower.Weak)))
Anim.Add(AaHeight(RectCheck, Delta * 0.6, 300,, New AniEaseOutBack(AniEasePower.Weak)))
Anim.Add(AaOpacity(RectCheck, 1 - RectCheck.Opacity, 30))
Anim.Add(AaHeight(RectCheck, Delta * If(half, 0.2, 0.4), 200,, New AniEaseOutFluent(AniEasePower.Weak)))
Anim.Add(AaHeight(RectCheck, Delta * If(half, 0.3, 0.6), 300,, New AniEaseOutBack(AniEasePower.Weak)))
Anim.Add(AaOpacity(RectCheck, If(half, 0.5, 1) - RectCheck.Opacity, 30))
RectCheck.VerticalAlignment = VerticalAlignment.Center
RectCheck.Margin = New Thickness(-1, 0, 0, 0)
End If
Expand All @@ -457,12 +468,17 @@
Else
'不使用动画
AniStop("MyListItem Checked " & Uuid)
If Checked Then

If Checked OrElse half Then
If Not IsNothing(RectCheck) Then
RectCheck.Height = Double.NaN
RectCheck.Margin = New Thickness(-1, 6, 0, 6)
RectCheck.Opacity = 1
RectCheck.VerticalAlignment = VerticalAlignment.Stretch
If half Then
RectCheck.Height = Height * 0.4
RectCheck.Opacity = 0.5
End If
End If
SetResourceReference(ForegroundProperty, If(Height < 40, "ColorBrush3", "ColorBrush2"))
Else
Expand Down
1 change: 1 addition & 0 deletions Plain Craft Launcher 2/FormMain.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,7 @@ Install:
VersionSetup = 1
VersionMod = 2
VersionModDisabled = 3
VersionExport = 4
End Enum
''' <summary>
''' 获取次级页面的名称。若并非次级页面则返回空字符串,故可以以此判断是否为次级页面。
Expand Down
4 changes: 4 additions & 0 deletions Plain Craft Launcher 2/Modules/Base/ModBase.vb
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ Public Module ModBase
''' </summary>
Public Const IconButtonOffline As String = "M533.293176 788.841412a60.235294 60.235294 0 1 1 85.202824 85.202823l-42.616471 42.586353c-129.355294 129.385412-339.124706 129.385412-468.510117 0-129.385412-129.385412-129.385412-339.124706 0-468.510117l42.586353-42.616471a60.235294 60.235294 0 1 1 85.202823 85.202824l-42.61647 42.586352a210.823529 210.823529 0 1 0 298.164706 298.164706l42.586352-42.61647z m255.548236-255.548236l42.61647-42.586352a210.823529 210.823529 0 1 0-298.164706-298.164706l-42.586352 42.61647a60.235294 60.235294 0 1 1-85.202824-85.202823l42.616471-42.586353c129.355294-129.385412 339.124706-129.385412 468.510117 0 129.385412 129.385412 129.385412 339.124706 0 468.510117l-42.586353 42.616471a60.235294 60.235294 0 1 1-85.202823-85.202824zM192.542118 192.542118a60.235294 60.235294 0 0 1 85.202823 0l553.712941 553.712941a60.235294 60.235294 0 0 1-85.202823 85.202823L192.542118 277.744941a60.235294 60.235294 0 0 1 0-85.202823z"
''' <summary>
''' 图标,向右箭头,1x
''' </summary>
Public Const IconButtonRight As String = "M757.792745 435.407215L419.597482 96.904967c-40.010393-40.010393-104.886579-40.010393-144.896972 0-40.010393 40.010393-40.010393 104.988908 0 144.9993L540.344959 507.855701 274.70051 773.807135c-40.010393 40.112721-40.010393 104.988908 0 144.9993 40.010393 40.010393 104.886579 40.010393 144.896972 0l338.092935-338.39992c40.112721-40.010393 40.112721-104.988908 0.102328-144.9993z"
''' <summary>
''' 图标,音符,1x
''' </summary>
Public Const IconMusic As String = "M348.293565 716.53287V254.797913c0-41.672348 28.004174-78.358261 68.919652-90.37913L815.994435 40.826435c62.775652-18.610087 125.907478 26.579478 125.907478 89.933913v539.158261c8.013913 42.25113-8.94887 89.177043-47.014956 127.109565a232.848696 232.848696 0 0 1-170.785392 65.758609c-61.885217-2.938435-111.081739-33.435826-129.113043-80.050087-18.031304-46.614261-2.137043-102.177391 41.672348-145.853218a232.848696 232.848696 0 0 1 170.785391-65.80313c21.014261 1.024 40.514783 5.164522 57.878261 12.065391V233.338435c0-12.109913-10.551652-20.034783-20.569044-20.034783a24.620522 24.620522 0 0 0-5.787826 0.934957L439.785739 338.18713a19.545043 19.545043 0 0 0-14.825739 19.144348v438.984348H423.846957c11.53113 43.987478-5.164522 94.208-45.412174 134.322087a232.848696 232.848696 0 0 1-170.785392 65.758609c-61.885217-2.938435-111.081739-33.435826-129.113043-80.050087-18.031304-46.614261-2.137043-102.177391 41.672348-145.853218a232.848696 232.848696 0 0 1 170.785391-65.80313c20.791652 1.024 40.069565 5.075478 57.299478 11.842783z"
Expand Down
16 changes: 10 additions & 6 deletions Plain Craft Launcher 2/Modules/Base/ModValidate.vb
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ Public Class ValidateFileName
Public Property IgnoreCase As Boolean = True
Public Property ParentFolder As String = Nothing
Public Property RequireParentFolderExists = True
Public Property AllowNull As Boolean = False
Public Sub New()
End Sub
Public Sub New(Name As String, Optional UseMinecraftCharCheck As Boolean = True, Optional IgnoreCase As Boolean = True)
Expand All @@ -269,14 +270,16 @@ Public Class ValidateFileName
End Sub
Public Overrides Function Validate(Str As String) As String
Try
'检查是否为空
Dim LengthCheck As String = New ValidateNullOrWhiteSpace().Validate(Str)
If Not LengthCheck = "" Then Return LengthCheck
If Not AllowNull Then
'检查是否为空
Dim NullCheck As String = New ValidateNullOrWhiteSpace().Validate(Str)
If Not NullCheck = "" Then Return NullCheck
End If
'检查空格
If Str.StartsWithF(" ") Then Return "文件名不能以空格开头!"
If Str.EndsWithF(" ") Then Return "文件名不能以空格结尾!"
'检查长度
LengthCheck = New ValidateLength(1, 253).Validate(Str & If(ParentFolder, ""))
Dim LengthCheck = New ValidateLength(If(AllowNull, 0, 1), 253).Validate(Str & If(ParentFolder, ""))
If Not LengthCheck = "" Then Return LengthCheck
'检查尾部小数点
If Str.EndsWithF(".") Then Return "文件名不能以小数点结尾!"
Expand Down Expand Up @@ -311,6 +314,7 @@ End Class
Public Class ValidateFolderPath
Inherits Validate
Public Property UseMinecraftCharCheck As Boolean = True
Public Property AllowNull As Boolean = False
Public Sub New()
End Sub
Public Sub New(UseMinecraftCharCheck As Boolean)
Expand All @@ -322,9 +326,9 @@ Public Class ValidateFolderPath
If Not Str.TrimEnd("\").EndsWithF(":") Then Str = Str.TrimEnd("\")
'检查是否为空
Dim LengthCheck As String = New ValidateNullOrWhiteSpace().Validate(Str)
If Not LengthCheck = "" Then Return LengthCheck
If Not AllowNull AndAlso Not LengthCheck = "" Then Return LengthCheck
'检查长度
LengthCheck = New ValidateLength(1, 254).Validate(Str)
LengthCheck = New ValidateLength(If(AllowNull, 0, 1), 254).Validate(Str)
If Not LengthCheck = "" Then Return LengthCheck
'检查开头
If Str.StartsWithF("\\Mac\") Then GoTo Fin
Expand Down
2 changes: 1 addition & 1 deletion Plain Craft Launcher 2/Modules/Minecraft/ModMod.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ Finished:
Next
WriteFile(PathTemp & "Cache\LocalMod.json", Cache.ToString(If(ModeDebug, Newtonsoft.Json.Formatting.Indented, Newtonsoft.Json.Formatting.None)))
End Sub
Private Function GetTargetModLoaders() As List(Of CompModLoaderType)
Public Function GetTargetModLoaders() As List(Of CompModLoaderType)
Dim ModLoaders As New List(Of CompModLoaderType)
If PageVersionLeft.Version.Version.HasForge Then ModLoaders.Add(CompModLoaderType.Forge)
If PageVersionLeft.Version.Version.HasNeoForge Then ModLoaders.Add(CompModLoaderType.NeoForge)
Expand Down
Loading