From a9fefadec99f006ce8147b4fe019d727ff6eb2f0 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Fri, 13 Feb 2026 09:17:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E7=BB=93?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/Helpers/PPTROTConnectionHelper.cs | 7 ------- .../SettingsViews/SettingsViews/UpdateCenterPanel.xaml.cs | 6 ++++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/Ink Canvas/Helpers/PPTROTConnectionHelper.cs b/Ink Canvas/Helpers/PPTROTConnectionHelper.cs index 8a1f69c0..5f06a549 100644 --- a/Ink Canvas/Helpers/PPTROTConnectionHelper.cs +++ b/Ink Canvas/Helpers/PPTROTConnectionHelper.cs @@ -299,13 +299,6 @@ namespace Ink_Canvas.Helpers } bestPriority = highestPriority; - - if (bestApp != null) - { - } - else - { - } } catch (Exception ex) { diff --git a/Ink Canvas/Windows/SettingsViews/SettingsViews/UpdateCenterPanel.xaml.cs b/Ink Canvas/Windows/SettingsViews/SettingsViews/UpdateCenterPanel.xaml.cs index 39764890..ba7d347c 100644 --- a/Ink Canvas/Windows/SettingsViews/SettingsViews/UpdateCenterPanel.xaml.cs +++ b/Ink Canvas/Windows/SettingsViews/SettingsViews/UpdateCenterPanel.xaml.cs @@ -78,8 +78,9 @@ namespace Ink_Canvas.Windows.SettingsViews if (AutoUpdateWithSilenceStartTimeComboBox != null) { var startTime = MainWindow.Settings.Startup.AutoUpdateWithSilenceStartTime ?? "06:00"; + var startHour = startTime.Contains(":") ? startTime.Split(':')[0].Trim().PadLeft(2, '0') : startTime; var startItem = AutoUpdateWithSilenceStartTimeComboBox.Items.Cast() - .FirstOrDefault(item => item.Tag?.ToString() == startTime.Replace(":", "")); + .FirstOrDefault(item => item.Tag?.ToString() == startHour); if (startItem != null) { AutoUpdateWithSilenceStartTimeComboBox.SelectedItem = startItem; @@ -89,8 +90,9 @@ namespace Ink_Canvas.Windows.SettingsViews if (AutoUpdateWithSilenceEndTimeComboBox != null) { var endTime = MainWindow.Settings.Startup.AutoUpdateWithSilenceEndTime ?? "22:00"; + var endHour = endTime.Contains(":") ? endTime.Split(':')[0].Trim().PadLeft(2, '0') : endTime; var endItem = AutoUpdateWithSilenceEndTimeComboBox.Items.Cast() - .FirstOrDefault(item => item.Tag?.ToString() == endTime.Replace(":", "")); + .FirstOrDefault(item => item.Tag?.ToString() == endHour); if (endItem != null) { AutoUpdateWithSilenceEndTimeComboBox.SelectedItem = endItem;