Просмотр исходного кода

fix: 编译错误

CO-Authored-by: jiangyanyue <[email protected]>
薄奚梦灵 1 год назад
Родитель
Сommit
3adf47aa2c

+ 2 - 2
Plain Craft Launcher 2.sln

@@ -1,4 +1,4 @@
-
+
 Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio Version 17
 VisualStudioVersion = 17.2.32616.157
@@ -34,4 +34,4 @@ Global
 	GlobalSection(Performance) = preSolution
 		HasPerformanceSessions = true
 	EndGlobalSection
-EndGlobal
+EndGlobal

+ 31 - 33
Plain Craft Launcher 2/App.config

@@ -1,37 +1,35 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-	<system.net>
-		<settings>
-			<httpWebRequest useUnsafeHeaderParsing="true"/>
-		</settings>
-	</system.net>
-	<startup>
-		<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
-	</startup>
-	<runtime>
+    <system.net>
+        <settings>
+            <httpWebRequest useUnsafeHeaderParsing="true"/>
+        </settings>
+    </system.net>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
+    </startup>
+    <runtime>
 		<AppContextSwitchOverrides value="Switch.System.Net.DontEnableSchUseStrongCrypto=false" />
-		<AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/>
-		<!-- #5337 -->
-		<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" />
-		<!-- 长路径支持 -->
-		<generatePublisherEvidence enabled="false"/>
-		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
-			<dependentAssembly>
-				<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
-				<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0"/>
-			</dependentAssembly>
-			<dependentAssembly>
-				<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
-				<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0"/>
-			</dependentAssembly>
-			<dependentAssembly>
-				<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
-				<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
-			</dependentAssembly>
-			<dependentAssembly>
-				<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
-				<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
-			</dependentAssembly>
-		</assemblyBinding>
-	</runtime>
+        <AppContextSwitchOverrides value="Switch.System.Windows.DoNotScaleForDpiChanges=false"/> <!-- #5337 -->
+		<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=false;Switch.System.IO.BlockLongPaths=false" /> <!-- 长路径支持 -->
+        <generatePublisherEvidence enabled="false"/>
+        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+            <dependentAssembly>
+                  <assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+                  <bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0"/>
+            </dependentAssembly>
+            <dependentAssembly>
+                  <assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
+                  <bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0"/>
+            </dependentAssembly>
+            <dependentAssembly>
+                  <assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
+                  <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
+            </dependentAssembly>
+            <dependentAssembly>
+                  <assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
+                  <bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0"/>
+            </dependentAssembly>
+        </assemblyBinding>
+    </runtime>
 </configuration>

+ 299 - 0
Plain Craft Launcher 2/Modules/Reference/SystemDropShadowChrome.vb

