From 375aec6f6cea8f12c71d80aa99026d75283bbd6c Mon Sep 17 00:00:00 2001
From: CJKmkp <2564608840@qq.com>
Date: Sat, 6 Sep 2025 14:24:18 +0800
Subject: [PATCH] =?UTF-8?q?improve:=E6=8C=89=E9=92=AE=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Ink Canvas/Windows/CountdownTimerWindow.xaml | 89 ++++++++++++------
.../Windows/CountdownTimerWindow.xaml.cs | 39 ++++----
Ink Canvas/Windows/OperatingGuideWindow.xaml | 6 +-
.../Windows/OperatingGuideWindow.xaml.cs | 17 ++--
...vasForClass.csproj.AssemblyReference.cache | Bin 35826 -> 23069 bytes
5 files changed, 85 insertions(+), 66 deletions(-)
diff --git a/Ink Canvas/Windows/CountdownTimerWindow.xaml b/Ink Canvas/Windows/CountdownTimerWindow.xaml
index a361e609..1a8bfe8e 100644
--- a/Ink Canvas/Windows/CountdownTimerWindow.xaml
+++ b/Ink Canvas/Windows/CountdownTimerWindow.xaml
@@ -12,14 +12,7 @@
Title="Ink Canvas 画板 - 计时器" Height="700" Width="1100">
-
-
-
-
-
+
@@ -31,11 +24,23 @@
Margin="0,0,0,0" Visibility="Collapsed"
Foreground="#5B5D5F"
Text="00" FontSize="26"/>
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -186,7 +215,7 @@
-
+
-
+
-
+
diff --git a/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs b/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs
index ce679ebb..31e190ce 100644
--- a/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs
+++ b/Ink Canvas/Windows/CountdownTimerWindow.xaml.cs
@@ -1,16 +1,11 @@
using Ink_Canvas.Helpers;
using System;
-using System.ComponentModel;
using System.Media;
using System.Timers;
using System.Windows;
-using System.Windows.Forms;
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Media;
-using Application = System.Windows.Application;
-using MouseEventArgs = System.Windows.Input.MouseEventArgs;
-using Timer = System.Timers.Timer;
namespace Ink_Canvas
{
@@ -56,7 +51,7 @@ namespace Ink_Canvas
TextBlockSecond.Text = "00";
timer.Stop();
isTimerRunning = false;
- FontIconStart.Glyph = "";
+ SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play;
BtnStartCover.Visibility = Visibility.Visible;
TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F"));
BorderStopTime.Visibility = Visibility.Collapsed;
@@ -75,23 +70,23 @@ namespace Ink_Canvas
SoundPlayer player = new SoundPlayer();
- int hour;
+ int hour = 0;
int minute = 1;
- int second;
+ int second = 0;
int totalSeconds = 60;
DateTime startTime = DateTime.Now;
DateTime pauseTime = DateTime.Now;
- bool isTimerRunning;
- bool isPaused;
+ bool isTimerRunning = false;
+ bool isPaused = false;
Timer timer = new Timer();
private void Grid_MouseUp(object sender, MouseButtonEventArgs e)
{
if (isTimerRunning) return;
- if (ProcessBarTime.Visibility == Visibility.Visible && !isTimerRunning)
+ if (ProcessBarTime.Visibility == Visibility.Visible && isTimerRunning == false)
{
ProcessBarTime.Visibility = Visibility.Collapsed;
GridAdjustHour.Visibility = Visibility.Visible;
@@ -207,12 +202,12 @@ namespace Ink_Canvas
if (WindowState == WindowState.Normal)
{
WindowState = WindowState.Maximized;
- FontIconFullscreen.Text = "";
+ SymbolIconFullscreen.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.BackToWindow;
}
else
{
WindowState = WindowState.Normal;
- FontIconFullscreen.Text = "";
+ SymbolIconFullscreen.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.FullScreen;
}
}
@@ -227,6 +222,7 @@ namespace Ink_Canvas
BtnStartCover.Visibility = Visibility.Collapsed;
BorderStopTime.Visibility = Visibility.Collapsed;
TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F"));
+ return;
}
else if (isTimerRunning && isPaused)
{
@@ -237,7 +233,7 @@ namespace Ink_Canvas
BtnStartCover.Visibility = Visibility.Collapsed;
BorderStopTime.Visibility = Visibility.Collapsed;
TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F"));
- FontIconStart.Glyph = "";
+ SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play;
isTimerRunning = false;
timer.Stop();
isPaused = false;
@@ -287,7 +283,7 @@ namespace Ink_Canvas
startTime += DateTime.Now - pauseTime;
ProcessBarTime.IsPaused = false;
TextBlockHour.Foreground = Brushes.Black;
- FontIconStart.Glyph = "";
+ SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Pause;
isPaused = false;
timer.Start();
UpdateStopTime();
@@ -299,7 +295,7 @@ namespace Ink_Canvas
pauseTime = DateTime.Now;
ProcessBarTime.IsPaused = true;
TextBlockHour.Foreground = new SolidColorBrush(StringToColor("#FF5B5D5F"));
- FontIconStart.Glyph = "";
+ SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Play;
BorderStopTime.Visibility = Visibility.Collapsed;
isPaused = true;
timer.Stop();
@@ -311,7 +307,7 @@ namespace Ink_Canvas
totalSeconds = ((hour * 60) + minute) * 60 + second;
ProcessBarTime.IsPaused = false;
TextBlockHour.Foreground = Brushes.Black;
- FontIconStart.Glyph = "";
+ SymbolIconStart.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.Pause;
BtnResetCover.Visibility = Visibility.Collapsed;
if (totalSeconds <= 10)
@@ -339,7 +335,7 @@ namespace Ink_Canvas
}
}
- private void Window_Closing(object sender, CancelEventArgs e)
+ private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
isTimerRunning = false;
}
@@ -349,7 +345,7 @@ namespace Ink_Canvas
Close();
}
- private bool _isInCompact;
+ private bool _isInCompact = false;
private void BtnMinimal_OnMouseUp(object sender, MouseButtonEventArgs e)
{
@@ -363,13 +359,12 @@ namespace Ink_Canvas
// Set to center
double dpiScaleX = 1, dpiScaleY = 1;
PresentationSource source = PresentationSource.FromVisual(this);
- if (source != null)
- {
+ if (source != null) {
dpiScaleX = source.CompositionTarget.TransformToDevice.M11;
dpiScaleY = source.CompositionTarget.TransformToDevice.M22;
}
IntPtr windowHandle = new WindowInteropHelper(this).Handle;
- Screen screen = Screen.FromHandle(windowHandle);
+ System.Windows.Forms.Screen screen = System.Windows.Forms.Screen.FromHandle(windowHandle);
double screenWidth = screen.Bounds.Width / dpiScaleX, screenHeight = screen.Bounds.Height / dpiScaleY;
Left = (screenWidth / 2) - (Width / 2);
Top = (screenHeight / 2) - (Height / 2);
diff --git a/Ink Canvas/Windows/OperatingGuideWindow.xaml b/Ink Canvas/Windows/OperatingGuideWindow.xaml
index d8f84c51..67c81734 100644
--- a/Ink Canvas/Windows/OperatingGuideWindow.xaml
+++ b/Ink Canvas/Windows/OperatingGuideWindow.xaml
@@ -71,7 +71,7 @@
-
+
-
+
-
+
diff --git a/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs b/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs
index 0da22c2e..3d48d677 100644
--- a/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs
+++ b/Ink Canvas/Windows/OperatingGuideWindow.xaml.cs
@@ -25,22 +25,17 @@ namespace Ink_Canvas
if (e.LeftButton == MouseButtonState.Pressed) DragMove();
}
- private void BtnFullscreen_MouseUp(object sender, MouseButtonEventArgs e)
- {
- if (WindowState == WindowState.Normal)
- {
+ private void BtnFullscreen_MouseUp(object sender, MouseButtonEventArgs e) {
+ if (WindowState == WindowState.Normal) {
WindowState = WindowState.Maximized;
- FontIconFullscreen.Text = "";
- }
- else
- {
+ SymbolIconFullscreen.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.BackToWindow;
+ } else {
WindowState = WindowState.Normal;
- FontIconFullscreen.Text = "";
+ SymbolIconFullscreen.Symbol = iNKORE.UI.WPF.Modern.Controls.Symbol.FullScreen;
}
}
- private void SCManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e)
- {
+ private void SCManipulationBoundaryFeedback(object sender, ManipulationBoundaryFeedbackEventArgs e) {
e.Handled = true;
}
}
diff --git a/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache b/Ink Canvas/obj/Debug/net472/InkCanvasForClass.csproj.AssemblyReference.cache
index 44b9fc7383ebb573862944afd3220347eedadfaa..771b061a32c98a1ec2de289e4866236dcb85d74a 100644
GIT binary patch
delta 199
zcmew~ooVhC#tG$23=A6&WOE5JFfekJndlkl85zHh6kT!XywmOjRog88~WAa6#{>h?d(#1;fOh3h=JJvP((Rked}{0giegEH
delta 2354
zcma)8&u<%55Y8?{4X%I0KjWArHKjiez$!&Z#7a@+#I3qfHjQkeL|oiuy$MfUzg>3M
z1Q!Gi2U-vkP3FLf1AhTR&9$64_R#jswd#eoCr;tb!0_P
z=Rc`;w{>Mi{3)a2U!1#so3*&9amPD}4}8<=``p6Mbck=>pg{CMk>9#EVyf~Q>{hSB
znF}?zQmz+96h%olxFs*)ZVwndM1D
znvh8K4i8z|*6McK4dGH{79PA6hlR7};qFRGabPyFc5mtABSlrli4Ec)qp1~r3UNvi
zBW7-KHwc*(Xdn8fC7>>1u@WB2%R~A#ZP9Iez8wV2<$`);6vJisJ6neBnaVkQdP5$@
zlP(u68g9#WDA5gAC=1AaF?Dq>nzritP_FfBY6V1*IDy%
zuaY1OXEV^uZ@~593HTv#N>yUir=Xt0%#_S**jC49VK>s7@=*vO2nm|&(dL_MtK*xJ
zDNQGXP>HH#Vdoz+rw{1J;9j2V1RXSPWiI7FFfd-aZM^Sp-f>;98fPZDt)wttM|rDPq_(bR0gSK2ClSg@goUM4I})
z_BEXcq3OW0Intcwls1^~2-+A|a0&b?ds`5%dP5Szv(1gq5h5itZ
z52>*6FX6}P64d5&cya0)?9bGZ>HxuI2OCh%$6-A^(bvhKEG$5Z7B=8vdRkS+h~}+n
zl4ejQswU_TT&LkHbXYunGg?sGJ>-N0MB~E&&f}O)%Q3Ap-g37CF(9uKYQis=*Kuf_
z=+cmkg7c8&Bu=+8U#m*0CkAptZo6|U!#U9{LVa*-qKg@HN&cr3b^t3DGph|c9r#|O;ec)gGj?B!C~mg6Yo=c&cSi@ir0+pgc#6t4-xMMqBiqiMb`+winjV`{!YXVc_BXxAuk*z-ZnWRLfI*J66KgP
z#?l9cPE>+3rMWi42m}?4_xNLCOw}8wy@C8n6Tp`miNuX
z=aD#q;qc<5#aJ=yvk