Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
77215b7
feat(MyMsgInput):支持执行代码
LinQingYuu Mar 4, 2025
7682cd8
Fix(MyMsgInput):按下 Button3 会执行 Button2 的事件
LinQingYuu Mar 5, 2025
b8159af
chore(MyMsgInput):移除无用代码
LinQingYuu Mar 5, 2025
497a6d8
Fix
LinQingYuu Mar 5, 2025
2ac3085
Merge pull request #9 from Hex-Dragon/main
LinQingYuu Mar 18, 2025
84a6863
pref(ModMinecraft、PageDownloadInstall、PageDownloadClient):自动识别和添加基本描述
LinQingYuu Apr 2, 2025
0d3c34d
chore:忘记更新代码了
LinQingYuu Apr 2, 2025
98d0081
fix(ModMinecraft):少加了一个参数 QWQ
LinQingYuu Apr 2, 2025
477968e
Update Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
LinQingYuu Apr 2, 2025
1e693d9
Update Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
LinQingYuu Apr 2, 2025
7b5c9af
Update Plain Craft Launcher 2/Modules/Minecraft/ModMinecraft.vb
LinQingYuu Apr 2, 2025
d564a87
Merge branch 'main' into auto-fool-sort
LinQingYuu Apr 2, 2025
b14638b
fix(ModMinecraft):改一下
LinQingYuu Apr 2, 2025
edef0a9
Revert: fix(ModMinecraft):改一下
LinQingYuu Apr 3, 2025
5d61a00
Merge branch 'main' into auto-fool-sort
LinQingYuu Apr 14, 2025
635079a
Merge pull request #20 from Hex-Dragon/main
LinQingYuu Apr 26, 2025
bf4e0bf
Merge branch 'auto-fool-sort' into Update
LinQingYuu Apr 26, 2025
f0b3795
Merge branch 'my-msg-input-action' into Update
LinQingYuu Apr 27, 2025
1471517
Merge pull request #27 from LuoYun-Team/Update
LinQingYuu Apr 27, 2025
ce99b5b
Merge pull request #37 from Hex-Dragon/main
LinQingYuu Apr 28, 2025
0ac3653
Merge branch 'main' into my-msg-input-action
LinQingYuu May 24, 2025
145b1b3
revert
LinQingYuu May 25, 2025
f21747f
revert
LinQingYuu May 25, 2025
b37b61a
revert
LinQingYuu May 25, 2025
60c4b3c
Merge pull request #50 from Hex-Dragon/main
LinQingYuu May 30, 2025
1ea3871
imp(MyMsgInput):修正实现
LinQingYuu May 30, 2025
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
1 change: 1 addition & 0 deletions Plain Craft Launcher 2/Controls/MyMsg/MyMsgInput.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
<StackPanel Grid.Row="5" Name="PanBtn" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="150,0,8,0" Orientation="Horizontal">
<my:MyButton ColorType="Normal" x:FieldModifier="public" Text="测试按钮1" x:Name="Btn1" Margin="12,0,0,0" TextPadding="7" SnapsToDevicePixels="False" Padding="5,0" UseLayoutRounding="False" />
<my:MyButton ColorType="Normal" x:FieldModifier="public" Text="测试按钮2" x:Name="Btn2" Margin="12,0,0,0" TextPadding="7" SnapsToDevicePixels="False" Padding="5,0" UseLayoutRounding="False" />
<my:MyButton ColorType="Normal" x:FieldModifier="public" Text="测试按钮3" x:Name="Btn3" Margin="12,0,0,0" TextPadding="7" SnapsToDevicePixels="False" Padding="5,0" UseLayoutRounding="False" />
</StackPanel>
</Grid>
</Border>
Expand Down
32 changes: 27 additions & 5 deletions Plain Craft Launcher 2/Controls/MyMsg/MyMsgInput.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

Public Sub New(Converter As MyMsgBoxConverter)
Try

InitializeComponent()
Btn1.Name = Btn1.Name & GetUuid()
Btn2.Name = Btn2.Name & GetUuid()
Btn3.Name = Btn3.Name & GetUuid()
MyConverter = Converter
LabTitle.Text = Converter.Title
LabText.Text = Converter.Text
Expand All @@ -23,16 +23,16 @@
End If
Btn2.Text = Converter.Button2
Btn2.Visibility = If(Converter.Button2 = "", Visibility.Collapsed, Visibility.Visible)
Btn3.Text = Converter.Button3
Btn3.Visibility = If(Converter.Button3 = "" OrElse Converter.Button2 = "取消", Visibility.Collapsed, Visibility.Visible)
ShapeLine.StrokeThickness = GetWPFSize(1)

Catch ex As Exception
Log(ex, "输入弹窗初始化失败", LogLevel.Hint)
End Try
End Sub

Private Sub Load(sender As Object, e As EventArgs) Handles MyBase.Loaded
Try

'UI 初始化
If Btn2.IsVisible AndAlso Not Btn1.ColorType = MyButton.ColorState.Red Then Btn1.ColorType = MyButton.ColorState.Highlight
TextArea.Focus()
Expand Down Expand Up @@ -74,11 +74,33 @@
Public Sub Btn1_Click() Handles Btn1.Click
TextArea.Validate() '#5773
If MyConverter.IsExited OrElse Not TextArea.IsValidated Then Exit Sub
MyConverter.IsExited = True
MyConverter.Result = TextArea.Text
If MyConverter.Button1Action IsNot Nothing Then
MyConverter.Button1Action()
Else
MyConverter.IsExited = True
MyConverter.Result = TextArea.Text
End If
Close()
End Sub
Public Sub Btn2_Click() Handles Btn2.Click
If MyConverter.Button2Action IsNot Nothing Then
MyConverter.Button2Action()
Else
MyConverter.IsExited = True
MyConverter.Result = Nothing
Close()
End If
If MyConverter.IsExited Then Exit Sub
End Sub