@@ -0,0 +1,299 @@
+Public NotInheritable Class SystemDropShadowChrome
+    Inherits Decorator
+
+    '源码来源于:https://referencesource.microsoft.com/#PresentationFramework.Aero/parent/Shared/Microsoft/Windows/Themes/SystemDropShadowChrome.cs,6d9c27d92a8128c1
+
+    Public Shared ReadOnly ColorProperty As DependencyProperty = DependencyProperty.Register("Color", GetType(Color), GetType(SystemDropShadowChrome), New FrameworkPropertyMetadata(Color.FromArgb(&H71, &H0, &H0, &H0), FrameworkPropertyMetadataOptions.AffectsRender, New PropertyChangedCallback(AddressOf ClearBrushes)))
+    Public Property Color As Color
+        Get
+            Return CType(GetValue(ColorProperty), Color)
+        End Get
+        Set(value As Color)
+            SetValue(ColorProperty, value)
+        End Set
+    End Property
+
+    Public Shared ReadOnly CornerRadiusProperty As DependencyProperty = DependencyProperty.Register("CornerRadius", GetType(CornerRadius), GetType(SystemDropShadowChrome), New FrameworkPropertyMetadata(New CornerRadius(), FrameworkPropertyMetadataOptions.AffectsRender, New PropertyChangedCallback(AddressOf ClearBrushes)), New ValidateValueCallback(AddressOf IsCornerRadiusValid))
+    Public Property CornerRadius As CornerRadius
+        Get
+            Return CType(GetValue(CornerRadiusProperty), CornerRadius)
+        End Get
+        Set(value As CornerRadius)
+            SetValue(CornerRadiusProperty, value)
+        End Set
+    End Property
+    Private Shared Function IsCornerRadiusValid(value As Object) As Boolean
+        Dim cr As CornerRadius = CType(value, CornerRadius)
+        Return Not (cr.TopLeft < 0.0 OrElse cr.TopRight < 0.0 OrElse cr.BottomLeft < 0.0 OrElse cr.BottomRight < 0.0 OrElse Double.IsNaN(cr.TopLeft) OrElse Double.IsNaN(cr.TopRight) OrElse Double.IsNaN(cr.BottomLeft) OrElse Double.IsNaN(cr.BottomRight) OrElse Double.IsInfinity(cr.TopLeft) OrElse Double.IsInfinity(cr.TopRight) OrElse Double.IsInfinity(cr.BottomLeft) OrElse Double.IsInfinity(cr.BottomRight))
+    End Function
+
+    Private Const ShadowDepth As Double = 5
+
+    Protected Overrides Sub OnRender(drawingContext As DrawingContext)
+        Dim cornerRadius As CornerRadius = Me.CornerRadius
+        Dim shadowBounds As New Rect(New Point(ShadowDepth, ShadowDepth), New Size(RenderSize.Width, RenderSize.Height))
+        Dim color As Color = Me.Color
+
+        If shadowBounds.Width > 0 AndAlso shadowBounds.Height > 0 AndAlso color.A > 0 Then
+            Dim centerWidth As Double = shadowBounds.Right - shadowBounds.Left - 2 * ShadowDepth
+            Dim centerHeight As Double = shadowBounds.Bottom - shadowBounds.Top - 2 * ShadowDepth
+            Dim maxRadius As Double = Math.Min(centerWidth * 0.5, centerHeight * 0.5)
+            cornerRadius.TopLeft = Math.Min(cornerRadius.TopLeft, maxRadius)
+            cornerRadius.TopRight = Math.Min(cornerRadius.TopRight, maxRadius)
+            cornerRadius.BottomLeft = Math.Min(cornerRadius.BottomLeft, maxRadius)
+            cornerRadius.BottomRight = Math.Min(cornerRadius.BottomRight, maxRadius)
+            Dim brushes As Brush() = GetBrushes(color, cornerRadius)
+            Dim centerTop As Double = shadowBounds.Top + ShadowDepth
+            Dim centerLeft As Double = shadowBounds.Left + ShadowDepth
+            Dim centerRight As Double = shadowBounds.Right - ShadowDepth
+            Dim centerBottom As Double = shadowBounds.Bottom - ShadowDepth
+            Dim guidelineSetX As Double() = New Double() {centerLeft, centerLeft + cornerRadius.TopLeft, centerRight - cornerRadius.TopRight, centerLeft + cornerRadius.BottomLeft, centerRight - cornerRadius.BottomRight, centerRight}
+            Dim guidelineSetY As Double() = New Double() {centerTop, centerTop + cornerRadius.TopLeft, centerTop + cornerRadius.TopRight, centerBottom - cornerRadius.BottomLeft, centerBottom - cornerRadius.BottomRight, centerBottom}
+            drawingContext.PushGuidelineSet(New GuidelineSet(guidelineSetX, guidelineSetY))
+            cornerRadius.TopLeft += ShadowDepth
+            cornerRadius.TopRight += ShadowDepth
+            cornerRadius.BottomLeft += ShadowDepth
+            cornerRadius.BottomRight += ShadowDepth
+            Dim topLeft As New Rect(shadowBounds.Left, shadowBounds.Top, cornerRadius.TopLeft, cornerRadius.TopLeft)
+            drawingContext.DrawRectangle(brushes(Placement.TopLeft), Nothing, topLeft)
+            Dim topWidth As Double = guidelineSetX(2) - guidelineSetX(1)
+
+            If topWidth > 0 Then
+                Dim top As New Rect(guidelineSetX(1), shadowBounds.Top, topWidth, ShadowDepth)
+                drawingContext.DrawRectangle(brushes(Placement.Top), Nothing, top)
+            End If
+
+            Dim topRight As New Rect(guidelineSetX(2), shadowBounds.Top, cornerRadius.TopRight, cornerRadius.TopRight)
+            drawingContext.DrawRectangle(brushes(Placement.TopRight), Nothing, topRight)
+            Dim leftHeight As Double = guidelineSetY(3) - guidelineSetY(1)
+
+            If leftHeight > 0 Then
+                Dim left As New Rect(shadowBounds.Left, guidelineSetY(1), ShadowDepth, leftHeight)
+                drawingContext.DrawRectangle(brushes(Placement.Left), Nothing, left)
+            End If
+
+            Dim rightHeight As Double = guidelineSetY(4) - guidelineSetY(2)
+
+            If rightHeight > 0 Then
+                Dim right As New Rect(guidelineSetX(5), guidelineSetY(2), ShadowDepth, rightHeight)
+                drawingContext.DrawRectangle(brushes(Placement.Right), Nothing, right)
+            End If
+
+            Dim bottomLeft As New Rect(shadowBounds.Left, guidelineSetY(3), cornerRadius.BottomLeft, cornerRadius.BottomLeft)
+            drawingContext.DrawRectangle(brushes(Placement.BottomLeft), Nothing, bottomLeft)
+            Dim bottomWidth As Double = guidelineSetX(4) - guidelineSetX(3)
+
+            If bottomWidth > 0 Then
+                Dim bottom As New Rect(guidelineSetX(3), guidelineSetY(5), bottomWidth, ShadowDepth)
+                drawingContext.DrawRectangle(brushes(Placement.Bottom), Nothing, bottom)
+            End If
+
+            Dim bottomRight As New Rect(guidelineSetX(4), guidelineSetY(4), cornerRadius.BottomRight, cornerRadius.BottomRight)
+            drawingContext.DrawRectangle(brushes(Placement.BottomRight), Nothing, bottomRight)
+
+            If cornerRadius.TopLeft = ShadowDepth AndAlso cornerRadius.TopLeft = cornerRadius.TopRight AndAlso cornerRadius.TopLeft = cornerRadius.BottomLeft AndAlso cornerRadius.TopLeft = cornerRadius.BottomRight Then
+                Dim center As New Rect(guidelineSetX(0), guidelineSetY(0), centerWidth, centerHeight)
+                drawingContext.DrawRectangle(brushes(Placement.Center), Nothing, center)
+            Else
+                Dim figure As New PathFigure()
+
+                If cornerRadius.TopLeft > ShadowDepth Then
+                    figure.StartPoint = New Point(guidelineSetX(1), guidelineSetY(0))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(1), guidelineSetY(1)), True))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(0), guidelineSetY(1)), True))
+                Else
+                    figure.StartPoint = New Point(guidelineSetX(0), guidelineSetY(0))
+                End If
+
+                If cornerRadius.BottomLeft > ShadowDepth Then
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(0), guidelineSetY(3)), True))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(3), guidelineSetY(3)), True))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(3), guidelineSetY(5)), True))
+                Else
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(0), guidelineSetY(5)), True))
+                End If
+
+                If cornerRadius.BottomRight > ShadowDepth Then
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(4), guidelineSetY(5)), True))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(4), guidelineSetY(4)), True))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(5), guidelineSetY(4)), True))
+                Else
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(5), guidelineSetY(5)), True))
+                End If
+
+                If cornerRadius.TopRight > ShadowDepth Then
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(5), guidelineSetY(2)), True))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(2), guidelineSetY(2)), True))
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(2), guidelineSetY(0)), True))
+                Else
+                    figure.Segments.Add(New LineSegment(New Point(guidelineSetX(5), guidelineSetY(0)), True))
+                End If
+
+                figure.IsClosed = True
+                figure.Freeze()
+                Dim geometry As New PathGeometry()
+                geometry.Figures.Add(figure)
+                geometry.Freeze()
+                drawingContext.DrawGeometry(brushes(Placement.Center), Nothing, geometry)
+            End If
+
+            drawingContext.Pop()
+        End If
+    End Sub
+
+    Private Enum Placement
+        TopLeft = 0
+        Top = 1
+        TopRight = 2
+        Left = 3
+        Center = 4
+        Right = 5
+        BottomLeft = 6
+        Bottom = 7
+        BottomRight = 8
+    End Enum
+    Private Shared _commonBrushes As Brush()
+    Private Shared _commonCornerRadius As CornerRadius
+    Private Shared ReadOnly _resourceAccess As New Object()
+    Private _brushes As Brush()
+
+    Private Shared Sub ClearBrushes(o As DependencyObject, e As DependencyPropertyChangedEventArgs)
+        CType(o, SystemDropShadowChrome)._brushes = Nothing
+    End Sub
+    Private Shared Function CreateStops(c As Color, cornerRadius As Double) As GradientStopCollection
+        Dim gradientScale As Double = 1 / (cornerRadius + ShadowDepth)
+        Dim gsc As New GradientStopCollection From {
+            New GradientStop(c, (0.5 + cornerRadius) * gradientScale)
+        }
+        Dim stopColor As Color = c
+        stopColor.A = CByte(0.74336 * c.A)
+        gsc.Add(New GradientStop(stopColor, (1.5 + cornerRadius) * gradientScale))
+        stopColor.A = CByte(0.38053 * c.A)
+        gsc.Add(New GradientStop(stopColor, (2.5 + cornerRadius) * gradientScale))
+        stopColor.A = CByte(0.12389 * c.A)
+        gsc.Add(New GradientStop(stopColor, (3.5 + cornerRadius) * gradientScale))
+        stopColor.A = CByte(0.02654 * c.A)
+        gsc.Add(New GradientStop(stopColor, (4.5 + cornerRadius) * gradientScale))
+        stopColor.A = 0
+        gsc.Add(New GradientStop(stopColor, (5 + cornerRadius) * gradientScale))
+        gsc.Freeze()
+        Return gsc
+    End Function
+    Private Shared Function CreateBrushes(c As Color, cornerRadius As CornerRadius) As Brush()
+        Dim brushes As Brush() = New Brush(8) {}
+        brushes(Placement.Center) = New SolidColorBrush(c)
+        brushes(Placement.Center).Freeze()
+        Dim sideStops As GradientStopCollection = CreateStops(c, 0)
+        Dim top As New LinearGradientBrush(sideStops, New Point(0, 1), New Point(0, 0))
+        top.Freeze()
+        brushes(Placement.Top) = top
+        Dim left As New LinearGradientBrush(sideStops, New Point(1, 0), New Point(0, 0))
+        left.Freeze()
+        brushes(Placement.Left) = left
+        Dim right As New LinearGradientBrush(sideStops, New Point(0, 0), New Point(1, 0))
+        right.Freeze()
+        brushes(Placement.Right) = right
+        Dim bottom As New LinearGradientBrush(sideStops, New Point(0, 0), New Point(0, 1))
+        bottom.Freeze()
+        brushes(Placement.Bottom) = bottom
+        Dim topLeftStops As GradientStopCollection
+
+        If cornerRadius.TopLeft = 0 Then
+            topLeftStops = sideStops
+        Else
+            topLeftStops = CreateStops(c, cornerRadius.TopLeft)
+        End If
+
+        Dim topLeft As New RadialGradientBrush(topLeftStops) With {
+            .RadiusX = 1,
+            .RadiusY = 1,
+            .Center = New Point(1, 1),
+            .GradientOrigin = New Point(1, 1)
+        }
+        topLeft.Freeze()
+        brushes(Placement.TopLeft) = topLeft
+        Dim topRightStops As GradientStopCollection
+
+        If cornerRadius.TopRight = 0 Then
+            topRightStops = sideStops
+        ElseIf cornerRadius.TopRight = cornerRadius.TopLeft Then
+            topRightStops = topLeftStops
+        Else
+            topRightStops = CreateStops(c, cornerRadius.TopRight)
+        End If
+
+        Dim topRight As New RadialGradientBrush(topRightStops) With {
+            .RadiusX = 1,
+            .RadiusY = 1,
+            .Center = New Point(0, 1),
+            .GradientOrigin = New Point(0, 1)
+        }
+        topRight.Freeze()
+        brushes(Placement.TopRight) = topRight
+        Dim bottomLeftStops As GradientStopCollection
+
+        If cornerRadius.BottomLeft = 0 Then
+            bottomLeftStops = sideStops
+        ElseIf cornerRadius.BottomLeft = cornerRadius.TopLeft Then
+            bottomLeftStops = topLeftStops
+        ElseIf cornerRadius.BottomLeft = cornerRadius.TopRight Then
+            bottomLeftStops = topRightStops
+        Else
+            bottomLeftStops = CreateStops(c, cornerRadius.BottomLeft)
+        End If
+
+        Dim bottomLeft As New RadialGradientBrush(bottomLeftStops) With {
+            .RadiusX = 1,
+            .RadiusY = 1,
+            .Center = New Point(1, 0),
+            .GradientOrigin = New Point(1, 0)
+        }
+        bottomLeft.Freeze()
+        brushes(Placement.BottomLeft) = bottomLeft
+        Dim bottomRightStops As GradientStopCollection
+
+        If cornerRadius.BottomRight = 0 Then
+            bottomRightStops = sideStops
+        ElseIf cornerRadius.BottomRight = cornerRadius.TopLeft Then
+            bottomRightStops = topLeftStops
+        ElseIf cornerRadius.BottomRight = cornerRadius.TopRight Then
+            bottomRightStops = topRightStops
+        ElseIf cornerRadius.BottomRight = cornerRadius.BottomLeft Then
+            bottomRightStops = bottomLeftStops
+        Else
+            bottomRightStops = CreateStops(c, cornerRadius.BottomRight)
+        End If
+
+        Dim bottomRight As New RadialGradientBrush(bottomRightStops) With {
+            .RadiusX = 1,
+            .RadiusY = 1,
+            .Center = New Point(0, 0),
+            .GradientOrigin = New Point(0, 0)
+        }
+        bottomRight.Freeze()
+        brushes(Placement.BottomRight) = bottomRight
+        Return brushes
+    End Function
+    Private Function GetBrushes(c As Color, cornerRadius As CornerRadius) As Brush()
+        If _commonBrushes Is Nothing Then
+
+            SyncLock _resourceAccess
+
+                If _commonBrushes Is Nothing Then
+                    _commonBrushes = CreateBrushes(c, cornerRadius)
+                    _commonCornerRadius = cornerRadius
+                End If
+            End SyncLock
+        End If
+
+        If c = CType(_commonBrushes(Placement.Center), SolidColorBrush).Color AndAlso cornerRadius = _commonCornerRadius Then
+            _brushes = Nothing
+            Return _commonBrushes
+        ElseIf _brushes Is Nothing Then
+            _brushes = CreateBrushes(c, cornerRadius)
+        End If
+
+        Return _brushes
+    End Function
+
+End Class

+ 153 - 51
Plain Craft Launcher 2/My Project/Resources.Designer.vb

@@ -1,4 +1,4 @@
-'------------------------------------------------------------------------------
+'------------------------------------------------------------------------------
 ' <auto-generated>
 '     此代码由工具生成。
 '     运行时版本:4.0.30319.42000
@@ -11,61 +11,163 @@
 Option Strict On
 Option Explicit On
 
+Imports System
 
-
-<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
- Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0"),  _
- Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
-Partial Friend NotInheritable Class MySettings
-    Inherits Global.System.Configuration.ApplicationSettingsBase
-    
-    Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
-    
-#Region "My.Settings 自动保存功能"
-#If _MyType = "WindowsForms" Then
-    Private Shared addedHandler As Boolean
-
-    Private Shared addedHandlerLockObject As New Object
-
-    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
-    Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
-        If My.Application.SaveMySettingsOnExit Then
-            My.Settings.Save()
-        End If
-    End Sub
-#End If
-#End Region
-    
-    Public Shared ReadOnly Property [Default]() As MySettings
-        Get
-            
-#If _MyType = "WindowsForms" Then
-               If Not addedHandler Then
-                    SyncLock addedHandlerLockObject
-                        If Not addedHandler Then
-                            AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
-                            addedHandler = True
-                        End If
-                    End SyncLock
-                End If
-#End If
-            Return defaultInstance
-        End Get
-    End Property
-End Class
-
-Namespace My
+Namespace My.Resources
     
-    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _
+    '此类是由 StronglyTypedResourceBuilder
+    '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    '(以 /str 作为命令选项),或重新生成 VS 项目。
+    '''<summary>
+    '''  一个强类型的资源类,用于查找本地化的字符串等。
+    '''</summary>
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"),  _
      Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
-     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _
-    Friend Module MySettingsProperty
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
+    Friend Module Resources
+        
+        Private resourceMan As Global.System.Resources.ResourceManager
+        
+        Private resourceCulture As Global.System.Globalization.CultureInfo
+        
+        '''<summary>
+        '''  返回此类使用的缓存的 ResourceManager 实例。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
+            Get
+                If Object.ReferenceEquals(resourceMan, Nothing) Then
+                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("PCL.Resources", GetType(Resources).Assembly)
+                    resourceMan = temp
+                End If
+                Return resourceMan
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  重写当前线程的 CurrentUICulture 属性,对
+        '''  使用此强类型资源类的所有资源查找执行重写。
+        '''</summary>
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+        Friend Property Culture() As Global.System.Globalization.CultureInfo
+            Get
+                Return resourceCulture
+            End Get
+            Set
+                resourceCulture = value
+            End Set
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property Custom() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("Custom", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property Dialogs() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("Dialogs", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property ForgeInstaller() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("ForgeInstaller", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property Help() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("Help", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property Imazen_WebP() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("Imazen_WebP", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property JavaWrapper() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("JavaWrapper", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property Json() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("Json", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property libwebp64() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("libwebp64", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property ModData() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("ModData", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
+        
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property NAudio() As Byte()
+            Get
+                Dim obj As Object = ResourceManager.GetObject("NAudio", resourceCulture)
+                Return CType(obj,Byte())
+            End Get
+        End Property
         
-        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
-        Friend ReadOnly Property Settings() As Global.PCL.MySettings
+        '''<summary>
+        '''  查找 System.Byte[] 类型的本地化资源。
+        '''</summary>
+        Friend ReadOnly Property Transformer() As Byte()
             Get
-                Return Global.PCL.MySettings.Default
+                Dim obj As Object = ResourceManager.GetObject("Transformer", resourceCulture)
+                Return CType(obj,Byte())
             End Get
         End Property
     End Module
-End Namespace
+End Namespace

+ 18 - 20
Plain Craft Launcher 2/My Project/Settings.Designer.vb

@@ -12,16 +12,15 @@ Option Strict On
 Option Explicit On
 
 
-Namespace My
+
+<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.0.3.0"),  _
+ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
+Partial Friend NotInheritable Class MySettings
+    Inherits Global.System.Configuration.ApplicationSettingsBase
+    
+    Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
     
-    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
-     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.0.0"),  _
-     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
-    Partial Friend NotInheritable Class MySettings
-        Inherits Global.System.Configuration.ApplicationSettingsBase
-        
-        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
-        
 #Region "My.Settings 自动保存功能"
 #If _MyType = "WindowsForms" Then
     Private Shared addedHandler As Boolean
@@ -36,10 +35,10 @@ Namespace My
     End Sub
 #End If
 #End Region
-        
-        Public Shared ReadOnly Property [Default]() As MySettings
-            Get
-                
+    
+    Public Shared ReadOnly Property [Default]() As MySettings
+        Get
+            
 #If _MyType = "WindowsForms" Then
                If Not addedHandler Then
                     SyncLock addedHandlerLockObject
