diff --git a/Ink Canvas/Helpers/AnimationsHelper.cs b/Ink Canvas/Helpers/AnimationsHelper.cs
index 0f247f8..9892907 100644
--- a/Ink Canvas/Helpers/AnimationsHelper.cs
+++ b/Ink Canvas/Helpers/AnimationsHelper.cs
@@ -50,6 +50,8 @@ namespace Ink_Canvas.Helpers
To = 1,
Duration = TimeSpan.FromSeconds(duration)
};
+ fadeInAnimation.EasingFunction = new CubicEase();
+
Storyboard.SetTargetProperty(fadeInAnimation, new PropertyPath(UIElement.OpacityProperty));
// 滑动动画
@@ -61,6 +63,8 @@ namespace Ink_Canvas.Helpers
};
Storyboard.SetTargetProperty(slideAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.Y)"));
+ slideAnimation.EasingFunction = new CubicEase();
+
sb.Children.Add(fadeInAnimation);
sb.Children.Add(slideAnimation);
@@ -212,6 +216,7 @@ namespace Ink_Canvas.Helpers
To = 0,
Duration = TimeSpan.FromSeconds(duration)
};
+ fadeOutAnimation.EasingFunction = new CubicEase();
Storyboard.SetTargetProperty(fadeOutAnimation, new PropertyPath(UIElement.OpacityProperty));
// 滑动动画
@@ -221,6 +226,8 @@ namespace Ink_Canvas.Helpers
To = element.RenderTransform.Value.OffsetY + 10, // 滑动距离
Duration = TimeSpan.FromSeconds(duration)
};
+ slideAnimation.EasingFunction = new CubicEase();
+
Storyboard.SetTargetProperty(slideAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.Y)"));
sb.Children.Add(fadeOutAnimation);
diff --git a/Ink Canvas/MainWindow.xaml b/Ink Canvas/MainWindow.xaml
index 4d23bfd..7340800 100644
--- a/Ink Canvas/MainWindow.xaml
+++ b/Ink Canvas/MainWindow.xaml
@@ -89,13 +89,726 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 墨迹、截图自动保存位置:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 保存时间设置(Days):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ICC仓库源:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ICA仓库源:
-
-
-
-
-
-
-
-
-
-
-
-
-
- IC仓库源:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -1724,11 +1721,11 @@
-
+
-
+
diff --git a/Ink Canvas/MainWindow.xaml.cs b/Ink Canvas/MainWindow.xaml.cs
index 54268de..f176cfd 100644
--- a/Ink Canvas/MainWindow.xaml.cs
+++ b/Ink Canvas/MainWindow.xaml.cs
@@ -32,7 +32,7 @@ namespace Ink_Canvas {
BorderSettings.Visibility = Visibility.Collapsed;
LeftSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
RightSidePanelForPPTNavigation.Visibility = Visibility.Collapsed;
- BorderSettings.Margin = new Thickness(0, 150, 0, 150);
+ BorderSettings.Margin = new Thickness(0, 0, 0, 0);
TwoFingerGestureBorder.Visibility = Visibility.Collapsed;
BoardTwoFingerGestureBorder.Visibility = Visibility.Collapsed;
BorderDrawShape.Visibility = Visibility.Collapsed;
@@ -108,6 +108,7 @@ namespace Ink_Canvas {
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
inkCanvas.Gesture += InkCanvas_Gesture;
+ inkCanvas.Strokes.StrokesChanged += Strokes_StrokesChanged;
} catch { }
}
//ApplicationGesture lastApplicationGesture = ApplicationGesture.AllGestures;
diff --git a/Ink Canvas/MainWindow_cs/MW_AutoFold.cs b/Ink Canvas/MainWindow_cs/MW_AutoFold.cs
index 5d80888..1355413 100644
--- a/Ink Canvas/MainWindow_cs/MW_AutoFold.cs
+++ b/Ink Canvas/MainWindow_cs/MW_AutoFold.cs
@@ -155,8 +155,11 @@ namespace Ink_Canvas {
}
private async void UnFoldFloatingBar_MouseUp(object sender, MouseButtonEventArgs e) {
- LeftUnFoldButtonQuickPanel.Visibility = Visibility.Collapsed;
- RightUnFoldButtonQuickPanel.Visibility = Visibility.Collapsed;
+ await Dispatcher.InvokeAsync(() =>
+ {
+ LeftUnFoldButtonQuickPanel.Visibility = Visibility.Collapsed;
+ RightUnFoldButtonQuickPanel.Visibility = Visibility.Collapsed;
+ });
if (sender == null || StackPanelPPTControls.Visibility == Visibility.Visible) {
unfoldFloatingBarByUser = false;
} else {
@@ -204,12 +207,13 @@ namespace Ink_Canvas {
From = LeftSidePanel.Margin,
To = new Thickness(MarginFromEdge, 0, 0, -150)
};
+ LeftSidePanelmarginAnimation.EasingFunction = new CubicEase();
ThicknessAnimation RightSidePanelmarginAnimation = new ThicknessAnimation {
Duration = isNoAnimation == true ? TimeSpan.FromSeconds(0) : TimeSpan.FromSeconds(0.175),
From = RightSidePanel.Margin,
To = new Thickness(0, 0, MarginFromEdge, -150)
};
-
+ RightSidePanelmarginAnimation.EasingFunction = new CubicEase();
LeftSidePanel.BeginAnimation(FrameworkElement.MarginProperty, LeftSidePanelmarginAnimation);
RightSidePanel.BeginAnimation(FrameworkElement.MarginProperty, RightSidePanelmarginAnimation);
});
diff --git a/Ink Canvas/MainWindow_cs/MW_Colors.cs b/Ink Canvas/MainWindow_cs/MW_Colors.cs
index c07a2f5..57d8b3f 100644
--- a/Ink Canvas/MainWindow_cs/MW_Colors.cs
+++ b/Ink Canvas/MainWindow_cs/MW_Colors.cs
@@ -426,6 +426,7 @@ namespace Ink_Canvas
From = PenPalette.Margin,
To = new Thickness(-160, -200, -33, 32)
};
+ marginAnimation.EasingFunction = new CubicEase();
PenPalette.BeginAnimation(FrameworkElement.MarginProperty, marginAnimation);
});
await Task.Delay(100);
@@ -461,6 +462,7 @@ namespace Ink_Canvas
From = PenPalette.Margin,
To = new Thickness(-160, -157, -33, 32)
};
+ marginAnimation.EasingFunction = new CubicEase();
PenPalette.BeginAnimation(FrameworkElement.MarginProperty, marginAnimation);
});
await Task.Delay(100);
diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs
index 819f96e..5d5fbb9 100644
--- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs
+++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs
@@ -22,6 +22,7 @@ using static System.Net.Mime.MediaTypeNames;
using System.Text;
using System.Globalization;
using System.Windows.Data;
+using System.Xml.Linq;
namespace Ink_Canvas {
@@ -716,6 +717,7 @@ namespace Ink_Canvas {
From = ViewboxFloatingBar.Margin,
To = new Thickness(pos.X, pos.Y, -2000, -200)
};
+ marginAnimation.EasingFunction = new CircleEase();
ViewboxFloatingBar.BeginAnimation(FrameworkElement.MarginProperty, marginAnimation);
});
@@ -1232,11 +1234,60 @@ namespace Ink_Canvas {
Application.Current.Shutdown();
}
+ private void SettingsOverlayClick(object sender, MouseButtonEventArgs e)
+ {
+ BtnSettings_Click(null, null);
+ }
+
private void BtnSettings_Click(object sender, RoutedEventArgs e) {
if (BorderSettings.Visibility == Visibility.Visible) {
- AnimationsHelper.HideWithSlideAndFade(BorderSettings, 0.5);
+ BorderSettingsMask.IsHitTestVisible = false;
+ BorderSettingsMask.Background = null;
+ var sb = new Storyboard();
+
+ // 滑动动画
+ var slideAnimation = new DoubleAnimation
+ {
+ From = 0, // 滑动距离
+ To = BorderSettings.RenderTransform.Value.OffsetX - 440,
+ Duration = TimeSpan.FromSeconds(0.6)
+ };
+ slideAnimation.EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseOut };
+ Storyboard.SetTargetProperty(slideAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.X)"));
+
+ sb.Children.Add(slideAnimation);
+
+ sb.Completed += (s, _) =>
+ {
+ BorderSettings.Visibility = Visibility.Collapsed;
+ };
+
+ BorderSettings.Visibility = Visibility.Visible;
+ BorderSettings.RenderTransform = new TranslateTransform();
+
+ sb.Begin((FrameworkElement)BorderSettings);
} else {
- AnimationsHelper.ShowWithSlideFromBottomAndFade(BorderSettings, 0.5);
+ BorderSettingsMask.IsHitTestVisible = true;
+ BorderSettingsMask.Background = new SolidColorBrush(Color.FromArgb(1,0,0,0));
+ SettingsPanelScrollViewer.ScrollToTop();
+ var sb = new Storyboard();
+
+ // 滑动动画
+ var slideAnimation = new DoubleAnimation
+ {
+ From = BorderSettings.RenderTransform.Value.OffsetX - 440, // 滑动距离
+ To = 0,
+ Duration = TimeSpan.FromSeconds(0.6)
+ };
+ slideAnimation.EasingFunction = new CubicEase() { EasingMode = EasingMode.EaseOut };
+ Storyboard.SetTargetProperty(slideAnimation, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.X)"));
+
+ sb.Children.Add(slideAnimation);
+
+ BorderSettings.Visibility = Visibility.Visible;
+ BorderSettings.RenderTransform = new TranslateTransform();
+
+ sb.Begin((FrameworkElement)BorderSettings);
}
}
diff --git a/Ink Canvas/MainWindow_cs/MW_Timer.cs b/Ink Canvas/MainWindow_cs/MW_Timer.cs
index 6b720c3..e06b457 100644
--- a/Ink Canvas/MainWindow_cs/MW_Timer.cs
+++ b/Ink Canvas/MainWindow_cs/MW_Timer.cs
@@ -63,7 +63,7 @@ namespace Ink_Canvas {
private void InitTimers() {
timerCheckPPT.Elapsed += TimerCheckPPT_Elapsed;
- timerCheckPPT.Interval = 1000;
+ timerCheckPPT.Interval = 500;
timerKillProcess.Elapsed += TimerKillProcess_Elapsed;
timerKillProcess.Interval = 5000;
timerCheckAutoFold.Elapsed += timerCheckAutoFold_Elapsed;
@@ -154,11 +154,11 @@ namespace Ink_Canvas {
}
} else if (WinTabWindowsChecker.IsWindowExisted("幻灯片放映", false)) { // 处于幻灯片放映状态
if (!Settings.Automation.IsAutoFoldInPPTSlideShow && isFloatingBarFolded && !foldFloatingBarByUser) {
- UnFoldFloatingBar_MouseUp(null, null);
+ UnFoldFloatingBar_MouseUp(new Object(), null);
}
} else {
if (isFloatingBarFolded && !foldFloatingBarByUser) {
- UnFoldFloatingBar_MouseUp(null, null);
+ UnFoldFloatingBar_MouseUp(new Object(), null);
}
unfoldFloatingBarByUser = false;
}
diff --git a/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs b/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs
index 0061b14..8bc6849 100644
--- a/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs
+++ b/Ink Canvas/MainWindow_cs/MW_TouchEvents.cs
@@ -1,7 +1,9 @@
using Ink_Canvas.Helpers;
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
@@ -340,64 +342,112 @@ namespace Ink_Canvas
}
}
}
+
+ private void Strokes_StrokesChanged(object sender, StrokeCollectionChangedEventArgs args)
+ {
+ Trace.WriteLine("Strokes_StrokesChanged");
+ }
+
+ private void StylusPointsChanged(object sender, EventArgs e)
+ {
+ ((StylusPointCollection)sender).Changed -= StylusPointsChanged;
+ FakeInkCanvas.Visibility = Visibility.Hidden;
+ inkCanvas.Opacity = 1;
+ }
+
private void inkCanvas_ManipulationStarting(object sender, ManipulationStartingEventArgs e)
{
e.Mode = ManipulationModes.All;
}
+ // 指定是否鎖定Manipulation,鎖定後ManipulationDelta不會觸發RenderTransform。
+ // 當雙指操作開始慣性時鎖定,並開始應用變換,Manipulation結束後取消鎖定。
+ bool isLockManipulation = false;
+
+ // 可能不會發生Inertia事件,這裡指示是否發生inertia事件
+ bool isInertiaEventFired = false;
+
+ private void ExecuteManipulationTransform()
+ {
+ double TranslateX = FakeICTranslateTransform.X;
+ double TranslateY = FakeICTranslateTransform.Y;
+ double ScaleX = FakeICScaleTransform.ScaleX;
+ double ScaleY = FakeICScaleTransform.ScaleY;
+ double CenterX = FakeICScaleTransform.CenterX;
+ double CenterY = FakeICScaleTransform.CenterY;
+
+ Matrix m1 = new Matrix();
+ //Matrix m2 = new Matrix();
+ Matrix m3 = new Matrix();
+ Matrix mfinal = new Matrix();
+ m1.Translate(TranslateX, TranslateY);
+ //m2.RotateAt(FakeICRotateTransform.Angle, FakeICRotateTransform.CenterX, FakeICRotateTransform.CenterY);
+ m3.ScaleAt(ScaleX, ScaleY, CenterX, CenterY);
+ mfinal.Prepend(m1);
+ //mfinal.Prepend(m2);
+ mfinal.Prepend(m3);
+
+ foreach (Stroke stroke in inkCanvas.Strokes)
+ {
+ if (inkCanvas.Strokes.IndexOf(stroke) == inkCanvas.Strokes.Count - 1)
+ {
+ stroke.StylusPoints.Changed += StylusPointsChanged;
+ }
+ stroke.Transform(mfinal, false);
+ try
+ {
+ stroke.DrawingAttributes.Width *= FakeICScaleTransform.ScaleX;
+ stroke.DrawingAttributes.Height *= FakeICScaleTransform.ScaleY;
+ }
+ catch { }
+ };
+
+ FakeICTranslateTransform.X = 0;
+ FakeICTranslateTransform.Y = 0;
+ FakeICRotateTransform.Angle = 0;
+ FakeICRotateTransform.CenterX = 0;
+ FakeICRotateTransform.CenterY = 0;
+ FakeICScaleTransform.ScaleX = 1;
+ FakeICScaleTransform.ScaleY = 1;
+ FakeICScaleTransform.CenterX = 0;
+ FakeICScaleTransform.CenterY = 0;
+
+ TTT.Text = $"tx:{FakeICTranslateTransform.X}\n" +
+ $"ty:{FakeICTranslateTransform.Y}\n" +
+ $"ssx:{FakeICScaleTransform.ScaleX}\n" +
+ $"ssy:{FakeICScaleTransform.ScaleY}\n" +
+ $"scx:{FakeICScaleTransform.CenterX}\n" +
+ $"scy:{FakeICScaleTransform.CenterY}";
+ }
+
private void inkCanvas_ManipulationInertiaStarting(object sender, ManipulationInertiaStartingEventArgs e)
{
+ if (e.Manipulators.Count() == 0 && FakeICTranslateTransform.X != 0 && FakeICTranslateTransform.Y != 0)
+ {
+ isLockManipulation = true;
+ isInertiaEventFired = true;
+ ExecuteManipulationTransform();
+ }
+ }
+
+ private void StylusPoints_Changed(object sender, EventArgs e)
+ {
+ throw new NotImplementedException();
}
private void Main_Grid_ManipulationCompleted(object sender, ManipulationCompletedEventArgs e)
{
if (e.Manipulators.Count() == 0)
{
+
+ if (isInertiaEventFired == false)
+ {
+ ExecuteManipulationTransform();
+ }
+
if (forceEraser) return;
inkCanvas.EditingMode = InkCanvasEditingMode.Ink;
-
- if (FakeICTranslateTransform.X != 0 && FakeICTranslateTransform.Y != 0)
- {
- Matrix m1 = new Matrix();
- //Matrix m2 = new Matrix();
- Matrix m3 = new Matrix();
- m1.Translate(FakeICTranslateTransform.X, FakeICTranslateTransform.Y);
- //m2.RotateAt(FakeICRotateTransform.Angle, FakeICRotateTransform.CenterX, FakeICRotateTransform.CenterY);
- m3.ScaleAt(FakeICScaleTransform.ScaleX, FakeICScaleTransform.ScaleY, FakeICScaleTransform.CenterX, FakeICScaleTransform.CenterY);
- inkCanvas.Strokes.Transform(m1, false);
- //inkCanvas.Strokes.Transform(m2, false);
- inkCanvas.Strokes.Transform(m3, false);
- foreach (Stroke stroke in inkCanvas.Strokes)
- {
- try
- {
- stroke.DrawingAttributes.Width *= FakeICScaleTransform.ScaleX;
- stroke.DrawingAttributes.Height *= FakeICScaleTransform.ScaleY;
- }
- catch { }
- };
-
- FakeICTranslateTransform.X = 0;
- FakeICTranslateTransform.Y = 0;
- //FakeICRotateTransform.Angle = 0;
- //FakeICRotateTransform.CenterX = 0;
- //FakeICRotateTransform.CenterY = 0;
- FakeICScaleTransform.ScaleX = 1;
- FakeICScaleTransform.ScaleY = 1;
- FakeICScaleTransform.CenterX = 0;
- FakeICScaleTransform.CenterY = 0;
-
- TTT.Text = $"tx:{FakeICTranslateTransform.X}\n" +
- $"ty:{FakeICTranslateTransform.Y}\n" +
- $"ssx:{FakeICScaleTransform.ScaleX}\n" +
- $"ssy:{FakeICScaleTransform.ScaleY}\n" +
- $"scx:{FakeICScaleTransform.CenterX}\n" +
- $"scy:{FakeICScaleTransform.CenterY}";
-
- inkCanvas.Opacity = 1;
- }
-
}
}
@@ -425,12 +475,10 @@ namespace Ink_Canvas
if (isInMultiTouchMode || !Settings.Gesture.IsEnableTwoFingerGesture) return;
if ((dec.Count >= 2 && (Settings.PowerPointSettings.IsEnableTwoFingerGestureInPresentationMode || StackPanelPPTControls.Visibility != Visibility.Visible || StackPanelPPTButtons.Visibility == Visibility.Collapsed)) || isSingleFingerDragMode)
{
-
- if (inkCanvas.Opacity != 0)
- {
- inkCanvas.Opacity = 0;
- }
-
+
+ inkCanvas.Opacity = 0;
+ FakeInkCanvas.Visibility = Visibility.Visible;
+
ManipulationDelta md = e.DeltaManipulation;
Vector trans = md.Translation; // 获得位移矢量
@@ -519,14 +567,14 @@ namespace Ink_Canvas
//TTT.Text = "transX:" + trans.X + ",transY:" + trans.Y + "!";
//}
- if (Settings.Gesture.IsEnableTwoFingerTranslate)
+ if (Settings.Gesture.IsEnableTwoFingerTranslate && isLockManipulation == false)
{
FakeICTranslateTransform.X = Math.Round(FakeICTranslateTransform.X + trans.X,4);
FakeICTranslateTransform.Y = Math.Round(FakeICTranslateTransform.Y + trans.Y, 4);
}
- if (Settings.Gesture.IsEnableTwoFingerGestureTranslateOrRotation)
+ if (Settings.Gesture.IsEnableTwoFingerGestureTranslateOrRotation && isLockManipulation == false)
{
double rotate = md.Rotation; // 获得旋转角度
Vector scale = md.Scale; // 获得缩放倍数
@@ -538,9 +586,9 @@ namespace Ink_Canvas
if (Settings.Gesture.IsEnableTwoFingerRotation)
{
- FakeICRotateTransform.Angle = Math.Round(FakeICRotateTransform.Angle+rotate,4);
- FakeICRotateTransform.CenterX = Math.Round(FakeICRotateTransform.CenterX+center.X,4);
- FakeICRotateTransform.CenterY = Math.Round(FakeICRotateTransform.CenterY + center.Y, 4);
+ //FakeICRotateTransform.Angle = Math.Round(FakeICRotateTransform.Angle+rotate,4);
+ //FakeICRotateTransform.CenterX = Math.Round(FakeICRotateTransform.CenterX+center.X,4);
+ //FakeICRotateTransform.CenterY = Math.Round(FakeICRotateTransform.CenterY + center.Y, 4);
}
if (Settings.Gesture.IsEnableTwoFingerZoom)