Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
2044154
Merge pull request #420 from InkCanvasForClass/beta
PrefacedCorg Mar 28, 2026
1bf57ea
1
PrefacedCorg Mar 29, 2026
e8be851
add:NewNewSettings
PrefacedCorg Mar 29, 2026
cc9f58f
add:NewNewSettings
PrefacedCorg Mar 29, 2026
e0f3545
add:NewNewSettings
PrefacedCorg Mar 29, 2026
a2f2135
我服了
PrefacedCorg Mar 30, 2026
378b3e7
1
PrefacedCorg Mar 31, 2026
7c97b68
新新设置的第一个开关设置选项 开机时启动
PrefacedCorg Mar 31, 2026
6484450
更新 SettingsWindow2.xaml.cs
PrefacedCorg Apr 1, 2026
ca53624
add:高dpi适配 插件接口 设置窗口多显示器优化 fix:触摸后鼠标指针显示异常
PrefacedCorg Apr 1, 2026
5f9b01e
更新 SettingsWindow2.xaml
PrefacedCorg Apr 1, 2026
ffdb3cd
更新 SettingsWindow2.xaml.cs
PrefacedCorg Apr 1, 2026
a6fdb07
Revert "更新 SettingsWindow2.xaml.cs"
PrefacedCorg Apr 2, 2026
11cb181
Revert "更新 SettingsWindow2.xaml"
PrefacedCorg Apr 2, 2026
26f79da
Revert "add:高dpi适配 插件接口 设置窗口多显示器优化 fix:触摸后鼠标指针显示异常"
PrefacedCorg Apr 2, 2026
c3335c0
Update SettingsWindow.xaml.cs
PrefacedCorg Apr 3, 2026
576f86c
Reapply "add:高dpi适配 插件接口 设置窗口多显示器优化 fix:触摸后鼠标指针显示异常"
PrefacedCorg Apr 3, 2026
df4168e
Reapply "更新 SettingsWindow2.xaml"
PrefacedCorg Apr 3, 2026
b77e540
Reapply "更新 SettingsWindow2.xaml.cs"
PrefacedCorg Apr 3, 2026
e347443
Update SettingsWindow2.xaml
PrefacedCorg Apr 3, 2026
e7fa1ca
Update SettingsWindow2.xaml
PrefacedCorg Apr 3, 2026
62a9a09
i18n
PrefacedCorg Apr 3, 2026
d4517d3
Update SettingsWindow2.xaml.cs
PrefacedCorg Apr 3, 2026
7eafcb0
新设置
PrefacedCorg Apr 3, 2026
7c9a5f8
Merge branch 'beta' into New-New-Settings
PrefacedCorg Apr 3, 2026
c890f95
i18n
PrefacedCorg Apr 3, 2026
cacc67b
新设置
PrefacedCorg Apr 4, 2026
e2d898d
Update SettingsWindow2.xaml
PrefacedCorg Apr 4, 2026
fa2366c
i1145141919810n
PrefacedCorg Apr 4, 2026
34c2dab
i1145141919810n
PrefacedCorg Apr 4, 2026
140e92e
新设置
PrefacedCorg Apr 4, 2026
742a62b
Revert "新设置"
PrefacedCorg Apr 4, 2026
9279783
Revert "新设置"
PrefacedCorg Apr 4, 2026
2f54e9d
add:复制按钮
PrefacedCorg Apr 5, 2026
04a8224
Merge branch 'beta' into New-New-Settings
PrefacedCorg Apr 5, 2026
ceb99ce
重命名和补回i18n
PrefacedCorg Apr 5, 2026
77dd83c
新设置
PrefacedCorg Apr 5, 2026
fa38d3d
remove:旧的新设置
PrefacedCorg Apr 5, 2026
0029709
Update MainWindow.xaml
PrefacedCorg Apr 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ink Canvas/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
ToolTipText="InkCanvasForClass"
ContextMenu="{StaticResource SysTrayMenu}"
IconSource="/Resources/icc.ico"/>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary.MergedDictionaries>
<ui:ThemeResources/>
<ui:XamlControlsResources />
<ResourceDictionary Source="Resources/SeewoImageDictionary.xaml"/>
Expand Down
24 changes: 24 additions & 0 deletions Ink Canvas/Controls/CopyButton.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<UserControl x:Class="Ink_Canvas.Controls.CopyButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern">
<Button x:Name="CopyButtonControl" Padding="6" Click="CopyButton_Click"
ToolTipService.ToolTip="Copy">
<Grid>
<ui:FontIcon x:Name="FontIcon_Copy" FontSize="16"
Icon="{x:Static ui:SegoeFluentIcons.Copy}" RenderTransformOrigin="0.5 0.5">
<FrameworkElement.RenderTransform>
<ScaleTransform x:Name="ScaleTransform_Copy"
ScaleX="1" ScaleY="{Binding ScaleX, RelativeSource={RelativeSource Self}}"/>
</FrameworkElement.RenderTransform>
</ui:FontIcon>
<ui:FontIcon x:Name="FontIcon_Success" FontSize="16"
Icon="{x:Static ui:SegoeFluentIcons.CheckMark}" RenderTransformOrigin="0.5 0.5">
<FrameworkElement.RenderTransform>
<ScaleTransform x:Name="ScaleTransform_Success"
ScaleX="0" ScaleY="{Binding ScaleX, RelativeSource={RelativeSource Self}}"/>
</FrameworkElement.RenderTransform>
</ui:FontIcon>
</Grid>
</Button>
</UserControl>
115 changes: 115 additions & 0 deletions Ink Canvas/Controls/CopyButton.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
using System;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Animation;

