Browse Source

主页面样式

tags/录制修改前
zhangxueyang 4 years ago
parent
commit
c82b723daf

+ 39
- 1
Common/system/BlackboardNew.cs View File

287
                     stylusPoint.X = 581;
287
                     stylusPoint.X = 581;
288
                     stylusPoint.Y = 213;
288
                     stylusPoint.Y = 213;
289
                     stylusPoints.Add(stylusPoint);
289
                     stylusPoints.Add(stylusPoint);
290
-                     stroke = new Stroke(stylusPoints);
290
+                    stroke = new Stroke(stylusPoints);
291
 
291
 
292
                     stylusPoint.X = 586;
292
                     stylusPoint.X = 586;
293
                     stylusPoint.Y = 214;
293
                     stylusPoint.Y = 214;
316
                     m_canvas.Strokes.Add(stroke);
316
                     m_canvas.Strokes.Add(stroke);
317
                 }
317
                 }
318
             }
318
             }
319
+        }
320
+        StylusPointCollection stylusPoints = new StylusPointCollection();
321
+        StylusPoint stylusPoint = new StylusPoint();
322
+        Stroke stroke;
323
+        public void changepages(double _x, double _y, bool _new)
324
+        {
325
+            if (_new)
326
+            {
327
+                if(stroke!=null&&stroke.StylusPoints.Count > 1)
328
+                {
329
+                    m_canvas.Strokes.Add(stroke);
330
+                   
331
+                }
332
+            
333
+                stylusPoints = new StylusPointCollection();
334
+                stylusPoint = new StylusPoint();
335
+                //stroke = new Stroke(stylusPoints);
336
+                stroke=null;
337
+            }
338
+            else
339
+            {
340
+                //stylusPoints = new StylusPointCollection();
341
+                //stylusPoint = new StylusPoint();
342
+                stylusPoint.X = _x;
343
+                stylusPoint.Y = _y;
344
+                stylusPoints.Add(stylusPoint);
345
+                stroke = new Stroke(stylusPoints);
346
+            }
347
+           
348
+
349
+            //page.lines.Last().lines_curr.Add();
350
+            //if (stroke.StylusPoints.Count > 20)
351
+            //{
352
+              
353
+            
354
+
355
+
356
+
319
         }
357
         }
320
     }
358
     }
321
 }
359
 }

+ 1
- 1
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs View File

107
                 APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
107
                 APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
108
                 //APP.W_XHMicroLessonSystemWindow .Topmost = true;
108
                 //APP.W_XHMicroLessonSystemWindow .Topmost = true;
109
             }
109
             }
110
-            APP.W_XHMicroLessonSystemWindow.Show();
110
+            APP.W_XHMicroLessonSystemWindow.ShowDialog();
111
             this.Hide();
111
             this.Hide();
112
         }
112
         }
113
         /// <summary>
113
         /// <summary>

+ 19
- 18
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

7
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
7
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
8
         xmlns:local="clr-namespace:XHWK.WKTool"
8
         xmlns:local="clr-namespace:XHWK.WKTool"
9
         mc:Ignorable="d"
9
         mc:Ignorable="d"
10
-        Title="XHMicroLessonSystemWindow" Height="930" Width="1162.5" WindowStartupLocation="CenterOwner"
11
-    WindowStyle="None" Background="#EFF1F8"   AllowsTransparency="True" 
12
-    ShowInTaskbar="False">
10
+        Title="XHMicroLessonSystemWindow" Height="1040.8" Width="875" WindowStartupLocation="CenterScreen"
11
+    WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8"
12
+   >
13
+    
13
     <Viewbox>
14
     <Viewbox>
14
-        <Grid Height="930" Width="1162.5">
15
+        <Grid Height="1040.8" Width="875">
15
             <!--分3行-->
16
             <!--分3行-->
16
             <Grid.RowDefinitions>
17
             <Grid.RowDefinitions>
17
-                <RowDefinition Height="106"/>
18
+                <RowDefinition Height="94"/>
18
                 <RowDefinition Height="*"/>
19
                 <RowDefinition Height="*"/>
19
                 <RowDefinition Height="30"/>
20
                 <RowDefinition Height="30"/>
20
             </Grid.RowDefinitions>
21
             </Grid.RowDefinitions>
24
                     <RowDefinition Height="auto"/>
25
                     <RowDefinition Height="auto"/>
25
                 </Grid.RowDefinitions>
26
                 </Grid.RowDefinitions>
26
                 <!--第一行-->
27
                 <!--第一行-->
27
-                <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10,10,10,0">
28
+                <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="10,2,10,0">
28
                     <Image Source="./Images/microLessonSystem_0.png"/>
29
                     <Image Source="./Images/microLessonSystem_0.png"/>
29
                     <TextBlock Text="星火微课系统" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
30
                     <TextBlock Text="星火微课系统" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
30
                 </StackPanel>
31
                 </StackPanel>
31
-                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,10,10,0">
32
+                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Right" Margin="10,2,10,0">
32
                     <Button Cursor="Hand" x:Name="btnLoginType" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnLoginType_Click">
33
                     <Button Cursor="Hand" x:Name="btnLoginType" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,10,0" Click="BtnLoginType_Click">
33
                         <StackPanel Orientation="Horizontal">
34
                         <StackPanel Orientation="Horizontal">
34
                             <Image Source="./Images/microLessonSystem_9.png"/>
35
                             <Image Source="./Images/microLessonSystem_9.png"/>
35
                             <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
36
                             <TextBlock x:Name="txbLoginType" Text="未登录" FontSize="14" Padding="5,0,0,0" Foreground="#FFFFFF"/>
36
                         </StackPanel>
37
                         </StackPanel>
37
                     </Button>
38
                     </Button>
38
-                    <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
39
+                    <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnShrink_Click">
39
                         <Image Source="./Images/microLessonSystem_19.png"/>
40
                         <Image Source="./Images/microLessonSystem_19.png"/>
40
                     </Button>
41
                     </Button>
41
                     <Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
42
                     <Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
46
                     </Button>
47
                     </Button>
47
                 </StackPanel>
48
                 </StackPanel>
48
                 <!--第二行-->
49
                 <!--第二行-->
49
-                <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,10,0,0">
50
+                <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,2,0,0">
50
                     <Button Cursor="Hand" x:Name="btnScreenRecording" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnScreenRecording_Click">
51
                     <Button Cursor="Hand" x:Name="btnScreenRecording" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnScreenRecording_Click">
51
                         <StackPanel Orientation="Vertical">
52
                         <StackPanel Orientation="Vertical">
52
                             <Image x:Name="ImgScreenRecording" Source="./Images/microLessonSystem_2.png"/>
53
                             <Image x:Name="ImgScreenRecording" Source="./Images/microLessonSystem_2.png"/>
122
                 </StackPanel>
123
                 </StackPanel>
123
             </Grid>
124
             </Grid>
124
             <!--主内容-->
125
             <!--主内容-->
125
-            <Grid Grid.Row="1" x:Name="GridMain"  Margin="20,0,20,0" Background="#FFFFFF" Height="793.700787401575" Width="1142.51968503937" Visibility="Visible">
126
+            <Grid Grid.Row="1" x:Name="GridMain"  Margin="0,0,0,0" Background="#FFFFFF" Width="635" Height="914" Visibility="Visible">
126
                 <Label Content="" Grid.Column="0" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
127
                 <Label Content="" Grid.Column="0" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
127
                 <Grid>
128
                 <Grid>
128
                     <Border Grid.Row="1"  CornerRadius="5">
129
                     <Border Grid.Row="1"  CornerRadius="5">
152
                 <!--<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">
153
                 <!--<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">
153
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
154
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
154
                 </wfi:WindowsFormsHost>-->
155
                 </wfi:WindowsFormsHost>-->
155
-                <Image x:Name="imgPlayer" Width="172" Height="124"  HorizontalAlignment="Right" Margin="0,10,30.10,0" VerticalAlignment="Top"/>
156
+                <Image x:Name="imgPlayer" Width="172" Height="124"  HorizontalAlignment="Right" Margin="0,7,10,0" VerticalAlignment="Top" Visibility="Collapsed"/>
156
                 <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Right"
157
                 <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Right"
157
-            Height="58" Margin="0,718,50,0" Grid.Column="1">
158
+            Height="58" Margin="0,830,20,0" Grid.Column="1">
158
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
159
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
159
                     x:Name="last_button"
160
                     x:Name="last_button"
160
                     Width="60"
161
                     Width="60"
198
                     </Button>
199
                     </Button>
199
                 </StackPanel>
200
                 </StackPanel>
200
 
201
 
201
-                <Label Content="" Grid.Column="1" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,21,0"/>
202
-                <Label Content="" Grid.Column="1" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,21,0"/>
202
+                <Label Content="" Grid.Column="1" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,2,0"/>
203
+                <Label Content="" Grid.Column="1" Height="1" Width="1" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,2,0"/>
203
             </Grid>
204
             </Grid>
204
             <!--设置-->
205
             <!--设置-->
205
             <Grid Grid.Row="1" x:Name="gridSetUp" Margin="20,0,20,0" Background="#FFFFFF" Visibility="Collapsed">
206
             <Grid Grid.Row="1" x:Name="gridSetUp" Margin="20,0,20,0" Background="#FFFFFF" Visibility="Collapsed">
215
                 </Grid.RowDefinitions>
216
                 </Grid.RowDefinitions>
216
                 <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
217
                 <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
217
                     <TextBlock Text="   点阵笔" FontSize="16" Foreground="#2D8CF0"/>
218
                     <TextBlock Text="   点阵笔" FontSize="16" Foreground="#2D8CF0"/>
218
-                    <TextBlock Text="未连接" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
219
+                    <TextBlock x:Name="txbNotConnecteds"  Text="未连接" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
219
                 </StackPanel>
220
                 </StackPanel>
220
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
221
                 <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
221
                     <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0"/>
222
                     <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0"/>
239
                     <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Foreground="#2D8CF0" Padding="2,36,10,0"/>
240
                     <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Foreground="#2D8CF0" Padding="2,36,10,0"/>
240
                     <!--输入框-->
241
                     <!--输入框-->
241
                     <Border Background="#CDD6E0" Width="525" Height="43" CornerRadius="3">
242
                     <Border Background="#CDD6E0" Width="525" Height="43" CornerRadius="3">
242
-                        <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="523" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
243
+                        <Label x:Name="txbStoragePath" Content="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="523" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
243
                     </Border>
244
                     </Border>
244
                     <!--浏览按钮-->
245
                     <!--浏览按钮-->
245
-                    <Button Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
246
+                    <Button Cursor="Hand" x:Name="btnBrowse" Content="打开" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
246
                         <Button.Template>
247
                         <Button.Template>
247
                             <ControlTemplate TargetType="{x:Type Button}">
248
                             <ControlTemplate TargetType="{x:Type Button}">
248
                                 <Border
249
                                 <Border
285
                     </Button.Template>
286
                     </Button.Template>
286
                 </Button>
287
                 </Button>
287
             </Grid>
288
             </Grid>
288
-            <Grid Grid.Row="2">
289
+            <Grid Grid.Row="2" Background="#EFF1F8">
289
                 <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
290
                 <StackPanel Orientation="Horizontal" Margin="0,5,0,0">
290
                     <TextBlock Text="颜色:" FontSize="14" Padding="5,5,0,0"/>
291
                     <TextBlock Text="颜色:" FontSize="14" Padding="5,5,0,0"/>
291
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click"/>
292
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click"/>

+ 89
- 50
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

64
             APP.pageData.currpage = 1;
64
             APP.pageData.currpage = 1;
65
             DataContext = APP.pageData;
65
             DataContext = APP.pageData;
66
 
66
 
67
-            txbStoragePath.Text = FileToolsCommon.GetConfigValue("VideoType");
67
+            txbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoType");
68
             if (FileToolsCommon.GetConfigValue("IsSound").Equals("true"))
68
             if (FileToolsCommon.GetConfigValue("IsSound").Equals("true"))
69
             {
69
             {
70
                 rbnY.IsChecked = true;
70
                 rbnY.IsChecked = true;
73
             {
73
             {
74
                 rbnN.IsChecked = true;
74
                 rbnN.IsChecked = true;
75
             }
75
             }
76
-            txbStoragePath.Text = FileToolsCommon.GetConfigValue("VideoSavePath");
76
+            txbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoSavePath");
77
             Initialize();
77
             Initialize();
78
             InitPen();
78
             InitPen();
79
         }
79
         }
134
             if (CameraHelper.CameraDevices.Count > 0)
134
             if (CameraHelper.CameraDevices.Count > 0)
135
             {
135
             {
136
                 CameraHelper.SetCameraDevice(0);
136
                 CameraHelper.SetCameraDevice(0);
137
-                //wfhCamera.Visibility = Visibility.Hidden;
137
+                imgPlayer.Visibility = Visibility.Visible;
138
                 RbnOpen = new List<string>();
138
                 RbnOpen = new List<string>();
139
                 times = new System.Timers.Timer(200);//设置执行一次(false)还是一直执行(true)
139
                 times = new System.Timers.Timer(200);//设置执行一次(false)还是一直执行(true)
140
                 times.AutoReset = true;//设置是否执行System.Timers.Timer.Elapsed事件
140
                 times.AutoReset = true;//设置是否执行System.Timers.Timer.Elapsed事件
143
 
143
 
144
                 IsRbnOpen = true;
144
                 IsRbnOpen = true;
145
             }
145
             }
146
-
147
-        
148
         }
146
         }
149
 
147
 
150
-
151
         int I = 9999;
148
         int I = 9999;
152
         private void Times_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
149
         private void Times_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
