Skip to content

Commit

Permalink
Fix some bugs and release new version
Browse files Browse the repository at this point in the history
  • Loading branch information
WXRIW committed Sep 10, 2022
1 parent db16a49 commit 3cb84c8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
6 changes: 3 additions & 3 deletions Ink Canvas/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
xmlns:local="clr-namespace:Ink_Canvas" xmlns:ui="http://schemas.modernwpf.com/2019"
AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize"
mc:Ignorable="d" WindowState="Maximized" Loaded="Window_Loaded" Background="Transparent" ShowInTaskbar="False"
Title="Ink Canvas 画板" Closing="Window_Closing" Closed="Window_Closed"
Height="10000" Width="1000" FontFamily="Microsoft YaHei UI"
Title="Ink Canvas 画板" Closing="Window_Closing" Closed="Window_Closed" PreviewKeyDown="Main_Grid_PreviewKeyDown"
Height="10000" Width="1000" FontFamily="Microsoft YaHei UI" MouseWheel="Window_MouseWheel"
Foreground="Black" Stylus.IsPressAndHoldEnabled="False">
<!--资源中添加命令-->
<Window.Resources>
Expand All @@ -28,7 +28,7 @@
CanExecute="CommandBinding_CanExecute"
Executed="KeyExit"/>
</Window.CommandBindings>
<Grid x:Name="Main_Grid" Background="#01FFFFFF" PreviewKeyDown="Main_Grid_PreviewKeyDown">
<Grid x:Name="Main_Grid" Background="#01FFFFFF">
<Grid Name="GridBackgroundCoverHolder">
<Grid Name="GridBackgroundCover" Visibility="Hidden" Background="#1F1F1F"/>
</Grid>
Expand Down
40 changes: 26 additions & 14 deletions Ink Canvas/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,32 @@ private void inkCanvas_EditingModeChanged(object sender, RoutedEventArgs e)

#region Hotkeys

private void Window_MouseWheel(object sender, MouseWheelEventArgs e)
{
if (e.Delta >= 120)
{
BtnPPTSlidesUp_Click(BtnPPTSlidesUp, null);
}
else if (e.Delta <= -120)
{
BtnPPTSlidesDown_Click(BtnPPTSlidesDown, null);
}
}

private void Main_Grid_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (StackPanelPPTControls.Visibility != Visibility.Visible || currentMode != 0) return;

if (e.Key == Key.Down || e.Key == Key.PageDown || e.Key == Key.Right || e.Key == Key.N)
{
BtnPPTSlidesDown_Click(BtnPPTSlidesDown, null);
}
if (e.Key == Key.Up || e.Key == Key.PageUp || e.Key == Key.Left || e.Key == Key.P)
{
BtnPPTSlidesUp_Click(BtnPPTSlidesUp, null);
}
}

private void Window_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.Escape)
Expand Down Expand Up @@ -2149,20 +2175,6 @@ private void PptApplication_SlideShowEnd(Presentation Pres)
});
}

private void Main_Grid_PreviewKeyDown(object sender, KeyEventArgs e)
{
if (StackPanelPPTControls.Visibility != Visibility.Visible || currentMode != 0) return;

if (e.Key == Key.Down || e.Key == Key.PageDown || e.Key == Key.Right || e.Key == Key.N)
{
BtnPPTSlidesDown_Click(BtnPPTSlidesDown, null);
}
if (e.Key == Key.Up || e.Key == Key.PageUp || e.Key == Key.Left || e.Key == Key.P)
{
BtnPPTSlidesUp_Click(BtnPPTSlidesUp, null);
}
}

int previousSlideID = 0;
MemoryStream[] memoryStreams = new MemoryStream[50];

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 @@ -51,5 +51,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("3.2.6.0")]
[assembly: AssemblyFileVersion("3.2.6.0")]
[assembly: AssemblyVersion("3.3.0.0")]
[assembly: AssemblyFileVersion("3.3.0.0")]

0 comments on commit 3cb84c8

Please sign in to comment.