This commit is contained in:
龙腾猫跃
2023-05-11 02:03:06 +08:00
parent 1748fec3dd
commit cf74de5789
23 changed files with 297 additions and 172 deletions
+6 -3
View File
@@ -292,7 +292,7 @@
Margin="5,0,0,0" Cursor="IBeam" /> Margin="5,0,0,0" Cursor="IBeam" />
<!-- 由于未知原因,TextView 会有 2,0 的 Margin --> <!-- 由于未知原因,TextView 会有 2,0 的 Margin -->
</Border> </Border>
<Border Margin="{TemplateBinding Padding}" IsHitTestVisible="False" VerticalAlignment="Center" BorderThickness="0"> <Border Margin="{TemplateBinding Padding}" IsHitTestVisible="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" BorderThickness="0">
<TextBlock x:Name="labHint" Foreground="{DynamicResource ColorBrush1}" Opacity="0.3" Margin="7,0,0,0" Padding="{TemplateBinding BorderThickness}" FontSize="{TemplateBinding FontSize}" FontFamily="Resources/#PCL English, Microsoft YaHei UI" /> <TextBlock x:Name="labHint" Foreground="{DynamicResource ColorBrush1}" Opacity="0.3" Margin="7,0,0,0" Padding="{TemplateBinding BorderThickness}" FontSize="{TemplateBinding FontSize}" FontFamily="Resources/#PCL English, Microsoft YaHei UI" />
</Border> </Border>
<TextBlock Grid.Row="1" x:Name="labWrong" Height="0" Foreground="{TemplateBinding BorderBrush}" Padding="0,4,0,0" /> <TextBlock Grid.Row="1" x:Name="labWrong" Height="0" Foreground="{TemplateBinding BorderBrush}" Padding="0,4,0,0" />
@@ -345,7 +345,7 @@
<!-- ComboBox --> <!-- ComboBox -->
<DataTemplate x:Key="ComboBoxItemTemplateWithDelete"> <DataTemplate x:Key="ComboBoxItemTemplateWithDelete">
<local:MyListItem Title="{Binding}" FontSize="13" PaddingRight="40" MaxHeight="26" IsScaleAnimationEnabled="False" Margin="-1,0,0,0"> <local:MyListItem Title="{Binding}" FontSize="13" PaddingRight="40" MaxHeight="26" IsScaleAnimationEnabled="False" Margin="-3,0,0,0">
<local:MyListItem.Buttons> <local:MyListItem.Buttons>
<x:Array Type="local:MyIconButton"> <x:Array Type="local:MyIconButton">
<local:MyIconButton Grid.Column="1" Height="20" Width="20" VerticalAlignment="Center" Tag="{Binding}" Click="MyIconButton_Click" Logo="F1 M 26.9166,22.1667L 37.9999,33.25L 49.0832,22.1668L 53.8332,26.9168L 42.7499,38L 53.8332,49.0834L 49.0833,53.8334L 37.9999,42.75L 26.9166,53.8334L 22.1666,49.0833L 33.25,38L 22.1667,26.9167L 26.9166,22.1667 Z" /> <local:MyIconButton Grid.Column="1" Height="20" Width="20" VerticalAlignment="Center" Tag="{Binding}" Click="MyIconButton_Click" Logo="F1 M 26.9166,22.1667L 37.9999,33.25L 49.0832,22.1668L 53.8332,26.9168L 42.7499,38L 53.8332,49.0834L 49.0833,53.8334L 37.9999,42.75L 26.9166,53.8334L 22.1666,49.0833L 33.25,38L 22.1667,26.9167L 26.9166,22.1667 Z" />
@@ -367,7 +367,10 @@
<Grid> <Grid>
<Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="3" BorderThickness="1" BorderBrush="{TemplateBinding Foreground}" /> <Border x:Name="border" Background="{TemplateBinding Background}" CornerRadius="3" BorderThickness="1" BorderBrush="{TemplateBinding Foreground}" />
<ToggleButton Margin="0,0,1.5,0" Foreground="{TemplateBinding Foreground}" IsTabStop="False" SnapsToDevicePixels="False" Focusable="False" IsChecked="{Binding IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" /> <ToggleButton Margin="0,0,1.5,0" Foreground="{TemplateBinding Foreground}" IsTabStop="False" SnapsToDevicePixels="False" Focusable="False" IsChecked="{Binding IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press" />
<ContentPresenter Margin="8.5,0,21.5,0" IsHitTestVisible="False" Content="{TemplateBinding SelectionBoxItem}" ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" VerticalAlignment="Center" /> <ContentPresenter x:Name="PART_Content" Margin="8.5,0,21.5,0" IsHitTestVisible="False" VerticalAlignment="Center"
Content="{TemplateBinding SelectionBoxItem}"
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}" />
<Popup x:Name="PART_Popup" SnapsToDevicePixels="True" VerticalOffset="-1.5" AllowsTransparency="True" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="Fade"> <Popup x:Name="PART_Popup" SnapsToDevicePixels="True" VerticalOffset="-1.5" AllowsTransparency="True" IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" Placement="Bottom" PopupAnimation="Fade">
<Grid x:Name="PanPopup"> <Grid x:Name="PanPopup">
<Border Background="White" CornerRadius="3" /> <Border Background="White" CornerRadius="3" />
+40 -37
View File
@@ -179,45 +179,48 @@ Public Class Application
'切换窗口 '切换窗口
'控件模板事件 '控件模板事件
Private Sub MyIconButton_Click(sender As Object, e As EventArgs) Private Sub MyIconButton_Click(sender As Object, e As EventArgs)
If Setup.Get("LoginType") = McLoginType.Legacy Then Select Case Setup.Get("LoginType")
'离线 Case McLoginType.Ms
Dim Names As New List(Of String) '微软
Names.AddRange(Setup.Get("LoginLegacyName").ToString.Split("¨")) Dim MsJson As JObject = GetJson(Setup.Get("LoginMsJson"))
Names.Remove(sender.Tag) MsJson.Remove(sender.Tag)
Setup.Set("LoginLegacyName", Join(Names, "¨")) Setup.Set("LoginMsJson", MsJson.ToString(Newtonsoft.Json.Formatting.None))
FrmLoginLegacy.ComboName.ItemsSource = Names FrmLoginMs.ComboAccounts.Items.Remove(sender.Parent)
FrmLoginLegacy.ComboName.Text = If(Names.Count > 0, Names(0), "") Case McLoginType.Legacy
Else '离线
'非离线 Dim Names As New List(Of String)
Dim Token As String = GetStringFromEnum(Setup.Get("LoginType")) Names.AddRange(Setup.Get("LoginLegacyName").ToString.Split("¨"))
Dim Dict As New Dictionary(Of String, String) Names.Remove(sender.Tag)
Dim Names As New List(Of String) Setup.Set("LoginLegacyName", Join(Names, "¨"))
Dim Passs As New List(Of String) FrmLoginLegacy.ComboName.ItemsSource = Names
If Not Setup.Get("Login" & Token & "Email") = "" Then Names.AddRange(Setup.Get("Login" & Token & "Email").ToString.Split("¨")) FrmLoginLegacy.ComboName.Text = If(Names.Count > 0, Names(0), "")
If Not Setup.Get("Login" & Token & "Pass") = "" Then Passs.AddRange(Setup.Get("Login" & Token & "Pass").ToString.Split("¨")) Case Else
For i = 0 To Names.Count - 1 '第三方
Dict.Add(Names(i), Passs(i)) Dim Token As String = GetStringFromEnum(Setup.Get("LoginType"))
Next Dim Dict As New Dictionary(Of String, String)
Dict.Remove(sender.Tag) Dim Names As New List(Of String)
Setup.Set("Login" & Token & "Email", Join(Dict.Keys.ToArray, "¨")) Dim Passs As New List(Of String)
Setup.Set("Login" & Token & "Pass", Join(Dict.Values.ToArray, "¨")) If Not Setup.Get("Login" & Token & "Email") = "" Then Names.AddRange(Setup.Get("Login" & Token & "Email").ToString.Split("¨"))
Select Case Token If Not Setup.Get("Login" & Token & "Pass") = "" Then Passs.AddRange(Setup.Get("Login" & Token & "Pass").ToString.Split("¨"))
Case "Nide" For i = 0 To Names.Count - 1
FrmLoginNide.ComboName.ItemsSource = Dict.Keys Dict.Add(Names(i), Passs(i))
FrmLoginNide.ComboName.Text = If(Dict.Keys.Count > 0, Dict.Keys(0), "") Next
FrmLoginNide.TextPass.Password = If(Dict.Values.Count > 0, Dict.Values(0), "") Dict.Remove(sender.Tag)
Case "Auth" Setup.Set("Login" & Token & "Email", Join(Dict.Keys, "¨"))
FrmLoginAuth.ComboName.ItemsSource = Dict.Keys Setup.Set("Login" & Token & "Pass", Join(Dict.Values, "¨"))
FrmLoginAuth.ComboName.Text = If(Dict.Keys.Count > 0, Dict.Keys(0), "") Select Case Token
FrmLoginAuth.TextPass.Password = If(Dict.Values.Count > 0, Dict.Values(0), "") Case "Nide"
Case Else FrmLoginNide.ComboName.ItemsSource = Dict.Keys
DebugAssert(True) FrmLoginNide.ComboName.Text = If(Dict.Keys.Count > 0, Dict.Keys(0), "")
Exit Sub FrmLoginNide.TextPass.Password = If(Dict.Values.Count > 0, Dict.Values(0), "")
End Select Case "Auth"
End If FrmLoginAuth.ComboName.ItemsSource = Dict.Keys
FrmLoginAuth.ComboName.Text = If(Dict.Keys.Count > 0, Dict.Keys(0), "")
FrmLoginAuth.TextPass.Password = If(Dict.Values.Count > 0, Dict.Values(0), "")
End Select
End Select
End Sub End Sub
End Class End Class
@@ -128,4 +128,10 @@
End If End If
End Sub End Sub
Public ReadOnly Property ContentPresenter As ContentPresenter
Get
Return Template.FindName("PART_Content", Me)
End Get
End Property
End Class End Class
+39 -13
View File
@@ -68,7 +68,7 @@
Loop Loop
RunInUiWait(Sub() FinishedInvoke(RealLoader)) RunInUiWait(Sub() FinishedInvoke(RealLoader))
Thread.Sleep(20) '由于大量初始化控件会导致掉帧,延迟触发 State 改变事件 Thread.Sleep(20) '由于大量初始化控件会导致掉帧,延迟触发 State 改变事件
End Sub End Sub
End If End If
AddHandler RealLoader.OnStateChangedUi, Sub(Loader As LoaderBase, NewState As LoadState, OldState As LoadState) RunInUi(Sub() PageLoaderState(Loader, NewState, OldState)) AddHandler RealLoader.OnStateChangedUi, Sub(Loader As LoaderBase, NewState As LoadState, OldState As LoadState) RunInUi(Sub() PageLoaderState(Loader, NewState, OldState))
'隐藏 UI '隐藏 UI
@@ -325,17 +325,13 @@
'逐个进入动画 '逐个进入动画
Public Sub TriggerEnterAnimation(ParamArray Elements As FrameworkElement()) Public Sub TriggerEnterAnimation(ParamArray Elements As FrameworkElement())
'去除 Nothing 项 Dim RealElements = Elements.Where(Function(e) e IsNot Nothing)
Dim RealElements As New List(Of FrameworkElement)
For Each Element In Elements
If Element IsNot Nothing Then RealElements.Add(Element)
Next
For Each Element In RealElements For Each Element In RealElements
Element.Visibility = Visibility.Visible '页面均处于默认的隐藏状态 Element.Visibility = Visibility.Visible '页面均处于默认的隐藏状态
Next Next
Dim AniList As New List(Of AniData) Dim AniList As New List(Of AniData)
Dim Delay As Integer = 0 Dim Delay As Integer = 0
'基础动画
For Each Element In RealElements For Each Element In RealElements
For Each Control As FrameworkElement In GetAllAnimControls(Element, True) For Each Control As FrameworkElement In GetAllAnimControls(Element, True)
'还原被隐藏的卡片的消失动画 '还原被隐藏的卡片的消失动画
@@ -351,18 +347,20 @@
Delay += 40 Delay += 40
Next Next
Next Next
'滚动条动画
Dim Scroll As MyScrollBar = GetFirstScrollViewer(RealElements)
If Scroll IsNot Nothing Then
If TypeOf Scroll.RenderTransform IsNot TranslateTransform Then Scroll.RenderTransform = New TranslateTransform(10, 0)
AniList.Add(AaTranslateX(Scroll, -CType(Scroll.RenderTransform, TranslateTransform).X, 350, 0, New AniEaseOutFluent))
End If
'结束
AniList.Add(AaCode(Sub() PageOnEnterAnimationFinished(),, True)) AniList.Add(AaCode(Sub() PageOnEnterAnimationFinished(),, True))
AniStart(AniList, "PageRight PageChange " & PageUuid) AniStart(AniList, "PageRight PageChange " & PageUuid)
End Sub End Sub
'逐个退出动画 '逐个退出动画
Public Sub TriggerExitAnimation(ParamArray Elements As FrameworkElement()) Public Sub TriggerExitAnimation(ParamArray Elements As FrameworkElement())
'去除 Nothing 项 Dim RealElements = Elements.Where(Function(e) e IsNot Nothing)
Dim RealElements As New List(Of FrameworkElement)
For Each Element In Elements
If Element IsNot Nothing Then RealElements.Add(Element)
Next
Dim AniList As New List(Of AniData) Dim AniList As New List(Of AniData)
Dim Delay As Integer = 0 Dim Delay As Integer = 0
For Each Element In RealElements For Each Element In RealElements
@@ -373,6 +371,13 @@
Delay += 20 Delay += 20
Next Next
Next Next
'滚动条动画
Dim Scroll As MyScrollBar = GetFirstScrollViewer(RealElements)
If Scroll IsNot Nothing Then
If TypeOf Scroll.RenderTransform IsNot TranslateTransform Then Scroll.RenderTransform = New TranslateTransform
AniList.Add(AaTranslateX(Scroll, 10 - CType(Scroll.RenderTransform, TranslateTransform).X, 90, 0, New AniEaseInFluent))
End If
'结束
AniList.Add(AaCode(Sub() AniList.Add(AaCode(Sub()
For Each Element In RealElements For Each Element In RealElements
Element.Visibility = Visibility.Collapsed Element.Visibility = Visibility.Collapsed
@@ -402,6 +407,27 @@
End If End If
End Sub End Sub
'查找列表中的第一个滚动条
Private Function GetFirstScrollViewer(Elements As IEnumerable(Of FrameworkElement)) As MyScrollBar
Dim Viewer As MyScrollViewer = Nothing
For Each Element In Elements
If TypeOf Element Is MyScrollViewer Then
Viewer = Element
GoTo FindViewer
End If
For Each Control In LogicalTreeHelper.GetChildren(Element)
If TypeOf Control Is MyScrollViewer Then
Viewer = Control
GoTo FindViewer
End If
Next
Next
Return Nothing
FindViewer:
If Viewer.ComputedVerticalScrollBarVisibility <> Visibility.Visible Then Return Nothing
Return Viewer.ScrollBar
End Function
#End Region #End Region
End Class End Class
@@ -2,6 +2,8 @@
Inherits ScrollViewer Inherits ScrollViewer
Public Property DeltaMuity As Double = 1 Public Property DeltaMuity As Double = 1
Private RealOffset As Double Private RealOffset As Double
Private Sub MyScrollViewer_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs) Handles Me.PreviewMouseWheel Private Sub MyScrollViewer_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs) Handles Me.PreviewMouseWheel
If e.Delta = 0 OrElse ActualHeight = 0 OrElse ScrollableHeight = 0 Then Exit Sub If e.Delta = 0 OrElse ActualHeight = 0 OrElse ScrollableHeight = 0 Then Exit Sub
@@ -30,4 +32,9 @@
FrmMain.BtnExtraBack.ShowRefresh() FrmMain.BtnExtraBack.ShowRefresh()
End Sub End Sub
Public ScrollBar As MyScrollBar
Private Sub Load() Handles Me.Loaded
ScrollBar = GetTemplateChild("PART_VerticalScrollBar")
End Sub
End Class End Class
+17
View File
@@ -10,6 +10,17 @@ Public Class FormMain
Dim FeatureList As New List(Of KeyValuePair(Of Integer, String)) Dim FeatureList As New List(Of KeyValuePair(Of Integer, String))
'统计更新日志条目 '统计更新日志条目
#If BETA Then #If BETA Then
If LastVersion < 291 Then 'Release 2.6.0
FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "支持在多个正版账号间切换"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "在缺少 Java 时会自动下载所需的 Java"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "重新制作正版登录页面"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "彻底移除 Mojang 登录"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "添加 CurseForge / Modrinth 来源筛选"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "Mod / 整合包下载会单独列出筛选的版本"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "为下载管理和音乐播放按钮添加进度条"))
FeatureCount += 24
BugCount += 24
End If
If LastVersion < 286 Then 'Release 2.5.2 If LastVersion < 286 Then 'Release 2.5.2
FeatureList.Add(New KeyValuePair(Of Integer, String)(5, "支持搜索、安装 Modrinth 的 Mod 与整合包")) FeatureList.Add(New KeyValuePair(Of Integer, String)(5, "支持搜索、安装 Modrinth 的 Mod 与整合包"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "资源搜索页面支持翻页")) FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "资源搜索页面支持翻页"))
@@ -95,6 +106,12 @@ Public Class FormMain
'3:BUG+ IMP* FEAT- '3:BUG+ IMP* FEAT-
'2:BUG* IMP- '2:BUG* IMP-
'1:BUG- '1:BUG-
If LastVersion < 290 Then 'Snapshot 2.6.0
FeatureList.Add(New KeyValuePair(Of Integer, String)(4, "支持在多个正版账号间切换"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(2, "Mod / 整合包下载会单独列出筛选的版本"))
FeatureCount += 10
BugCount += 2
End If
If LastVersion < 289 Then 'Snapshot 2.5.4 If LastVersion < 289 Then 'Snapshot 2.5.4
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "重新制作正版登录页面")) FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "重新制作正版登录页面"))
FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "彻底移除 Mojang 登录")) FeatureList.Add(New KeyValuePair(Of Integer, String)(3, "彻底移除 Mojang 登录"))
@@ -11,12 +11,12 @@ Public Module ModBase
#Region "声明" #Region "声明"
'下列版本信息由更新器自动修改 '下列版本信息由更新器自动修改
Public Const VersionBaseName As String = "2.5.4" '不含分支前缀的显示用版本名 Public Const VersionBaseName As String = "2.6.0" '不含分支前缀的显示用版本名
Public Const VersionStandardCode As String = "2.5.4." & VersionBranchCode '标准格式的四段式版本号 Public Const VersionStandardCode As String = "2.6.0." & VersionBranchCode '标准格式的四段式版本号
#If BETA Then #If BETA Then
Public Const VersionCode As Integer = 286 'Release Public Const VersionCode As Integer = 291 'Release
#Else #Else
Public Const VersionCode As Integer = 289 'Snapshot Public Const VersionCode As Integer = 290 'Snapshot
#End If #End If
'自动生成的版本信息 '自动生成的版本信息
Public Const VersionDisplayName As String = VersionBranchName & " " & VersionBaseName Public Const VersionDisplayName As String = VersionBranchName & " " & VersionBaseName
@@ -2606,11 +2606,11 @@ Retry:
''' <summary> ''' <summary>
''' 将数组随机打乱。 ''' 将数组随机打乱。
''' </summary> ''' </summary>
Public Function RandomChaos(Of T)(array As IList(Of T)) As IList(Of T) Public Function Shuffle(Of T)(array As IList(Of T)) As IList(Of T)
RandomChaos = New List(Of T) Shuffle = New List(Of T)
Do While array.Count > 0 Do While array.Count > 0
Dim i As Integer = RandomInteger(0, array.Count - 1) Dim i As Integer = RandomInteger(0, array.Count - 1)
RandomChaos.Add(array(i)) Shuffle.Add(array(i))
array.RemoveAt(i) array.RemoveAt(i)
Loop Loop
End Function End Function
@@ -361,7 +361,7 @@
低版本Forge与高版本Java不兼容 低版本Forge与高版本Java不兼容
版本Json中存在多个Forge 版本Json中存在多个Forge
Mod过多导致超出ID限制 Mod过多导致超出ID限制
NightConfig库问题 NightConfig的Bug
ShadersMod与Optifine同时安装 ShadersMod与Optifine同时安装
Forge安装不完整 Forge安装不完整
End Enum End Enum
@@ -489,7 +489,7 @@ Done:
If LogMc.Contains("Maybe try a lower resolution resourcepack?") Then AppendReason(CrashReason.材质过大或显卡配置不足) If LogMc.Contains("Maybe try a lower resolution resourcepack?") Then AppendReason(CrashReason.材质过大或显卡配置不足)
If LogMc.Contains("java.lang.NoSuchMethodError: net.minecraft.world.server.ChunkManager$ProxyTicketManager.shouldForceTicks(J)Z") AndAlso LogMc.Contains("OptiFine") Then AppendReason(CrashReason.OptiFine导致无法加载世界) If LogMc.Contains("java.lang.NoSuchMethodError: net.minecraft.world.server.ChunkManager$ProxyTicketManager.shouldForceTicks(J)Z") AndAlso LogMc.Contains("OptiFine") Then AppendReason(CrashReason.OptiFine导致无法加载世界)
If LogMc.Contains("Unsupported class file major version") Then AppendReason(CrashReason.Java版本不兼容) If LogMc.Contains("Unsupported class file major version") Then AppendReason(CrashReason.Java版本不兼容)
If LogMc.Contains("com.electronwill.nightconfig.core.io.ParsingException: Not enough data available") Then AppendReason(CrashReason.NightConfig库问题) If LogMc.Contains("com.electronwill.nightconfig.core.io.ParsingException: Not enough data available") Then AppendReason(CrashReason.NightConfig的Bug)
If LogMc.Contains("Cannot find launch target fmlclient, unable to launch") Then AppendReason(CrashReason.Forge安装不完整) If LogMc.Contains("Cannot find launch target fmlclient, unable to launch") Then AppendReason(CrashReason.Forge安装不完整)
If LogMc.Contains("Invalid module name: '' is not a Java identifier") Then AppendReason(CrashReason.Mod名称包含特殊字符) If LogMc.Contains("Invalid module name: '' is not a Java identifier") Then AppendReason(CrashReason.Mod名称包含特殊字符)
If LogMc.Contains("java.lang.UnsupportedClassVersionError: net/fabricmc/loader/impl/launch/knot/KnotClient : Unsupported major.minor version") Then AppendReason(CrashReason.Java版本不兼容) If LogMc.Contains("java.lang.UnsupportedClassVersionError: net/fabricmc/loader/impl/launch/knot/KnotClient : Unsupported major.minor version") Then AppendReason(CrashReason.Java版本不兼容)
@@ -874,7 +874,7 @@ NextStack:
Case CrashReason.OptiFine与Forge不兼容 Case CrashReason.OptiFine与Forge不兼容
Results.Add("由于 OptiFine 与当前版本的 Forge 不兼容,导致了游戏崩溃。\n\n请前往 OptiFine 官网(https://optifine.net/downloads)查看 OptiFine 所兼容的 Forge 版本,并严格按照对应版本重新安装游戏。") Results.Add("由于 OptiFine 与当前版本的 Forge 不兼容,导致了游戏崩溃。\n\n请前往 OptiFine 官网(https://optifine.net/downloads)查看 OptiFine 所兼容的 Forge 版本,并严格按照对应版本重新安装游戏。")
Case CrashReason.ShadersMod与Optifine同时安装 Case CrashReason.ShadersMod与Optifine同时安装
Results.Add("当前游戏因为同时安装了 Optifine 和 Shaders Mod,无法继续运行。\n\n因为 Optifine 已集成 Shaders Mod 的功能,只需删除 Shaders Mod 即可。") Results.Add("无需同时安装 Optifine 和 Shaders Mod,Optifine 已经集成了 Shaders Mod 的功能。\n在删除 Shaders Mod 后,游戏即可正常运行。")
Case CrashReason.低版本Forge与高版本Java不兼容 Case CrashReason.低版本Forge与高版本Java不兼容
Results.Add("由于低版本 Forge 与当前 Java 不兼容,导致了游戏崩溃。\n\n请尝试以下解决方案:\n - 更新 Forge 到 36.2.26 或更高版本\n - 换用版本低于 8.0.320 的 Java") Results.Add("由于低版本 Forge 与当前 Java 不兼容,导致了游戏崩溃。\n\n请尝试以下解决方案:\n - 更新 Forge 到 36.2.26 或更高版本\n - 换用版本低于 8.0.320 的 Java")
Case CrashReason.版本Json中存在多个Forge Case CrashReason.版本Json中存在多个Forge
@@ -894,7 +894,7 @@ NextStack:
Case CrashReason.材质过大或显卡配置不足 Case CrashReason.材质过大或显卡配置不足
Results.Add("你所使用的材质分辨率过高,或显卡配置不足,导致游戏无法继续运行。\n\n如果你正在使用高清材质,请将它移除。\n如果你没有使用材质,那么你可能需要更新显卡驱动,或者换个更好的显卡……\h") Results.Add("你所使用的材质分辨率过高,或显卡配置不足,导致游戏无法继续运行。\n\n如果你正在使用高清材质,请将它移除。\n如果你没有使用材质,那么你可能需要更新显卡驱动,或者换个更好的显卡……\h")
Case CrashReason.材质过大或显卡配置不足 Case CrashReason.材质过大或显卡配置不足
Results.Add("当前游戏因为 Night Config 库的一些问题,无法继续运行。\n\n你可以尝试安装 Night Config Fixes 模组,这或许能帮助你解决这个问题。\n可访问该模组的 GitHub 仓库了解更多。\h") Results.Add("由于 Night Config 存在问题,导致了游戏崩溃。\n你可以尝试安装 Night Config Fixes 模组,这或许能解决此问题。\h")
Case CrashReason.光影或资源包导致OpenGL1282错误 Case CrashReason.光影或资源包导致OpenGL1282错误
Results.Add("你所使用的光影或材质导致游戏出现了一些问题……\n\n请尝试删除你所添加的这些额外资源。\h") Results.Add("你所使用的光影或材质导致游戏出现了一些问题……\n\n请尝试删除你所添加的这些额外资源。\h")
Case CrashReason.Mod过多导致超出ID限制 Case CrashReason.Mod过多导致超出ID限制
@@ -902,7 +902,7 @@ NextStack:
Case CrashReason.文件或内容校验失败 Case CrashReason.文件或内容校验失败
Results.Add("部分文件或内容校验失败,导致游戏出现了问题。\n\n请尝试删除游戏(包括 Mod)并重新下载,或尝试在重新下载时使用 VPN。\h") Results.Add("部分文件或内容校验失败,导致游戏出现了问题。\n\n请尝试删除游戏(包括 Mod)并重新下载,或尝试在重新下载时使用 VPN。\h")
Case CrashReason.Forge安装不完整 Case CrashReason.Forge安装不完整
Results.Add("当前游戏因为 Forge 安装不完整,无法继续运行。\n\n请尝试重新全新安装 Forge\h") Results.Add("由于 Forge 安装不完整,导致游戏无法正常运行。\n请尝试重新安装 Forge。\h")
Case CrashReason.Fabric报错 Case CrashReason.Fabric报错
If Additional.Count = 1 Then If Additional.Count = 1 Then
Results.Add("Fabric 提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。") Results.Add("Fabric 提供了以下错误信息:\n" & Additional.First & "\n\n请根据上述信息进行对应处理,如果看不懂英文可以使用翻译软件。")
@@ -203,7 +203,7 @@ NextInner:
"如果觉得 Minecraft 还不错,也可以考虑购买正版支持一下,毕竟开发游戏也很不容易……" & vbCrLf & "如果觉得 Minecraft 还不错,也可以考虑购买正版支持一下,毕竟开发游戏也很不容易……" & vbCrLf &
"在你登录一次正版账号后,就不会再出现这个提示了。", "在你登录一次正版账号后,就不会再出现这个提示了。",
"考虑一下正版?", "购买正版游戏", "下次一定") = 1 Then "考虑一下正版?", "购买正版游戏", "下次一定") = 1 Then
OpenWebsite("https://www.minecraft.net/store/checkout/minecraft-java-bedrock-edition-pc") OpenWebsite("https://www.xbox.com/zh-cn/games/store/minecraft-java-bedrock-edition-for-pc/9nxp44l49shj")
End If End If
End Select End Select
End If End If
@@ -478,7 +478,7 @@ NextInner:
End If End If
'尝试登录 '尝试登录
Dim OAuthTokens As String() Dim OAuthTokens As String()
If Setup.Get("CacheMsOAuthRefresh") = "" Then If Input.OAuthRefreshToken = "" Then
'无 RefreshToken '无 RefreshToken
Relogin: Relogin:
Dim OAuthCode As String = MsLoginStep1(Data) Dim OAuthCode As String = MsLoginStep1(Data)
@@ -487,7 +487,7 @@ Relogin:
OAuthTokens = MsLoginStep2(OAuthCode, False) OAuthTokens = MsLoginStep2(OAuthCode, False)
Else Else
'有 RefreshToken '有 RefreshToken
OAuthTokens = MsLoginStep2(Setup.Get("CacheMsOAuthRefresh"), True) OAuthTokens = MsLoginStep2(Input.OAuthRefreshToken, True)
End If End If
'要求重新打开登录网页认证 '要求重新打开登录网页认证
If OAuthTokens(0) = "Relogin" Then GoTo Relogin If OAuthTokens(0) = "Relogin" Then GoTo Relogin
@@ -511,6 +511,10 @@ Relogin:
Setup.Set("CacheMsUuid", Result(0)) Setup.Set("CacheMsUuid", Result(0))
Setup.Set("CacheMsName", Result(1)) Setup.Set("CacheMsName", Result(1))
Setup.Set("CacheMsProfileJson", Result(2)) Setup.Set("CacheMsProfileJson", Result(2))
Dim MsJson As JObject = GetJson(Setup.Get("LoginMsJson"))
MsJson.Remove(Input.UserName) '如果更改了玩家名……
MsJson(Result(1)) = OAuthRefreshToken
Setup.Set("LoginMsJson", MsJson.ToString(Newtonsoft.Json.Formatting.None))
Data.Output = New McLoginResult With {.AccessToken = AccessToken, .Name = Result(1), .Uuid = Result(0), .Type = "Microsoft", .ClientToken = Result(0), .ProfileJson = Result(2)} Data.Output = New McLoginResult With {.AccessToken = AccessToken, .Name = Result(1), .Uuid = Result(0), .Type = "Microsoft", .ClientToken = Result(0), .ProfileJson = Result(2)}
'解锁主题 '解锁主题
SkipLogin: SkipLogin:
@@ -1001,7 +1005,7 @@ SystemBrowser:
Case 1 Case 1
OpenWebsite("https://www.minecraft.net/zh-hans/msaprofile/mygames/editprofile") OpenWebsite("https://www.minecraft.net/zh-hans/msaprofile/mygames/editprofile")
Case 2 Case 2
OpenWebsite("https://www.minecraft.net/store/checkout/minecraft-java-bedrock-edition-pc") OpenWebsite("https://www.xbox.com/zh-cn/games/store/minecraft-java-bedrock-edition-for-pc/9nxp44l49shj")
End Select End Select
End Sub, "Login Failed: Create Profile") End Sub, "Login Failed: Create Profile")
Throw New Exception("$$") Throw New Exception("$$")
@@ -1818,9 +1822,9 @@ NextVersion:
PackFormat = 12 PackFormat = 12
End If End If
Case 20, 99 '99 是快照版 Case 20, 99 '99 是快照版
PackFormat = 13 PackFormat = 15
Case Else Case Else
PackFormat = 14 PackFormat = 16
'https://minecraft.fandom.com/zh/wiki/数据包#数据包版本 'https://minecraft.fandom.com/zh/wiki/数据包#数据包版本
End Select End Select
McLaunchLog("正在构建自定义皮肤资源包,格式为:" & PackFormat) McLaunchLog("正在构建自定义皮肤资源包,格式为:" & PackFormat)
+1 -1
View File
@@ -31,7 +31,7 @@
Next Next
End If End If
'打乱顺序播放 '打乱顺序播放
MusicToplayList = RandomChaos(New List(Of String)(MusicAllList)) MusicToplayList = If(Setup.Get("UiMusicRandom"), Shuffle(New List(Of String)(MusicAllList)), New List(Of String)(MusicAllList))
If Not IgnoreFirst = "" AndAlso Not MusicToplayList.Count = 0 AndAlso MusicToplayList(0) = IgnoreFirst Then If Not IgnoreFirst = "" AndAlso Not MusicToplayList.Count = 0 AndAlso MusicToplayList(0) = IgnoreFirst Then
'若需要避免成为第一项的为第一项,则将它放在最后 '若需要避免成为第一项的为第一项,则将它放在最后
MusicToplayList.RemoveAt(0) MusicToplayList.RemoveAt(0)
@@ -51,6 +51,6 @@ Imports System.Runtime.InteropServices
' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 ' 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
' 方法是按如下所示使用“*” ' 方法是按如下所示使用“*”
<Assembly: AssemblyVersion("2.5.4.0")> <Assembly: AssemblyVersion("2.6.0.0")>
<Assembly: AssemblyFileVersion("2.5.4.0")> <Assembly: AssemblyFileVersion("2.6.0.0")>
<Assembly: NeutralResourcesLanguage("")> <Assembly: NeutralResourcesLanguage("")>
@@ -39,51 +39,54 @@
End Sub End Sub
End Class End Class
Private Sub Load_OnFinish() Private Sub Load_OnFinish()
'获取目标版本与 Mod 加载器
'初始化字典,并将当前版本排在最上面 Dim TargetVersion As String = ""
Dim TopVersion As String
Select Case Project.Type Select Case Project.Type
Case CompType.Mod Case CompType.Mod
TopVersion = If(PageDownloadMod.Loader.Input.GameVersion, "") TargetVersion = If(PageDownloadMod.Loader.Input.GameVersion, "")
Case CompType.ModPack Case CompType.ModPack
TopVersion = If(PageDownloadPack.Loader.Input.GameVersion, "") TargetVersion = If(PageDownloadPack.Loader.Input.GameVersion, "")
Case Else 'CompType.ResourcePack Case Else 'CompType.ResourcePack
'FUTURE: Res 'FUTURE: Res
TopVersion = Nothing 'If(PageDownloadResource.Loader.Input.GameVersion, "") TargetVersion = "" 'If(PageDownloadResource.Loader.Input.GameVersion, "")
End Select End Select
Dim Dict As New SortedDictionary(Of String, List(Of CompFile))(New VersionSorterWithSelect(TopVersion)) Dim TargetLoader = CompModLoaderType.Any
'#8826 汇报了奇怪的这个 Try 块里出现 NPE 的问题,但实在找不到,就瞎加点检测 If Project.Type = CompType.Mod AndAlso PageDownloadMod.Loader.Input.ModLoader <> CompModLoaderType.Any Then
Try TargetLoader = PageDownloadMod.Loader.Input.ModLoader
Dict.Add("未知版本", New List(Of CompFile)) End If
If CompFileLoader.Output Is Nothing Then Dim TargetCardName As String = If(TargetVersion <> "" OrElse TargetLoader <> CompModLoaderType.Any,
Log("[Comp] 列表加载输出为 Nothing,请反馈此问题", LogLevel.Feedback) $"目标PCL2版本:{TargetVersion} {If(TargetLoader <> CompModLoaderType.Any, TargetLoader, "")}", "")
Exit Try '初始化字典
End If Dim Dict As New SortedDictionary(Of String, List(Of CompFile))(New VersionSorterWithSelect(TargetCardName))
For Each Version As CompFile In CompFileLoader.Output Dict.Add("未知版本", New List(Of CompFile))
If Version Is Nothing Then For Each Version As CompFile In CompFileLoader.Output
Log("[Comp] 列表中的一个版本为 Nothing,请反馈此问题", LogLevel.Feedback) For Each GameVersion In Version.GameVersions
Continue For '决定添加到哪个版本
Dim TargetCard As String
If GameVersion Is Nothing Then
TargetCard = "未知版本"
ElseIf GameVersion.Contains("w") OrElse GameVersion.Contains("pre") OrElse GameVersion.Contains("rc") Then
TargetCard = "快照版本"
ElseIf GameVersion.Split(".").Count >= 2 Then
TargetCard = GameVersion
Else
TargetCard = "未知版本"
End If End If
For Each GameVersion In Version.GameVersions '实际进行添加
'决定添加到哪个版本 If Not Dict.ContainsKey(TargetCard) Then Dict.Add(TargetCard, New List(Of CompFile))
Dim TargetVersion As String If Not Dict(TargetCard).Contains(Version) Then Dict(TargetCard).Add(Version)
If GameVersion Is Nothing Then
TargetVersion = "未知版本"
ElseIf GameVersion.Contains("w") Then
TargetVersion = "快照版本"
ElseIf GameVersion.Split(".").Count >= 2 Then
TargetVersion = GameVersion
Else
TargetVersion = "未知版本"
End If
'实际进行添加
If Not Dict.ContainsKey(TargetVersion) Then Dict.Add(TargetVersion, New List(Of CompFile))
If Not Dict(TargetVersion).Contains(Version) Then Dict(TargetVersion).Add(Version)
Next
Next Next
Catch ex As Exception Next
Log(ex, "准备工程下载列表出错", LogLevel.Feedback) '添加筛选的版本的卡片
End Try If TargetCardName <> "" Then
Dict.Add(TargetCardName, New List(Of CompFile))
For Each Version As CompFile In CompFileLoader.Output
If Version.GameVersions.Contains(TargetVersion) AndAlso
(TargetLoader = CompModLoaderType.Any OrElse Version.ModLoaders.Contains(TargetLoader)) Then
If Not Dict(TargetCardName).Contains(Version) Then Dict(TargetCardName).Add(Version)
End If
Next
End If
#Region "转化为 UI" #Region "转化为 UI"
Try Try
@@ -99,7 +102,7 @@
NewCard.SwapControl = NewStack NewCard.SwapControl = NewStack
PanMain.Children.Add(NewCard) PanMain.Children.Add(NewCard)
'确定卡片是否展开 '确定卡片是否展开
If Pair.Key = TopVersion Then If Pair.Key = TargetCardName Then
MyCard.StackInstall(NewStack, If(Project.Type = CompType.ModPack, 9, 8), Pair.Key) 'FUTURE: Res MyCard.StackInstall(NewStack, If(Project.Type = CompType.ModPack, 9, 8), Pair.Key) 'FUTURE: Res
Else Else
NewCard.IsSwaped = True NewCard.IsSwaped = True
@@ -33,11 +33,8 @@
<TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="版本" Margin="0,0,18,0" /> <TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="版本" Margin="0,0,18,0" />
<local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" IsEditable="True" MaxDropDownHeight="320"> <local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" Grid.ColumnSpan="2" IsEditable="True" MaxDropDownHeight="320">
<local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" /> <local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" />
<local:MyComboBoxItem Content="1.20" />
<local:MyComboBoxItem Content="1.19.4" /> <local:MyComboBoxItem Content="1.19.4" />
<local:MyComboBoxItem Content="1.19.3" />
<local:MyComboBoxItem Content="1.19.2" />
<local:MyComboBoxItem Content="1.19.1" />
<local:MyComboBoxItem Content="1.19" />
<local:MyComboBoxItem Content="1.18.2" /> <local:MyComboBoxItem Content="1.18.2" />
<local:MyComboBoxItem Content="1.17.1" /> <local:MyComboBoxItem Content="1.17.1" />
<local:MyComboBoxItem Content="1.16.5" /> <local:MyComboBoxItem Content="1.16.5" />
@@ -32,11 +32,8 @@
<TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="版本" Margin="0,0,18,0" /> <TextBlock VerticalAlignment="Center" Grid.Row="2" HorizontalAlignment="Left" Text="版本" Margin="0,0,18,0" />
<local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" IsEditable="True" MaxDropDownHeight="320"> <local:MyComboBox x:Name="TextSearchVersion" Grid.Row="2" Grid.Column="1" IsEditable="True" MaxDropDownHeight="320">
<local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" /> <local:MyComboBoxItem Content="全部 (也可自行输入)" IsSelected="True" />
<local:MyComboBoxItem Content="1.20" />
<local:MyComboBoxItem Content="1.19.4" /> <local:MyComboBoxItem Content="1.19.4" />
<local:MyComboBoxItem Content="1.19.3" />
<local:MyComboBoxItem Content="1.19.2" />
<local:MyComboBoxItem Content="1.19.1" />
<local:MyComboBoxItem Content="1.19" />
<local:MyComboBoxItem Content="1.18.2" /> <local:MyComboBoxItem Content="1.18.2" />
<local:MyComboBoxItem Content="1.17.1" /> <local:MyComboBoxItem Content="1.17.1" />
<local:MyComboBoxItem Content="1.16.5" /> <local:MyComboBoxItem Content="1.16.5" />
@@ -4,17 +4,33 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:PCL" xmlns:local="clr-namespace:PCL"
mc:Ignorable="d" d:DesignWidth="302.4" Margin="0,0,0,-2"> mc:Ignorable="d" d:DesignWidth="302.4">
<StackPanel x:Name="PanEmpty"> <Grid x:Name="PanEmpty" Margin="0,10,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="25" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Path Data="M660.338 528.065c63.61-46.825 105.131-121.964 105.131-206.83 0-141.7-115.29-256.987-256.997-256.987-141.706 0-256.998 115.288-256.998 256.987 0 85.901 42.52 161.887 107.456 208.562-152.1 59.92-260.185 207.961-260.185 381.077 0 21.276 17.253 38.53 38.53 38.53 21.278 0 38.53-17.254 38.53-38.53 0-183.426 149.232-332.671 332.667-332.671 1.589 0 3.113-0.207 4.694-0.244 0.8 0.056 1.553 0.244 2.362 0.244 183.434 0 332.664 149.245 332.664 332.671 0 21.276 17.255 38.53 38.533 38.53 21.277 0 38.53-17.254 38.53-38.53 0-174.885-110.354-324.13-264.917-382.809z m-331.803-206.83c0-99.22 80.72-179.927 179.935-179.927s179.937 80.708 179.937 179.927c0 99.203-80.721 179.91-179.937 179.91s-179.935-80.708-179.935-179.91z" <Path Data="M660.338 528.065c63.61-46.825 105.131-121.964 105.131-206.83 0-141.7-115.29-256.987-256.997-256.987-141.706 0-256.998 115.288-256.998 256.987 0 85.901 42.52 161.887 107.456 208.562-152.1 59.92-260.185 207.961-260.185 381.077 0 21.276 17.253 38.53 38.53 38.53 21.278 0 38.53-17.254 38.53-38.53 0-183.426 149.232-332.671 332.667-332.671 1.589 0 3.113-0.207 4.694-0.244 0.8 0.056 1.553 0.244 2.362 0.244 183.434 0 332.664 149.245 332.664 332.671 0 21.276 17.255 38.53 38.533 38.53 21.277 0 38.53-17.254 38.53-38.53 0-174.885-110.354-324.13-264.917-382.809z m-331.803-206.83c0-99.22 80.72-179.927 179.935-179.927s179.937 80.708 179.937 179.927c0 99.203-80.721 179.91-179.937 179.91s-179.935-80.708-179.935-179.91z"
Fill="{DynamicResource ColorBrush1}" Opacity="0.3" Fill="{DynamicResource ColorBrush2}" Opacity="0.7" Width="40" Stretch="Uniform" Grid.ColumnSpan="2" />
Width="40" Stretch="Uniform"/> <local:MyComboBox x:Name="ComboAccounts" Grid.Row="2" />
<TextBlock Text="没有已登录的账号" HorizontalAlignment="Center" Margin="0,15,0,40" <local:MyButton Text="登录" x:Name="BtnLogin" ColorType="Highlight"
Foreground="{DynamicResource ColorBrush1}" Opacity="0.5" /> Height="28" Width="60" Margin="10,0,0,0" Grid.Row="2" Grid.Column="1" />
<local:MyButton Text="登录" x:Name="BtnLogin" ColorType="Highlight" Height="35" HorizontalAlignment="Center" Width="150" /> <Grid Grid.Row="4" Grid.ColumnSpan="2" Opacity="0.3" Margin="2,30,2,0" HorizontalAlignment="Center">
<StackPanel Orientation="Horizontal" Margin="0,16,0,0" HorizontalAlignment="Center" Opacity="0.7"> <Grid.ColumnDefinitions>
<local:MyTextButton Text="购买正版" Margin="0,0,15,0" EventType="打开网页" EventData="https://www.minecraft.net/store/checkout/minecraft-java-bedrock-edition-pc" /> <ColumnDefinition Width="Auto" />
<local:MyTextButton Text="老账号迁移" Margin="15,0,0,0" x:Name="BtnMigration" /> <ColumnDefinition Width="30" />
</StackPanel> <ColumnDefinition Width="Auto" />
</StackPanel> </Grid.ColumnDefinitions>
<local:MyTextButton Text="» 购买正版" EventType="打开网页" EventData="https://www.xbox.com/zh-cn/games/store/minecraft-java-bedrock-edition-for-pc/9nxp44l49shj"
Grid.Column="0" />
<local:MyTextButton Text="» 老账号迁移" x:Name="BtnMigration"
Grid.Column="2" />
</Grid>
</Grid>
</StackPanel> </StackPanel>
@@ -4,12 +4,50 @@
''' 刷新页面显示的所有信息。 ''' 刷新页面显示的所有信息。
''' </summary> ''' </summary>
Public Sub Reload(KeepInput As Boolean) Public Sub Reload(KeepInput As Boolean)
Dim IndexBefore = ComboAccounts.SelectedIndex
'刷新下拉框列表
ComboAccounts.Items.Clear()
ComboAccounts.Items.Add(New MyComboBoxItem With {.Content = "添加新账号"})
Try
Dim MsJson As JObject = GetJson(Setup.Get("LoginMsJson"))
For Each Account In MsJson
Dim Item As MyListItem = CType(FindResource("ComboBoxItemTemplateWithDelete"), DataTemplate).LoadContent()
Item.Tag = Account.Value.ToString
Item.Title = Account.Key
CType(Item.Buttons(0), MyIconButton).Tag = Account.Key
ComboAccounts.Items.Add(Item)
Next
Catch ex As Exception
Log(ex, $"微软登录信息出错,登录信息已被重置({Setup.Get("LoginMsJson")})", LogLevel.Hint)
Setup.Set("LoginMsJson", "{}")
End Try
'如果不保留输入,刷新列表后自动选择第一项
ComboAccounts.SelectedIndex = If(KeepInput, Math.Max(0, IndexBefore), 0)
End Sub End Sub
Private Sub ComboAccounts_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboAccounts.SelectionChanged
If AniControlEnabled <> 0 OrElse ComboAccounts.SelectedItem Is Nothing Then Exit Sub
If TypeOf ComboAccounts.SelectedItem Is MyListItem Then
ComboAccounts.ContentPresenter.Content = CType(ComboAccounts.SelectedItem, MyListItem).Title
ElseIf TypeOf ComboAccounts.SelectedItem Is MyComboBoxItem Then
ComboAccounts.ContentPresenter.Content = CType(ComboAccounts.SelectedItem, MyComboBoxItem).Content
End If
End Sub
''' <summary> ''' <summary>
''' 获取当前页面的登录信息。 ''' 获取当前页面的登录信息。
''' </summary> ''' </summary>
Public Shared Function GetLoginData() As McLoginMs Public Shared Function GetLoginData() As McLoginMs
Return New McLoginMs With {.OAuthRefreshToken = Setup.Get("CacheMsOAuthRefresh"), .UserName = Setup.Get("CacheMsName")} If FrmLoginMs Is Nothing Then Return New McLoginMs With {.OAuthRefreshToken = Setup.Get("CacheMsOAuthRefresh"), .UserName = Setup.Get("CacheMsName")}
Dim Result As McLoginMs = Nothing
RunInUiWait(Sub()
If FrmLoginMs.ComboAccounts.SelectedIndex = 0 Then
Result = New McLoginMs
Else
Dim Item As MyListItem = FrmLoginMs.ComboAccounts.SelectedItem
Result = New McLoginMs With {.OAuthRefreshToken = Item.Tag, .UserName = Item.Title}
End If
End Sub)
Return Result
End Function End Function
''' <summary> ''' <summary>
''' 当前页面的登录信息是否有效。 ''' 当前页面的登录信息是否有效。
@@ -26,13 +64,14 @@
End Function End Function
Private Sub BtnLogin_Click(sender As Object, e As EventArgs) Handles BtnLogin.Click Private Sub BtnLogin_Click(sender As Object, e As EventArgs) Handles BtnLogin.Click
ComboAccounts.IsEnabled = False
BtnLogin.IsEnabled = False BtnLogin.IsEnabled = False
BtnLogin.Text = "登录中 0%" BtnLogin.Text = "0%"
RunInNewThread(Sub() RunInNewThread(Sub()
Try Try
McLoginMsLoader.Start(GetLoginData(), IsForceRestart:=True) McLoginMsLoader.Start(GetLoginData(), IsForceRestart:=True)
Do While McLoginMsLoader.State = LoadState.Loading Do While McLoginMsLoader.State = LoadState.Loading
RunInUi(Sub() BtnLogin.Text = "登录中 " & Math.Round(McLoginMsLoader.Progress * 100) & "%") RunInUi(Sub() BtnLogin.Text = Math.Round(McLoginMsLoader.Progress * 100) & "%")
Thread.Sleep(50) Thread.Sleep(50)
Loop Loop
If McLoginMsLoader.State = LoadState.Finished Then If McLoginMsLoader.State = LoadState.Finished Then
@@ -45,7 +84,7 @@
Throw New Exception(McLoginMsLoader.Error.Message, McLoginMsLoader.Error) Throw New Exception(McLoginMsLoader.Error.Message, McLoginMsLoader.Error)
End If End If
Catch ex As ThreadInterruptedException Catch ex As ThreadInterruptedException
Hint("登录已取消!") Hint("已取消登录!")
Catch ex As Exception Catch ex As Exception
If ex.Message = "$$" Then If ex.Message = "$$" Then
ElseIf ex.Message.StartsWith("$") Then ElseIf ex.Message.StartsWith("$") Then
@@ -55,8 +94,9 @@
End If End If
Finally Finally
RunInUi(Sub() RunInUi(Sub()
ComboAccounts.IsEnabled = True
BtnLogin.IsEnabled = True BtnLogin.IsEnabled = True
BtnLogin.Text = "添加账号" BtnLogin.Text = "登录"
End Sub) End Sub)
End Try End Try
End Sub, "Ms Login") End Sub, "Ms Login")
@@ -9,39 +9,42 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="75" /> <RowDefinition Height="75" />
<RowDefinition Height="Auto" MinHeight="30" /> <RowDefinition Height="Auto" MinHeight="30" />
<RowDefinition Height="19" /> <RowDefinition Height="13" />
<RowDefinition Height="24" /> <RowDefinition Height="30" />
<RowDefinition Height="19" /> <RowDefinition Height="19" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="1" VerticalAlignment="Center" Name="TextName" Text="加载中" Margin="8,0" FontSize="17" HorizontalAlignment="Center" TextTrimming="CharacterEllipsis" /> <TextBlock Grid.Row="1" VerticalAlignment="Center" Name="TextName" Text="加载中" Margin="8,0" FontSize="17" HorizontalAlignment="Center" TextTrimming="CharacterEllipsis" />
<StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Center" x:Name="PanButtons" Opacity="0"> <Border Grid.Row="3" HorizontalAlignment="Center" x:Name="PanButtons" Opacity="0"
<local:MyIconButton Height="24" Margin="0,0.5,15,0" x:Name="BtnSkin" CornerRadius="5" Background="{DynamicResource ColorBrush8}" Padding="10,3,9,3">
ToolTip="皮肤/披风" ToolTipService.Placement="Center" ToolTipService.VerticalOffset="40" ToolTipService.InitialShowDelay="50" ToolTipService.ShowDuration="1000000" <StackPanel Orientation="Horizontal">
<local:MyIconButton Height="24" Margin="0,0.5,9,0" x:Name="BtnSkin"
ToolTip="皮肤与披风" ToolTipService.Placement="Center" ToolTipService.VerticalOffset="40" ToolTipService.InitialShowDelay="50" ToolTipService.ShowDuration="1000000"
LogoScale="1.08" Logo="M764.0003 0.076794a215.433442 215.433442 0 0 0-76.282279 13.950954l-9.06172 3.686123c-49.148314 20.734445-88.518161 30.53851-115.498538 30.53851-27.031573 0-66.478214-9.855261-116.676049-31.050471a217.583681 217.583681 0 0 0-72.186586-16.766743l-9.138515-0.307177-3.839712-0.051196-8.626553 0.307177-4.223683 0.281579A160.755943 160.755943 0 0 0 250.477214 45.385396l-219.32435 212.438467a102.392321 102.392321 0 0 0-11.263156 134.210734l106.360023 144.552359 3.378947 4.351674a102.469115 102.469115 0 0 0 112.810739 31.690423l5.657176-2.175837V883.210559a140.789441 140.789441 0 0 0 140.789441 140.789441h372.170487l5.657175-0.102392a140.789441 140.789441 0 0 0 135.132266-140.687049l-0.025599-318.6705 1.177512 0.716747a102.392321 102.392321 0 0 0 141.941355-44.233483l70.906682-144.39877a102.392321 102.392321 0 0 0-20.657651-118.647101L875.86391 45.385396A160.730345 160.730345 0 0 0 764.0003 0.076794z m-357.349199 111.454041C468.444867 137.615279 520.562558 150.644702 563.157763 150.644702c42.492813 0 94.584906-12.978227 156.199485-38.985876A112.580356 112.580356 0 0 1 764.0003 102.469115c15.154063 0 29.693773 5.887558 40.598555 16.433967L1023.923206 331.495138l-70.906682 144.39877-93.023423-65.684674a38.39712 38.39712 0 0 0-60.53946 31.383247V883.210559a38.39712 38.39712 0 0 1-38.39712 38.39712H388.886034a38.39712 38.39712 0 0 1-38.397121-38.39712V445.176212a38.39712 38.39712 0 0 0-61.691373-30.487314l-80.070795 61.20501L102.392321 331.341549l219.32435-212.438467a58.363623 58.363623 0 0 1 35.581332-16.229183L362.110442 102.469115l6.322726 0.179186a115.191361 115.191361 0 0 1 38.217933 8.882534z"> LogoScale="1.08" Logo="M764.0003 0.076794a215.433442 215.433442 0 0 0-76.282279 13.950954l-9.06172 3.686123c-49.148314 20.734445-88.518161 30.53851-115.498538 30.53851-27.031573 0-66.478214-9.855261-116.676049-31.050471a217.583681 217.583681 0 0 0-72.186586-16.766743l-9.138515-0.307177-3.839712-0.051196-8.626553 0.307177-4.223683 0.281579A160.755943 160.755943 0 0 0 250.477214 45.385396l-219.32435 212.438467a102.392321 102.392321 0 0 0-11.263156 134.210734l106.360023 144.552359 3.378947 4.351674a102.469115 102.469115 0 0 0 112.810739 31.690423l5.657176-2.175837V883.210559a140.789441 140.789441 0 0 0 140.789441 140.789441h372.170487l5.657175-0.102392a140.789441 140.789441 0 0 0 135.132266-140.687049l-0.025599-318.6705 1.177512 0.716747a102.392321 102.392321 0 0 0 141.941355-44.233483l70.906682-144.39877a102.392321 102.392321 0 0 0-20.657651-118.647101L875.86391 45.385396A160.730345 160.730345 0 0 0 764.0003 0.076794z m-357.349199 111.454041C468.444867 137.615279 520.562558 150.644702 563.157763 150.644702c42.492813 0 94.584906-12.978227 156.199485-38.985876A112.580356 112.580356 0 0 1 764.0003 102.469115c15.154063 0 29.693773 5.887558 40.598555 16.433967L1023.923206 331.495138l-70.906682 144.39877-93.023423-65.684674a38.39712 38.39712 0 0 0-60.53946 31.383247V883.210559a38.39712 38.39712 0 0 1-38.39712 38.39712H388.886034a38.39712 38.39712 0 0 1-38.397121-38.39712V445.176212a38.39712 38.39712 0 0 0-61.691373-30.487314l-80.070795 61.20501L102.392321 331.341549l219.32435-212.438467a58.363623 58.363623 0 0 1 35.581332-16.229183L362.110442 102.469115l6.322726 0.179186a115.191361 115.191361 0 0 1 38.217933 8.882534z">
<local:MyIconButton.ContextMenu> <local:MyIconButton.ContextMenu>
<ContextMenu Closed="HidePanel" HorizontalOffset="10" VerticalOffset="18"> <ContextMenu Closed="HidePanel" HorizontalOffset="10" VerticalOffset="18">
<local:MyMenuItem Click="BtnSkinEdit_Click" Header="修改皮肤"/> <local:MyMenuItem Click="BtnSkinEdit_Click" Header="修改皮肤"/>
<local:MyMenuItem Click="BtnSkinSave_Click" Header="保存皮肤"/> <local:MyMenuItem Click="BtnSkinSave_Click" Header="保存皮肤"/>
<local:MyMenuItem Click="BtnSkinRefresh_Click" Header="刷新头像"/> <local:MyMenuItem Click="BtnSkinRefresh_Click" Header="刷新头像"/>
<Separator /> <Separator />
<local:MyMenuItem Click="BtnSkinCape_Click" Header="修改披风"/> <local:MyMenuItem Click="BtnSkinCape_Click" Header="修改披风"/>
</ContextMenu> </ContextMenu>
</local:MyIconButton.ContextMenu> </local:MyIconButton.ContextMenu>
</local:MyIconButton> </local:MyIconButton>
<local:MyIconButton Height="24" Margin="0,0,16,0" x:Name="BtnEdit" <local:MyIconButton Height="24" Margin="0,0,9,0" x:Name="BtnEdit"
ToolTip="账号信息" ToolTipService.Placement="Center" ToolTipService.VerticalOffset="40" ToolTipService.InitialShowDelay="50" ToolTipService.ShowDuration="1000000" ToolTip="修改信息" ToolTipService.Placement="Center" ToolTipService.VerticalOffset="40" ToolTipService.InitialShowDelay="50" ToolTipService.ShowDuration="1000000"
LogoScale="1.1" Logo="M462.336 924.891429L73.142857 950.857143l25.965714-389.193143 467.017143-467.017143a73.398857 73.398857 0 0 1 103.789715 0l259.437714 259.437714a73.398857 73.398857 0 0 1 0 103.789715l-467.017143 467.017143z m155.684571-778.349715L202.861714 561.664l259.474286 259.474286L877.458286 405.942857 618.057143 146.541714zM151.003429 873.033143l233.508571-25.965714-207.579429-207.579429-25.965714 233.545143z m544.841142-492.982857l51.894858 51.894857-233.508572 233.508571-51.931428-51.894857 233.545142-233.508571z"> LogoScale="1.1" Logo="M462.336 924.891429L73.142857 950.857143l25.965714-389.193143 467.017143-467.017143a73.398857 73.398857 0 0 1 103.789715 0l259.437714 259.437714a73.398857 73.398857 0 0 1 0 103.789715l-467.017143 467.017143z m155.684571-778.349715L202.861714 561.664l259.474286 259.474286L877.458286 405.942857 618.057143 146.541714zM151.003429 873.033143l233.508571-25.965714-207.579429-207.579429-25.965714 233.545143z m544.841142-492.982857l51.894858 51.894857-233.508572 233.508571-51.931428-51.894857 233.545142-233.508571z">
<local:MyIconButton.ContextMenu> <local:MyIconButton.ContextMenu>
<ContextMenu Closed="HidePanel" HorizontalOffset="10" VerticalOffset="18"> <ContextMenu Closed="HidePanel" HorizontalOffset="10" VerticalOffset="18">
<local:MyMenuItem Click="BtnEditPassword_Click" Header="修改密码" /> <local:MyMenuItem Click="BtnEditPassword_Click" Header="修改密码" />
<local:MyMenuItem Click="BtnEditName_Click" Header="修改玩家名" /> <local:MyMenuItem Click="BtnEditName_Click" Header="修改玩家名" />
</ContextMenu> </ContextMenu>
</local:MyIconButton.ContextMenu> </local:MyIconButton.ContextMenu>
</local:MyIconButton> </local:MyIconButton>
<local:MyIconButton Height="24" x:Name="BtnExit" Margin="0,0,0,0" <local:MyIconButton Height="24" x:Name="BtnExit" Margin="0,0,0,0"
ToolTip="退出登录" ToolTipService.Placement="Center" ToolTipService.VerticalOffset="40" ToolTipService.InitialShowDelay="50" ToolTipService.ShowDuration="1000000" ToolTip="切换账号" ToolTipService.Placement="Center" ToolTipService.VerticalOffset="40" ToolTipService.InitialShowDelay="50" ToolTipService.ShowDuration="1000000"
Logo="M533.333333 64a21.333333 21.333333 0 0 1 21.333334 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333334 21.333333H170.666667v725.333334h362.666666a21.333333 21.333333 0 0 1 21.333334 21.333333v42.666667a21.333333 21.333333 0 0 1-21.333334 21.333333H170.666667a85.333333 85.333333 0 0 1-85.226667-81.066667L85.333333 874.666667V149.333333a85.333333 85.333333 0 0 1 81.066667-85.226666L170.666667 64h362.666666z m194.581334 219.584l183.168 183.168a64 64 0 0 1 2.88 87.424l-2.88 3.072-183.168 183.168a21.333333 21.333333 0 0 1-30.165334 0l-30.165333-30.165333a21.333333 21.333333 0 0 1 0-30.165334L792.96 554.666667H362.666667a21.333333 21.333333 0 0 1-21.333334-21.333334v-42.666666a21.333333 21.333333 0 0 1 21.333334-21.333334h430.293333l-125.376-125.418666a21.333333 21.333333 0 0 1 0-30.165334l30.165333-30.165333a21.333333 21.333333 0 0 1 30.165334 0z" /> LogoScale="1.15" Logo="M512 0A512 512 0 1 0 1024 512 512 512 0 0 0 512 0z m0 941.407086A429.407086 429.407086 0 1 1 941.407086 512 429.407086 429.407086 0 0 1 512 941.407086z m235.139657-368.64H264.045714a43.505371 43.505371 0 0 0-31.246628 72.060343l159.305143 166.765714a41.281829 41.281829 0 1 0 59.626057-56.788114l-94.997943-99.474286H747.227429a41.311086 41.311086 0 1 0 0-82.622172zM262.670629 450.940343H745.764571a43.505371 43.505371 0 0 0 31.246629-72.352914l-159.305143-166.765715a41.281829 41.281829 0 1 0-59.713828 57.022172l94.968685 99.474285H262.670629a41.281829 41.281829 0 0 0 0 82.563658z" />
</StackPanel> </StackPanel>
</Border>
</Grid> </Grid>
<local:MySkin HorizontalAlignment="Center" VerticalAlignment="Top" x:Name="Skin" HasCape="True" IsHitTestVisible="False" /> <local:MySkin HorizontalAlignment="Center" VerticalAlignment="Top" x:Name="Skin" HasCape="True" IsHitTestVisible="False" />
</Grid> </Grid>
@@ -7,7 +7,7 @@
<Grid> <Grid>
<Grid x:Name="PanAllBack"> <Grid x:Name="PanAllBack">
<local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack"> <local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" x:Name="PanBack">
<VirtualizingStackPanel VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling" Name="PanMain" Margin="25,25,25,10" Grid.IsSharedSizeScope="True" /> <StackPanel Name="PanMain" Margin="25,25,25,10" Grid.IsSharedSizeScope="True" />
</local:MyScrollViewer> </local:MyScrollViewer>
<local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" Margin="40" x:Name="PanEmpty" UseAnimation="False"> <local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" Margin="40" x:Name="PanEmpty" UseAnimation="False">
<StackPanel Margin="20,17"> <StackPanel Margin="20,17">
@@ -219,7 +219,7 @@
<ColumnDefinition Width="1*" /> <ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="28" /> <RowDefinition Height="Auto" />
<RowDefinition Height="9" /> <RowDefinition Height="9" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="9" /> <RowDefinition Height="9" />
@@ -228,7 +228,8 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数头" Margin="0,0,25,0" /> <TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数头" Margin="0,0,25,0" />
<local:MyTextBox x:Name="TextAdvanceJvm" Grid.Row="0" Grid.ColumnSpan="2" Tag="LaunchAdvanceJvm" Grid.Column="1" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,在没有确定把握的情况下请不要尝试修改。&#xa;你可以通过点击左侧选项卡的初始化按钮来恢复到默认设置。" Text="-XX:+UseG1GC -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -Dfml.ignoreInvalidMinecraftCertificates=True -Dfml.ignorePatchDiscrepancies=True -Dlog4j2.formatMsgNoLookups=true" /> <local:MyTextBox x:Name="TextAdvanceJvm" Grid.Row="0" Grid.ColumnSpan="2" Tag="LaunchAdvanceJvm" Grid.Column="1" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,在没有确定把握的情况下请不要尝试修改。&#xa;你可以通过点击左侧选项卡的初始化按钮来恢复到默认设置。" Text="-XX:+UseG1GC -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -Dfml.ignoreInvalidMinecraftCertificates=True -Dfml.ignorePatchDiscrepancies=True -Dlog4j2.formatMsgNoLookups=true"
Height="57" AcceptsReturn="True" TextWrapping="Wrap" VerticalContentAlignment="Top" Padding="0,5" />
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数尾" Margin="0,0,25,0" /> <TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数尾" Margin="0,0,25,0" />
<local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="LaunchAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。&#xa;例如输入 --demo 则会以试玩模式启动游戏。" /> <local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="LaunchAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。&#xa;例如输入 --demo 则会以试玩模式启动游戏。" />
<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" />
@@ -182,7 +182,7 @@
<ColumnDefinition Width="60" /> <ColumnDefinition Width="60" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="28" /> <RowDefinition Height="Auto" />
<RowDefinition Height="9" /> <RowDefinition Height="9" />
<RowDefinition Height="28" /> <RowDefinition Height="28" />
<RowDefinition Height="9" /> <RowDefinition Height="9" />
@@ -192,7 +192,8 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数头" Margin="0,0,25,0" /> <TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数头" Margin="0,0,25,0" />
<local:MyTextBox x:Name="TextAdvanceJvm" Grid.Row="0" Grid.ColumnSpan="2" Tag="VersionAdvanceJvm" Grid.Column="1" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,在没有确定把握的情况下请不要尝试修改。&#xa;若留空,则使用全局设置的值。" HintText="使用全局设置" /> <local:MyTextBox x:Name="TextAdvanceJvm" Grid.Row="0" Grid.ColumnSpan="2" Tag="VersionAdvanceJvm" Grid.Column="1" ToolTip="启动 Minecraft 时使用的额外 JVM 参数,在没有确定把握的情况下请不要尝试修改。&#xa;若留空,则使用全局设置的值。" HintText="使用全局设置"
Height="57" AcceptsReturn="True" TextWrapping="Wrap" VerticalContentAlignment="Top" Padding="0,5" />
<TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数尾" Margin="0,0,25,0" /> <TextBlock Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Text="JVM 参数尾" Margin="0,0,25,0" />
<local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="VersionAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。&#xa;例如输入 --demo 则会以试玩模式启动游戏。&#xa;若留空,则使用全局设置的值。" HintText="使用全局设置" /> <local:MyTextBox x:Name="TextAdvanceGame" Grid.Row="2" Grid.ColumnSpan="2" Tag="VersionAdvanceGame" Grid.Column="1" ToolTip="文本框中的内容将会被直接拼合在启动参数的末尾。&#xa;例如输入 --demo 则会以试玩模式启动游戏。&#xa;若留空,则使用全局设置的值。" HintText="使用全局设置" />
<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" />
@@ -396,7 +396,8 @@ PreFin:
'LittleSkin 'LittleSkin
Private Sub BtnServerAuthLittle_Click(sender As Object, e As EventArgs) Handles BtnServerAuthLittle.Click Private Sub BtnServerAuthLittle_Click(sender As Object, e As EventArgs) Handles BtnServerAuthLittle.Click
If MyMsgBox("即将把第三方登录设置覆盖为自动使用 LittleSkin 登录,是否继续?", "覆盖确认", "确定", "取消") = 2 Then Exit Sub If TextServerAuthServer.Text <> "" AndAlso TextServerAuthServer.Text <> "https://littleskin.cn/api/yggdrasil" AndAlso
MyMsgBox("即将把第三方登录设置覆盖为自动使用 LittleSkin 登录,是否继续?", "覆盖确认", "确定", "取消") = 2 Then Exit Sub
TextServerAuthServer.Text = "https://littleskin.cn/api/yggdrasil" TextServerAuthServer.Text = "https://littleskin.cn/api/yggdrasil"
TextServerAuthRegister.Text = "https://littleskin.cn/auth/register" TextServerAuthRegister.Text = "https://littleskin.cn/auth/register"
TextServerAuthName.Text = "LittleSkin 登录" TextServerAuthName.Text = "LittleSkin 登录"
@@ -285,7 +285,7 @@
<Compile Include="Pages\PageVersion\PageVersionSetup.xaml.vb"> <Compile Include="Pages\PageVersion\PageVersionSetup.xaml.vb">
<DependentUpon>PageVersionSetup.xaml</DependentUpon> <DependentUpon>PageVersionSetup.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="Modules\Reference\PresentationFramework.Aero\SystemDropShadowChrome.vb" /> <Compile Include="Modules\Reference\SystemDropShadowChrome.vb" />
<Compile Include="Modules\Base\ModLoader.vb" /> <Compile Include="Modules\Base\ModLoader.vb" />
<Compile Include="Modules\Base\ModNet.vb" /> <Compile Include="Modules\Base\ModNet.vb" />
<Compile Include="Modules\Base\ModValidate.vb" /> <Compile Include="Modules\Base\ModValidate.vb" />