Skip to content

Commit

Permalink
Add lots of things and fix lots of bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
WXRIW committed Sep 26, 2021
1 parent fd669c7 commit fd30e21
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 32 deletions.
25 changes: 25 additions & 0 deletions Ink Canvas/ChangeLogWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<Window x:Class="Ink_Canvas.ChangeLogWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Ink_Canvas" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" ShowInTaskbar="False"
xmlns:ui="http://schemas.modernwpf.com/2019" FontFamily="Microsoft YaHei UI" Topmost="True"
mc:Ignorable="d" ui:WindowHelper.UseModernWindowStyle="True" Loaded="Window_Loaded" Closed="Window_Closed"
Title="" Height="350" Width="600">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
<RowDefinition/>
<RowDefinition Height="60"/>
</Grid.RowDefinitions>
<Label Content="已升级到最新版本!" FontFamily="Microsoft YaHei UI" FontSize="26" Margin="20,0"/>
<StackPanel Grid.Row="1">
<TextBlock Name="TextBlockChangeLogTitle" Text="更新日志" FontSize="18" FontWeight="Bold" Margin="35,10,35,0"/>
<TextBlock Name="TextBlockChangeLog" Text="" FontSize="14" Margin="55,5"/>
<TextBlock Name="TextBlockSuggestionTitle" Text="建议" FontSize="18" FontWeight="Bold" Margin="35,10,35,0"/>
<TextBlock Name="TextBlockSuggestion" Text="" FontSize="14" Margin="55,5"/>
</StackPanel>
<Button Content="确定" Grid.Row="2" HorizontalAlignment="Right" Margin="10" Width="100" FontFamily="Microsoft YaHei UI" Click="Button_Click"/>
</Grid>
</Window>
49 changes: 49 additions & 0 deletions Ink Canvas/ChangeLogWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Ink_Canvas
{
/// <summary>
/// Interaction logic for ChangeLogWindow.xaml
/// </summary>
public partial class ChangeLogWindow : Window
{
public ChangeLogWindow()
{
InitializeComponent();
}

private void Window_Loaded(object sender, RoutedEventArgs e)
{
//Version 2.1.0-beta
TextBlockChangeLog.Text = "" +
"1. 修复使用画板时无法使用翻页笔的问题\n" +
"2. 支持修改画笔粗细,支持显示画笔指针\n" +
"3. 支持双指缩放和拖动手势\n" +
"4. 添加“选择墨迹”功能,选中后可以对墨迹进行拖动,拉伸等操作\n" +
"5. 添加画图功能(直线、箭头、矩形、椭圆)";
TextBlockSuggestion.Text = "打开设置,点击“重置”中的“重置设置为推荐设置”,以提升教学体验!";
}

private void Window_Closed(object sender, EventArgs e)
{

}

private void Button_Click(object sender, RoutedEventArgs e)
{
Close();
}
}
}
7 changes: 7 additions & 0 deletions Ink Canvas/Ink Canvas.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,17 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="ChangeLogWindow.xaml.cs">
<DependentUpon>ChangeLogWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Settings.cs" />
<Compile Include="SettingsPage.xaml.cs">
<DependentUpon>SettingsPage.xaml</DependentUpon>
</Compile>
<Page Include="ChangeLogWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
31 changes: 27 additions & 4 deletions Ink Canvas/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
ManipulationBoundaryFeedback="SCManipulationBoundaryFeedback">
<StackPanel Margin="20,20,20,20">
<TextBlock FontSize="14" Margin="0,0,0,0"
Text="*设置将自动保存,再次点击“设置”按钮将关闭此页面"/>
Text="*设置将自动保存,再次点击“设置”按钮即可关闭此页面"/>
<TextBlock FontSize="14" Margin="0,0,0,12"
Text="*部分设置可能需要重新打开后生效。"/>
<GroupBox Header="行为">
Expand Down Expand Up @@ -110,11 +110,31 @@
<ui:ToggleSwitch Name="ToggleSwitchShowButtonExit" Header="显示“退出”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchShowButtonExit_Toggled"/>
<Button Content="立即退出" Width="120" FontFamily="Microsoft YaHei UI" Click="BtnExit_Click" Margin="0,0,0,10"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonEraser" Header="显示“橡皮”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchShowButtonEraser_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonHideControl" Header="显示“⇅ (显示或隐藏控制按钮)”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchShowButtonHideControl_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonLRSwitch" Header="显示“⇆ (左右切换)”按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchShowButtonLRSwitch_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonHideControl" Header="显示“⇅ (显示或隐藏控制按钮)”按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchShowButtonHideControl_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonLRSwitch" Header="显示“⇆ (左右切换)”按钮" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchShowButtonLRSwitch_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchShowButtonModeFinger" Header="显示“手指模式”切换按钮" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchShowButtonModeFinger_Toggled"/>
</ui:SimpleStackPanel>
</GroupBox>
<GroupBox Header="重置">
<ui:SimpleStackPanel Spacing="12">
<StackPanel>
<TextBlock FontSize="14" Margin="0,0,0,12"
Text="重置设置为推荐设置"/>
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="12">
<Button Content="重置" Width="100" FontFamily="Microsoft YaHei UI" Click="BtnResetToSuggestion_Click" Margin="0,0,0,0"/>
<ui:SymbolIcon Name="SymbolIconResetSuggestionComplete" Symbol="Accept" Visibility="Collapsed"/>
</ui:SimpleStackPanel>
</StackPanel>
<StackPanel>
<TextBlock FontSize="14" Margin="0,0,0,12"
Text="重置设置为默认设置"/>
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="12">
<Button Content="重置" Width="100" FontFamily="Microsoft YaHei UI" Click="BtnResetToDefault_Click" Margin="0,0,0,10"/>
<ui:SymbolIcon Name="SymbolIconResetDefaultComplete" Symbol="Accept" Visibility="Collapsed"/>
</ui:SimpleStackPanel>
</StackPanel>
</ui:SimpleStackPanel>
</GroupBox>
<GroupBox Header="关于">
<ui:SimpleStackPanel Spacing="12">
<ui:SimpleStackPanel Orientation="Horizontal" Spacing="4">
Expand Down Expand Up @@ -286,9 +306,12 @@
<Button Name="BtnSelect" Content="选择&#x000A;墨迹" Visibility="Visible" FontFamily="Microsoft YaHei UI"
Margin="0,25,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
Click="BtnSelect_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
<Button Name="BtnClearAndHideCanvas" Content="清屏&#x000A;&amp;&#x000A;隐藏" Visibility="Collapsed" FontFamily="Microsoft YaHei UI"
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}" Block.TextAlignment="Center"
Click="BtnSelect_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
<StackPanel Visibility="{Binding ElementName=StackPanelPPTControls, Path=Visibility}">
<Button Content="" FontFamily="Microsoft YaHei UI"
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
Margin="0,25,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
Click="BtnPPTSlidesUp_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}" Background="{Binding ElementName=BtnExit, Path=Background}"/>
<Button Content="" FontFamily="Microsoft YaHei UI"
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelMain, Path=ActualWidth}"
Expand Down
Loading

0 comments on commit fd30e21

Please sign in to comment.