|
@@ -163,6 +163,9 @@ namespace XHWK.WKTool
|
163
|
163
|
times.Enabled = true; //启动计时器
|
164
|
164
|
|
165
|
165
|
IsRbnOpen = true;
|
|
166
|
+
|
|
167
|
+ string imgPath = FileToolsCommon.GetFileAbsolutePath("Temp/imgplayer");
|
|
168
|
+ FileToolsCommon.CreateDirectory(imgPath);
|
166
|
169
|
}
|
167
|
170
|
}
|
168
|
171
|
|
|
@@ -178,8 +181,7 @@ namespace XHWK.WKTool
|
178
|
181
|
if (I > 10010)
|
179
|
182
|
{
|
180
|
183
|
long time = Timestamp();
|
181
|
|
- string imgPath= FileToolsCommon.GetFileAbsolutePath("temp/imgplayer");
|
182
|
|
- FileToolsCommon.CreateFile(imgPath);
|
|
184
|
+ string imgPath= FileToolsCommon.GetFileAbsolutePath("Temp/imgplayer");
|
183
|
185
|
//string FilePathName = ImgPath + RsImgName.Count + ".png";
|
184
|
186
|
string path = CameraHelper.CaptureImage(imgPath, time.ToString());
|
185
|
187
|
if (!string.IsNullOrWhiteSpace(path))
|
|
@@ -705,7 +707,7 @@ namespace XHWK.WKTool
|
705
|
707
|
imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
706
|
708
|
//btnOk.Visibility = Visibility.Visible;
|
707
|
709
|
//blackboard_canvas.Visibility = Visibility.Collapsed;
|
708
|
|
-
|
|
710
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation = false;
|
709
|
711
|
ImgPrint.Visibility = Visibility.Visible;//截图成功可打印
|
710
|
712
|
ImgPrintTwo.Visibility = Visibility.Collapsed;
|
711
|
713
|
btnPrint.IsEnabled = true;
|
|
@@ -849,6 +851,7 @@ namespace XHWK.WKTool
|
849
|
851
|
APP.PageDrawList[i].PageImagePath = page[i]; //zxycs
|
850
|
852
|
APP.PageDrawList[i].PdfImagePath = page[i];
|
851
|
853
|
APP.PageDrawList[i].PageNum = i + 1;
|
|
854
|
+ APP.PageDrawList[i].ImgDocumentation = true;
|
852
|
855
|
}
|
853
|
856
|
else
|
854
|
857
|
{
|
|
@@ -857,6 +860,7 @@ namespace XHWK.WKTool
|
857
|
860
|
model_DrawData.PageImagePath = page[i];
|
858
|
861
|
model_DrawData.PdfImagePath = page[i];
|
859
|
862
|
model_DrawData.PageNum = i + 1;
|
|
863
|
+ model_DrawData.ImgDocumentation = true;
|
860
|
864
|
APP.PageDrawList.Add(model_DrawData);
|
861
|
865
|
}
|
862
|
866
|
ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
|
|
@@ -910,6 +914,7 @@ namespace XHWK.WKTool
|
910
|
914
|
APP.PageDrawList[i].PageImagePath = page[i]; //zxycs
|
911
|
915
|
APP.PageDrawList[i].PdfImagePath = page[i];
|
912
|
916
|
APP.PageDrawList[i].PageNum = i + 1;
|
|
917
|
+ APP.PageDrawList[i].ImgDocumentation = true;
|
913
|
918
|
}
|
914
|
919
|
else
|
915
|
920
|
{
|
|
@@ -918,6 +923,7 @@ namespace XHWK.WKTool
|
918
|
923
|
model_DrawData.PageImagePath = page[i];
|
919
|
924
|
model_DrawData.PdfImagePath = page[i];
|
920
|
925
|
model_DrawData.PageNum = i + 1;
|
|
926
|
+ model_DrawData.ImgDocumentation = true;
|
921
|
927
|
APP.PageDrawList.Add(model_DrawData);
|
922
|
928
|
}
|
923
|
929
|
ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
|
|
@@ -1476,7 +1482,7 @@ namespace XHWK.WKTool
|
1476
|
1482
|
APP.pageData.currpage -= 1;
|
1477
|
1483
|
|
1478
|
1484
|
myblackboard.changepage(APP.pageData.currpage - 1);
|
1479
|
|
- if (APP.PageDrawList.Count > 0)
|
|
1485
|
+ if (APP.pageData.currpage <= APP.PageDrawList.Count)
|
1480
|
1486
|
{
|
1481
|
1487
|
if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
|
1482
|
1488
|
{
|
|
@@ -1486,27 +1492,38 @@ namespace XHWK.WKTool
|
1486
|
1492
|
{
|
1487
|
1493
|
//imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
|
1488
|
1494
|
|
1489
|
|
- imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
1490
|
|
- if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
|
|
1495
|
+ if (APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation)
|
1491
|
1496
|
{
|
1492
|
|
- var group = IMG.FindResource("Imageview") as TransformGroup;
|
1493
|
|
- var transform = group.Children[1] as TranslateTransform;
|
1494
|
|
- //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
1495
|
|
- //{
|
1496
|
|
- // var transform1 = group.Children[0] as ScaleTransform;
|
1497
|
|
- // transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
1498
|
|
- // transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
1499
|
|
- //}
|
1500
|
|
- //var position = e.GetPosition(img);
|
1501
|
|
- transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
|
1502
|
|
- transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
|
1503
|
|
- mouseDown = false;
|
|
1497
|
+ imgCanvas.Source = null;
|
|
1498
|
+ imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
|
1499
|
+ }
|
|
1500
|
+ else
|
|
1501
|
+ {
|
|
1502
|
+ imgDocumentation.Source = null;
|
|
1503
|
+ imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
|
1504
|
+
|
|
1505
|
+ if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
|
|
1506
|
+ {
|
|
1507
|
+ var group = IMG.FindResource("Imageview") as TransformGroup;
|
|
1508
|
+ var transform = group.Children[1] as TranslateTransform;
|
|
1509
|
+ //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
|
1510
|
+ //{
|
|
1511
|
+ // var transform1 = group.Children[0] as ScaleTransform;
|
|
1512
|
+ // transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
|
1513
|
+ // transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
|
1514
|
+ //}
|
|
1515
|
+ //var position = e.GetPosition(img);
|
|
1516
|
+ transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
|
|
1517
|
+ transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
|
|
1518
|
+ mouseDown = false;
|
1504
|
1519
|
|
|
1520
|
+ }
|
1505
|
1521
|
}
|
1506
|
1522
|
}
|
1507
|
1523
|
else
|
1508
|
1524
|
{
|
1509
|
1525
|
imgCanvas.Source = null;
|
|
1526
|
+ imgDocumentation.Source = null;
|
1510
|
1527
|
}
|
1511
|
1528
|
}
|
1512
|
1529
|
//if (!string.IsNullOrWhiteSpace(APP.JPaths[APP.pageData.currpage]))
|
|
@@ -1543,7 +1560,7 @@ namespace XHWK.WKTool
|
1543
|
1560
|
}
|
1544
|
1561
|
APP.pageData.currpage += 1;
|
1545
|
1562
|
myblackboard.changepage(APP.pageData.currpage - 1);
|
1546
|
|
- if (APP.PageDrawList.Count > 0)
|
|
1563
|
+ if (APP.pageData.currpage <= APP.PageDrawList.Count)
|
1547
|
1564
|
{
|
1548
|
1565
|
|
1549
|
1566
|
if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
|
|
@@ -1552,29 +1569,39 @@ namespace XHWK.WKTool
|
1552
|
1569
|
}
|
1553
|
1570
|
if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
|
1554
|
1571
|
{
|
1555
|
|
- //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage-1]));
|
1556
|
|
- imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
1557
|
|
- if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
|
|
1572
|
+ if(APP.PageDrawList[APP.pageData.currpage - 1].ImgDocumentation)
|
1558
|
1573
|
{
|
1559
|
|
- var group = IMG.FindResource("Imageview") as TransformGroup;
|
1560
|
|
- //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
1561
|
|
- //{
|
1562
|
|
- // var transform1 = group.Children[0] as ScaleTransform;
|
1563
|
|
- // transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
1564
|
|
- // transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
1565
|
|
- //}
|
1566
|
|
- var transform = group.Children[1] as TranslateTransform;
|
1567
|
|
- //var position = e.GetPosition(img);
|
1568
|
|
- transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
|
1569
|
|
- transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
|
1570
|
|
-
|
1571
|
|
-
|
1572
|
|
- mouseDown = false;
|
|
1574
|
+ imgCanvas.Source = null;
|
|
1575
|
+ imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
|
1576
|
+ }
|
|
1577
|
+ else
|
|
1578
|
+ {
|
|
1579
|
+ //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage-1]));
|
|
1580
|
+ imgDocumentation.Source = null;
|
|
1581
|
+ imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
|
1582
|
+ if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
|
|
1583
|
+ {
|
|
1584
|
+ var group = IMG.FindResource("Imageview") as TransformGroup;
|
|
1585
|
+ //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
|
1586
|
+ //{
|
|
1587
|
+ // var transform1 = group.Children[0] as ScaleTransform;
|
|
1588
|
+ // transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
|
1589
|
+ // transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
|
1590
|
+ //}
|
|
1591
|
+ var transform = group.Children[1] as TranslateTransform;
|
|
1592
|
+ //var position = e.GetPosition(img);
|
|
1593
|
+ transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
|
|
1594
|
+ transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
|
|
1595
|
+
|
|
1596
|
+
|
|
1597
|
+ mouseDown = false;
|
|
1598
|
+ }
|
1573
|
1599
|
}
|
1574
|
1600
|
}
|
1575
|
1601
|
else
|
1576
|
1602
|
{
|
1577
|
1603
|
imgCanvas.Source = null;
|
|
1604
|
+ imgDocumentation.Source = null;
|
1578
|
1605
|
}
|
1579
|
1606
|
}
|
1580
|
1607
|
//if (!string.IsNullOrWhiteSpace(APP.JPaths[APP.pageData.currpage]))
|