153
         {
150
         {
157
                 {
154
                 {
158
                     Dispatcher.Invoke(() =>
155
                     Dispatcher.Invoke(() =>
159
                     {
156
                     {
160
-                        if(I>10006)
157
+                        if(I>10010)
161
                         {
158
                         {
159
+                            long time = Timestamp();
162
                             //string FilePathName = ImgPath + RsImgName.Count + ".png";
160
                             //string FilePathName = ImgPath + RsImgName.Count + ".png";
163
-                            string path = CameraHelper.CaptureImage(@"G:\103", I.ToString());
161
+                            string path = CameraHelper.CaptureImage(@"G:\103", time.ToString());
164
                             if (!string.IsNullOrWhiteSpace(path))
162
                             if (!string.IsNullOrWhiteSpace(path))
165
                             {
163
                             {
166
                                 RbnOpen.Add(path);
164
                                 RbnOpen.Add(path);
167
                                 imgPlayer.Source = new BitmapImage(new Uri(path));
165
                                 imgPlayer.Source = new BitmapImage(new Uri(path));
168
                             }
166
                             }
169
                         }
167
                         }
170
-                     
171
                         I++;
168
                         I++;
172
                     });
169
                     });
173
                 }
170
                 }
185
         private void RbnTurnOff_Click(object sender, RoutedEventArgs e)
182
         private void RbnTurnOff_Click(object sender, RoutedEventArgs e)
186
         {
183
         {
187
             IsRbnOpen = false;
184
             IsRbnOpen = false;
188
-            //wfhCamera.Visibility = Visibility.Hidden;
185
+            imgPlayer.Visibility = Visibility.Hidden;
189
             CameraHelper.CloseDevice();
186
             CameraHelper.CloseDevice();
187
+            I = 9999;
190
         } 
188
         } 
191
         #endregion
189
         #endregion
192
         #endregion
190
         #endregion
255
         /// <param name="e"></param>
253
         /// <param name="e"></param>
256
         private void BtnSave_Click(object sender, RoutedEventArgs e)
254
         private void BtnSave_Click(object sender, RoutedEventArgs e)
257
         {
255
         {
258
-            #region 合法性判断
259
-            if (string.IsNullOrWhiteSpace(txbStoragePath.Text.Trim()))
260
-            {
261
-                System.Windows.MessageBox.Show("路径不可为空!");
262
-                return;
263
-            }
264
-            string temp = FileToolsCommon.GetLegalPath(txbStoragePath.Text) + APP.WKData.WkName.Trim() + "/";
265
-            if (!APP.WKData.WkPath.Equals(temp))
266
-            {
267
-                APP.WKData.WkPath = FileToolsCommon.GetLegalPath(txbStoragePath.Text) + APP.WKData.WkName.Trim() + "/";
268
-                if (FileToolsCommon.IsExistDirectory(APP.WKData.WkPath))
269
-                {
270
-                    //微课已存在
271
-                    MessageBoxResult dr = System.Windows.MessageBox.Show("讲解已存在是否覆盖?", "提示", MessageBoxButton.OKCancel);
272
-                    if (dr == MessageBoxResult.OK)
273
-                    {
274
-                        FileToolsCommon.DeleteDirectory(APP.WKData.WkPath);
275
-                    }
276
-                    else
277
-                    {
278
-                        return;
279
-                    }
280
-                }
281
-                //创建文件夹
282
-                FileToolsCommon.CreateDirectory(APP.WKData.WkPath);
283
-            }
284
-            #endregion
256
+            //#region 合法性判断
257
+            //if (string.IsNullOrWhiteSpace(txbStoragePath.Text.Trim()))
258
+            //{
259
+            //    System.Windows.MessageBox.Show("路径不可为空!");
260
+            //    return;
261
+            //}
262
+            //string temp = FileToolsCommon.GetLegalPath(txbStoragePath.Text) + APP.WKData.WkName.Trim() + "/";
263
+            //if (!APP.WKData.WkPath.Equals(temp))
264
+            //{
265
+            //    APP.WKData.WkPath = FileToolsCommon.GetLegalPath(txbStoragePath.Text) + APP.WKData.WkName.Trim() + "/";
266
+            //    if (FileToolsCommon.IsExistDirectory(APP.WKData.WkPath))
267
+            //    {
268
+            //        //微课已存在
269
+            //        MessageBoxResult dr = System.Windows.MessageBox.Show("讲解已存在是否覆盖?", "提示", MessageBoxButton.OKCancel);
270
+            //        if (dr == MessageBoxResult.OK)
271
+            //        {
272
+            //            FileToolsCommon.DeleteDirectory(APP.WKData.WkPath);
273
+            //        }
274
+            //        else
275
+            //        {
276
+            //            return;
277
+            //        }
278
+            //    }
279
+            //    //创建文件夹
280
+            //    FileToolsCommon.CreateDirectory(APP.WKData.WkPath);
281
+            //}
282
+            //#endregion
285
 
283
 
286
 
284
 
287
             if (rbnMP4.IsChecked == true)
285
             if (rbnMP4.IsChecked == true)
317
         {
315
         {
318
             GridMain.Visibility = Visibility.Collapsed;
316
             GridMain.Visibility = Visibility.Collapsed;
319
             gridSetUp.Visibility = Visibility.Visible;
317
             gridSetUp.Visibility = Visibility.Visible;
318
+            txbStoragePath.Content = APP.WKData.WkPath;
320
         }
319
         }
321
         /// <summary>
320
         /// <summary>
322
         /// 设置 浏览事件
321
         /// 设置 浏览事件
325
         /// <param name="e"></param>
324
         /// <param name="e"></param>
326
         private void BtnBrowse_Click(object sender, RoutedEventArgs e)
325
         private void BtnBrowse_Click(object sender, RoutedEventArgs e)
327
         {
326
         {
328
-            string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
329
-            Ofd = new System.Windows.Forms.FolderBrowserDialog();
330
 
327
 
331
-            Result = Ofd.ShowDialog();
332
-            if (Result == System.Windows.Forms.DialogResult.OK)
333
-            {
334
-                if (Ofd.SelectedPath != "")
335
-                {
336
-                    txbStoragePath.Text = Ofd.SelectedPath;
337
-                    //string ApplicationData = ZConfig.dataPath + "fileStorageAddress.txt";
338
-                    //string temp = ofd.SelectedPath;
339
-                    //System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
340
-                }
341
-            }
328
+
329
+            System.Diagnostics.Process.Start(APP.WKData.WkPath);
330
+            //string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
331
+            //Ofd = new System.Windows.Forms.FolderBrowserDialog();
332
+
333
+            //Result = Ofd.ShowDialog();
334
+            //if (Result == System.Windows.Forms.DialogResult.OK)
335
+            //{
336
+            //    if (Ofd.SelectedPath != "")
337
+            //    {
338
+
339
+
340
+            //        //txbStoragePath.Text = Ofd.SelectedPath;
341
+            //        //string ApplicationData = ZConfig.dataPath + "fileStorageAddress.txt";
342
+            //        //string temp = ofd.SelectedPath;
343
+            //        //System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
344
+            //    }
345
+            //}
342
         }
346
         }
343
         /// <summary>
347
         /// <summary>
344
         /// 画笔颜色事件 白色
348
         /// 画笔颜色事件 白色
1439
                 //labPenStatus.Text = "PenDown";
1443
                 //labPenStatus.Text = "PenDown";
1440
                 isPenDown = true;
1444
                 isPenDown = true;
1441
             }
1445
             }
1446
+            //myblackboard.changepages(0, 0, true);
1442
         }
1447
         }
1443
 
1448
 
1444
         /// <summary>
1449
         /// <summary>
1469
                 //}
1474
                 //}
1470
                 stroke.Clear();
1475
                 stroke.Clear();
1471
             }
1476
             }
1477
+            Dispatcher.Invoke(new Action(() =>
1478
+            {
1479
+                myblackboard.changepages(0, 0, true);
1480
+            }));
1481
+          
1472
         }
1482
         }
1473
 
1483
 
1474
         /// <summary>
1484
         /// <summary>
1488
             {
1498
             {
1489
                 APP.PenSerial = penSerial;
1499
                 APP.PenSerial = penSerial;
1490
                 APP.PenStatus = false;
1500
                 APP.PenStatus = false;
1501
+           
1502
+                Dispatcher.Invoke(new Action(() =>
1503
+                {
1504
+                    txbNotConnected.Text = "未连接";
1505
+                    txbNotConnecteds.Text = "未连接";
1506
+                }));
1491
             }
1507
             }
1492
         }
1508
         }
1493
 
1509
 
1514
 
1530
 
1515
                 //开始接收笔数据
1531
                 //开始接收笔数据
1516
                 APP.digitalPen.GetPenData(penSerial);
1532
                 APP.digitalPen.GetPenData(penSerial);
1533
+                Dispatcher.Invoke(new Action(() =>
1534
+                {
1535
+                    txbNotConnected.Text = "已连接";
1536
+                    txbNotConnecteds.Text = "已连接";
1537
+                }));
1538
+              
1517
             }
1539
             }
1518
         }
1540
         }
1519
         /// <summary>
1541
         /// <summary>
1589
                 double testY=(double)cy * PropH;
1611
                 double testY=(double)cy * PropH;
1590
                 //pageSerial //点阵IP地址  与打印的页面关联
1612
                 //pageSerial //点阵IP地址  与打印的页面关联
1591
 
1613
 
1614
+                Dispatcher.Invoke(new Action(() =>
1615
+                {
1616
+                    myblackboard.changepages(testX, testY,false);
1617
+                }));
1592
 
1618
 
1619
+             
1593
                 ////每3个点画一条曲线
1620
                 ////每3个点画一条曲线
1594
                 //if (stroke.Count % 3 == 0)
1621
                 //if (stroke.Count % 3 == 0)
1595
                 //{
1622
                 //{
1654
                 APP.digitalPen.SetPenHoverMode(false, penSerial);
1681
                 APP.digitalPen.SetPenHoverMode(false, penSerial);
1655
         }
1682
         }
1656
         #endregion
1683
         #endregion
1684
+        /// <summary>
1685
+        /// 最小化
1686
+        /// </summary>
1687
+        /// <param name="sender"></param>
1688
+        /// <param name="e"></param>
1689
+        private void BtnShrink_Click(object sender, RoutedEventArgs e)
1690
+        {
1691
+            if(Visibility== Visibility.Hidden)
1692
+            Visibility = Visibility.Visible;
1693
+            else
1694
+                Visibility = Visibility.Hidden;
1695
+        }
1657
     }
1696
     }
1658
 }
1697
 }

Loading…
Cancel
Save