Skip to content

Commit ca4a126

Browse files
authored
Merge pull request PCL-Community#180 from PCL-Community/clip-fix
剪贴板修复与部分 UI 调整
2 parents bf83b05 + 17a707b commit ca4a126

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Plain Craft Launcher 2/Modules/Minecraft/ModComp.vb

+8-3
Original file line numberDiff line numberDiff line change
@@ -1619,6 +1619,8 @@ Retry:
16191619
End Sub
16201620

16211621
#End Region
1622+
1623+
#Region "CompFavorites | 收藏"
16221624
Class CompFavorites
16231625

16241626
''' <summary>
@@ -1732,23 +1734,27 @@ Retry:
17321734
Return Res
17331735
End Function
17341736
End Class
1737+
#End Region
17351738

1739+
#Region "CompClipboard | 剪贴板识别"
17361740
Class CompClipboard
17371741
'剪贴板已读取内容
17381742
Public Shared CurrentText As String = Nothing
17391743
'识别剪贴板内容
17401744
Public Shared Sub ClipboardListening()
17411745
While Setup.Get("ToolDownloadClipboard")
1746+
Thread.Sleep(700)
17421747
Dim Text As String = Nothing
17431748
Dim Slug As String = Nothing
17441749
Dim ProjectId As String = Nothing
17451750
Dim CategoryURL As String = Nothing
17461751
Dim ReturnData = Nothing
17471752
RunInUiWait(Sub()
1748-
Text = My.Computer.Clipboard.GetText().Replace("https://", "").Replace("http://", "")
1753+
Text = My.Computer.Clipboard.GetText()
17491754
End Sub)
17501755
If Text = CurrentText Then Continue While
17511756
CurrentText = Text
1757+
Text = Text.Replace("https://", "").Replace("http://", "")
17521758

17531759
If Text.Contains("curseforge.com/minecraft/") Then 'e.g. www.curseforge.com/minecraft/mc-mods/jei
17541760
Dim ClassIds As List(Of String) = New List(Of String) From {"6", "4471", "12", "6552"}
@@ -1805,9 +1811,8 @@ Retry:
18051811
RunInUi(Sub() FrmMain.PageChange(New FormMain.PageStackData With {.Page = FormMain.PageType.CompDetail,
18061812
.Additional = {CompProjects.First(), New List(Of String), String.Empty, CompModLoaderType.Any}}))
18071813
End If
1808-
1809-
Thread.Sleep(700)
18101814
End While
18111815
End Sub
18121816
End Class
1817+
#End Region
18131818
End Module

Plain Craft Launcher 2/Pages/PageDownload/PageDownloadCompDetail.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<RowDefinition Height="1*" />
1212
</Grid.RowDefinitions>
1313
<local:MyCard Margin="0,0,0,25" x:Name="CardIntro">
14-
<StackPanel Margin="22,10,22,19" x:Name="PanIntro">
14+
<StackPanel Margin="22,20,22,20" x:Name="PanIntro">
1515
<WrapPanel Orientation="Horizontal" HorizontalAlignment="Left">
1616
<local:MyButton x:Name="BtnIntroWeb" MinWidth="140" Text="转到 CurseForge" Padding="13,10" Margin="0,8,20,0" HorizontalAlignment="Left" ColorType="Highlight" />
1717
<local:MyButton x:Name="BtnIntroWiki" MinWidth="140" Text="转到 MC 百科" Padding="13,10" Margin="0,8,20,0" HorizontalAlignment="Left" />

0 commit comments

Comments
 (0)