From 799362e4667732cf71b934bcd915b04d76b05489 Mon Sep 17 00:00:00 2001 From: MiyamizuSu <805108808t@gmail.com> Date: Wed, 6 Nov 2024 11:45:59 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=B8=8D=E7=94=A8?= =?UTF-8?q?=E5=86=8D=E5=88=87=E6=8D=A2=E5=88=B0=E5=88=AB=E7=9A=84=E9=A2=84?= =?UTF-8?q?=E8=AE=BE=E5=9B=BE=E6=A0=87=E6=89=8D=E8=83=BD=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E5=88=87=E6=8D=A2=E8=87=AA=E5=AE=9A=E4=B9=89=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=20close=20#4902?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../PageVersion/PageVersionOverall.xaml.vb | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb b/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb index 133138ab..ae748a0f 100644 --- a/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb +++ b/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb @@ -177,7 +177,25 @@ Log(ex, "重命名版本失败", LogLevel.Msgbox) End Try End Sub - + + + '#4902 可以不用再切换到别的预设图标才能再次切换自定义图标' + Private Sub ItemDisplayLogoCustom_PreviewMouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs) Handles ItemDisplayLogoCustom.PreviewMouseLeftButtonDown + + Try + If ComboDisplayLogo.SelectedItem Is ItemDisplayLogoCustom + ComboDisplayLogo.SelectedItem = ItemDisplayLogoCustom + Dim comboBoxItemsList =New List(Of ComboBoxItem)() + comboBoxItemsList.Add(ComboDisplayLogo.SelectedItem) + Dim removedItems As IList = New List(Of Object)() + Dim args As New SelectionChangedEventArgs(ComboBox.SelectionChangedEvent, removedItems, comboBoxItemsList) + ComboDisplayLogo_SelectionChanged(ComboDisplayLogo, args) ' 触发事件2 + End If + Catch ex As Exception + Log(ex, "更改自定义版本图标失败(" & PageVersionLeft.Version.Name & ")", LogLevel.Feedback) + End Try + End Sub + '版本图标 Private Sub ComboDisplayLogo_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ComboDisplayLogo.SelectionChanged If Not (IsLoad AndAlso AniControlEnabled = 0) Then Exit Sub From 3dab5d61c28ed12cef73f8e4518c74ce17a33ec9 Mon Sep 17 00:00:00 2001 From: MiyamizuSu <805108808t@gmail.com> Date: Wed, 6 Nov 2024 12:51:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E6=9B=B4=E6=94=B9=20clos?= =?UTF-8?q?e=20#4902?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Pages/PageVersion/PageVersionOverall.xaml.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb b/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb index ae748a0f..fe06c213 100644 --- a/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb +++ b/Plain Craft Launcher 2/Pages/PageVersion/PageVersionOverall.xaml.vb @@ -181,7 +181,6 @@ '#4902 可以不用再切换到别的预设图标才能再次切换自定义图标' Private Sub ItemDisplayLogoCustom_PreviewMouseLeftButtonDown(sender As Object, e As MouseButtonEventArgs) Handles ItemDisplayLogoCustom.PreviewMouseLeftButtonDown - Try If ComboDisplayLogo.SelectedItem Is ItemDisplayLogoCustom ComboDisplayLogo.SelectedItem = ItemDisplayLogoCustom @@ -189,7 +188,8 @@ comboBoxItemsList.Add(ComboDisplayLogo.SelectedItem) Dim removedItems As IList = New List(Of Object)() Dim args As New SelectionChangedEventArgs(ComboBox.SelectionChangedEvent, removedItems, comboBoxItemsList) - ComboDisplayLogo_SelectionChanged(ComboDisplayLogo, args) ' 触发事件2 + '事件触发器' + ComboDisplayLogo_SelectionChanged(ComboDisplayLogo, args) End If Catch ex As Exception Log(ex, "更改自定义版本图标失败(" & PageVersionLeft.Version.Name & ")", LogLevel.Feedback)