Merge branch 'master' of https://github.com/WXRIW/Ink-Canvas
This commit is contained in:
commit
5d640ed709
@ -422,7 +422,7 @@
|
||||
<ComboBoxItem Content="较大" FontFamily="Microsoft YaHei UI"/>
|
||||
<ComboBoxItem Content="大" FontFamily="Microsoft YaHei UI"/>
|
||||
</ComboBox>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchHideStrokeWhenSelecting" Header="切换到鼠标模式后隐藏墨迹" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchHideStrokeWhenSelecting_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchHideStrokeWhenSelecting" Header="退出画板模式后隐藏墨迹" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchHideStrokeWhenSelecting_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchUsingWhiteboard" Header="使用白板 (白色背景)" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchUsingWhiteboard_Toggled"/>
|
||||
<TextBlock Text="保留双曲线渐近线" FontFamily="Microsoft YaHei UI" FontSize="14"/>
|
||||
<ComboBox Name="ComboBoxHyperbolaAsymptoteOption" FontFamily="Microsoft YaHei UI" SelectedIndex="2" SelectionChanged="ComboBoxHyperbolaAsymptoteOption_SelectionChanged">
|
||||
@ -493,8 +493,8 @@
|
||||
<ui:ToggleSwitch Name="ToggleSwitchNotifyPreviousPage" Header="记忆并提示上次播放位置" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchNotifyPreviousPage_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchNotifyHiddenPage" Header="提示隐藏幻灯片" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchNotifyHiddenPage_Toggled"/>
|
||||
|
||||
<ui:ToggleSwitch Name="ToggleSwitchNoStrokeClearInPowerPoint" Header="进入鼠标模式时不清除笔迹" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchNoStrokeClearInPowerPoint_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowStrokeOnSelectInPowerPoint" Header="进入鼠标模式时不隐藏笔迹" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowStrokeOnSelectInPowerPoint_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchNoStrokeClearInPowerPoint" Header="退出画板模式时不清除笔迹" IsOn="True" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchNoStrokeClearInPowerPoint_Toggled"/>
|
||||
<ui:ToggleSwitch Name="ToggleSwitchShowStrokeOnSelectInPowerPoint" Header="退出画板模式时不隐藏笔迹" IsOn="False" FontFamily="Microsoft YaHei UI" OnContent="开" OffContent="关" Toggled="ToggleSwitchShowStrokeOnSelectInPowerPoint_Toggled"/>
|
||||
</ui:SimpleStackPanel>
|
||||
|
||||
</GroupBox>
|
||||
|
@ -5279,7 +5279,16 @@ namespace Ink_Canvas
|
||||
if (_currentCommitType == CommitReason.ShapeDrawing && drawingShapeMode != 9)
|
||||
{
|
||||
_currentCommitType = CommitReason.UserInput;
|
||||
timeMachine.CommitStrokeUserInputHistory(lastTempStrokeCollection);
|
||||
StrokeCollection collection;
|
||||
if (lastTempStrokeCollection != null && lastTempStrokeCollection.Count > 0)
|
||||
{
|
||||
collection = lastTempStrokeCollection;
|
||||
}
|
||||
else
|
||||
{
|
||||
collection = new StrokeCollection () { lastTempStroke };
|
||||
}
|
||||
timeMachine.CommitStrokeUserInputHistory(collection);
|
||||
}
|
||||
lastTempStroke = null;
|
||||
lastTempStrokeCollection = null;
|
||||
@ -5832,8 +5841,13 @@ namespace Ink_Canvas
|
||||
{
|
||||
DrawingAttributes = inkCanvas.DefaultDrawingAttributes.Clone()
|
||||
};
|
||||
inkCanvas.Strokes.Add(_stroke.Clone());
|
||||
inkCanvas.Strokes.Add(GenerateDashedLineEllipseStrokeCollection(iniP, endP, true, false));
|
||||
var _dashedLineStroke = GenerateDashedLineEllipseStrokeCollection(iniP, endP, true, false);
|
||||
StrokeCollection strokes = new StrokeCollection()
|
||||
{
|
||||
_stroke,
|
||||
_dashedLineStroke
|
||||
};
|
||||
inkCanvas.Strokes.Add(strokes);
|
||||
_currentCommitType = CommitReason.UserInput;
|
||||
return;
|
||||
}
|
||||
@ -7017,17 +7031,30 @@ namespace Ink_Canvas
|
||||
LogHelper.WriteLogToFile(string.Format("Strokes Insert: Name: {0}", openFileDialog.FileName), LogHelper.LogType.Event);
|
||||
try
|
||||
{
|
||||
var fs = new FileStream(openFileDialog.FileName, FileMode.Open, FileAccess.Read);
|
||||
inkCanvas.Strokes = new StrokeCollection(fs);
|
||||
LogHelper.NewLog(string.Format("Strokes Insert: Strokes Count: {0}", inkCanvas.Strokes.Count.ToString()));
|
||||
if (inkCanvas.Strokes.Count == 0)
|
||||
var fileStreamHasNoStroke = false;
|
||||
using (var fs = new FileStream(openFileDialog.FileName, FileMode.Open, FileAccess.Read))
|
||||
{
|
||||
var strokes = new StrokeCollection(fs);
|
||||
fileStreamHasNoStroke = strokes.Count == 0;
|
||||
if (!fileStreamHasNoStroke)
|
||||
{
|
||||
fs.Close();
|
||||
var memoryStream = new MemoryStream(File.ReadAllBytes(openFileDialog.FileName));
|
||||
memoryStream.Position = 0;
|
||||
ClearStrokes(true);
|
||||
inkCanvas.Strokes.Add(new StrokeCollection(memoryStream));
|
||||
LogHelper.NewLog(string.Format("Strokes Insert (2): Strokes Count: {0}", inkCanvas.Strokes.Count.ToString()));
|
||||
timeMachine.ClearStrokeHistory();
|
||||
inkCanvas.Strokes.Add(strokes);
|
||||
LogHelper.NewLog(string.Format("Strokes Insert: Strokes Count: {0}", inkCanvas.Strokes.Count.ToString()));
|
||||
}
|
||||
}
|
||||
if (fileStreamHasNoStroke)
|
||||
{
|
||||
using (var ms = new MemoryStream(File.ReadAllBytes(openFileDialog.FileName)))
|
||||
{
|
||||
ms.Seek(0, SeekOrigin.Begin);
|
||||
var strokes = new StrokeCollection(ms);
|
||||
ClearStrokes(true);
|
||||
timeMachine.ClearStrokeHistory();
|
||||
inkCanvas.Strokes.Add(strokes);
|
||||
LogHelper.NewLog(string.Format("Strokes Insert (2): Strokes Count: {0}", strokes.Count.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
if (inkCanvas.Visibility != Visibility.Visible)
|
||||
|
23
README.md
23
README.md
@ -16,22 +16,41 @@ A fantastic Ink Canvas in WPF/C#, with fantastic support for Seewo Boards.
|
||||
|
||||
</div>
|
||||
|
||||
## 特性
|
||||
## 🔧 特性
|
||||
对 Microsoft PowerPoint 有优化支持(强烈不推荐使用 WPS,会导致 WPS 自己把自己卡住,并且 WPS 对触摸屏的支持实在是差,PPT 翻页点击就行,而不是滑动,也不能放大缩小)
|
||||
**笔细的一头写字,反过来粗的一头是橡皮擦。(希沃白板自己并不支持此功能)**
|
||||
当然,用手直接擦也是可以的(跟希沃白板一样)
|
||||
支持 Active Pen (支持压感)
|
||||
对于其他红外线屏也可以提供相似功能,欢迎大家测试!
|
||||
|
||||
## FAQ
|
||||
## ⚠️ 提示
|
||||
- 提问前请先读[FAQ](https://github.com/WXRIW/Ink-Canvas#FAQ "FAQ")
|
||||
- 遇到问题请先尝试自行解决,如果有没法自行解决的问题请先冷静下来提问,使用简洁的语言,描述你的期望与现实的差异性。如果有必要,请附上复现此问题的操作步骤或错误日志¹ (可适当配图),等待大佬们的回复。
|
||||
- 对新功能的有效意见和合理建议,开发者会适时回复并进行开发。Ink Canvas并非商业性质的软件,请勿催促开发者,耐心才能让功能更少BUG、更加稳定。
|
||||
|
||||
> 等待是人类的一种智慧
|
||||
|
||||
[1] :对于长文本,可以使用在线剪贴板 (如 https://pastes.dev/ ),粘贴完毕点击 `SAVE` 后复制链接进行分享
|
||||
|
||||
## 📗 FAQ
|
||||
### 在 Windows 10 以下版本系统中部分图标显示为 “□” 怎么办?
|
||||
[点击下载](https://aka.ms/SegoeFonts "SegoeFonts") SegoeFonts 文件,安装压缩包中 `SegMDL2.ttf` 字体后重启即可解决
|
||||
|
||||
### 点击放映后一翻页就闪退?
|
||||
考虑是由于`Microsoft Office`未激活导致的,请自行激活
|
||||
|
||||
### 放映后画板程序不会切换到PPT模式?
|
||||
如果你曾经安装过`WPS`且在卸载后发现此问题则是由于暂时未确定的问题所导致,可以尝试重新安装WPS
|
||||
> “您好,关于您反馈的情况我们已经反馈技术同学进一步分析哈,辛苦您可以留意后续WPS版本更新哈~” --回复自WPS客服
|
||||
|
||||
另外,处在保护(只读)模式的PPT不会被识别
|
||||
|
||||
### **安装后**程序无法正常启动?
|
||||
请检查你的电脑上是否安装了 `.Net Framework 4.7.2` 或更高版本。若没有,请前往官网下载
|
||||
如果仍无法运行,请检查你的电脑上是否安装了 `Microsoft Office`。若没有,请安装后再试
|
||||
|
||||
### 我该如何提出功能需求和错误报告?
|
||||
|
||||
1. 你可以选择在GitHub issues里提出
|
||||
|
||||
功能需求:https://github.com/WXRIW/Ink-Canvas/labels/enhancement/new
|
||||
|
Loading…
Reference in New Issue
Block a user