|
@@ -42,7 +42,7 @@ namespace XHWK.WKTool
|
42
|
42
|
//private CountdownWindow FileDirectoryWindows = null;
|
43
|
43
|
private FolderBrowserDialog Ofd;
|
44
|
44
|
private DialogResult Result;
|
45
|
|
- public readonly BlackboardNew myblackboard;
|
|
45
|
+ public BlackboardNew myblackboard;
|
46
|
46
|
private System.Windows.Forms.DialogResult result;
|
47
|
47
|
private System.Windows.Forms.OpenFileDialog ofd;
|
48
|
48
|
//声明一个 DrawingAttributes 类型的变量
|
|
@@ -885,6 +885,8 @@ namespace XHWK.WKTool
|
885
|
885
|
/// <param name="e"></param>
|
886
|
886
|
private void BtnScreenshot_Click(object sender, RoutedEventArgs e)
|
887
|
887
|
{
|
|
888
|
+ HideAngleBorder();
|
|
889
|
+ imgCanvas.Margin = new Thickness(0, 0, 0, 0);
|
888
|
890
|
APP.ImgPath = string.Empty;
|
889
|
891
|
string time = GetTimeStamp();
|
890
|
892
|
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory) + time + ".jpg";
|
|
@@ -947,6 +949,7 @@ namespace XHWK.WKTool
|
947
|
949
|
}
|
948
|
950
|
if (APP.PageDrawList.Count >= APP.pageData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
|
949
|
951
|
{
|
|
952
|
+
|
950
|
953
|
imgDocumentation.Source = null;
|
951
|
954
|
BitmapImage bitImg=new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
952
|
955
|
imgCanvas.Source = bitImg;
|
|
@@ -956,6 +959,8 @@ namespace XHWK.WKTool
|
956
|
959
|
ImgPrint.Visibility = Visibility.Visible;//截图成功可打印
|
957
|
960
|
ImgPrintTwo.Visibility = Visibility.Collapsed;
|
958
|
961
|
btnPrint.IsEnabled = true;
|
|
962
|
+
|
|
963
|
+
|
959
|
964
|
}
|
960
|
965
|
}
|
961
|
966
|
this.Topmost = false;
|
|
@@ -1392,6 +1397,22 @@ namespace XHWK.WKTool
|
1392
|
1397
|
btnSetUp.IsEnabled = false;
|
1393
|
1398
|
|
1394
|
1399
|
btnLoginType.IsEnabled = false;
|
|
1400
|
+ blackboard_canvas.Visibility = Visibility.Visible;//zxyceshi
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+ //myblackboard = new BlackboardNew(blackboard_canvas);
|
|
1404
|
+ //DataContext = APP.pageData;
|
|
1405
|
+ //drawingAttributes = new DrawingAttributes();
|
|
1406
|
+ ////将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
|
|
1407
|
+ ////InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
|
|
1408
|
+ //blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
|
|
1409
|
+ //blackboard_canvas.UseCustomCursor = true;
|
|
1410
|
+ //drawingAttributes.FitToCurve = true;
|
|
1411
|
+ //drawingAttributes.IgnorePressure = false;
|
|
1412
|
+ //drawingAttributes.Width = PenSize;
|
|
1413
|
+ //drawingAttributes.Height = PenSize;
|
|
1414
|
+ //drawingAttributes.Color = Color;
|
|
1415
|
+ //blackboard_canvas.Cursor = System.Windows.Input.Cursors.Pen;
|
1395
|
1416
|
#endregion
|
1396
|
1417
|
|
1397
|
1418
|
#region 录像倒计时
|
|
@@ -1587,6 +1608,21 @@ namespace XHWK.WKTool
|
1587
|
1608
|
APP.pageData.currpage = 0;
|
1588
|
1609
|
APP.pageData.pagenum = 0;
|
1589
|
1610
|
myblackboard.clear();
|
|
1611
|
+
|
|
1612
|
+ //myblackboard = new BlackboardNew(blackboard_canvas);
|
|
1613
|
+ //DataContext = APP.pageData;
|
|
1614
|
+ //drawingAttributes = new DrawingAttributes();
|
|
1615
|
+ ////将 InkCanvas 的 DefaultDrawingAttributes 属性的值赋成创建的 DrawingAttributes 类的对象的引用
|
|
1616
|
+ ////InkCanvas 通过 DefaultDrawingAttributes 属性来获取墨迹的各种设置,该属性的类型为 DrawingAttributes 型
|
|
1617
|
+ //blackboard_canvas.DefaultDrawingAttributes = drawingAttributes;
|
|
1618
|
+ //blackboard_canvas.UseCustomCursor = true;
|
|
1619
|
+ //drawingAttributes.FitToCurve = true;
|
|
1620
|
+ //drawingAttributes.IgnorePressure = false;
|
|
1621
|
+ //drawingAttributes.Width = PenSize;
|
|
1622
|
+ //drawingAttributes.Height = PenSize;
|
|
1623
|
+ //drawingAttributes.Color = Color;
|
|
1624
|
+ //blackboard_canvas.Cursor = System.Windows.Input.Cursors.Pen;
|
|
1625
|
+
|
1590
|
1626
|
APP.PageDrawList.Clear();
|
1591
|
1627
|
imgCanvas.Source = null;
|
1592
|
1628
|
imgDocumentation.Source = null;
|
|
@@ -1689,9 +1725,10 @@ namespace XHWK.WKTool
|
1689
|
1725
|
blackboard_canvas.Visibility = Visibility.Visible;
|
1690
|
1726
|
}
|
1691
|
1727
|
APP.pageData.pagenum += 1;
|
|
1728
|
+ HideAngleBorder();
|
1692
|
1729
|
gridPage.Visibility = Visibility.Visible;//页码大于0 显示
|
1693
|
1730
|
APP.pageData.currpage = APP.pageData.pagenum;
|
1694
|
|
- //myblackboard.changepage(APP.pageData.currpage - 1);
|
|
1731
|
+ myblackboard.changepage(APP.pageData.currpage - 1);
|
1695
|
1732
|
///清空页面图片UI
|
1696
|
1733
|
imgCanvas.Source = null;
|
1697
|
1734
|
imgDocumentation.Source = null;
|
|
@@ -3255,26 +3292,6 @@ namespace XHWK.WKTool
|
3255
|
3292
|
|
3256
|
3293
|
}
|
3257
|
3294
|
#endregion
|
3258
|
|
-
|
3259
|
|
- /// <summary>
|
3260
|
|
- /// 图片失去焦点事件
|
3261
|
|
- /// </summary>
|
3262
|
|
- /// <param name="sender"></param>
|
3263
|
|
- /// <param name="e"></param>
|
3264
|
|
- private void imgCanvas_LostFocus(object sender, RoutedEventArgs e)
|
3265
|
|
- {
|
3266
|
|
- //HideAngleBorder();
|
3267
|
|
- }
|
3268
|
|
-
|
3269
|
|
- /// <summary>
|
3270
|
|
- /// 图片获取焦点事件
|
3271
|
|
- /// </summary>
|
3272
|
|
- /// <param name="sender"></param>
|
3273
|
|
- /// <param name="e"></param>
|
3274
|
|
- private void imgCanvas_GotFocus(object sender, RoutedEventArgs e)
|
3275
|
|
- {
|
3276
|
|
- ShowAngleBorder();
|
3277
|
|
- }
|
3278
|
3295
|
System.Windows.Point initialPoint;
|
3279
|
3296
|
private void PicEMap_MouseDown(object sender, MouseButtonEventArgs e)
|
3280
|
3297
|
{
|
|
@@ -3369,7 +3386,7 @@ namespace XHWK.WKTool
|
3369
|
3386
|
}
|
3370
|
3387
|
catch (Exception ex)
|
3371
|
3388
|
{
|
3372
|
|
- MessageWindow.Show(ex.Message);
|
|
3389
|
+ MessageWindow.Show("图片过小!");
|
3373
|
3390
|
}
|
3374
|
3391
|
}
|
3375
|
3392
|
|
|
@@ -3377,27 +3394,5 @@ namespace XHWK.WKTool
|
3377
|
3394
|
{
|
3378
|
3395
|
ShowAngleBorder();
|
3379
|
3396
|
}
|
3380
|
|
-
|
3381
|
|
- private void gridM_MouseDown(object sender, MouseButtonEventArgs e)
|
3382
|
|
- {
|
3383
|
|
- }
|
3384
|
|
-
|
3385
|
|
- private void Canvas_MouseDown(object sender, MouseButtonEventArgs e)
|
3386
|
|
- {
|
3387
|
|
-
|
3388
|
|
- }
|
3389
|
|
-
|
3390
|
|
- private void IMG_MouseDown(object sender, MouseButtonEventArgs e)
|
3391
|
|
- {
|
3392
|
|
- }
|
3393
|
|
-
|
3394
|
|
- private void GridMain_MouseDown(object sender, MouseButtonEventArgs e)
|
3395
|
|
- {
|
3396
|
|
- }
|
3397
|
|
-
|
3398
|
|
- private void Grid_MouseDown(object sender, MouseButtonEventArgs e)
|
3399
|
|
- {
|
3400
|
|
- HideAngleBorder();
|
3401
|
|
- }
|
3402
|
3397
|
}
|
3403
|
3398
|
}
|