improve:issue #24
This commit is contained in:
@@ -107,6 +107,7 @@ namespace Ink_Canvas {
|
|||||||
if (Settings.Automation.IsAutoSaveStrokesAtClear &&
|
if (Settings.Automation.IsAutoSaveStrokesAtClear &&
|
||||||
inkCanvas.Strokes.Count > Settings.Automation.MinimumAutomationStrokeNumber) SaveScreenShot(true);
|
inkCanvas.Strokes.Count > Settings.Automation.MinimumAutomationStrokeNumber) SaveScreenShot(true);
|
||||||
if (CurrentWhiteboardIndex >= WhiteboardTotalCount) {
|
if (CurrentWhiteboardIndex >= WhiteboardTotalCount) {
|
||||||
|
// 在最后一页时,点击“新页面”按钮直接新增一页
|
||||||
BtnWhiteBoardAdd_Click(sender, e);
|
BtnWhiteBoardAdd_Click(sender, e);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -166,64 +167,35 @@ namespace Ink_Canvas {
|
|||||||
TextBlockWhiteBoardIndexInfo.Text =
|
TextBlockWhiteBoardIndexInfo.Text =
|
||||||
$"{CurrentWhiteboardIndex}/{WhiteboardTotalCount}";
|
$"{CurrentWhiteboardIndex}/{WhiteboardTotalCount}";
|
||||||
|
|
||||||
if (CurrentWhiteboardIndex == WhiteboardTotalCount) {
|
bool isLastPage = CurrentWhiteboardIndex == WhiteboardTotalCount;
|
||||||
var newImageSource = new BitmapImage();
|
bool isMaxPage = WhiteboardTotalCount >= 99;
|
||||||
newImageSource.BeginInit();
|
|
||||||
newImageSource.UriSource = new Uri("/Resources/Icons-Fluent/ic_fluent_add_circle_24_regular.png",
|
// 设置按钮文本
|
||||||
UriKind.RelativeOrAbsolute);
|
BtnLeftWhiteBoardSwitchNextLabel.Text = isLastPage ? "新页面" : "下一页";
|
||||||
newImageSource.EndInit();
|
BtnRightWhiteBoardSwitchNextLabel.Text = isLastPage ? "新页面" : "下一页";
|
||||||
//BoardLeftPannelNextPage.Source = newImageSource;
|
|
||||||
//BoardRightPannelNextPage.Source = newImageSource;
|
// 始终允许点击“下一页/新页面”按钮(除非已达最大页数)
|
||||||
//BoardRightPannelNextPageTextBlock.Text = "加页";
|
BtnWhiteBoardSwitchNext.IsEnabled = !isMaxPage;
|
||||||
//BoardLeftPannelNextPageTextBlock.Text = "加页";
|
|
||||||
} else {
|
// 保持按钮常亮(高亮)
|
||||||
var newImageSource = new BitmapImage();
|
BtnLeftWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
||||||
newImageSource.BeginInit();
|
BtnLeftWhiteBoardSwitchNextLabel.Opacity = 1;
|
||||||
newImageSource.UriSource =
|
BtnRightWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
||||||
new Uri("/Resources/Icons-Fluent/ic_fluent_arrow_circle_right_24_regular.png",
|
BtnRightWhiteBoardSwitchNextLabel.Opacity = 1;
|
||||||
UriKind.RelativeOrAbsolute);
|
|
||||||
newImageSource.EndInit();
|
|
||||||
//BoardLeftPannelNextPage.Source = newImageSource;
|
|
||||||
//BoardRightPannelNextPage.Source = newImageSource;
|
|
||||||
//BoardRightPannelNextPageTextBlock.Text = "下一页";
|
|
||||||
//BoardLeftPannelNextPageTextBlock.Text = "下一页";
|
|
||||||
}
|
|
||||||
|
|
||||||
BtnWhiteBoardSwitchPrevious.IsEnabled = true;
|
BtnWhiteBoardSwitchPrevious.IsEnabled = true;
|
||||||
BtnWhiteBoardSwitchNext.IsEnabled = true;
|
|
||||||
|
|
||||||
if (CurrentWhiteboardIndex == 1) {
|
if (CurrentWhiteboardIndex == 1) {
|
||||||
BtnWhiteBoardSwitchPrevious.IsEnabled = false;
|
BtnWhiteBoardSwitchPrevious.IsEnabled = false;
|
||||||
BtnLeftWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(127, 24, 24, 27));
|
BtnLeftWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(127, 24, 24, 27));
|
||||||
BtnLeftWhiteBoardSwitchPreviousLabel.Opacity = 0.5;
|
BtnLeftWhiteBoardSwitchPreviousLabel.Opacity = 0.5;
|
||||||
BtnLeftWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
|
||||||
BtnLeftWhiteBoardSwitchNextLabel.Opacity = 1;
|
|
||||||
|
|
||||||
BtnRightWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(127, 24, 24, 27));
|
BtnRightWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(127, 24, 24, 27));
|
||||||
BtnRightWhiteBoardSwitchPreviousLabel.Opacity = 0.5;
|
BtnRightWhiteBoardSwitchPreviousLabel.Opacity = 0.5;
|
||||||
BtnRightWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
|
||||||
BtnRightWhiteBoardSwitchNextLabel.Opacity = 1;
|
|
||||||
} else {
|
} else {
|
||||||
BtnLeftWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
BtnLeftWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
||||||
BtnLeftWhiteBoardSwitchPreviousLabel.Opacity = 1;
|
BtnLeftWhiteBoardSwitchPreviousLabel.Opacity = 1;
|
||||||
|
|
||||||
BtnRightWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
BtnRightWhiteBoardSwitchPreviousGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
||||||
BtnRightWhiteBoardSwitchPreviousLabel.Opacity = 1;
|
BtnRightWhiteBoardSwitchPreviousLabel.Opacity = 1;
|
||||||
|
|
||||||
if (CurrentWhiteboardIndex == WhiteboardTotalCount) {
|
|
||||||
BtnLeftWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(127, 24, 24, 27));
|
|
||||||
BtnLeftWhiteBoardSwitchNextLabel.Opacity = 0.5;
|
|
||||||
|
|
||||||
BtnRightWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(127, 24, 24, 27));
|
|
||||||
BtnRightWhiteBoardSwitchNextLabel.Opacity = 0.5;
|
|
||||||
BtnWhiteBoardSwitchNext.IsEnabled = false;
|
|
||||||
} else {
|
|
||||||
BtnLeftWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
|
||||||
BtnLeftWhiteBoardSwitchNextLabel.Opacity = 1;
|
|
||||||
|
|
||||||
BtnRightWhiteBoardSwitchNextGeometry.Brush = new SolidColorBrush(Color.FromArgb(255, 24, 24, 27));
|
|
||||||
BtnRightWhiteBoardSwitchNextLabel.Opacity = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BtnWhiteBoardDelete.IsEnabled = WhiteboardTotalCount != 1;
|
BtnWhiteBoardDelete.IsEnabled = WhiteboardTotalCount != 1;
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user