Browse Source

zhao:解决冲突

tags/录制修改前
耀 4 years ago
parent
commit
b51134a633

+ 44
- 23
Common/system/BlackboardNew.cs View File

333
         StylusPoint stylusPoint = new StylusPoint();
333
         StylusPoint stylusPoint = new StylusPoint();
334
         Stroke stroke;
334
         Stroke stroke;
335
         bool isFirst = true;
335
         bool isFirst = true;
336
-        //public void changepages(double _x, double _y, bool _new, Color _color, int _size)
336
+        //public void changepages(double _x, double _y, bool _new, Color _color, int _size, int i)
337
         //{
337
         //{
338
         //    if (_new)
338
         //    if (_new)
339
         //    {
339
         //    {
349
         //            stroke.DrawingAttributes = drawingAttributes;
349
         //            stroke.DrawingAttributes = drawingAttributes;
350
         //            m_canvas.Strokes.Add(stroke);
350
         //            m_canvas.Strokes.Add(stroke);
351
         //            isFirst = true;
351
         //            isFirst = true;
352
+
353
+        //            strokes_page_all[i].lines.Last().lines_curr.Add(stroke);
354
+        //            //int currCount = strokes_page_all[i].lines.Last().lines_curr.Count;
355
+        //            //if (currCount > 0)
356
+        //            //{
357
+        //            //    strokes_page_all[i].lines.Last().lines_curr[currCount - 1].add = stroke;
358
+        //            //}
359
+
360
+
352
         //        }
361
         //        }
353
 
362
 
354
         //        stylusPoints = new StylusPointCollection();
363
         //        stylusPoints = new StylusPointCollection();
372
         //        }
381
         //        }
373
         //        else
382
         //        else
374
         //        {
383
         //        {
375
-        //            if(m_canvas.Strokes.Count)
376
-        //            stylusPoint.X = _x;
384
+        //            if (m_canvas.Strokes.Count>0)
385
+        //            {
386
+
387
+
388
+        //                stylusPoint.X = _x;
377
         //            stylusPoint.Y = _y;
389
         //            stylusPoint.Y = _y;
378
         //            stylusPoints.Add(stylusPoint);
390
         //            stylusPoints.Add(stylusPoint);
379
         //            stroke = new Stroke(stylusPoints);
391
         //            stroke = new Stroke(stylusPoints);
380
         //            m_canvas.Strokes[m_canvas.Strokes.Count - 1].StylusPoints.Add(stylusPoints);
392
         //            m_canvas.Strokes[m_canvas.Strokes.Count - 1].StylusPoints.Add(stylusPoints);
393
+        //            }
381
         //        }
394
         //        }
382
         //    }
395
         //    }
383
         //}
396
         //}
397
 
410
 
398
 
411
 
399
 
412
 
400
-        public void changepages(double _x, double _y, bool _new, Color _color, int _size)
413
+        public void changepages(double _x, double _y, bool _new, Color _color, int _size, int i)
401
         {
414
         {
402
-            if (_new)
415
+            try
403
             {
416
             {
404
-                if (stroke != null && stroke.StylusPoints.Count > 1)
417
+                if (_new)
405
                 {
418
                 {
406
-                    try
419
+                    if (stroke != null && stroke.StylusPoints.Count > 1)
407
                     {
420
                     {
408
                         drawingAttributes = new DrawingAttributes();
421
                         drawingAttributes = new DrawingAttributes();
409
                         //m_canvas.DefaultDrawingAttributes = drawingAttributes;
422
                         //m_canvas.DefaultDrawingAttributes = drawingAttributes;
415
 
428
 
416
                         stroke.DrawingAttributes = drawingAttributes;
429
                         stroke.DrawingAttributes = drawingAttributes;
417
                         //m_canvas.DefaultDrawingAttributes= drawingAttributes;
430
                         //m_canvas.DefaultDrawingAttributes= drawingAttributes;
431
+
418
                         m_canvas.Strokes.Add(stroke);
432
                         m_canvas.Strokes.Add(stroke);
433
+                        strokes_page_all[i].lines.Last().lines_curr.Add(stroke);
434
+
435
+                        //int currCount= strokes_page_all[i].lines.Last().lines_curr.Count;
436
+                        //if (currCount > 0)
437
+                        //{
438
+                        //    strokes_page_all[i].lines.Last().lines_curr[currCount - 1] = stroke;
439
+                        //}
440
+                        stroke = null;
419
                     }
441
                     }
420
-                    catch (Exception ex)
421
-                    {
422
-                        LogHelper.WriteErrLog("【点阵笔】(changepages):" + ex.Message, ex);
423
-                    }
442
+                    stylusPoints = new StylusPointCollection();
443
+                    stylusPoint = new StylusPoint();
444
+                    //stroke = new Stroke(stylusPoints);
445
+                    //stroke = null;
446
+                }
447
+                else
448
+                {
449
+                    //stylusPoints = new StylusPointCollection();
450
+                    //stylusPoint = new StylusPoint();
451
+                    stylusPoint.X = _x;
452
+                    stylusPoint.Y = _y;
453
+                    stylusPoints.Add(stylusPoint);
454
+                    stroke = new Stroke(stylusPoints);
424
                 }
455
                 }
425
-
426
-                stylusPoints = new StylusPointCollection();
427
-                stylusPoint = new StylusPoint();
428
-                //stroke = new Stroke(stylusPoints);
429
-                //stroke = null;
430
             }
456
             }
431
-            else
457
+            catch (Exception ex)
432
             {
458
             {
433
-                //stylusPoints = new StylusPointCollection();
434
-                //stylusPoint = new StylusPoint();
435
-                stylusPoint.X = _x;
436
-                stylusPoint.Y = _y;
437
-                stylusPoints.Add(stylusPoint);
438
-                stroke = new Stroke(stylusPoints);
459
+                LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(changepages)点阵比书写报错:" + ex.Message, ex);
439
             }
460
             }
440
         }
461
         }
441
 
462
 

+ 4
- 4
XHWK.WKTool/App.cs View File

127
         /// 打印
127
         /// 打印
128
         /// </summary>
128
         /// </summary>
129
         public static PrintWindow W_PrintWindow = null;
129
         public static PrintWindow W_PrintWindow = null;
130
-        /// <summary>
131
-        /// 提示窗口
132
-        /// </summary>
133
-        public static PromptWindow W_PromptWindow = null;
130
+        ///// <summary>
131
+        ///// 提示窗口
132
+        ///// </summary>
133
+        //public static PromptWindow W_PromptWindow = null;
134
         #endregion
134
         #endregion
135
         #endregion
135
         #endregion
136
 
136
 

+ 4
- 4
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

159
                 <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,26,10" VerticalAlignment="Top" Visibility="Collapsed"/>
159
                 <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,26,10" VerticalAlignment="Top" Visibility="Collapsed"/>
160
                 <Image x:Name="imgPlayerLeftUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
160
                 <Image x:Name="imgPlayerLeftUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
161
                 <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,26,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
161
                 <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,26,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
162
-                <Label Content="" Grid.Column="0" HorizontalAlignment="Left" Height="10" VerticalAlignment="Top" Width="10" Background="#FF0F0F0F" Margin="1,0,0,0"/>
163
-                <Label Content="" Grid.Column="1" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,16,0"/>
164
-                <Label Content="" Grid.Column="0" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
165
-                <Label Content="" Grid.Column="1" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,0"/>
162
+                <Label Content="" Grid.Column="0" Height="2" Width="2" HorizontalAlignment="Left"  VerticalAlignment="Top" Background="#FF0F0F0F" Margin="1,0,0,0"/>
163
+                <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,16,0"/>
164
+                <Label Content="" Grid.Column="0" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
165
+                <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,0"/>
166
             </Grid>
166
             </Grid>
167
            
167
            
168
             <Grid Grid.Row="1">
168
             <Grid Grid.Row="1">

+ 47
- 77
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

1409
         /// <param name="e"></param>
1409
         /// <param name="e"></param>
1410
         private void BtnAdd_Click(object sender, RoutedEventArgs e)
1410
         private void BtnAdd_Click(object sender, RoutedEventArgs e)
1411
         {
1411
         {
1412
-            //      RectangleF rectangleF = new RectangleF();
1413
-            //      rectangleF.Width = (float)APP.PageDrawList[0].ImageSizes.CenterX;
1414
-            //      rectangleF.Height = (float)APP.PageDrawList[0].ImageSizes.CenterY;
1415
-            //      rectangleF.X= (float)APP.PageDrawList[0].ImageLocation.X;
1416
-            //      rectangleF.Y = (float)APP.PageDrawList[0].ImageLocation.Y;
1417
-
1418
-            //      //CESHI 
1419
-            //bool isImg=    MergerImg(APP.PageDrawList[0].PageImagePath, @"G:\102H.jpg", rectangleF, out string errmsg);
1420
-
1421
-
1422
-
1423
             if (APP.pageData.currpage > 0)
1412
             if (APP.pageData.currpage > 0)
1424
             {
1413
             {
1425
                 APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
1414
                 APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
1439
             model_DrawData.PageNum = APP.pageData.currpage;
1428
             model_DrawData.PageNum = APP.pageData.currpage;
1440
             APP.PageDrawList.Add(model_DrawData);
1429
             APP.PageDrawList.Add(model_DrawData);
1441
             APP.SaveDraw();
1430
             APP.SaveDraw();
1442
-            ///截图可用
1443
-            ImgScreenshot.Visibility = Visibility.Visible;
1444
-            ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1445
-            btnScreenshot.IsEnabled = true;
1431
+            if (btnImport.IsEnabled == true)
1432
+            {
1433
+                ///截图可用
1434
+                ImgScreenshot.Visibility = Visibility.Visible;
1435
+                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1436
+                btnScreenshot.IsEnabled = true;
1437
+            }
1446
         }
1438
         }
1447
         /// <summary>
1439
         /// <summary>
1448
         /// 打印事件
1440
         /// 打印事件
1472
                 {
1464
                 {
1473
                     long ii = Timestamp();
1465
                     long ii = Timestamp();
1474
                     string directoryPath = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1466
                     string directoryPath = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1475
-                    string filePathOutPut = Path.Combine(directoryPath, string.Format("{0}{1}.jpg", ii, i));
1467
+                    string filePathOutPut = Path.Combine(directoryPath, string.Format("print{0}{1}.jpg", ii, i));
1476
                     RectangleF rectangleFs = new RectangleF();
1468
                     RectangleF rectangleFs = new RectangleF();
1477
                     MergerImg("", filePathOutPut, rectangleFs, out string errmsg);
1469
                     MergerImg("", filePathOutPut, rectangleFs, out string errmsg);
1478
                     image = iTextSharp.text.Image.GetInstance(filePathOutPut);
1470
                     image = iTextSharp.text.Image.GetInstance(filePathOutPut);
1556
                 //APP.W_PrintWindow.Topmost = true;
1548
                 //APP.W_PrintWindow.Topmost = true;
1557
                 APP.W_PrintWindow.Owner = this;
1549
                 APP.W_PrintWindow.Owner = this;
1558
             }
1550
             }
1559
-            if (APP.PageDrawList.Count > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[0].PdfImagePath))
1551
+            if (APP.PageDrawList.Count > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[0].PageImagePath))
1560
             {
1552
             {
1561
-                APP.W_PrintWindow.Initialize(APP.PageDrawList[0].PdfImagePath);
1553
+                APP.W_PrintWindow.Initialize(APP.PageDrawList[0].PageImagePath);
1562
             }
1554
             }
1563
             else
1555
             else
1564
             {
1556
             {
1591
         {
1583
         {
1592
             if (APP.pageData.currpage > 1)
1584
             if (APP.pageData.currpage > 1)
1593
             {
1585
             {
1594
-                try
1595
-                {
1596
-                    Dispatcher.Invoke(() =>
1597
-                    {
1598
-                        string filePath = FileToolsCommon.GetFileAbsolutePath("/Data/" + APP.UserInfo.Username + "/pdfimagetemp/");
1599
-                        FileToolsCommon.CreateDirectory(filePath);
1600
-                        string filePathName = filePath + APP.pageData.currpage.ToString() + ".jpg";
1601
-                        ImageHelper.SaveUIToImage(GridMain, filePathName, (int)GridMain.ActualWidth, (int)GridMain.ActualHeight);
1602
-                        //ImgPDFPath[APP.pageData.currpage - 1] = filePathName;
1603
-                        APP.PageDrawList[APP.pageData.currpage - 1].PdfImagePath = filePathName;
1604
-                    });
1605
-                }
1606
-                catch (Exception ex)
1607
-                {
1608
-                    LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(last_button_Click)生成图片错误:" + ex.Message, ex);
1609
-                }
1610
                 APP.pageData.currpage -= 1;
1586
                 APP.pageData.currpage -= 1;
1611
                 myblackboard.changepage(APP.pageData.currpage - 1);
1587
                 myblackboard.changepage(APP.pageData.currpage - 1);
1612
-                ///截图可用
1613
-                ImgScreenshot.Visibility = Visibility.Visible;
1614
-                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1615
-                btnScreenshot.IsEnabled = true;
1588
+                if (btnImport.IsEnabled == true)
1589
+                {
1590
+                    ///截图可用
1591
+                    ImgScreenshot.Visibility = Visibility.Visible;
1592
+                    ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1593
+                    btnScreenshot.IsEnabled = true;
1594
+                }
1616
                 if (APP.pageData.currpage <= APP.PageDrawList.Count)
1595
                 if (APP.pageData.currpage <= APP.PageDrawList.Count)
1617
                 {
1596
                 {
1618
                     if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
1597
                     if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
1640
                             {
1619
                             {
1641
                                 var group = IMG.FindResource("Imageview") as TransformGroup;
1620
                                 var group = IMG.FindResource("Imageview") as TransformGroup;
1642
                                 var transform = group.Children[1] as TranslateTransform;
1621
                                 var transform = group.Children[1] as TranslateTransform;
1622
+                                #region 高低 缩放比例
1643
                                 if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
1623
                                 if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
1644
                                 {
1624
                                 {
1645
                                     var transform1 = group.Children[0] as ScaleTransform;
1625
                                     var transform1 = group.Children[0] as ScaleTransform;
1648
                                     imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
1628
                                     imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
1649
                                     imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
1629
                                     imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
1650
                                 }
1630
                                 }
1651
-                                //var position = e.GetPosition(img);
1631
+                                #endregion
1632
+                                #region XY轴
1652
                                 transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
1633
                                 transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
1653
                                 transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
1634
                                 transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
1635
+                                #endregion
1654
                                 mouseDown = false;
1636
                                 mouseDown = false;
1655
                             }
1637
                             }
1656
                         }
1638
                         }
1662
                     }
1644
                     }
1663
                 }
1645
                 }
1664
             }
1646
             }
1665
-
1666
         }
1647
         }
1667
         /// <summary>
1648
         /// <summary>
1668
         /// 下一页
1649
         /// 下一页
1673
         {
1654
         {
1674
             if (APP.pageData.currpage < APP.pageData.pagenum)
1655
             if (APP.pageData.currpage < APP.pageData.pagenum)
1675
             {
1656
             {
1676
-                try
1677
-                {
1678
-                    Dispatcher.Invoke(() =>
1679
-                    {
1680
-                        string filePath = FileToolsCommon.GetFileAbsolutePath("/Data/" + APP.UserInfo.Username + "/pdfimagetemp/");
1681
-                        FileToolsCommon.CreateDirectory(filePath);
1682
-                        string filePathName = filePath + APP.pageData.currpage.ToString() + ".jpg";
1683
-                        ImageHelper.SaveUIToImage(GridMain, filePathName, (int)GridMain.ActualWidth, (int)GridMain.ActualHeight);
1684
-                        //ImgPDFPath[APP.pageData.currpage - 1] = filePathName;
1685
-                        APP.PageDrawList[APP.pageData.currpage - 1].PdfImagePath = filePathName;
1686
-                    });
1687
-                }
1688
-                catch (Exception ex)
1689
-                {
1690
-                    LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(next_btn_Click)生成图片错误:" + ex.Message, ex);
1691
-                }
1692
                 APP.pageData.currpage += 1;
1657
                 APP.pageData.currpage += 1;
1693
                 myblackboard.changepage(APP.pageData.currpage - 1);
1658
                 myblackboard.changepage(APP.pageData.currpage - 1);
1694
-                ///截图可用
1695
-                ImgScreenshot.Visibility = Visibility.Visible;
1696
-                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1697
-                btnScreenshot.IsEnabled = true;
1659
+                if (btnImport.IsEnabled == true)
1660
+                {
1661
+                    ///截图可用
1662
+                    ImgScreenshot.Visibility = Visibility.Visible;
1663
+                    ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1664
+                    btnScreenshot.IsEnabled = true;
1665
+                }
1698
                 if (APP.pageData.currpage <= APP.PageDrawList.Count)
1666
                 if (APP.pageData.currpage <= APP.PageDrawList.Count)
1699
                 {
1667
                 {
1700
-
1701
                     if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
1668
                     if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
1702
                     {
1669
                     {
1703
                         APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
1670
                         APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
1714
                         }
1681
                         }
1715
                         else
1682
                         else
1716
                         {
1683
                         {
1717
-                            //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage-1]));
1718
                             imgDocumentation.Source = null;
1684
                             imgDocumentation.Source = null;
1719
-
1720
                             imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
1685
                             imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
1721
                             APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
1686
                             APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = false;
1722
                             if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
1687
                             if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X > 0)
1723
                             {
1688
                             {
1724
                                 var group = IMG.FindResource("Imageview") as TransformGroup;
1689
                                 var group = IMG.FindResource("Imageview") as TransformGroup;
1690
+                                #region 高低 缩放比例
1725
                                 if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
1691
                                 if (APP.PageDrawList[APP.pageData.currpage - 1].ImageSize != null)
1726
                                 {
1692
                                 {
1727
                                     var transform1 = group.Children[0] as ScaleTransform;
1693
                                     var transform1 = group.Children[0] as ScaleTransform;
1730
                                     imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
1696
                                     imgCanvas.Width = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterX;
1731
                                     imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
1697
                                     imgCanvas.Height = APP.PageDrawList[APP.pageData.currpage - 1].ImageSizes.CenterY;
1732
                                 }
1698
                                 }
1699
+                                #endregion
1700
+                                #region 坐标XY轴
1733
                                 var transform = group.Children[1] as TranslateTransform;
1701
                                 var transform = group.Children[1] as TranslateTransform;
1734
-                                //var position = e.GetPosition(img);
1735
                                 transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
1702
                                 transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
1736
                                 transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
1703
                                 transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
1704
+                                #endregion
1737
                                 mouseDown = false;
1705
                                 mouseDown = false;
1738
                             }
1706
                             }
1739
                         }
1707
                         }
1744
                         imgDocumentation.Source = null;
1712
                         imgDocumentation.Source = null;
1745
                     }
1713
                     }
1746
                 }
1714
                 }
1747
-                //if (!string.IsNullOrWhiteSpace(APP.JPaths[APP.pageData.currpage]))
1748
-                //{
1749
-                //    imgCanvas.Source = new BitmapImage(new Uri(APP.JPaths[APP.pageData.currpage]));
1750
-                //}
1751
             }
1715
             }
1752
         }
1716
         }
1753
         /// <summary>
1717
         /// <summary>
2179
                 //}
2143
                 //}
2180
                 stroke.Clear();
2144
                 stroke.Clear();
2181
             }
2145
             }
2182
-            Dispatcher.Invoke(new Action(() =>
2146
+            if (APP.pageData.currpage > 0)
2183
             {
2147
             {
2184
-                //myblackboard.changepages(0, 0, true);
2185
-                myblackboard.changepages(0, 0, true, Color, Size);
2186
-            }));
2148
+                Dispatcher.Invoke(new Action(() =>
2149
+                {
2150
+                    myblackboard.changepages(0, 0, true, Color, Size, APP.pageData.currpage - 1);
2151
+                }));
2152
+            }
2153
+
2187
 
2154
 
2188
         }
2155
         }
2189
 
2156
 
2316
                 double testX = (double)cx * PropW;
2283
                 double testX = (double)cx * PropW;
2317
                 double testY = (double)cy * PropH;
2284
                 double testY = (double)cy * PropH;
2318
                 //pageSerial //点阵IP地址  与打印的页面关联
2285
                 //pageSerial //点阵IP地址  与打印的页面关联
2319
-
2320
-                Dispatcher.Invoke(new Action(() =>
2286
+                if (APP.pageData.currpage > 0)
2321
                 {
2287
                 {
2322
-                    //myblackboard.changepages(testX, testY,false);
2323
-                    myblackboard.changepages(testX, testY, false, Color, Size);
2324
-                }));
2288
+                    Dispatcher.Invoke(new Action(() =>
2289
+                    {
2290
+                        //myblackboard.changepages(testX, testY,false);
2291
+                        myblackboard.changepages(testX, testY, false, Color, Size, APP.pageData.currpage - 1);
2292
+                    }));
2293
+                }
2294
+
2325
 
2295
 
2326
 
2296
 
2327
                 ////每3个点画一条曲线
2297
                 ////每3个点画一条曲线

Loading…
Cancel
Save