|
@@ -157,7 +157,7 @@ namespace XHWK.WKTool
|
157
|
157
|
{
|
158
|
158
|
CameraHelper.SetCameraDevice(0);
|
159
|
159
|
RbnOpen = new List<string>();
|
160
|
|
- times = new System.Timers.Timer(200);//设置执行一次(false)还是一直执行(true)
|
|
160
|
+ times = new System.Timers.Timer(300);//设置执行一次(false)还是一直执行(true)
|
161
|
161
|
times.AutoReset = true;//设置是否执行System.Timers.Timer.Elapsed事件
|
162
|
162
|
times.Elapsed += new System.Timers.ElapsedEventHandler(Times_Elapsed);
|
163
|
163
|
times.Enabled = true; //启动计时器
|
|
@@ -286,7 +286,6 @@ namespace XHWK.WKTool
|
286
|
286
|
// }
|
287
|
287
|
//}
|
288
|
288
|
#endregion
|
289
|
|
-
|
290
|
289
|
if (APP.W_ScreenRecordingToolbarWindow == null)
|
291
|
290
|
{
|
292
|
291
|
APP.W_ScreenRecordingToolbarWindow = new ScreenRecordingToolbarWindow
|
|
@@ -637,8 +636,6 @@ namespace XHWK.WKTool
|
637
|
636
|
{
|
638
|
637
|
txbLoginType.Text = APP.UserInfo.Username;
|
639
|
638
|
|
640
|
|
- ImgMyMine.Visibility = Visibility.Visible;
|
641
|
|
- ImgMyMineTwo.Visibility = Visibility.Collapsed;
|
642
|
639
|
ImgUpload.Visibility = Visibility.Visible;
|
643
|
640
|
ImgUploadTwo.Visibility = Visibility.Collapsed;
|
644
|
641
|
}
|
|
@@ -646,8 +643,6 @@ namespace XHWK.WKTool
|
646
|
643
|
{
|
647
|
644
|
txbLoginType.Text = "未登录";
|
648
|
645
|
|
649
|
|
- ImgMyMine.Visibility = Visibility.Collapsed;
|
650
|
|
- ImgMyMineTwo.Visibility = Visibility.Visible;
|
651
|
646
|
ImgUpload.Visibility = Visibility.Collapsed;
|
652
|
647
|
ImgUploadTwo.Visibility = Visibility.Visible;
|
653
|
648
|
}
|
|
@@ -1118,10 +1113,6 @@ namespace XHWK.WKTool
|
1118
|
1113
|
ImgUploadTwo.Visibility = Visibility.Visible;
|
1119
|
1114
|
btnUpload.IsEnabled = false;
|
1120
|
1115
|
|
1121
|
|
- ImgMyMine.Visibility = Visibility.Collapsed;//录制中不可点击我的
|
1122
|
|
- ImgMyMineTwo.Visibility = Visibility.Visible;
|
1123
|
|
- btnMyMine.IsEnabled = false;
|
1124
|
|
-
|
1125
|
1116
|
ImgSetUp.Visibility = Visibility.Collapsed;//录制中不可设置
|
1126
|
1117
|
ImgSetUpTwo.Visibility = Visibility.Visible;
|
1127
|
1118
|
btnSetUp.IsEnabled = false;
|
|
@@ -1247,10 +1238,6 @@ namespace XHWK.WKTool
|
1247
|
1238
|
ImgUploadTwo.Visibility = Visibility.Collapsed;
|
1248
|
1239
|
btnUpload.IsEnabled = true;
|
1249
|
1240
|
|
1250
|
|
- ImgMyMine.Visibility = Visibility.Visible;
|
1251
|
|
- ImgMyMineTwo.Visibility = Visibility.Collapsed;
|
1252
|
|
- btnMyMine.IsEnabled = true;
|
1253
|
|
-
|
1254
|
1241
|
ImgSetUp.Visibility = Visibility.Visible;
|
1255
|
1242
|
ImgSetUpTwo.Visibility = Visibility.Collapsed;
|
1256
|
1243
|
btnSetUp.IsEnabled = true;
|
|
@@ -1404,7 +1391,7 @@ namespace XHWK.WKTool
|
1404
|
1391
|
if (APP.W_PrintWindow == null)
|
1405
|
1392
|
{
|
1406
|
1393
|
APP.W_PrintWindow = new PrintWindow();
|
1407
|
|
- APP.W_PrintWindow.Topmost = true;
|
|
1394
|
+ //APP.W_PrintWindow.Topmost = true;
|
1408
|
1395
|
APP.W_PrintWindow.Owner = this;
|
1409
|
1396
|
}
|
1410
|
1397
|
if (APP.PageDrawList.Count > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[0].PdfImagePath))
|
|
@@ -1434,15 +1421,6 @@ namespace XHWK.WKTool
|
1434
|
1421
|
|
1435
|
1422
|
//}
|
1436
|
1423
|
}
|
1437
|
|
- /// <summary>
|
1438
|
|
- /// 我的
|
1439
|
|
- /// </summary>
|
1440
|
|
- /// <param name="sender"></param>
|
1441
|
|
- /// <param name="e"></param>
|
1442
|
|
- private void BtnMyMine_Click(object sender, RoutedEventArgs e)
|
1443
|
|
- {
|
1444
|
|
- }
|
1445
|
|
- /// <summary>
|
1446
|
1424
|
/// 上一页
|
1447
|
1425
|
/// </summary>
|
1448
|
1426
|
/// <param name="sender"></param>
|
|
@@ -1489,17 +1467,19 @@ namespace XHWK.WKTool
|
1489
|
1467
|
{
|
1490
|
1468
|
imgDocumentation.Source = null;
|
1491
|
1469
|
imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
1492
|
|
-
|
|
1470
|
+ APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
|
1493
|
1471
|
if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
|
1494
|
1472
|
{
|
1495
|
1473
|
var group = IMG.FindResource("Imageview") as TransformGroup;
|
1496
|
1474
|
var transform = group.Children[1] as TranslateTransform;
|
1497
|
|
- //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
1498
|
|
- //{
|
1499
|
|
- // var transform1 = group.Children[0] as ScaleTransform;
|
1500
|
|
- // transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
1501
|
|
- // transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
1502
|
|
- //}
|
|
1475
|
+ if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
|
1476
|
+ {
|
|
1477
|
+ var transform1 = group.Children[0] as ScaleTransform;
|
|
1478
|
+ transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
|
1479
|
+ transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
|
1480
|
+ imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
|
|
1481
|
+ imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
|
|
1482
|
+ }
|
1503
|
1483
|
//var position = e.GetPosition(img);
|
1504
|
1484
|
transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
|
1505
|
1485
|
transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
|
|
@@ -1566,21 +1546,26 @@ namespace XHWK.WKTool
|
1566
|
1546
|
{
|
1567
|
1547
|
//imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage-1]));
|
1568
|
1548
|
imgDocumentation.Source = null;
|
|
1549
|
+
|
1569
|
1550
|
imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
|
|
1551
|
+ APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
|
1570
|
1552
|
if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
|
1571
|
1553
|
{
|
1572
|
1554
|
var group = IMG.FindResource("Imageview") as TransformGroup;
|
1573
|
|
- //if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
1574
|
|
- //{
|
1575
|
|
- // var transform1 = group.Children[0] as ScaleTransform;
|
1576
|
|
- // transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
1577
|
|
- // transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
1578
|
|
- //}
|
|
1555
|
+ if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
|
|
1556
|
+ {
|
|
1557
|
+ var transform1 = group.Children[0] as ScaleTransform;
|
|
1558
|
+ transform1.ScaleX = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX;
|
|
1559
|
+ transform1.ScaleY = APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY;
|
|
1560
|
+ imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
|
|
1561
|
+ imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
|
|
1562
|
+ }
|
1579
|
1563
|
var transform = group.Children[1] as TranslateTransform;
|
1580
|
1564
|
//var position = e.GetPosition(img);
|
1581
|
1565
|
transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
|
1582
|
1566
|
transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
|
1583
|
1567
|
|
|
1568
|
+
|
1584
|
1569
|
|
1585
|
1570
|
mouseDown = false;
|
1586
|
1571
|
}
|
|
@@ -1779,15 +1764,22 @@ namespace XHWK.WKTool
|
1779
|
1764
|
var transform1 = group.Children[1] as TranslateTransform;
|
1780
|
1765
|
transform1.X = -1 * ((pointToContent.X * transform.ScaleX) - point.X);
|
1781
|
1766
|
transform1.Y = -1 * ((pointToContent.Y * transform.ScaleY) - point.Y);
|
|
1767
|
+ LogHelper.WriteInfoLog("【img宽高】" + imgCanvas.ActualWidth.ToString() + ":"
|
|
1768
|
+ + imgCanvas.ActualHeight.ToString() + "百分比:" + transform.ScaleX.ToString() + ":" + transform.ScaleY.ToString()
|
|
1769
|
+ );
|
|
1770
|
+
|
1782
|
1771
|
//Console.WriteLine("transform.ScaleX = " + transform.ScaleX + "; transform.ScaleY = " + transform.ScaleY);
|
1783
|
1772
|
|
1784
|
|
- //APP.PageDrawList[APP.pageData.currpage - 1].ImageSize = new ScaleTransform();
|
1785
|
|
- //APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX = transform.ScaleX;
|
1786
|
|
- //APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY = transform.ScaleY;
|
1787
|
|
- //APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation = new TranslateTransform();
|
1788
|
|
- //APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X = transform1.X;
|
1789
|
|
- //APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y = transform1.Y;
|
1790
|
|
- //APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
|
|
1773
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageSize = new ScaleTransform();
|
|
1774
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleX = transform.ScaleX;
|
|
1775
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageSize.ScaleY = transform.ScaleY;
|
|
1776
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation = new TranslateTransform();
|
|
1777
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X = transform1.X;
|
|
1778
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y = transform1.Y;
|
|
1779
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes = new ScaleTransform();
|
|
1780
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX = imgCanvas.ActualWidth;
|
|
1781
|
+ APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY = imgCanvas.ActualHeight;
|
|
1782
|
+ APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
|
1791
|
1783
|
}
|
1792
|
1784
|
#endregion
|
1793
|
1785
|
|