namespace Ink_Canvas.Controls
{
public partial class CopyButton : UserControl
{
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
nameof(Text), typeof(string), typeof(CopyButton), new PropertyMetadata(string.Empty));

public string Text
{
get => (string)GetValue(TextProperty);
set => SetValue(TextProperty, value);
}

public event EventHandler Click;

public CopyButton()
{
InitializeComponent();
}

private void CopyButton_Click(object sender, RoutedEventArgs e)
{
try
{
if (!string.IsNullOrEmpty(Text))
{
Clipboard.SetText(Text);
}

ShowSuccessAnimation();
Click?.Invoke(this, EventArgs.Empty);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "Unable to Perform Copy", MessageBoxButton.OK, MessageBoxImage.Error);
}
}

private async void ShowSuccessAnimation()
{
var copyScaleAnim = new DoubleAnimation
{
To = 0,
Duration = TimeSpan.FromMilliseconds(150)
};
ScaleTransform_Copy.BeginAnimation(ScaleTransform.ScaleXProperty, copyScaleAnim);

var copyOpacityAnim = new DoubleAnimation
{
To = 0,
BeginTime = TimeSpan.FromMilliseconds(100),
Duration = TimeSpan.FromMilliseconds(10)
};
FontIcon_Copy.BeginAnimation(UIElement.OpacityProperty, copyOpacityAnim);

await Task.Delay(150);
var successScaleAnim = new DoubleAnimation
{
To = 1,
Duration = TimeSpan.FromMilliseconds(150),
EasingFunction = new BackEase { EasingMode = EasingMode.EaseOut, Amplitude = 0.2 }
};
ScaleTransform_Success.BeginAnimation(ScaleTransform.ScaleXProperty, successScaleAnim);

var successOpacityAnim = new DoubleAnimation
{
To = 1,
Duration = TimeSpan.FromMilliseconds(15)
};
FontIcon_Success.BeginAnimation(UIElement.OpacityProperty, successOpacityAnim);

await Task.Delay(1000);
ShowCopyAnimation();
}