Public Sub Btn3_Click() Handles Btn3.Click
If MyConverter.Button3Action IsNot Nothing Then
MyConverter.Button3Action()
Else
MyConverter.IsExited = True
MyConverter.Result = Nothing
Close()
End If
If MyConverter.IsExited Then Exit Sub
MyConverter.IsExited = True
MyConverter.Result = Nothing
Expand Down
2 changes: 1 addition & 1 deletion Plain Craft Launcher 2/FormMain.xaml.vb
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ Public Class FormMain
Exit Sub
ElseIf e.Key = Key.Escape Then
Dim Msg As Object = PanMsg.Children(0)
If TypeOf Msg IsNot MyMsgInput AndAlso TypeOf Msg IsNot MyMsgSelect AndAlso Msg.Btn3.Visibility = Visibility.Visible Then
If TypeOf Msg IsNot MyMsgSelect AndAlso Msg.Btn3.Visibility = Visibility.Visible Then
Msg.Btn3_Click()
ElseIf Msg.Btn2.Visibility = Visibility.Visible Then
Msg.Btn2_Click()
Expand Down
4 changes: 2 additions & 2 deletions Plain Craft Launcher 2/Modules/ModMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,9 @@ EndHint:
''' <param name="Button1">显示的第一个按钮,默认为“确定”。</param>
''' <param name="Button2">显示的第二个按钮,默认为“取消”。</param>
''' <param name="IsWarn">是否为警告弹窗,若为 True,弹窗配色和背景会变为红色。</param>
Public Function MyMsgBoxInput(Title As String, Optional Text As String = "", Optional DefaultInput As String = "", Optional ValidateRules As ObjectModel.Collection(Of Validate) = Nothing, Optional HintText As String = "", Optional Button1 As String = "确定", Optional Button2 As String = "取消", Optional IsWarn As Boolean = False) As String
Public Function MyMsgBoxInput(Title As String, Optional Text As String = "", Optional DefaultInput As String = "", Optional ValidateRules As ObjectModel.Collection(Of Validate) = Nothing, Optional HintText As String = "", Optional Button1 As String = "确定", Optional Button1Action As Action = Nothing, Optional Button2 As String = "取消", Optional Button2Action As Action = Nothing, Optional Button3 As String = "取消", Optional Button3Action As Action = Nothing, Optional IsWarn As Boolean = False) As String
'将弹窗列入队列
Dim Converter As New MyMsgBoxConverter With {.Text = Text, .HintText = HintText, .Type = MyMsgBoxType.Input, .ValidateRules = If(ValidateRules, New ObjectModel.Collection(Of Validate)), .Button1 = Button1, .Button2 = Button2, .Content = DefaultInput, .IsWarn = IsWarn, .Title = Title}
Dim Converter As New MyMsgBoxConverter With {.Text = Text, .HintText = HintText, .Type = MyMsgBoxType.Input, .ValidateRules = If(ValidateRules, New ObjectModel.Collection(Of Validate)), .Button1 = Button1, .Button1Action = Button1Action, .Button2 = Button2, .Button2Action = Button2Action, .Button3 = Button3, .Button3Action = Button3Action, .Content = DefaultInput, .IsWarn = IsWarn, .Title = Title}
WaitingMyMsgBox.Add(Converter)
'虽然我也不知道这是啥但是能用就成了 :)
Try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@
Type = "愚人节版"
Version("id") = "20w14∞"
Version("type") = "special"
Version.Add("lore", GetMcFoolName(Version("id")))
Case "3d shareware v1.34", "1.rv-pre1", "15w14a", "2.0", "22w13oneblockatatime", "23w13a_or_b", "24w14potato", "25w14craftmine"
Type = "愚人节版"
Version("type") = "special"
Version.Add("lore", GetMcFoolName(Version("id")))
Case Else '4/1 自动视作愚人节版
Dim ReleaseDate = Version("releaseTime").Value(Of Date).ToUniversalTime().AddHours(2)
If ReleaseDate.Month = 4 AndAlso ReleaseDate.Day = 1 Then

Type = "愚人节版"
Version("type") = "special"
End If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -590,13 +590,14 @@
Version("id") = "20w14∞"
Version("type") = "special"
Version.Add("lore", GetMcFoolName(Version("id")))
Case "3d shareware v1.34", "1.rv-pre1", "15w14a", "2.0", "22w13oneblockatatime", "23w13a_or_b", "24w14potato", "25w14craftmine"
Case "3d shareware v1.34", "1.rv-pre1", "15w14a", "2.0", "22w13oneblockatatime", "23w13a_or_b", "24w14potato","25w14craftmine"
Type = "愚人节版"
Version("type") = "special"
Version.Add("lore", GetMcFoolName(Version("id")))
Case Else '4/1 自动视作愚人节版
Dim ReleaseDate = Version("releaseTime").Value(Of Date).ToUniversalTime().AddHours(2)
If ReleaseDate.Month = 4 AndAlso ReleaseDate.Day = 1 Then

Type = "愚人节版"
Version("type") = "special"
End If
Expand Down