Преглед на файлове

已知BUG修复。版本1.1.4

tags/录制修改前
zhangxueyang преди 4 години
родител
ревизия
b050bfc09f

+ 2
- 2
XHWK.Model/Properties/AssemblyInfo.cs Целия файл

@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
31 31
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
32 32
 //通过使用 "*",如下所示:
33 33
 // [assembly: AssemblyVersion("1.0.*")]
34
-[assembly: AssemblyVersion("1.1.3.0")]
35
-[assembly: AssemblyFileVersion("1.1.3.0")]
34
+[assembly: AssemblyVersion("1.1.4.0")]
35
+[assembly: AssemblyFileVersion("1.1.4.0")]

+ 3
- 2
XHWK.WKTool/App.config Целия файл

@@ -4,6 +4,7 @@
4 4
         <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
5 5
     </startup>
6 6
   <appSettings>
7
+    <!--0正式1测试-->
7 8
     <add key="IsDebug" value="1"/>
8 9
     <!--图片压缩等级-->
9 10
     <add key="ImageCompressionLevel" value="30" />
@@ -32,7 +33,7 @@
32 33
     <!--上传每片大小 Mb-->
33 34
     <add key="UploadSliceLen" value="1"/>
34 35
     <!--版本号-->
35
-    <add key="VersionCode" value="14"/>
36
-    <add key="VersionName" value="1.1.3"/>
36
+    <add key="VersionCode" value="15"/>
37
+    <add key="VersionName" value="1.1.4"/>
37 38
   </appSettings>
38 39
 </configuration>

+ 1
- 0
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs Целия файл

@@ -26,6 +26,7 @@ namespace XHWK.WKTool
26 26
         public CreateAMicroLessonWindow()
27 27
         {
28 28
             InitializeComponent();
29
+            this.ResizeMode = ResizeMode.NoResize;
29 30
             if (!APP.CheckScreenCapturerRecorder())
30 31
             {
31 32
                 MessageWindow.Show("首次运行需安装环境,请在确定后依次点击“OK-Next>-Next>Install”完成安装!");

Двоични данни
XHWK.WKTool/Images/Toobar30.png Целия файл


+ 2
- 1
XHWK.WKTool/PracticeWindow.xaml.cs Целия файл

@@ -385,7 +385,8 @@ namespace XHWK.WKTool
385 385
             {
386 386
                 APP.W_ScreenRecordingToolbarWindow.flg = 1;
387 387
             }
388
-            Hide();
388
+            APP.W_ScreenRecordingToolbarWindow.ReturnPractice();
389
+            //Hide();
389 390
         }
390 391
     }
391 392
 }

+ 1
- 1
XHWK.WKTool/PrintWindow.xaml Целия файл

@@ -111,7 +111,7 @@
111 111
             VerticalAlignment="Center"
112 112
             Background="#FAFAFA"
113 113
             CornerRadius="4"
114
-            Visibility="Visible">
114
+            Visibility="Collapsed">
115 115
             <Grid>
116 116
 
117 117
                 <ProgressBar BorderBrush="#4597FF"

+ 147
- 37
XHWK.WKTool/PrintWindow.xaml.cs Целия файл

@@ -94,10 +94,16 @@ namespace XHWK.WKTool
94 94
                 MessageWindow.Show("打印机不能为空!");
95 95
                 return;
96 96
             }
97
-            I = 1;
98 97
             APP.myloading.Show();
99
-            tip_outer.Visibility = Visibility.Visible;
100
-            Thread.Sleep(2000);
98
+            APP.BackgroundWorkerHelper.RunWorkerAsync(InvokeServering, InvokeServerCompate);
99
+
100
+
101
+
102
+
103
+            //I = 1;
104
+            //APP.myloading.Show();
105
+            //tip_outer.Visibility = Visibility.Visible;
106
+            //Thread.Sleep(2000);
101 107
             //Times();
102 108
             //Dispatcher.Invoke(() =>
103 109
             //{
@@ -114,6 +120,90 @@ namespace XHWK.WKTool
114 120
 
115 121
 
116 122
 
123
+            //string imgPath = FileToolsCommon.GetFileAbsolutePath("temp");
124
+            //FileToolsCommon.CreateFile(imgPath);
125
+            //string pdf = imgPath + "\\101.pdf";
126
+            //string tpf = imgPath + "\\102.TPF";
127
+            //string msg = string.Empty;
128
+            //string outPut = string.Empty;
129
+            ////if(rbnSquarePoint.IsChecked==false)
130
+            ////{
131
+            ////    pyte = 1;
132
+            ////}
133
+            //LatticeFileHelper.GeneratingPDF(pdf, tpf, out int pr, out msg, out outPut/*, pyte*/);
134
+            //if (pr == 0)
135
+            //{
136
+            //    //outPut = outPut.Replace("[", "").Replace("]", "").Replace("\"", "").Trim();
137
+            //    //APP.OutPut = outPut.Split(',');
138
+            //    //string []page= outPut.Split(',');
139
+            //    //for(int i=0;i<page.Length;i++) //增加页码编号
140
+            //    //{
141
+            //    //    APP.PageDrawList[i].PageCode = page[i];
142
+            //    //}
143
+
144
+            //    //string defa = string.Empty;
145
+            //    //List<string> defaList = LatticeFileHelper.GetPrinterList(out defa);
146
+
147
+            //    string standardError = string.Empty;
148
+            //    string standardOutput = string.Empty;
149
+            //    int frequency = Convert.ToInt32(txbNumberOfCopies.Text);
150
+            //    //for (int i=0;i< frequency;i++)
151
+            //    //{
152
+            //    LatticeFileHelper.PrinterTPFFile(tpf, frequency, cmbClass.Text, out int printResult, out standardError, out standardOutput);
153
+            //    //}
154
+            //    if (printResult == 0)// 0为成功
155
+            //    {
156
+            //        new Thread(new ThreadStart(new Action(() =>
157
+            //        {
158
+            //            Dispatcher.Invoke(() =>
159
+            //            {
160
+            //                I = 100;
161
+            //                pgbProcess.Value = I * 100 / 100;
162
+            //                lbProcess.Content = string.Format("{0}/{1}", I, 100);
163
+            //                APP.myloading.Hide();
164
+            //                I = 0;
165
+            //            });
166
+            //            Thread.Sleep(2000);
167
+            //            Dispatcher.Invoke(() =>
168
+            //            {
169
+            //                //tip_outer.Visibility = Visibility.Collapsed;
170
+            //                MessageWindow.Show("打印成功");
171
+            //            });
172
+            //        }))).Start();
173
+
174
+
175
+                   
176
+                    
177
+                  
178
+            //    }
179
+            //    else
180
+            //    {
181
+            //        APP.myloading.Hide();
182
+            //        MessageWindow.Show(standardError);
183
+            //    }
184
+            //}
185
+            //else
186
+            //{
187
+            //    APP.myloading.Hide();
188
+            //    MessageWindow.Show(msg);
189
+            //}
190
+        }
191
+        /// <summary>
192
+        /// 打印-开始
193
+        /// </summary>
194
+        /// <returns></returns>
195
+        private object InvokeServering()
196
+        {
197
+            Dispatcher.Invoke(() =>
198
+                       {
199
+                           I = 1;
200
+                           pgbProcess.Value = I * 100 / 100;
201
+                           lbProcess.Content = string.Format("{0}/{1}", I, 100);
202
+                           tip_outer.Visibility = Visibility.Visible;
203
+                           //I = 0;
204
+                       });
205
+            Thread.Sleep(2000);
206
+
117 207
             string imgPath = FileToolsCommon.GetFileAbsolutePath("temp");
118 208
             FileToolsCommon.CreateFile(imgPath);
119 209
             string pdf = imgPath + "\\101.pdf";
@@ -140,47 +230,54 @@ namespace XHWK.WKTool
140 230
 
141 231
                 string standardError = string.Empty;
142 232
                 string standardOutput = string.Empty;
143
-                int frequency = Convert.ToInt32(txbNumberOfCopies.Text);
144
-                //for (int i=0;i< frequency;i++)
145
-                //{
146
-                LatticeFileHelper.PrinterTPFFile(tpf, frequency, cmbClass.Text, out int printResult, out standardError, out standardOutput);
147
-                //}
148
-                if (printResult == 0)// 0为成功
233
+                int frequency = 1;
234
+                Dispatcher.Invoke(() =>
149 235
                 {
150
-                    new Thread(new ThreadStart(new Action(() =>
236
+                     frequency = Convert.ToInt32(txbNumberOfCopies.Text);
237
+                    LatticeFileHelper.PrinterTPFFile(tpf, frequency, cmbClass.Text, out int printResult, out standardError, out standardOutput);
238
+                    if (printResult == 0)// 0为成功
151 239
                     {
152
-                        Dispatcher.Invoke(() =>
153
-                        {
154
-                            I = 100;
155
-                            pgbProcess.Value = I * 100 / 100;
156
-                            lbProcess.Content = string.Format("{0}/{1}", I, 100);
157
-                            APP.myloading.Hide();
158
-                            I = 0;
159
-                        });
160
-                        Thread.Sleep(2000);
161
-                        Dispatcher.Invoke(() =>
240
+                        new Thread(new ThreadStart(new Action(() =>
162 241
                         {
163
-                            //tip_outer.Visibility = Visibility.Collapsed;
164
-                            MessageWindow.Show("打印成功");
165
-                        });
166
-                    }))).Start();
167
-
168
-
169
-                   
170
-                    
171
-                  
172
-                }
173
-                else
174
-                {
175
-                    APP.myloading.Hide();
176
-                    MessageWindow.Show(standardError);
177
-                }
242
+                            Dispatcher.Invoke(() =>
243
+                            {
244
+                                I = 100;
245
+                                pgbProcess.Value = I * 100 / 100;
246
+                                lbProcess.Content = string.Format("{0}/{1}", I, 100);
247
+                                APP.myloading.Hide();
248
+                                I = 0;
249
+                            });
250
+                            Thread.Sleep(3000);
251
+                            Dispatcher.Invoke(() =>
252
+                            {
253
+                                tip_outer.Visibility = Visibility.Collapsed;
254
+                                //tip_outer.Visibility = Visibility.Collapsed;
255
+                                MessageWindow.Show("打印成功");
256
+                            });
257
+                        }))).Start();
258
+                    }
259
+                    else
260
+                    {
261
+                        APP.myloading.Hide();
262
+                        MessageWindow.Show(standardError);
263
+                    }
264
+                });
265
+             
178 266
             }
179 267
             else
180 268
             {
181 269
                 APP.myloading.Hide();
182 270
                 MessageWindow.Show(msg);
183 271
             }
272
+            return "";
273
+        }
274
+        /// <summary>
275
+        /// 打印-结束
276
+        /// </summary>
277
+        /// <returns></returns>
278
+        public void InvokeServerCompate(object obj)
279
+        {
280
+            APP.myloading.Hide();
184 281
         }
185 282
         /// <summary>
186 283
         /// 时钟回调
@@ -211,13 +308,21 @@ namespace XHWK.WKTool
211 308
             }
212 309
 
213 310
             string time = string.Format("{0:D2}:{1:D2}",/* _timeSpan.Hours,*/ _timeSpan.Minutes, _timeSpan.Seconds);
214
-            if(I <= 90 && I != 0)
311
+            if(I < 90 && I != 0)
215 312
             {
216 313
                 Dispatcher.Invoke(() =>
217 314
                 {
315
+                 
218 316
                     pgbProcess.Value = I * 100 / 100;
219 317
             lbProcess.Content = string.Format("{0}/{1}", I, 100);
220
-            I++;
318
+                    if (I == 1)
319
+                    {
320
+                        I = 30;
321
+                    }
322
+                    else
323
+                    {
324
+                        I += 30;
325
+                    }
221 326
                 });
222 327
             }
223 328
         }
@@ -301,5 +406,10 @@ namespace XHWK.WKTool
301 406
                 txbNumberOfCopies.Text = num.ToString();
302 407
             }
303 408
         }
409
+
410
+        private void Window_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
411
+        {
412
+
413
+        }
304 414
     }
305 415
 }

+ 18
- 5
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs Целия файл

@@ -409,13 +409,13 @@ namespace XHWK.WKTool
409 409
                 IsSuspend = true;
410 410
                 ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar26.png"));//大圆圈三角形
411 411
                 BtnStopRecordingScreen.IsEnabled = false; //停止录制按钮不点击
412
-                imgBlackPenOne.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
413
-                btnBlackPenOne.IsEnabled = false;//蓝笔不可点击
414
-                imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
415
-                btnBlackPenTwo.IsEnabled = false;//红笔不可点击
412
+                //imgBlackPenOne.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
413
+                //btnBlackPenOne.IsEnabled = false;//蓝笔不可点击
414
+                //imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
415
+                //btnBlackPenTwo.IsEnabled = false;//红笔不可点击
416 416
                 txbTime.Visibility = Visibility.Hidden;//时间不显示
417 417
                 imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar29.png"));
418
-                //btnReturn.IsEnabled = true;//返回主界面可点击
418
+                btnReturn.IsEnabled = true;//返回主界面可点击
419 419
                 #region 2秒内不可点击
420 420
                 new Thread(new ThreadStart(new Action(() =>
421 421
                 {
@@ -1005,5 +1005,18 @@ namespace XHWK.WKTool
1005 1005
             APP.W_XHMicroLessonSystemWindow.Show();
1006 1006
             Hide();
1007 1007
         }
1008
+        /// <summary>
1009
+        /// 批注退出
1010
+        /// </summary>
1011
+        public void ReturnPractice()
1012
+        {
1013
+            Dispatcher.Invoke(() =>
1014
+            {
1015
+                borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
1016
+                borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
1017
+            });
1018
+            flg = 0;
1019
+            APP.W_PracticeWindow.Hide();
1020
+        }
1008 1021
     }
1009 1022
 }

+ 7
- 7
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Целия файл

@@ -9,7 +9,7 @@
9 9
         xmlns:local="clr-namespace:XHWK.WKTool"
10 10
         mc:Ignorable="d"
11 11
         Title="星火微课系统" Height="1036" Width="1290" 
12
-    WindowStyle="None"  WindowStartupLocation="CenterScreen"  AllowsTransparency="True"  Background="Transparent"    ShowInTaskbar="True" ResizeMode="CanMinimize" BorderThickness="7">
12
+    WindowStyle="None"  WindowStartupLocation="CenterScreen"  AllowsTransparency="True"  Background="Transparent"    ShowInTaskbar="True" ResizeMode="CanMinimize" BorderThickness="7" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
13 13
     <Window.Effect>
14 14
         <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
15 15
     </Window.Effect>
@@ -277,9 +277,9 @@
277 277
             </Grid>
278 278
 
279 279
         <!--主内容-->
280
-        <Grid Grid.Row="1" x:Name="GridMain" Visibility="Visible">
281
-            <ScrollViewer x:Name="scroMain" VerticalScrollBarVisibility="Visible">
282
-                <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Visibility="Visible" Height="1780">
280
+            <Grid Grid.Row="1" x:Name="GridMain" Visibility="Visible" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
281
+                <ScrollViewer x:Name="scroMain" VerticalScrollBarVisibility="Visible" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
282
+                    <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Visibility="Visible" Height="1780" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
283 283
                     <Grid>
284 284
                         <Border Grid.Row="1"  CornerRadius="5">
285 285
                             <Grid x:Name="IMG" Margin="0,0,0,0">
@@ -315,7 +315,7 @@
315 315
 
316 316
                     <!--导入图片-->
317 317
                     <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
318
-                    <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
318
+                        <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2"/>
319 319
 
320 320
 
321 321
                     <!--摄像头-->
@@ -339,7 +339,7 @@
339 339
             <!--<TextBlock x:Name="txbTime" Text="123456" FontSize="20" Foreground="#000000" Margin="0,0,0,10" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>-->
340 340
         </Grid>
341 341
         <!--页码-->
342
-        <Grid Grid.Row="1" x:Name="gridPage" Visibility="Collapsed">
342
+            <Grid Grid.Row="1" x:Name="gridPage" Visibility="Collapsed" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
343 343
             <StackPanel Grid.Row="0" Orientation="Horizontal" Background="Transparent" Width="180" HorizontalAlignment="Center"
344 344
             Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
345 345
                 <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
@@ -352,7 +352,7 @@
352 352
                         </StackPanel>
353 353
                     </Button.Content>
354 354
                 </Button>
355
-                <Grid Width="60"  Background="Transparent">
355
+                    <Grid Width="60"  Background="Transparent" MouseLeftButtonDown="Window_MouseLeftButtonDown_1">
356 356
                     <Grid.RowDefinitions>
357 357
                         <RowDefinition Height="311*"/>
358 358
                         <RowDefinition Height="483*"/>

+ 162
- 157
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Целия файл

@@ -564,124 +564,131 @@ namespace XHWK.WKTool
564 564
         /// <param name="e"></param>
565 565
         private void BtnSave_Click(object sender, RoutedEventArgs e)
566 566
         {
567
-            ImgRecord.Visibility = Visibility.Visible;//设置结束时可录制
568
-            ImgRecordTwo.Visibility = Visibility.Collapsed;//设置结束时可录制
569
-            BtnRecord.IsEnabled = true;//设置结束时可录制
570
-
571
-            if (!string.IsNullOrWhiteSpace(txbInterfaceAddress.Text))
572
-            {
573
-                string ApplicationData = APP.dataPath + "interfaceAddress.txt";
574
-                string temp = "http://" + txbInterfaceAddress.Text;
575
-                System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
576
-            }
577
-            else
578
-            {
579
-                MessageWindow.Show("接口地址未输入");
580
-                return;
581
-            }
582
-            if (!string.IsNullOrWhiteSpace(txbImageUploadAddress.Text))//图片上传地址
583
-            {
584
-                string ApplicationData = APP.dataPath + "imageUploadAddress.txt";
585
-                string temp = "http://" + txbImageUploadAddress.Text + "/";
586
-                System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
587
-            }
588
-            else
589
-            {
590
-                MessageWindow.Show("上传地址未输入");
591
-                return;
592
-            }
593
-            if (!string.IsNullOrWhiteSpace(txbPictureShowsAddress.Text))
594
-            {
595
-                string ApplicationData = APP.dataPath + "pictureShowsAddress.txt";
596
-                string temp = "http://" + txbPictureShowsAddress.Text + "/static/";
597
-                System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
598
-            }
599
-            else
600
-            {
601
-                MessageWindow.Show("下载地址未输入");
602
-                return;
603
-            }
604
-            if (!APP.apiUrl.Equals("http://" + txbInterfaceAddress.Text))
567
+            try
605 568
             {
606
-                APP.apiUrl = "http://" + txbInterfaceAddress.Text;
607
-              
608
-                if(!txbLoginType.Text.Equals("未登录"))
569
+                ImgRecord.Visibility = Visibility.Visible;//设置结束时可录制
570
+                ImgRecordTwo.Visibility = Visibility.Collapsed;//设置结束时可录制
571
+                BtnRecord.IsEnabled = true;//设置结束时可录制
572
+
573
+                if (!string.IsNullOrWhiteSpace(txbInterfaceAddress.Text))
609 574
                 {
610
-                    LoginType();
611
-                    MessageWindow.Show("接口地址已修改,请重新登陆!");
575
+                    string ApplicationData = APP.dataPath + "interfaceAddress.txt";
576
+                    string temp = "http://" + txbInterfaceAddress.Text;
577
+                    System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
612 578
                 }
613
-            }
614
-            if (!APP.uploadUrl.Equals(txbImageUploadAddress.Text))
615
-            {
616
-                APP.uploadUrl = "http://" + txbImageUploadAddress.Text + "/";
617
-            }
618
-            if (!APP.showImageUrl.Equals(txbPictureShowsAddress.Text))
619
-            {
620
-                APP.showImageUrl = "http://" + txbPictureShowsAddress.Text + "/static/";
621
-            }
622
-            if (rbnMP4.IsChecked == true)
623
-            {
624
-                //存储文件
625
-                FileToolsCommon.SetConfigValue("VideoType", "1");
626
-            }
627
-            else if (rbnFLV.IsChecked == true)
628
-            {
629
-                FileToolsCommon.SetConfigValue("VideoType", "2");
630
-            }
631
-            else
632
-            {
633
-                FileToolsCommon.SetConfigValue("VideoType", "3");
634
-            }
635
-            if (rbnY.IsChecked == true)
636
-            {
637
-                FileToolsCommon.SetConfigValue("IsSound", "true");
638
-            }
639
-            else
640
-            {
641
-                FileToolsCommon.SetConfigValue("IsSound", "false");
642
-            }
643
-            ///  < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
644
-            if (rbnRight.IsChecked == true)
645
-            {
646
-                FileToolsCommon.SetConfigValue("CameraPosition", "1");
647
-            }
648
-            else if (rbnLeft.IsChecked == true)
649
-            {
650
-                FileToolsCommon.SetConfigValue("CameraPosition", "2");
651
-            }
652
-            else if (rbnRightUnder.IsChecked == true)
653
-            {
654
-                FileToolsCommon.SetConfigValue("CameraPosition", "3");
655
-            }
656
-            else if (rbnLeftUnder.IsChecked == true)
657
-            {
658
-                FileToolsCommon.SetConfigValue("CameraPosition", "4");
659
-            }
579
+                else
580
+                {
581
+                    MessageWindow.Show("接口地址未输入");
582
+                    return;
583
+                }
584
+                if (!string.IsNullOrWhiteSpace(txbImageUploadAddress.Text))//图片上传地址
585
+                {
586
+                    string ApplicationData = APP.dataPath + "imageUploadAddress.txt";
587
+                    string temp = "http://" + txbImageUploadAddress.Text + "/";
588
+                    System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
589
+                }
590
+                else
591
+                {
592
+                    MessageWindow.Show("上传地址未输入");
593
+                    return;
594
+                }
595
+                if (!string.IsNullOrWhiteSpace(txbPictureShowsAddress.Text))
596
+                {
597
+                    string ApplicationData = APP.dataPath + "pictureShowsAddress.txt";
598
+                    string temp = "http://" + txbPictureShowsAddress.Text + "/static/";
599
+                    System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
600
+                }
601
+                else
602
+                {
603
+                    MessageWindow.Show("下载地址未输入");
604
+                    return;
605
+                }
606
+                if (!APP.apiUrl.Equals("http://" + txbInterfaceAddress.Text))
607
+                {
608
+                    APP.apiUrl = "http://" + txbInterfaceAddress.Text;
660 609
 
661
-            if (rbnMP4.IsChecked == true)
662
-            {
663
-                FileToolsCommon.SetConfigValue("VideoType", "1");
664
-            }
665
-            else if (rbnFLV.IsChecked == true)
666
-            {
667
-                FileToolsCommon.SetConfigValue("VideoType", "2");
668
-            }
669
-            else if (rbnAVI.IsChecked == true)
670
-            {
671
-                FileToolsCommon.SetConfigValue("VideoType", "3");
610
+                    if (!txbLoginType.Text.Equals("未登录"))
611
+                    {
612
+                        LoginType();
613
+                        MessageWindow.Show("接口地址已修改,请重新登陆!");
614
+                    }
615
+                }
616
+                if (!APP.uploadUrl.Equals(txbImageUploadAddress.Text))
617
+                {
618
+                    APP.uploadUrl = "http://" + txbImageUploadAddress.Text + "/";
619
+                }
620
+                if (!APP.showImageUrl.Equals(txbPictureShowsAddress.Text))
621
+                {
622
+                    APP.showImageUrl = "http://" + txbPictureShowsAddress.Text + "/static/";
623
+                }
624
+                if (rbnMP4.IsChecked == true)
625
+                {
626
+                    //存储文件
627
+                    FileToolsCommon.SetConfigValue("VideoType", "1");
628
+                }
629
+                else if (rbnFLV.IsChecked == true)
630
+                {
631
+                    FileToolsCommon.SetConfigValue("VideoType", "2");
632
+                }
633
+                else
634
+                {
635
+                    FileToolsCommon.SetConfigValue("VideoType", "3");
636
+                }
637
+                if (rbnY.IsChecked == true)
638
+                {
639
+                    FileToolsCommon.SetConfigValue("IsSound", "true");
640
+                }
641
+                else
642
+                {
643
+                    FileToolsCommon.SetConfigValue("IsSound", "false");
644
+                }
645
+                ///  < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
646
+                if (rbnRight.IsChecked == true)
647
+                {
648
+                    FileToolsCommon.SetConfigValue("CameraPosition", "1");
649
+                }
650
+                else if (rbnLeft.IsChecked == true)
651
+                {
652
+                    FileToolsCommon.SetConfigValue("CameraPosition", "2");
653
+                }
654
+                else if (rbnRightUnder.IsChecked == true)
655
+                {
656
+                    FileToolsCommon.SetConfigValue("CameraPosition", "3");
657
+                }
658
+                else if (rbnLeftUnder.IsChecked == true)
659
+                {
660
+                    FileToolsCommon.SetConfigValue("CameraPosition", "4");
661
+                }
662
+
663
+                if (rbnMP4.IsChecked == true)
664
+                {
665
+                    FileToolsCommon.SetConfigValue("VideoType", "1");
666
+                }
667
+                else if (rbnFLV.IsChecked == true)
668
+                {
669
+                    FileToolsCommon.SetConfigValue("VideoType", "2");
670
+                }
671
+                else if (rbnAVI.IsChecked == true)
672
+                {
673
+                    FileToolsCommon.SetConfigValue("VideoType", "3");
674
+                }
675
+                APP.CameraPosition = FileToolsCommon.GetConfigValue("CameraPosition");
676
+                GridMain.Visibility = Visibility.Visible;
677
+                gridSetUp.Visibility = Visibility.Collapsed;
678
+                imgPlayerRight.Visibility = Visibility.Collapsed;
679
+                imgPlayerLeft.Visibility = Visibility.Collapsed;
680
+                imgPlayerRightUnder.Visibility = Visibility.Collapsed;
681
+                imgPlayerLeftUnder.Visibility = Visibility.Collapsed;
682
+                if (!txbStoragePath.Content.ToString().Equals(APP.WKData.WkPath))
683
+                {
684
+                    //存储文件
685
+                    FileToolsCommon.SetConfigValue("VideoSavePath", txbStoragePath.Content.ToString());
686
+                    MessageWindow.Show("路径已变更,下次创建微课时自动生效!!!");
687
+                }
672 688
             }
673
-            APP.CameraPosition = FileToolsCommon.GetConfigValue("CameraPosition");
674
-            GridMain.Visibility = Visibility.Visible;
675
-            gridSetUp.Visibility = Visibility.Collapsed;
676
-            imgPlayerRight.Visibility = Visibility.Collapsed;
677
-            imgPlayerLeft.Visibility = Visibility.Collapsed;
678
-            imgPlayerRightUnder.Visibility = Visibility.Collapsed;
679
-            imgPlayerLeftUnder.Visibility = Visibility.Collapsed;
680
-            if (!txbStoragePath.Content.ToString().Equals(APP.WKData.WkPath))
689
+            catch (Exception ex)
681 690
             {
682
-                //存储文件
683
-                FileToolsCommon.SetConfigValue("VideoSavePath", txbStoragePath.Content.ToString());
684
-                MessageWindow.Show("路径已变更,下次创建微课时自动生效!!!");
691
+                LogHelper.WriteErrLog("XHMicroLessonSystemWindow(设置保存事件报错:)" + ex.Message,ex);
685 692
             }
686 693
         }
687 694
         /// <summary>
@@ -986,7 +993,7 @@ namespace XHWK.WKTool
986 993
                 };
987 994
 
988 995
 
989
-                APP.myloading.Show();
996
+                //APP.myloading.Show();
990 997
                 APP.BackgroundWorkerHelper.RunWorkerAsync(InvokeServering, InvokeServerCompate);
991 998
 
992 999
 
@@ -1019,13 +1026,16 @@ namespace XHWK.WKTool
1019 1026
             Dispatcher.Invoke(new Action(() =>
1020 1027
             {
1021 1028
                 result = ofd.ShowDialog();
1022
-                if (result == System.Windows.Forms.DialogResult.OK)
1029
+            }));
1030
+            if (result == System.Windows.Forms.DialogResult.OK)
1023 1031
                 {
1024 1032
                     if (ofd.FileName != "")
1033
+                    {
1034
+                    Dispatcher.Invoke(new Action(() =>
1025 1035
                     {
1026 1036
                         APP.myloading.Show();
1027
-
1028 1037
                         myblackboard.changepage(APP.pageData.pagenum);
1038
+                    }));
1029 1039
                         #region PPT转PDF
1030 1040
                         string filepath = ofd.FileName;
1031 1041
                         string path = ofd.SafeFileName.Replace(".ppt", "").Replace(".pptx", "").Trim();
@@ -1077,8 +1087,11 @@ namespace XHWK.WKTool
1077 1087
                                         File.Delete(filePathOutPut);
1078 1088
                                     }
1079 1089
                                 }
1080
-                                #endregion
1081
-                                string[] page = images.ToArray();
1090
+                            #endregion
1091
+
1092
+                            Dispatcher.Invoke(new Action(() =>
1093
+                            {
1094
+                            string[] page = images.ToArray();
1082 1095
                                 int num = 0;
1083 1096
                                 for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1084 1097
                                 {
@@ -1101,6 +1114,7 @@ namespace XHWK.WKTool
1101 1114
                                         };
1102 1115
                                         APP.PageDrawList.Add(model_DrawData);
1103 1116
                                     }
1117
+                      
1104 1118
                                     ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
1105 1119
                                     ImgPrintTwo.Visibility = Visibility.Collapsed;
1106 1120
                                     btnPrint.IsEnabled = true;
@@ -1130,11 +1144,11 @@ namespace XHWK.WKTool
1130 1144
                                     ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1131 1145
                                     btnScreenshot.IsEnabled = true;
1132 1146
                                 }
1133
-                                APP.myloading.Hide();
1134
-                            }
1147
+                           
1148
+                            }));
1149
+                        }
1135 1150
                             catch (Exception ex)
1136 1151
                             {
1137
-                                APP.myloading.Hide();
1138 1152
                                 MessageWindow.Show("文件无效或者文件被加密!");
1139 1153
                                 LogHelper.WriteErrLog("【打开ppt】(OpenDialog PPT)" + ex.Message, ex);
1140 1154
                             }
@@ -1238,6 +1252,8 @@ namespace XHWK.WKTool
1238 1252
                                 string paths = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
1239 1253
                                 string[] page = ConvertWordToImage(filepath, paths, "", 0, 0, null, 0).ToArray();
1240 1254
                                 int num = 0;
1255
+                            Dispatcher.Invoke(new Action(() =>
1256
+                            {
1241 1257
                                 for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
1242 1258
                                 {
1243 1259
                                     if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
@@ -1290,8 +1306,9 @@ namespace XHWK.WKTool
1290 1306
                                     ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1291 1307
                                     btnScreenshot.IsEnabled = true;
1292 1308
                                 }
1293
-                                APP.myloading.Hide();
1294
-                            }
1309
+                                
1310
+                            }));
1311
+                        }
1295 1312
                             catch (Exception ex)
1296 1313
                             {
1297 1314
                                 APP.myloading.Hide();
@@ -1300,31 +1317,6 @@ namespace XHWK.WKTool
1300 1317
                         }
1301 1318
                     }
1302 1319
                 }
1303
-            }
1304
-                   ));
1305
-
1306
-
1307
-
1308
-
1309
-
1310
-
1311
-
1312
-
1313
-
1314
-
1315
-
1316
-
1317
-
1318
-
1319
-
1320
-
1321
-
1322
-
1323
-
1324
-
1325
-
1326
-
1327
-
1328 1320
             //OpenDialog();
1329 1321
             return "";
1330 1322
         }
@@ -1335,7 +1327,7 @@ namespace XHWK.WKTool
1335 1327
         public void InvokeServerCompate(object obj)
1336 1328
         {
1337 1329
             //APP.myloading.Hide();
1338
-           
1330
+            APP.myloading.Hide();
1339 1331
         }
1340 1332
         /// <summary>
1341 1333
         /// 导入文档
@@ -1641,11 +1633,7 @@ namespace XHWK.WKTool
1641 1633
         /// <param name="e"></param>
1642 1634
         private void BtnUpload_Click(object sender, RoutedEventArgs e)
1643 1635
         {
1644
-            if (APP.IsLoginType == false)
1645
-            {
1646
-                Login();
1647
-                return;
1648
-            }
1636
+            
1649 1637
             if (gridUpload.Visibility == Visibility.Visible)
1650 1638
             {
1651 1639
                 gridUpload.Visibility = Visibility.Collapsed;
@@ -1845,6 +1833,11 @@ namespace XHWK.WKTool
1845 1833
         /// <param name="e"></param>
1846 1834
         private void BtnUploads_Click(object sender, RoutedEventArgs e)
1847 1835
         {
1836
+            if (APP.IsLoginType == false)
1837
+            {
1838
+                Login();
1839
+                return;
1840
+            }
1848 1841
             pageData.menuList[Subscript].IsEnabled = false;
1849 1842
             List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnUpload");
1850 1843
             for (int i = 0; i < buttons.Count; i++)
@@ -3043,15 +3036,15 @@ namespace XHWK.WKTool
3043 3036
             {
3044 3037
                 txbLoginType.Text = APP.UserInfo.Username;
3045 3038
 
3046
-                ImgUpload.Visibility = Visibility.Visible;
3047
-                ImgUploadTwo.Visibility = Visibility.Collapsed;
3039
+                //ImgUpload.Visibility = Visibility.Visible;
3040
+                //ImgUploadTwo.Visibility = Visibility.Collapsed;
3048 3041
             }
3049 3042
             else
3050 3043
             {
3051 3044
                 txbLoginType.Text = "未登录";
3052 3045
 
3053
-                ImgUpload.Visibility = Visibility.Collapsed;
3054
-                ImgUploadTwo.Visibility = Visibility.Visible;
3046
+                //ImgUpload.Visibility = Visibility.Collapsed;
3047
+                //ImgUploadTwo.Visibility = Visibility.Visible;
3055 3048
             }
3056 3049
         }
3057 3050
         /// <summary>
@@ -4545,5 +4538,17 @@ namespace XHWK.WKTool
4545 4538
         {
4546 4539
             HideAngleBorder();
4547 4540
         }
4541
+        /// <summary>
4542
+        /// 鼠标左键点击事件
4543
+        /// </summary>
4544
+        /// <param name="sender"></param>
4545
+        /// <param name="e"></param>
4546
+        private void Window_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
4547
+        {
4548
+            if (RectImgBorder.Visibility != Visibility.Hidden)
4549
+            {
4550
+                HideAngleBorder();
4551
+            }
4552
+        }
4548 4553
     }
4549 4554
 }

Loading…
Отказ
Запис