Skip to content

Commit

Permalink
[fix] lastDesktopInkColor
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangSakura committed May 13, 2024
1 parent 1961309 commit 8b54e79
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion AutomaticUpdateVersionControl.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.7.1
4.7.2
13 changes: 6 additions & 7 deletions Ink Canvas/MainWindow_cs/MW_FloatBarIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ private void ImageBlackboard_MouseUp(object sender, MouseButtonEventArgs e) {
if (inkCanvas.EditingMode == InkCanvasEditingMode.Select) PenIcon_Click(null, null);

if (currentMode == 0) {
currentMode = 1;
//进入画板
PPTNavigationBottomLeft.Visibility = Visibility.Collapsed;
PPTNavigationBottomRight.Visibility = Visibility.Collapsed;
Expand All @@ -281,10 +282,8 @@ private void ImageBlackboard_MouseUp(object sender, MouseButtonEventArgs e) {
});
})).Start();

if (Settings.Canvas.UsingWhiteboard) {
BtnColorBlack_Click(null, null);
} else {
BtnColorWhite_Click(null, null);
if (Pen_Icon.Background == null) {
PenIcon_Click(BoardPenIcon, null);
}

if (Settings.Gesture.AutoSwitchTwoFingerGesture) // 自动关闭多指书写、开启双指移动
Expand All @@ -293,6 +292,7 @@ private void ImageBlackboard_MouseUp(object sender, MouseButtonEventArgs e) {
if (isInMultiTouchMode) ToggleSwitchEnableMultiTouchMode.IsOn = false;
}
} else {
currentMode = 0;
//退出画板
HideSubPanelsImmediately();

Expand Down Expand Up @@ -1030,8 +1030,7 @@ private void BtnHideControl_Click(object sender, RoutedEventArgs e) {

private void BtnSwitch_Click(object sender, RoutedEventArgs e) {
if (Main_Grid.Background == Brushes.Transparent) {
if (currentMode == 0) {
currentMode++;
if (currentMode == 1) {
GridBackgroundCover.Visibility = Visibility.Collapsed;
AnimationsHelper.HideWithSlideAndFade(BlackboardLeftSide);
AnimationsHelper.HideWithSlideAndFade(BlackboardCenterSide);
Expand Down Expand Up @@ -1061,7 +1060,7 @@ private void BtnSwitch_Click(object sender, RoutedEventArgs e) {
Topmost = true;
BtnHideInkCanvas_Click(BtnHideInkCanvas, e);
} else {
switch ((++currentMode) % 2) {
switch (currentMode) {
case 0: //屏幕模式
currentMode = 0;
GridBackgroundCover.Visibility = Visibility.Collapsed;
Expand Down
8 changes: 6 additions & 2 deletions Ink Canvas/MainWindow_cs/MW_PenColors.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Ink_Canvas.Helpers;
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Ink;
Expand Down Expand Up @@ -301,8 +302,11 @@ private void CheckColorTheme(bool changeColorTheme = false) {
}

private void CheckLastColor(int inkColor) {
if (currentMode == 0) lastDesktopInkColor = inkColor;
else lastBoardInkColor = inkColor;
if (currentMode == 0) {
lastDesktopInkColor = inkColor;
} else {
lastBoardInkColor = inkColor;
}
}

private void BtnColorBlack_Click(object sender, RoutedEventArgs e) {
Expand Down
4 changes: 2 additions & 2 deletions Ink Canvas/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.7.1.0")]
[assembly: AssemblyFileVersion("4.7.1.0")]
[assembly: AssemblyVersion("4.7.2.0")]
[assembly: AssemblyFileVersion("4.7.2.0")]

0 comments on commit 8b54e79

Please sign in to comment.