@@ -50,11 +49,10 @@ Namespace My
                     End SyncLock
                 End If
 #End If
-                Return defaultInstance
-            End Get
-        End Property
-    End Class
-End Namespace
+            Return defaultInstance
+        End Get
+    End Property
+End Class
 
 Namespace My
     
@@ -64,9 +62,9 @@ Namespace My
     Friend Module MySettingsProperty
         
         <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
-        Friend ReadOnly Property Settings() As Global.PCL.My.MySettings
+        Friend ReadOnly Property Settings() As Global.PCL.MySettings
             Get
-                Return Global.PCL.My.MySettings.Default
+                Return Global.PCL.MySettings.Default
             End Get
         End Property
     End Module

+ 10 - 0
Plain Craft Launcher 2/Resources/Language/en_US.xaml

@@ -0,0 +1,10 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:s="clr-namespace:System;assembly=mscorlib">
+
+    <s:String x:Key="LangTitleOther">More</s:String>
+    <s:String x:Key="LangTitleDownload">Download</s:String>
+    <s:String x:Key="LangTitleHome">Launch</s:String>
+    <s:String x:Key="LangTitleSetup">Setting</s:String>
+
+</ResourceDictionary>

+ 10 - 0
Plain Craft Launcher 2/Resources/Language/zh_CN.xaml

@@ -0,0 +1,10 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:s="clr-namespace:System;assembly=mscorlib">
+
+    <s:String x:Key="LangTitleOther">更多</s:String>
+    <s:String x:Key="LangTitleDownload">下载</s:String>
+    <s:String x:Key="LangTitleHome"> 启动</s:String>
+    <s:String x:Key="LangTitleSetup">设置</s:String>
+
+</ResourceDictionary>