private async void ShowCopyAnimation()
{
var successOpacityAnim = new DoubleAnimation
{
To = 0,
Duration = TimeSpan.FromMilliseconds(150)
};
FontIcon_Success.BeginAnimation(UIElement.OpacityProperty, successOpacityAnim);

await Task.Delay(150);
var copyScaleAnim = new DoubleAnimation
{
To = 1,
Duration = TimeSpan.Zero
};
ScaleTransform_Copy.BeginAnimation(ScaleTransform.ScaleXProperty, copyScaleAnim);

var copyOpacityAnim = new DoubleAnimation
{
To = 1,
Duration = TimeSpan.FromMilliseconds(150)
};
FontIcon_Copy.BeginAnimation(UIElement.OpacityProperty, copyOpacityAnim);

var successScaleAnim = new DoubleAnimation
{
To = 0,
Duration = TimeSpan.Zero
};
ScaleTransform_Success.BeginAnimation(ScaleTransform.ScaleXProperty, successScaleAnim);
}
}
}
14 changes: 9 additions & 5 deletions Ink Canvas/Helpers/PPTManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,15 @@ private void DisconnectFromPPT()
{
try
{
PPTApplication.PresentationOpen -= OnPresentationOpen;
PPTApplication.PresentationClose -= OnPresentationClose;
PPTApplication.SlideShowBegin -= OnSlideShowBegin;
PPTApplication.SlideShowNextSlide -= OnSlideShowNextSlide;
PPTApplication.SlideShowEnd -= OnSlideShowEnd;
// 再次检查PPTApplication是否为null,因为可能在异步操作期间被修改
if (PPTApplication != null && Marshal.IsComObject(PPTApplication))
{
PPTApplication.PresentationOpen -= OnPresentationOpen;
PPTApplication.PresentationClose -= OnPresentationClose;
PPTApplication.SlideShowBegin -= OnSlideShowBegin;
PPTApplication.SlideShowNextSlide -= OnSlideShowNextSlide;
PPTApplication.SlideShowEnd -= OnSlideShowEnd;
}
}
catch (COMException comEx)
{
Expand Down
10 changes: 2 additions & 8 deletions Ink Canvas/InkCanvasForClass.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="netstandard" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.ComponentModel.Composition" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Management" />
Expand Down Expand Up @@ -563,14 +564,7 @@
<ItemGroup>
<Compile Remove="AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="Properties\Strings.en-US.resx" />
<EmbeddedResource Remove="**\Strings.en-US.resx" />
<None Include="Properties\Strings.en-US.resx" />
<EmbeddedResource Include="Properties\Strings.enUS.xml">
<LogicalName>Ink_Canvas.Properties.Strings.enUS.xml</LogicalName>
</EmbeddedResource>
</ItemGroup>

<ItemGroup>
<None Remove="MainWindow.xaml~RF6c3144.TMP" />
<None Remove="Resources\Cursors\Cursor.cur" />
Expand Down
6 changes: 3 additions & 3 deletions Ink Canvas/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -643,15 +643,15 @@
</ikw:SimpleStackPanel>
</GroupBox>

<GroupBox Name="GroupBoxNewSettings">
<GroupBox Name="GroupBoxSettings">
<GroupBox.Header>
<TextBlock Margin="0,12,0,0" Text="{i18n:I18n Key=Settings_NewWindow}" FontWeight="Bold" Foreground="#fafafa"
FontSize="26" />
</GroupBox.Header>
<ikw:SimpleStackPanel Spacing="6" Margin="0,10,0,0">
<TextBlock TextWrapping="Wrap" Margin="0,0,0,10" Foreground="#fafafa" Text="{i18n:I18n Key=Settings_NewWindowDesc}"/>
<Button x:Name="BtnOpenNewSettings" Content="{i18n:I18n Key=Btn_OpenNewSettings}"
HorizontalAlignment="Left" Click="BtnOpenNewSettings_Click"
<Button x:Name="BtnOpenSettings" Content="{i18n:I18n Key=Btn_OpenNewSettings}"
HorizontalAlignment="Left" Click="BtnOpenNewNewSettings_Click"
Padding="15,5" Margin="0,10,0,0"/>
</ikw:SimpleStackPanel>
</GroupBox>
Expand Down
27 changes: 3 additions & 24 deletions Ink Canvas/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2812,38 +2812,17 @@ private void ShowGroupBoxByHeader(StackPanel parent, string headerText)
#endregion Navigation Sidebar Methods

#region 新设置窗口

/// <summary>
/// 在隐藏子面板后打开新的设置窗口;若需要则先提示并验证安全密码,并在正在打开或隐藏设置面板时不执行任何操作。
/// </summary>
/// <remarks>
/// 在验证密码失败或发生异常时会中止操作。成功通过验证后以模式窗口方式显示设置窗口并将当前窗口设为其所有者。
/// </remarks>
private async void BtnOpenNewSettings_Click(object sender, RoutedEventArgs e)
private async void BtnOpenNewNewSettings_Click(object sender, RoutedEventArgs e)
{
if (isOpeningOrHidingSettingsPane) return;
HideSubPanels();
{
try
{
if (SecurityManager.IsPasswordRequiredForEnterSettings(Settings))
{
bool ok = await SecurityManager.PromptAndVerifyAsync(Settings, this, "进入设置", "请输入安全密码以进入设置。");
if (!ok) return;
}
}
catch (Exception ex)
{
LogHelper.WriteLogToFile($"安全密码校验失败: {ex}", LogHelper.LogType.Error);
return;
}

var settingsWindow = new SettingsWindow();
var settingsWindow = new Windows.SettingsViews2.SettingsWindow2();
settingsWindow.Owner = this;
settingsWindow.ShowDialog();
}
}

#endregion 新设置窗口

// 在MainWindow类中添加:
Expand Down
2 changes: 1 addition & 1 deletion Ink Canvas/Properties/Strings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading