Переглянути джерело

zhao:解决冲突

tags/录制修改前
耀 4 роки тому
джерело
коміт
507c3f79da

+ 2
- 2
XHWK.Model/Model_Page.cs Переглянути файл

@@ -14,7 +14,7 @@ namespace XHWK.Model
14 14
         /// <summary>
15 15
         /// 总页码
16 16
         /// </summary>
17
-        private int _pagenum = 1;
17
+        private int _pagenum = 0;
18 18
 
19 19
         /// <summary>
20 20
         /// 总页码
@@ -28,7 +28,7 @@ namespace XHWK.Model
28 28
         /// <summary>
29 29
         /// 当前页 从1开始
30 30
         /// </summary>
31
-        private int _currpage = 1;// 从1开始
31
+        private int _currpage = 0;// 从1开始
32 32
 
33 33
         /// <summary>
34 34
         /// 当前页 从1开始

+ 7
- 0
XHWK.WKTool/App.cs Переглянути файл

@@ -123,7 +123,14 @@ namespace XHWK.WKTool
123 123
         /// 我的视频
124 124
         /// </summary>
125 125
         public static FileDirectoryWindow fileDirectoryWindow = null;
126
+        /// <summary>
127
+        /// 打印
128
+        /// </summary>
126 129
         public static PrintWindow W_PrintWindow = null;
130
+        /// <summary>
131
+        /// 提示窗口
132
+        /// </summary>
133
+        public static PromptWindow W_PromptWindow = null;
127 134
         #endregion
128 135
         #endregion
129 136
 

+ 12
- 2
XHWK.WKTool/FileDirectoryWindow.xaml.cs Переглянути файл

@@ -94,8 +94,8 @@ namespace XHWK.WKTool
94 94
                 pageData.menuList.Add(new FileDirectoryModel()
95 95
                 {
96 96
                     SerialNumber = i,
97
-                    VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace("AVI", "").Trim(),
98
-                    Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace("AVI", "").Trim(),
97
+                    VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
98
+                    Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
99 99
                     FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
100 100
                     VideoDuration = 0,
101 101
                     VideoSize = videoinfo.VideoSize,
@@ -202,12 +202,22 @@ namespace XHWK.WKTool
202 202
         /// <param name="e"></param>
203 203
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
204 204
         {
205
+        
205 206
             pageData.menuList[Subscript].IsEnabled = false;
206 207
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
207 208
             for (int i = 0; i < buttons.Count; i++)
208 209
             {
209 210
                 if (buttons[i] == sender)
210 211
                 {
212
+
213
+                    //if (APP.W_PromptWindow == null)
214
+                    //{
215
+                    //    APP.W_PromptWindow = new PromptWindow();
216
+                    //    APP.W_PromptWindow.Owner = this;
217
+                    //}
218
+                    //APP.W_PromptWindow.Initialize(pageData.menuList[i].VideoName);
219
+                    //APP.W_PromptWindow.ShowDialog();
220
+
211 221
                     foreach (Model_WKData wKData in APP.WKDataList)
212 222
                     {
213 223
                         if (wKData.VideoList == null)

+ 4
- 4
XHWK.WKTool/PrintWindow.xaml Переглянути файл

@@ -5,7 +5,7 @@
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6 6
         xmlns:local="clr-namespace:XHWK.WKTool"
7 7
         mc:Ignorable="d"
8
-        Title="PrintWindow" Height="729" Width="1028" AllowsTransparency="True"
8
+        Title="PrintWindow" Height="600" Width="900" AllowsTransparency="True"
9 9
     ShowInTaskbar="False"
10 10
     WindowStartupLocation="CenterOwner"
11 11
     WindowStyle="None">
@@ -25,14 +25,14 @@
25 25
             <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,10,0,0">
26 26
                 <TextBlock  Text="打印机:" Width="210" FontSize="20"/>
27 27
                 <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0"/>
28
-                <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" Padding="50,10,0,0" Background="White" />
28
+                <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White" />
29 29
                 <Grid>
30 30
                     <Grid.RowDefinitions>
31 31
                         <RowDefinition Height="auto"/>
32 32
                         <RowDefinition Height="auto"/>
33 33
                     </Grid.RowDefinitions>
34
-                    <Button Grid.Row="0" x:Name="btnLess" Content="-" Click="BtnLess_Click"/>
35
-                    <Button Grid.Row="1" x:Name="btnAdd" Content="+" Click="BtnAdd_Click"/>
34
+                    <Button Grid.Row="0" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
35
+                    <Button Grid.Row="1" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
36 36
                 </Grid>
37 37
             </StackPanel>
38 38
             <Button Grid.Row="1" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,20,0" Click="BtnClose_Click">

+ 1
- 1
XHWK.WKTool/PrintWindow.xaml.cs Переглянути файл

@@ -102,7 +102,7 @@ namespace XHWK.WKTool
102 102
                 int frequency = Convert.ToInt32(txbNumberOfCopies.Text);
103 103
                 for (int i=0;i< frequency;i++)
104 104
                 {
105
-                    LatticeFileHelper.PrinterTPFFile(@"G:\102.TPF", 1, cmbClass.Text, out printResult, out standardError, out standardOutput);
105
+                    LatticeFileHelper.PrinterTPFFile(tpf, 1, cmbClass.Text, out printResult, out standardError, out standardOutput);
106 106
                 }
107 107
                 if(printResult==0)// 0为成功
108 108
                 {

+ 33
- 0
XHWK.WKTool/PromptWindow.xaml Переглянути файл

@@ -0,0 +1,33 @@
1
+<Window x:Class="XHWK.WKTool.PromptWindow"
2
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
+        xmlns:local="clr-namespace:XHWK.WKTool"
7
+        mc:Ignorable="d"
8
+        Title="PromptWindow" Height="210" Width="553" WindowStartupLocation="CenterOwner"
9
+    WindowStyle="None" AllowsTransparency="True"    WindowState="Normal"
10
+    ShowInTaskbar="True"   ResizeMode="NoResize"
11
+  >
12
+    <Grid Background="#FFFFFF">
13
+        <Grid.RowDefinitions>
14
+            <RowDefinition Height="auto"/>
15
+            <RowDefinition Height="auto"/>
16
+            <RowDefinition Height="auto"/>
17
+        </Grid.RowDefinitions>
18
+        <TextBlock Grid.Row="0" Text="确定删除" FontSize="24" Margin="25,26,0,0"/>
19
+        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="25,36,0,0">
20
+            <TextBlock Text="删除" FontSize="18" Foreground="#919191" />
21
+            <TextBlock x:Name="txbName" Text="微课01" FontSize="18" Foreground="#919191"/>
22
+        </StackPanel>
23
+       
24
+        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,30,0,0">
25
+            <Border x:Name="borCancel" Background="#E5E5E5" CornerRadius="6" >
26
+                <Button x:Name="btnCancel" Width="104" Height="42" Content="取消" FontSize="18" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="Transparent"/>
27
+            </Border>
28
+            <Border Background="#E5E5E5" CornerRadius="6" Margin="30,0,20,0">
29
+                <Button Width="104" Height="42" Content="确定" FontSize="18" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="Transparent"/>
30
+            </Border>
31
+        </StackPanel>
32
+    </Grid>
33
+</Window>

+ 47
- 0
XHWK.WKTool/PromptWindow.xaml.cs Переглянути файл

@@ -0,0 +1,47 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+using System.Windows;
7
+using System.Windows.Controls;
8
+using System.Windows.Data;
9
+using System.Windows.Documents;
10
+using System.Windows.Input;
11
+using System.Windows.Media;
12
+using System.Windows.Media.Imaging;
13
+using System.Windows.Shapes;
14
+
15
+namespace XHWK.WKTool
16
+{
17
+    /// <summary>
18
+    /// PromptWindow.xaml 的交互逻辑
19
+    /// </summary>
20
+    public partial class PromptWindow : Window
21
+    {
22
+        public PromptWindow()
23
+        {
24
+            InitializeComponent();
25
+        }
26
+        public void Initialize(string _name)
27
+        {
28
+            txbName.Text = _name;
29
+        }
30
+        private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
31
+        {
32
+            System.Windows.Rect r = new System.Windows.Rect(e.NewSize);
33
+            RectangleGeometry gm = new RectangleGeometry(r, 1, 1);
34
+            ((UIElement)sender).Clip = gm;
35
+        }
36
+
37
+        private void Window_SizeChanged_1(object sender, SizeChangedEventArgs e)
38
+        {
39
+
40
+        }
41
+
42
+        private void Window_SizeChanged1(object sender, SizeChangedEventArgs e)
43
+        {
44
+
45
+        }
46
+    }
47
+}

+ 94
- 90
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Переглянути файл

@@ -7,17 +7,17 @@
7 7
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
8 8
         xmlns:local="clr-namespace:XHWK.WKTool"
9 9
         mc:Ignorable="d"
10
-        Title="星火微课系统" Height="1040.8" Width="875" WindowStartupLocation="CenterScreen"
10
+        Title="星火微课系统" Height="725.8" Width="975" WindowStartupLocation="CenterScreen"
11 11
     WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True"
12 12
    >
13 13
     
14 14
     <Viewbox>
15
-        <Grid Height="1040.8" Width="875">
15
+        <Grid Height="725.8" Width="975">
16 16
             <!--分3行-->
17 17
             <Grid.RowDefinitions>
18
-                <RowDefinition Height="94"/>
18
+                <RowDefinition Height="110"/>
19 19
                 <RowDefinition Height="*"/>
20
-                <RowDefinition Height="30"/>
20
+                <RowDefinition Height="40"/>
21 21
             </Grid.RowDefinitions>
22 22
             <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0">
23 23
                 <Grid.RowDefinitions>
@@ -47,40 +47,40 @@
47 47
                     </Button>
48 48
                 </StackPanel>
49 49
                 <!--第二行-->
50
-                <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,2,0,0">
50
+                <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,6,0,0">
51 51
                     <Button Cursor="Hand" x:Name="btnScreenRecording" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnScreenRecording_Click">
52 52
                         <StackPanel Orientation="Vertical">
53 53
                             <Image x:Name="ImgScreenRecording" Source="./Images/microLessonSystem_2.png"/>
54 54
                             <Image x:Name="ImgScreenRecordingTwo" Source="./Images/microLessonSystem_3.png" Visibility="Collapsed"/>
55
-                            <TextBlock x:Name="TxbRecordScreenWord" Text="录屏" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
55
+                            <TextBlock x:Name="TxbRecordScreenWord" Text="录屏" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
56 56
                         </StackPanel>
57 57
                     </Button>
58 58
                     <Button Cursor="Hand" x:Name="btnScreenshot" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0" Click="BtnScreenshot_Click">
59 59
                         <StackPanel Orientation="Vertical">
60 60
                             <Image x:Name="ImgScreenshot" Source="./Images/microLessonSystem_12.png"/>
61 61
                             <Image x:Name="ImgScreenshotTwo" Source="./Images/microLessonSystem_11.png" Visibility="Collapsed"/>
62
-                            <TextBlock Text="截图" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
62
+                            <TextBlock Text="截图" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
63 63
                         </StackPanel>
64 64
                     </Button>
65 65
                     <Button Cursor="Hand" x:Name="btnImport" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnImport_Click">
66 66
                         <StackPanel Orientation="Vertical">
67 67
                             <Image x:Name="ImgImport" Source="./Images/microLessonSystem_6.png"/>
68 68
                             <Image x:Name="ImgImportTwo" Source="./Images/microLessonSystem_7.png" Visibility="Collapsed"/>
69
-                            <TextBlock Text="导入" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
69
+                            <TextBlock Text="导入" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
70 70
                         </StackPanel>
71 71
                     </Button>
72 72
                     <Button Cursor="Hand" x:Name="BtnRecord" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="60,0,30,0" Click="BtnRecord_Click">
73 73
                         <StackPanel Orientation="Vertical">
74 74
                             <Image x:Name="ImgRecord" Source="./Images/microLessonSystem_14.png"/>
75 75
                             <Image x:Name="ImgRecordTwo" Source="./Images/microLessonSystem_13.png" Visibility="Collapsed"/>
76
-                            <TextBlock x:Name="TxbRecordingWord" Text="录制" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
76
+                            <TextBlock x:Name="TxbRecordingWord" Text="录制" Padding="0,6,0,0" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
77 77
                         </StackPanel>
78 78
                     </Button>
79 79
                     <Button Cursor="Hand" x:Name="btnStop" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnStop_Click">
80 80
                         <StackPanel Orientation="Vertical">
81 81
                             <Image x:Name="ImgStop" Source="./Images/microLessonSystem_21.png"/>
82 82
                             <Image x:Name="ImgStopTwo" Source="./Images/microLessonSystem_20.png" Visibility="Collapsed"/>
83
-                            <TextBlock Text="停止" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
83
+                            <TextBlock Text="停止" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
84 84
                         </StackPanel>
85 85
                     </Button>
86 86
                 </StackPanel>
@@ -89,152 +89,156 @@
89 89
                         <StackPanel Orientation="Vertical">
90 90
                             <Image x:Name="ImgAdd" Source="./Images/microLessonSystem_25.png" Visibility="Visible"/>
91 91
                             <Image x:Name="ImgAddTwo" Source="./Images/microLessonSystem_24.png" Visibility="Collapsed"/>
92
-                            <TextBlock Text="增加" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
92
+                            <TextBlock Text="增加" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
93 93
                         </StackPanel>
94 94
                     </Button>
95 95
                     <Button Cursor="Hand" x:Name="btnPrint" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,30,0" Click="BtnPrint_Click">
96 96
                         <StackPanel Orientation="Vertical">
97 97
                             <Image x:Name="ImgPrint" Source="./Images/microLessonSystem_4.png" Visibility="Collapsed"/>
98 98
                             <Image x:Name="ImgPrintTwo" Source="./Images/microLessonSystem_5.png" Visibility="Visible"/>
99
-                            <TextBlock Text="打印" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
99
+                            <TextBlock Text="打印" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
100 100
                         </StackPanel>
101 101
                     </Button>
102 102
                     <Button Cursor="Hand" x:Name="btnUpload" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnUpload_Click">
103 103
                         <StackPanel Orientation="Vertical">
104 104
                             <Image x:Name="ImgUpload" Source="./Images/microLessonSystem_15.png" Visibility="Collapsed"/>
105 105
                             <Image x:Name="ImgUploadTwo" Source="./Images/microLessonSystem_16.png" Visibility="Visible"/>
106
-                            <TextBlock Text="上传" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
106
+                            <TextBlock Text="上传" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
107 107
                         </StackPanel>
108 108
                     </Button>
109
-                    <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnSetUp_Click">
109
+                    <Button Cursor="Hand" x:Name="btnSetUp" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="30,0,0,0" Click="BtnSetUp_Click">
110 110
                         <StackPanel Orientation="Vertical">
111 111
                             <Image x:Name="ImgSetUp" Source="./Images/microLessonSystem_18.png" Visibility="Visible"/>
112 112
                             <Image x:Name="ImgSetUpTwo" Source="./Images/microLessonSystem_17.png" Visibility="Collapsed"/>
113
-                            <TextBlock Text="设置" FontSize="14" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
113
+                            <TextBlock Text="设置" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
114 114
                         </StackPanel>
115 115
                     </Button>
116 116
                 </StackPanel>
117 117
             </Grid>
118 118
             <!--主内容-->
119
-            <Grid Grid.Row="1" x:Name="GridMain"  Margin="0,0,0,0" Background="#FFFFFF" Width="635" Height="914" Visibility="Visible">
120
-                <Label Content="" Grid.Column="0" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
121
-                <Grid>
122
-                    <Border Grid.Row="1"  CornerRadius="5">
123
-                        <Grid x:Name="IMG" Margin="0,0,0,0">
124
-                            <Grid.Resources>
125
-                                <TransformGroup x:Key="Imageview">
126
-                                    <ScaleTransform/>
127
-                                    <TranslateTransform/>
128
-                                </TransformGroup>
129
-                                </Grid.Resources>
130
-                                <Label Content="" Grid.Column="0" HorizontalAlignment="Left" Height="1" VerticalAlignment="Top" Width="1" Background="#FF0F0F0F" Margin="1,0,0,0"/>
131
-                                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
119
+            <Grid Grid.Row="1" x:Name="GridMain" Width="793.700787401575">
120
+                <ScrollViewer x:Name="scroMain" Height="580" VerticalScrollBarVisibility="Visible">
121
+                    <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Width="793.700787401575" Height="1142.51968503937" Visibility="Visible">
122
+                        <Grid>
123
+                            <Border Grid.Row="1"  CornerRadius="5">
124
+                                <Grid x:Name="IMG" Margin="0,0,0,0">
125
+                                    <Grid.Resources>
126
+                                        <TransformGroup x:Key="Imageview">
127
+                                            <ScaleTransform/>
128
+                                            <TranslateTransform/>
129
+                                        </TransformGroup>
130
+                                    </Grid.Resources>
131
+                               
132
+                                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
132 133
                   Margin="0,0,0,0" Focusable="False" x:Name="BackFrame">
133
-                                <ContentControl  MouseLeftButtonDown="IMG1_MouseLeftButtonDown"   
134
+                                        <ContentControl  MouseLeftButtonDown="IMG1_MouseLeftButtonDown"   
134 135
                              MouseLeftButtonUp="IMG1_MouseLeftButtonUp"
135 136
                              MouseMove="IMG1_MouseMove"
136 137
                              MouseWheel="IMG1_MouseWheel" >
137
-                                    <Image Name="imgCanvas" Width="635" Height="auto" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}">
138
-                                    </Image>
139
-                                </ContentControl>
140
-                            </ScrollViewer>
138
+                                            <Image Name="imgCanvas" Width="635" Height="auto" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}">
139
+                                            </Image>
140
+                                        </ContentControl>
141
+                                    </ScrollViewer>
142
+                                </Grid>
143
+                            </Border>
141 144
                         </Grid>
142
-                    </Border>
143
-                </Grid>
144
-                <Image x:Name="imgDocumentation"/>
145
-                <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
146
-                <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
147
-                <!--摄像头-->
148
-                <!--<wfi:WindowsFormsHost Grid.Row="0" Grid.Column="1" x:Name="wfhCamera" Height="124" Width="172" HorizontalAlignment="Right" Margin="0,10,30.10,0" VerticalAlignment="Top">
145
+                        <Image x:Name="imgDocumentation"/>
146
+                        <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
147
+                        <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
148
+                        <!--摄像头-->
149
+                        <!--<wfi:WindowsFormsHost Grid.Row="0" Grid.Column="1" x:Name="wfhCamera" Height="124" Width="172" HorizontalAlignment="Right" Margin="0,10,30.10,0" VerticalAlignment="Top">
149 150
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
150 151
                 </wfi:WindowsFormsHost>-->
152
+             
153
+
154
+                    
155
+       
156
+                    </Grid>
157
+                </ScrollViewer>
151 158
                 <Image x:Name="imgPlayerLeft" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
152
-                <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,10,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"/>
153 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"/>
154
-                <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
155
-                <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Right"
156
-            Height="58" Margin="0,830,20,0" Grid.Column="1">
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"/>
166
+            </Grid>
167
+           
168
+            <Grid Grid.Row="1">
169
+                <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Center"
170
+            Height="58" Margin="0,520,0,0" Grid.Column="1">
157 171
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
158 172
                     x:Name="last_button"
159
-                    Width="60"
173
+                    Width="60" Height="50"
160 174
                     Click="last_button_Click">
161 175
                         <Button.Content>
162 176
                             <StackPanel>
163 177
                                 <Image Width="16" Source=".\Images\class_p1.png" />
164
-                                <TextBlock Margin="0,8,0,0" Text="上一页" />
165 178
                             </StackPanel>
166 179
                         </Button.Content>
167 180
                     </Button>
168
-                    <Grid Width="60">
181
+                    <Grid Width="60"  Background="Transparent">
169 182
                         <Grid.RowDefinitions>
170 183
                             <RowDefinition Height="311*"/>
171 184
                             <RowDefinition Height="483*"/>
172 185
                         </Grid.RowDefinitions>
173
-                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-25,0,0" Grid.Row="1" >
186
+                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-25,0,0" Grid.Row="1"  Background="Transparent">
174 187
 
175
-                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
188
+                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
176 189
                                 <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15"/>
177 190
                                 <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
178 191
                                 <TextBlock Text="{Binding pagenum}" TextAlignment="Center" FontSize="15"/>
179 192
                             </StackPanel>
180
-
181
-                            <TextBlock
182
-                            Margin="0,8,0,0"
183
-                            HorizontalAlignment="Center"
184
-                            Text="页码" />
185 193
                         </StackPanel>
186 194
                     </Grid>
187 195
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
188
-                    x:Name="next_btn"
189
-                    Width="60"
196
+                    x:Name="next_btn"  Background="Transparent"
197
+                    Width="60" Height="50"
190 198
                     Click="next_btn_Click">
191 199
                         <Button.Content>
192 200
                             <StackPanel>
193 201
                                 <Image Width="16" Source=".\Images\class_p2.png" />
194
-                                <TextBlock Margin="0,8,0,0" Text="下一页" />
195 202
                             </StackPanel>
196 203
                         </Button.Content>
197 204
                     </Button>
198 205
                 </StackPanel>
199
-
200
-                <Label Content="" Grid.Column="1" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,2,0"/>
201
-                <Label Content="" Grid.Column="1" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,2,0"/>
202 206
             </Grid>
203 207
             <!--设置-->
204 208
             <Grid Grid.Row="1" x:Name="gridSetUp" Margin="20,0,20,0" Background="#FFFFFF" Visibility="Collapsed">
205 209
                 <Grid.RowDefinitions>
206
-                    <RowDefinition Height="120"/>
207
-                    <RowDefinition Height="90"/>
208
-                    <RowDefinition Height="90"/>
209
-                    <RowDefinition Height="80"/>
210
-                    <RowDefinition Height="80"/>
211
-                    <RowDefinition Height="90"/>
212 210
                     <RowDefinition Height="90"/>
211
+                    <RowDefinition Height="70"/>
212
+                    <RowDefinition Height="70"/>
213
+                    <RowDefinition Height="70"/>
214
+                    <RowDefinition Height="70"/>
215
+                    <RowDefinition Height="70"/>
216
+                    <RowDefinition Height="70"/>
213 217
                     <RowDefinition Height="*"/>
214 218
                 </Grid.RowDefinitions>
215
-                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
219
+                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,30,0,0">
216 220
                     <TextBlock Text="   点阵笔" FontSize="16" Foreground="#2D8CF0"/>
217 221
                     <TextBlock x:Name="txbNotConnecteds"  Text="未连接" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
218 222
                 </StackPanel>
219
-                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
223
+                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
220 224
                     <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0"/>
221 225
                     <RadioButton x:Name="rbnMP4" Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
222 226
                     <RadioButton x:Name="rbnFLV" Cursor="Hand" Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
223 227
                     <RadioButton x:Name="rbnAVI" Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
224 228
                 </StackPanel>
225
-                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left">
229
+                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
226 230
                     <TextBlock Text="头像位置" FontSize="16" Foreground="#2D8CF0"/>
227 231
                     <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
228 232
                     <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
229 233
                     <RadioButton Cursor="Hand" x:Name="rbnLeft" Content="左上" FontSize="14" Foreground="#333333" Margin="20,2,0,0" />
230 234
                     <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
231 235
                 </StackPanel>
232
-                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left">
236
+                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
233 237
                     <TextBlock Text="视频声音" FontSize="16" Foreground="#2D8CF0"/>
234 238
                     <RadioButton x:Name="rbnY" Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
235 239
                     <RadioButton x:Name="rbnN" Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
236 240
                 </StackPanel>
237
-                <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left">
241
+                <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
238 242
                     <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Foreground="#2D8CF0" Padding="2,36,10,0"/>
239 243
                     <!--输入框-->
240 244
                     <Border Background="#CDD6E0" Width="525" Height="43" CornerRadius="3">
@@ -258,11 +262,11 @@
258 262
                         </Button.Template>
259 263
                     </Button>
260 264
                 </StackPanel>
261
-                <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
265
+                <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,30,0,0">
262 266
                     <TextBlock Text="    版本号" FontSize="16" Foreground="#2D8CF0"/>
263 267
                     <TextBlock Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
264 268
                 </StackPanel>
265
-                <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
269
+                <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,30,0,0">
266 270
                     <TextBlock Text="版权所有" FontSize="16" Foreground="#2D8CF0"/>
267 271
                     <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
268 272
                 </StackPanel>
@@ -284,26 +288,26 @@
284 288
                     </Button.Template>
285 289
                 </Button>
286 290
             </Grid>
287
-            <Grid Grid.Row="2" Background="#EFF1F8">
288
-                <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
289
-                    <TextBlock Text="颜色:" FontSize="14" Padding="5,5,0,0"/>
290
-                    <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click"/>
291
-                    <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,0,0,0" Click="BtnRed_Click"/>
292
-                    <Button Cursor="Hand" x:Name="btnGray" Background="#A7A9AC" Width="20" Height="20" Margin="5,0,0,0" Click="BtnGray_Click"/>
293
-                    <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,0,0,0" Click="BtnCyanBlue_Click"/>
294
-                    <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,0,0,0" Click="BtnYellow_Click"/>
295
-                    <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,0,0,0" Click="BtnBlue_Click"/>
296
-                    <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,0,0,0"/>
297
-                    <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,5,0,0" IsChecked="True" Click="RbnFine_Click"/>
298
-                    <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,5,0,0" Click="RbnIn_Click"/>
299
-                    <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,5,0,0" Click="RbnCrude_Click"/>
291
+            <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,2,0,0">
292
+                <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
293
+                    <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
294
+                    <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0"/>
295
+                    <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click"/>
296
+                    <Button Cursor="Hand" x:Name="btnGray" Background="#A7A9AC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnGray_Click"/>
297
+                    <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,2,0,0" Click="BtnCyanBlue_Click"/>
298
+                    <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,2,0,0" Click="BtnYellow_Click"/>
299
+                    <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click"/>
300
+                    <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
301
+                    <RadioButton Cursor="Hand" x:Name="rbnFine" Content="细" FontSize="14" Margin="0,10,0,0" IsChecked="True" Click="RbnFine_Click"/>
302
+                    <RadioButton Cursor="Hand" x:Name="rbnIn" Content="中" FontSize="14" Margin="5,10,0,0" Click="RbnIn_Click"/>
303
+                    <RadioButton Cursor="Hand" x:Name="rbnCrude" Content="粗" FontSize="14" Margin="5,10,0,0" Click="RbnCrude_Click"/>
300 304
                     <StackPanel Orientation="Horizontal">
301
-                        <TextBlock Text="摄像头:" FontSize="14" Padding="15,5,0,0"/>
302
-                        <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,5,0,0" Click="RbnOpen_Click"/>
303
-                        <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,5,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
305
+                        <TextBlock Text="摄像头:" FontSize="14" Padding="15,10,0,0"/>
306
+                        <RadioButton Cursor="Hand" x:Name="rbnOpen" Content="开" FontSize="14" Margin="0,10,0,0" Click="RbnOpen_Click"/>
307
+                        <RadioButton Cursor="Hand" x:Name="rbnTurnOff" Content="关" FontSize="14" Margin="5,10,0,0" IsChecked="True" Click="RbnTurnOff_Click"/>
304 308
                     </StackPanel>
305 309
                 </StackPanel>
306
-                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,5,0">
310
+                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,10,0">
307 311
                     <TextBlock Text="智能笔状态:" FontSize="14" Padding="0,5,0,0"/>
308 312
                     <TextBlock x:Name="txbNotConnected" Text="未连接" FontSize="14" Padding="0,5,5,0"/>
309 313
                 </StackPanel>

+ 266
- 133
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Переглянути файл

@@ -73,8 +73,8 @@ namespace XHWK.WKTool
73 73
             btnPrint.IsEnabled = false;
74 74
 
75 75
             myblackboard = new BlackboardNew(blackboard_canvas);
76
-            APP.pageData.pagenum = 1;
77
-            APP.pageData.currpage = 1;
76
+            APP.pageData.pagenum = 0;
77
+            APP.pageData.currpage = 0;
78 78
             DataContext = APP.pageData;
79 79
 
80 80
             //APP.SaveDraw();//画板模型第一页初始化
@@ -101,6 +101,13 @@ namespace XHWK.WKTool
101 101
         /// </summary>
102 102
         public void Initialize()
103 103
         {
104
+            #region 数据初始化
105
+            APP.pageData.pagenum = 0;
106
+            APP.pageData.currpage = APP.pageData.pagenum;
107
+            #endregion
108
+
109
+
110
+
104 111
             APP.CameraPosition = FileToolsCommon.GetConfigValue("CameraPosition");
105 112
             //创建 DrawingAttributes 类的一个实例  
106 113
             drawingAttributes = new DrawingAttributes();
@@ -383,7 +390,6 @@ namespace XHWK.WKTool
383 390
                         Thread.Sleep(100);
384 391
                     }
385 392
                     System.Environment.Exit(0);
386
-
387 393
                 }
388 394
                 else
389 395
                 {
@@ -709,8 +715,11 @@ namespace XHWK.WKTool
709 715
             {
710 716
                 if (!string.IsNullOrWhiteSpace(APP.ImgPath) && File.Exists(APP.ImgPath))
711 717
                 {
712
-                    //APP.JPaths[APP.pageData.currpage]= APP.ImgPath;
713
-                    //APP.JPaths[APP.pageData.currpage] = APP.ImgPath;
718
+                    if(APP.pageData.currpage==0)
719
+                    {
720
+                        APP.pageData.pagenum += 1;
721
+                        APP.pageData.currpage = APP.pageData.pagenum;
722
+                    }
714 723
                     if (APP.PageDrawList.Count >= APP.pageData.currpage)
715 724
                     {
716 725
                         APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath = APP.ImgPath;//zxycs
@@ -857,31 +866,23 @@ namespace XHWK.WKTool
857 866
                                 }
858 867
                             }
859 868
                             #endregion
860
-
861
-                            //APP.Paths = images.ToArray();
862
-                            //ImgPDFPath = images.ToArray();
863
-
864 869
                             string[] page = images.ToArray();
865
-                            if(page.Length>0)
866
-                            {
867
-                                APP.PageDrawList = null;
868
-                                APP.PageDrawList = new List<Model_DrawData>();
869
-                            }
870
-                            for (int i = 0; i < page.Length; i++)//给画板模型加图片路径
870
+                            int num = 0;
871
+                            for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
871 872
                             {
872 873
                                 if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
873 874
                                 {
874
-                                    APP.PageDrawList[i].PageImagePath = page[i]; //zxycs
875
-                                    APP.PageDrawList[i].PdfImagePath = page[i];
875
+                                    APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
876
+                                    APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
876 877
                                     APP.PageDrawList[i].PageNum = i + 1;
877 878
                                     APP.PageDrawList[i].ImgDocumentation = true;
878 879
                                 }
879 880
                                 else
880 881
                                 {
881
-                                 
882
+
882 883
                                     Model_DrawData model_DrawData = new Model_DrawData();
883
-                                    model_DrawData.PageImagePath = page[i];
884
-                                    model_DrawData.PdfImagePath = page[i];
884
+                                    model_DrawData.PageImagePath = page[i - APP.pageData.pagenum];
885
+                                    model_DrawData.PdfImagePath = page[i - APP.pageData.pagenum];
885 886
                                     model_DrawData.PageNum = i + 1;
886 887
                                     model_DrawData.ImgDocumentation = true;
887 888
                                     APP.PageDrawList.Add(model_DrawData);
@@ -890,28 +891,29 @@ namespace XHWK.WKTool
890 891
                                 ImgPrintTwo.Visibility = Visibility.Collapsed;
891 892
                                 btnPrint.IsEnabled = true;
892 893
                                 APP.SaveDraw();
894
+                                num++;
893 895
                             }
894
-                            myblackboard.clear();
895
-                            APP.pageData.pagenum = 1;
896
-                            APP.pageData.currpage = 1;
897
-                            for (int i = 0; i < APP.PageDrawList.Count; i++)
896
+                            if (num > 0)
898 897
                             {
899
-                                APP.pageData.pagenum += 1;
898
+                                APP.pageData.currpage = APP.pageData.pagenum + 1;
899
+                                APP.pageData.pagenum += num;
900 900
                             }
901
-                            if (APP.pageData.pagenum > 1)
901
+                            if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
902 902
                             {
903
-                                APP.pageData.pagenum -= 1;
904
-                            }
905
-                            if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage < APP.PageDrawList.Count)
906
-                            {
907
-                                //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
908 903
                                 imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
909 904
                                 imgCanvas.Source = null;
905
+                                ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
906
+                                ImgScreenshotTwo.Visibility = Visibility.Visible;
907
+                                btnScreenshot.IsEnabled = false;
910 908
                             }
911 909
                             else
912 910
                             {
913 911
                                 imgDocumentation.Source = null;
914 912
                                 imgCanvas.Source = null;
913
+                                ///截图可用
914
+                                ImgScreenshot.Visibility = Visibility.Visible;
915
+                                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
916
+                                btnScreenshot.IsEnabled = true;
915 917
                             }
916 918
                         }
917 919
                         catch (Exception ex)
@@ -925,19 +927,13 @@ namespace XHWK.WKTool
925 927
                         {
926 928
                             string paths = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
927 929
                             string[] page = ConvertWordToImage(filepath, paths, "", 0, 0, null, 0).ToArray();
928
-                            //APP.Paths = page;//cs
929
-                            //ImgPDFPath = page;
930
-                            if (page.Length > 0)
931
-                            {
932
-                                APP.PageDrawList = null;
933
-                                APP.PageDrawList = new List<Model_DrawData>();
934
-                            }
935
-                            for (int i = 0; i < page.Length; i++)//给画板模型加图片路径
930
+                            int num = 0;
931
+                            for (int i = 0+ APP.pageData.pagenum; i < page.Length+ APP.pageData.pagenum; i++)//给画板模型加图片路径
936 932
                             {
937 933
                                 if (APP.PageDrawList!=null&&APP.PageDrawList.Count > i)
938 934
                                 {
939
-                                    APP.PageDrawList[i].PageImagePath = page[i]; //zxycs
940
-                                    APP.PageDrawList[i].PdfImagePath = page[i];
935
+                                    APP.PageDrawList[i].PageImagePath = page[i- APP.pageData.pagenum]; //zxycs
936
+                                    APP.PageDrawList[i].PdfImagePath = page[i- APP.pageData.pagenum];
941 937
                                     APP.PageDrawList[i].PageNum = i + 1;
942 938
                                     APP.PageDrawList[i].ImgDocumentation = true;
943 939
                                 }
@@ -945,8 +941,8 @@ namespace XHWK.WKTool
945 941
                                 {
946 942
                                   
947 943
                                     Model_DrawData model_DrawData = new Model_DrawData();
948
-                                    model_DrawData.PageImagePath = page[i];
949
-                                    model_DrawData.PdfImagePath = page[i];
944
+                                    model_DrawData.PageImagePath = page[i- APP.pageData.pagenum];
945
+                                    model_DrawData.PdfImagePath = page[i- APP.pageData.pagenum];
950 946
                                     model_DrawData.PageNum = i + 1;
951 947
                                     model_DrawData.ImgDocumentation = true;
952 948
                                     APP.PageDrawList.Add(model_DrawData);
@@ -954,35 +950,35 @@ namespace XHWK.WKTool
954 950
                                 ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
955 951
                                 ImgPrintTwo.Visibility = Visibility.Collapsed;
956 952
                                 btnPrint.IsEnabled = true;
957
-
958 953
                                 APP.SaveDraw();
954
+                                num++;
959 955
                             }
960
-                            APP.pageData.pagenum = 1;
961
-                            APP.pageData.currpage = 1;
962
-                            //myblackboard.clear();
963
-                            for (int i = 0; i < APP.PageDrawList.Count; i++)
964
-                            {
965
-                                APP.pageData.pagenum += 1;
966
-                            }
967
-                            if (APP.pageData.pagenum > 1)
956
+                            if(num>0)
968 957
                             {
969
-                                APP.pageData.pagenum -= 1;
958
+                                APP.pageData.currpage = APP.pageData.pagenum + 1;
959
+                                APP.pageData.pagenum += num;
970 960
                             }
971
-                            if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage < APP.PageDrawList.Count)
961
+                            if (APP.pageData.currpage>0 && APP.pageData.currpage < APP.PageDrawList.Count)
972 962
                             {
973
-                                //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
974 963
                                 imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
975 964
                                 imgCanvas.Source = null;
965
+                                ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
966
+                                ImgScreenshotTwo.Visibility = Visibility.Visible;
967
+                                btnScreenshot.IsEnabled = false;
976 968
                             }
977 969
                             else
978 970
                             {
979 971
                                 imgDocumentation.Source = null;
980 972
                                 imgCanvas.Source = null;
973
+                                ///截图可用
974
+                                ImgScreenshot.Visibility = Visibility.Visible;
975
+                                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
976
+                                btnScreenshot.IsEnabled = true;
981 977
                             }
982 978
                         }
983 979
                         catch (Exception ex)
984 980
                         {
985
-                            LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog PDF)" + ex.Message, ex);
981
+                            LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
986 982
                         }
987 983
                     }
988 984
 
@@ -1043,7 +1039,15 @@ namespace XHWK.WKTool
1043 1039
         /// <param name="e"></param>
1044 1040
         private void BtnRecord_Click(object sender, RoutedEventArgs e)
1045 1041
         {
1046
-            blackboard_canvas.Visibility = Visibility.Visible;
1042
+            if(APP.pageData.currpage > 0)
1043
+            {
1044
+                blackboard_canvas.Visibility = Visibility.Visible;
1045
+            }
1046
+            else
1047
+            {
1048
+                System.Windows.MessageBox.Show("请先导入文档或截图!");
1049
+                return;
1050
+            }
1047 1051
             StartRecord();
1048 1052
         }
1049 1053
         /// <summary>
@@ -1167,6 +1171,8 @@ namespace XHWK.WKTool
1167 1171
                 IsSuspendR = false;
1168 1172
                 //BtnRecording.Content = "暂停录制";
1169 1173
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_23.png"));
1174
+                ImgStop.Visibility = Visibility.Collapsed;
1175
+                ImgStopTwo.Visibility = Visibility.Visible;
1170 1176
                 TxbRecordingWord.Text = "暂停";
1171 1177
                 #region 2秒内不可点击
1172 1178
                 new Thread(new ThreadStart(new Action(() =>
@@ -1207,6 +1213,8 @@ namespace XHWK.WKTool
1207 1213
                 //暂停
1208 1214
                 IsSuspendR = true;
1209 1215
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
1216
+                ImgStop.Visibility = Visibility.Visible;
1217
+                ImgStopTwo.Visibility = Visibility.Collapsed;
1210 1218
                 TxbRecordingWord.Text = "继续";
1211 1219
                 #region 2秒内不可点击
1212 1220
                 new Thread(new ThreadStart(new Action(() =>
@@ -1273,6 +1281,7 @@ namespace XHWK.WKTool
1273 1281
         {
1274 1282
             if (!IsFirstR)
1275 1283
             {
1284
+                #region 恢复被禁用的按钮
1276 1285
                 ImgPrint.Visibility = Visibility.Visible;
1277 1286
                 ImgPrintTwo.Visibility = Visibility.Collapsed;
1278 1287
                 btnPrint.IsEnabled = true;
@@ -1297,9 +1306,13 @@ namespace XHWK.WKTool
1297 1306
                 ImgSetUpTwo.Visibility = Visibility.Collapsed;
1298 1307
                 btnSetUp.IsEnabled = true;
1299 1308
 
1300
-                btnLoginType.IsEnabled = true;
1309
+                btnLoginType.IsEnabled = true; 
1310
+                #endregion
1311
+
1301 1312
                 IsSuspendR = true;
1302 1313
                 ImgRecord.Source = new BitmapImage(new Uri("pack://application:,,,/Images/microLessonSystem_14.png"));
1314
+                ImgStop.Visibility = Visibility.Visible;
1315
+                ImgStopTwo.Visibility = Visibility.Collapsed;
1303 1316
                 TxbRecordingWord.Text = "保存中";
1304 1317
                 #region 2秒内不可点击
1305 1318
                 new Thread(new ThreadStart(new Action(() =>
@@ -1389,26 +1402,40 @@ namespace XHWK.WKTool
1389 1402
         /// <param name="e"></param>
1390 1403
         private void BtnAdd_Click(object sender, RoutedEventArgs e)
1391 1404
         {
1392
-            if (APP.pageData.pagenum < 200)
1393
-            {
1394
-                if (APP.PageDrawList != null && APP.PageDrawList.Count > 0 && APP.PageDrawList.Count > APP.pageData.currpage - 1
1395
-                    && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
1405
+      //      RectangleF rectangleF = new RectangleF();
1406
+      //      rectangleF.Width = (float)APP.PageDrawList[0].ImageSizes.CenterX;
1407
+      //      rectangleF.Height = (float)APP.PageDrawList[0].ImageSizes.CenterY;
1408
+      //      rectangleF.X= (float)APP.PageDrawList[0].ImageLocation.X;
1409
+      //      rectangleF.Y = (float)APP.PageDrawList[0].ImageLocation.Y;
1410
+
1411
+      //      //CESHI 
1412
+      //bool isImg=    MergerImg(APP.PageDrawList[0].PageImagePath, @"G:\102H.jpg", rectangleF, out string errmsg);
1413
+
1414
+
1415
+
1416
+                if (APP.pageData.currpage>0)
1396 1417
                 {
1397 1418
                     APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
1398 1419
                 }
1420
+                if(IsStartCount&& blackboard_canvas.Visibility == Visibility.Collapsed)
1421
+                {
1422
+                    blackboard_canvas.Visibility = Visibility.Visible;
1423
+                }
1399 1424
                 APP.pageData.pagenum += 1;
1400 1425
                 APP.pageData.currpage = APP.pageData.pagenum;
1401 1426
                 myblackboard.changepage(APP.pageData.currpage - 1);
1427
+                ///清空页面图片UI
1402 1428
                 imgCanvas.Source = null;
1429
+            imgDocumentation.Source = null;
1430
+                ///画板模型增加一页
1403 1431
                 Model_DrawData model_DrawData = new Model_DrawData();
1404 1432
                 model_DrawData.PageNum = APP.pageData.currpage;
1405 1433
                 APP.PageDrawList.Add(model_DrawData);
1406
-                APP.SaveDraw();//画板模型增加一页
1407
-            }
1408
-            else
1409
-            {
1410
-                System.Windows.Forms.MessageBox.Show("已达到最大页数无法继续增加!");
1411
-            }
1434
+                APP.SaveDraw();
1435
+            ///截图可用
1436
+            ImgScreenshot.Visibility = Visibility.Visible;
1437
+            ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1438
+            btnScreenshot.IsEnabled = true;
1412 1439
         }
1413 1440
         /// <summary>
1414 1441
         /// 打印事件
@@ -1419,7 +1446,11 @@ namespace XHWK.WKTool
1419 1446
         {
1420 1447
             try
1421 1448
             {
1422
-                iTextSharp.text.Document document = new iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 25, 25, 25, 25);
1449
+                //3种情况  1.文档图片 2.截图图片 3.没有图片
1450
+
1451
+
1452
+
1453
+                    iTextSharp.text.Document document = new iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 25, 25, 25, 25);
1423 1454
                 //iTextSharp.text.Rectangle page = new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.A4., 250f);//cs
1424 1455
                 ////设置纸张横向
1425 1456
                 //document.SetPageSize(iTextSharp.text.PageSize.A4.Rotate());
@@ -1432,10 +1463,42 @@ namespace XHWK.WKTool
1432 1463
                 iTextSharp.text.Image image;
1433 1464
                 for (int i = 0; i < APP.PageDrawList.Count; i++)
1434 1465
                 {
1435
-                    if (String.IsNullOrEmpty(APP.PageDrawList[i].PdfImagePath)) break;
1466
+                    long ii = Timestamp();
1467
+                    string directoryPath = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1468
+                    string filePathOutPut = Path.Combine(directoryPath, string.Format("{0}{1}.jpg", ii, i));
1469
+                    RectangleF rectangleFs = new RectangleF();
1470
+                    MergerImg("", filePathOutPut, rectangleFs, out string errmsg);
1471
+                    image = iTextSharp.text.Image.GetInstance(filePathOutPut);
1472
+                    if (String.IsNullOrEmpty(APP.PageDrawList[i].PageImagePath))//没有图片
1473
+                    {
1474
+
1475
+                    }
1476
+                    else if(APP.PageDrawList[i].ImgDocumentation==true)
1477
+                    {
1478
+                        image = iTextSharp.text.Image.GetInstance(APP.PageDrawList[i].PageImagePath);
1479
+                    }
1480
+                    else
1481
+                    {
1482
+                        RectangleF rectangleF = new RectangleF();
1483
+                        rectangleF.Width = (float)APP.PageDrawList[i].ImageSizes.CenterX;
1484
+                        rectangleF.Height = (float)APP.PageDrawList[i].ImageSizes.CenterY;
1485
+                        rectangleF.X = (float)APP.PageDrawList[i].ImageLocation.X;
1486
+                        rectangleF.Y = (float)APP.PageDrawList[i].ImageLocation.Y;
1436 1487
 
1437 1488
 
1438
-                    image = iTextSharp.text.Image.GetInstance(APP.PageDrawList[i].PdfImagePath);
1489
+                        string msg = string.Empty;
1490
+                        bool isImg = MergerImg(APP.PageDrawList[i].PageImagePath, filePathOutPut, rectangleF, out msg);
1491
+                        if(isImg)
1492
+                        {
1493
+                            image = iTextSharp.text.Image.GetInstance(filePathOutPut);
1494
+                        }
1495
+                        else
1496
+                        {
1497
+                            image = iTextSharp.text.Image.GetInstance(APP.PageDrawList[i].PageImagePath);
1498
+                        }
1499
+                    }
1500
+
1501
+                   
1439 1502
 
1440 1503
 
1441 1504
                     if (image.Height > iTextSharp.text.PageSize.A4.Height - 25)
@@ -1461,6 +1524,23 @@ namespace XHWK.WKTool
1461 1524
             {
1462 1525
                 Console.WriteLine("转换失败,原因:" + ex.Message);
1463 1526
             }
1527
+
1528
+
1529
+         
1530
+
1531
+
1532
+
1533
+
1534
+
1535
+
1536
+
1537
+
1538
+
1539
+
1540
+
1541
+
1542
+
1543
+
1464 1544
             //document.Close();
1465 1545
             ////Console.ReadKey();
1466 1546
             if (APP.W_PrintWindow == null)
@@ -1521,8 +1601,11 @@ namespace XHWK.WKTool
1521 1601
                     LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(last_button_Click)生成图片错误:" + ex.Message, ex);
1522 1602
                 }
1523 1603
                 APP.pageData.currpage -= 1;
1524
-
1525 1604
                 myblackboard.changepage(APP.pageData.currpage - 1);
1605
+                ///截图可用
1606
+                ImgScreenshot.Visibility = Visibility.Visible;
1607
+                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1608
+                btnScreenshot.IsEnabled = true;
1526 1609
                 if (APP.pageData.currpage <= APP.PageDrawList.Count)
1527 1610
                 {
1528 1611
                     if (APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
@@ -1537,6 +1620,9 @@ namespace XHWK.WKTool
1537 1620
                         {
1538 1621
                             imgCanvas.Source = null;
1539 1622
                             imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
1623
+                            ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1624
+                            ImgScreenshotTwo.Visibility = Visibility.Visible;
1625
+                            btnScreenshot.IsEnabled = false;
1540 1626
                         }
1541 1627
                         else
1542 1628
                         {
@@ -1559,7 +1645,6 @@ namespace XHWK.WKTool
1559 1645
                                 transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
1560 1646
                                 transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
1561 1647
                                 mouseDown = false;
1562
-
1563 1648
                             }
1564 1649
                         }
1565 1650
                     }
@@ -1569,10 +1654,6 @@ namespace XHWK.WKTool
1569 1654
                         imgDocumentation.Source = null;
1570 1655
                     }
1571 1656
                 }
1572
-                //if (!string.IsNullOrWhiteSpace(APP.JPaths[APP.pageData.currpage]))
1573
-                //{
1574
-                //    imgCanvas.Source = new BitmapImage(new Uri(APP.JPaths[APP.pageData.currpage]));
1575
-                //}
1576 1657
             }
1577 1658
 
1578 1659
         }
@@ -1603,6 +1684,10 @@ namespace XHWK.WKTool
1603 1684
                 }
1604 1685
                 APP.pageData.currpage += 1;
1605 1686
                 myblackboard.changepage(APP.pageData.currpage - 1);
1687
+                ///截图可用
1688
+                ImgScreenshot.Visibility = Visibility.Visible;
1689
+                ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1690
+                btnScreenshot.IsEnabled = true;
1606 1691
                 if (APP.pageData.currpage <= APP.PageDrawList.Count)
1607 1692
                 {
1608 1693
 
@@ -1616,6 +1701,9 @@ namespace XHWK.WKTool
1616 1701
                         {
1617 1702
                             imgCanvas.Source = null;
1618 1703
                             imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
1704
+                            ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
1705
+                            ImgScreenshotTwo.Visibility = Visibility.Visible;
1706
+                            btnScreenshot.IsEnabled = false;
1619 1707
                         }
1620 1708
                         else
1621 1709
                         {
@@ -1639,9 +1727,6 @@ namespace XHWK.WKTool
1639 1727
                                 //var position = e.GetPosition(img);
1640 1728
                                 transform.X = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.X;
1641 1729
                                 transform.Y = APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation.Y;
1642
-
1643
-                                
1644
-
1645 1730
                                 mouseDown = false;
1646 1731
                             }
1647 1732
                         }
@@ -1659,6 +1744,54 @@ namespace XHWK.WKTool
1659 1744
             }
1660 1745
         }
1661 1746
         /// <summary>
1747
+        /// 生成图片
1748
+        /// </summary>
1749
+        /// <param name="_path">图片地址</param>
1750
+        /// <param name="_saveimg">保存位置</param>
1751
+        /// <param name="_rectangle">图片位置</param>
1752
+        /// <param name="errmsg">错误消息</param>
1753
+        /// <returns></returns>
1754
+        private bool MergerImg(string _path,string _saveimg,RectangleF _rectangle, out string errmsg)
1755
+        {
1756
+            errmsg = null;
1757
+            try
1758
+            {
1759
+                Bitmap bitmap = null;
1760
+
1761
+                 //创建要显示的图片对象,根据参数的个数设置宽度
1762
+                 Bitmap backgroudImg = new Bitmap((int)gridM.ActualWidth, (int)gridM.ActualHeight);
1763
+                Graphics g = Graphics.FromImage(backgroudImg);
1764
+                //清除画布,背景设置为白色
1765
+                g.Clear(System.Drawing.Color.White);
1766
+
1767
+                if(!string.IsNullOrWhiteSpace(_path))
1768
+                {
1769
+                     bitmap = ImageHelper.ReadBitmapFile(_path);
1770
+                    g.DrawImage(bitmap, _rectangle);
1771
+                }
1772
+
1773
+
1774
+                backgroudImg.Save(_saveimg);
1775
+               
1776
+                g.Dispose();
1777
+                backgroudImg.Dispose();
1778
+                if(bitmap!=null)
1779
+                {
1780
+                    bitmap.Dispose();
1781
+                }
1782
+              
1783
+                GC.Collect();
1784
+                return true;
1785
+            }
1786
+            catch (Exception ex)
1787
+            {
1788
+                errmsg = ex.Message;
1789
+                LogHelper.WriteErrLog("【截图合成】(MergerImg)图片合成失败:" + ex.Message,ex);
1790
+                return false;
1791
+            }
1792
+        
1793
+        }
1794
+        /// <summary>
1662 1795
         /// 将Word文档转换为图片的方法(该方法基于第三方DLL),你可以像这样调用该方法: ConvertPDF2Image("F:\\PdfFile.doc", "F:\\",
1663 1796
         /// "ImageFile", 1, 20, ImageFormat.Png, 256);
1664 1797
         /// </summary>
@@ -1954,59 +2087,59 @@ namespace XHWK.WKTool
1954 2087
                 //labPenStatus.Text = "PenDown";
1955 2088
                 isPenDown = true;
1956 2089
 
1957
-                Dispatcher.Invoke(new Action(() =>
1958
-                {
1959
-                    for (int i = 0; i < APP.PageDrawList.Count; i++)
1960
-                    {
1961
-                        if (APP.PageDrawList[i].PageCode == penSerial)
1962
-                        {
1963
-                            if (i < APP.pageData.pagenum)
1964
-                            {
1965
-                                if (i < APP.pageData.currpage)
1966
-                                {
1967
-                                    int num = APP.pageData.currpage - i;
1968
-                                    APP.pageData.currpage -= num;
1969
-                                    myblackboard.changepage(APP.pageData.currpage - 1);
1970
-                                    if (APP.PageDrawList.Count > 0)
1971
-                                    {
1972
-                                        if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && APP.pageData.currpage > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
1973
-                                        {
1974
-                                            //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
1975
-
1976
-                                            imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
1977
-                                        }
1978
-                                        else
1979
-                                        {
1980
-                                            imgCanvas.Source = null;
1981
-                                        }
1982
-                                    }
1983
-                                }
1984
-                                else
1985
-                                {
1986
-                                    int num = i - APP.pageData.currpage;
1987
-                                    APP.pageData.currpage += num;
1988
-                                    myblackboard.changepage(APP.pageData.currpage - 1);
1989
-                                    if (APP.PageDrawList.Count > 0)
1990
-                                    {
1991
-
1992
-                                        if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
1993
-                                        {
1994
-                                            //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage-1]));
1995
-                                            imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
1996
-                                        }
1997
-                                        else
1998
-                                        {
1999
-                                            imgCanvas.Source = null;
2000
-                                        }
2001
-                                    }
2002
-                                }
2003
-                            }
2004
-                            return;
2005
-                        }
2006
-                    }
2007
-                    //myblackboard.changepages(0, 0, true);
2008
-                    //myblackboard.changepaget(0, 0, true, blackboard_canvas);
2009
-                }));
2090
+                //Dispatcher.Invoke(new Action(() =>
2091
+                //{
2092
+                //    for (int i = 0; i < APP.PageDrawList.Count; i++)
2093
+                //    {
2094
+                //        if (APP.PageDrawList[i].PageCode == penSerial)
2095
+                //        {
2096
+                //            if (i < APP.pageData.pagenum)
2097
+                //            {
2098
+                //                if (i < APP.pageData.currpage)
2099
+                //                {
2100
+                //                    int num = APP.pageData.currpage - i;
2101
+                //                    APP.pageData.currpage -= num;
2102
+                //                    myblackboard.changepage(APP.pageData.currpage - 1);
2103
+                //                    if (APP.PageDrawList.Count > 0)
2104
+                //                    {
2105
+                //                        if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && APP.pageData.currpage > 0 && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
2106
+                //                        {
2107
+                //                            //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
2108
+
2109
+                //                            imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
2110
+                //                        }
2111
+                //                        else
2112
+                //                        {
2113
+                //                            imgCanvas.Source = null;
2114
+                //                        }
2115
+                //                    }
2116
+                //                }
2117
+                //                else
2118
+                //                {
2119
+                //                    int num = i - APP.pageData.currpage;
2120
+                //                    APP.pageData.currpage += num;
2121
+                //                    myblackboard.changepage(APP.pageData.currpage - 1);
2122
+                //                    if (APP.PageDrawList.Count > 0)
2123
+                //                    {
2124
+
2125
+                //                        if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage <= APP.PageDrawList.Count && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
2126
+                //                        {
2127
+                //                            //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage-1]));
2128
+                //                            imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
2129
+                //                        }
2130
+                //                        else
2131
+                //                        {
2132
+                //                            imgCanvas.Source = null;
2133
+                //                        }
2134
+                //                    }
2135
+                //                }
2136
+                //            }
2137
+                //            return;
2138
+                //        }
2139
+                //    }
2140
+                //    //myblackboard.changepages(0, 0, true);
2141
+                //    //myblackboard.changepaget(0, 0, true, blackboard_canvas);
2142
+                //}));
2010 2143
             }
2011 2144
             //myblackboard.changepages(0, 0, true);
2012 2145
         }

+ 7
- 0
XHWK.WKTool/XHWK.WKTool.csproj Переглянути файл

@@ -146,6 +146,9 @@
146 146
     <Compile Include="PrintWindow.xaml.cs">
147 147
       <DependentUpon>PrintWindow.xaml</DependentUpon>
148 148
     </Compile>
149
+    <Compile Include="PromptWindow.xaml.cs">
150
+      <DependentUpon>PromptWindow.xaml</DependentUpon>
151
+    </Compile>
149 152
     <Compile Include="ScreenRecordingToolbarWindow.xaml.cs">
150 153
       <DependentUpon>ScreenRecordingToolbarWindow.xaml</DependentUpon>
151 154
     </Compile>
@@ -177,6 +180,10 @@
177 180
       <SubType>Designer</SubType>
178 181
       <Generator>MSBuild:Compile</Generator>
179 182
     </Page>
183
+    <Page Include="PromptWindow.xaml">
184
+      <Generator>MSBuild:Compile</Generator>
185
+      <SubType>Designer</SubType>
186
+    </Page>
180 187
     <Page Include="Themes\Generic.xaml">
181 188
       <Generator>MSBuild:Compile</Generator>
182 189
       <SubType>Designer</SubType>

Завантаження…
Відмінити
Зберегти