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

Merge remote-tracking branch 'origin/zhangxueyang' into zyy

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

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

@@ -33,8 +33,8 @@
33 33
     <!--上传每片大小 Mb-->
34 34
     <add key="UploadSliceLen" value="1" />
35 35
     <!--版本号-->
36
-    <add key="VersionCode" value="25" />
37
-    <add key="VersionName" value="1.2.4" />
36
+    <add key="VersionCode" value="27" />
37
+    <add key="VersionName" value="1.2.6" />
38 38
     <add key="ClientSettingsProvider.ServiceUri" value="" />
39 39
   </appSettings>
40 40
   <system.web>

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

@@ -122,6 +122,10 @@ namespace XHWK.WKTool
122 122
         /// 上传个人空间 入参
123 123
         /// </summary>
124 124
         public static Model_ResourceAddTwo ResourceAddTwo = null;
125
+        /// <summary>
126
+        /// 是否正在
127
+        /// </summary>
128
+        public static bool IsUpLoad = false;
125 129
         #region 点阵笔
126 130
         /// <summary>
127 131
         /// 点阵笔

BIN
XHWK.WKTool/Images/31.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar10.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar14.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar15.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar27.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar28.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar29.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar30.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar7.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar8.png Переглянути файл


BIN
XHWK.WKTool/Images/Toobar9.png Переглянути файл


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

@@ -64,8 +64,8 @@
64 64
                             <RowDefinition Height="auto"/>
65 65
                             <RowDefinition Height="auto"/>
66 66
                         </Grid.RowDefinitions>
67
-                        <Button Cursor="Hand" Grid.Row="0" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
68
-                        <Button Cursor="Hand" Grid.Row="1" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
67
+                        <Button Cursor="Hand" Grid.Row="0" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
68
+                        <Button Cursor="Hand" Grid.Row="1" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
69 69
                     </Grid>
70 70
                     <!--<TextBlock Text="点型:" FontSize="20"  Margin="120,10,0,0"/>
71 71
                 <RadioButton x:Name="rbnSquarePoint" Content="方点" FontSize="16"  Margin="0,15,0,0" IsChecked="True"/>

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

@@ -49,5 +49,5 @@ using System.Windows;
49 49
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
50 50
 //通过使用 "*",如下所示:
51 51
 // [assembly: AssemblyVersion("1.0.*")]
52
-[assembly: AssemblyVersion("1.2.4.0")]
53
-[assembly: AssemblyFileVersion("1.2.4.0")]
52
+[assembly: AssemblyVersion("1.2.6.0")]
53
+[assembly: AssemblyFileVersion("1.2.6.0")]

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

@@ -74,7 +74,7 @@
74 74
             </Grid>
75 75
 
76 76
             <Image Grid.Row="1"  Source="./Images/Toobar0.png"/>
77
-            <Button Grid.Row="1" x:Name="BtnRecordingScreen" HorizontalAlignment="Left"  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="46,0,15,0" Click="BtnRecordingScreen_Click">
77
+            <Button Grid.Row="1" x:Name="BtnRecordingScreen" HorizontalAlignment="Left"  Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="46,0,15,0" ToolTip="开始" Click="BtnRecordingScreen_Click">
78 78
                 <Image x:Name="ImgRecordingScreen" Source="./Images/Toobar26.png"/>
79 79
             </Button>
80 80
             <TextBlock Grid.Row="1" x:Name="txbTime" Text="00:00" FontSize="20" Foreground="#FFFFFF" Margin="43,80,0,0" Visibility="Hidden"/>
@@ -97,7 +97,7 @@
97 97
                         <Image x:Name="imgBlackPenTwo" Source="./Images/31.png" Margin="5,5,5,5"/>
98 98
                     </Border>
99 99
                 </Button>
100
-                <Button  Cursor="Hand" x:Name="btnReturn" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,15,0" Click="BtnReturn_Click" ToolTip="返回">
100
+                <Button  Cursor="Hand" x:Name="btnReturn" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,12,0" Click="BtnReturn_Click" ToolTip="返回">
101 101
                     <Border Background="#2d8cf0" CornerRadius="22">
102 102
                         <Image x:Name="imgReturn" Source="./Images/Toobar29.png" Margin="5,5,5,5"/>
103 103
                     </Border>

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

@@ -75,6 +75,29 @@ namespace XHWK.WKTool
75 75
         public ScreenRecordingToolbarWindow()
76 76
         {
77 77
             InitializeComponent();
78
+            if (APP.W_PracticeWindow == null)
79
+            {
80
+                APP.W_PracticeWindow = new PracticeWindow
81
+                {
82
+                    //APP.W_PracticeWindow.Topmost = true;
83
+                    Width = pwidth,
84
+                    Height = pHeight,
85
+                    Left = 0,
86
+                    Top = 0
87
+                };
88
+                //practiceWin.Owner = this;
89
+            }
90
+            APP.W_PracticeWindow.Show();
91
+            new Thread(new ThreadStart(new Action(() =>
92
+            {
93
+                Thread.Sleep(100);
94
+                Dispatcher.Invoke(() =>
95
+                {
96
+                    this.Owner = APP.W_PracticeWindow;
97
+                    this.Topmost = true;
98
+                });
99
+            }))).Start();
100
+            APP.W_PracticeWindow.Hide();
78 101
         }
79 102
         /// <summary>
80 103
         /// 初始化
@@ -89,7 +112,7 @@ namespace XHWK.WKTool
89 112
                 borOne.Background = new SolidColorBrush(Colors.DodgerBlue);
90 113
                 borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
91 114
             flg = 0;
92
-
115
+         
93 116
 
94 117
             k_hook = new KeyboardHookCommon();
95 118
             k_hook.KeyDownEvent += K_hook_KeyDownEvent;
@@ -115,6 +138,7 @@ namespace XHWK.WKTool
115 138
             //imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar29.png"));
116 139
             //btnReturn.IsEnabled = true;//返回主界面可点击
117 140
             txbTime.Visibility = Visibility.Hidden;//时间不显示
141
+            BtnRecordingScreen.ToolTip = "开始";
118 142
             if (t == null)
119 143
             {
120 144
                 t = new DispatcherTimer();
@@ -366,9 +390,9 @@ namespace XHWK.WKTool
366 390
                 imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar28.png"));
367 391
                 btnBlackPenTwo.IsEnabled = true;//红笔可点击
368 392
                 txbTime.Visibility = Visibility.Visible;//时间显示
369
-                //imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
370
-                //borOne.Background = new SolidColorBrush(Colors.LightBlue);
371
-
393
+                                                        //imgReturn.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar30.png"));
394
+                                                        //borOne.Background = new SolidColorBrush(Colors.LightBlue);
395
+                BtnRecordingScreen.ToolTip = "暂停";
372 396
                 try
373 397
                 {
374 398
                     #region 4秒内不可点击
@@ -416,6 +440,7 @@ namespace XHWK.WKTool
416 440
                 IsSuspend = true;
417 441
                 ImgRecordingScreen.Source = new BitmapImage(new Uri("pack://application:,,,/Images/Toobar26.png"));//大圆圈三角形
418 442
                 BtnStopRecordingScreen.IsEnabled = false; //停止录制按钮不点击
443
+                BtnRecordingScreen.ToolTip = "开始";
419 444
                 //imgBlackPenOne.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
420 445
                 //btnBlackPenOne.IsEnabled = false;//蓝笔不可点击
421 446
                 //imgBlackPenTwo.Source = new BitmapImage(new Uri("pack://application:,,,/Images/31.png"));
@@ -615,7 +640,7 @@ namespace XHWK.WKTool
615 640
                         borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
616 641
                     });
617 642
                     flg = 1;
618
-                    this.Owner = null;
643
+                    //this.Owner = null;
619 644
                     APP.W_PracticeWindow.ReturnPractice();
620 645
                 }
621 646
                 else if (flg == 10)
@@ -655,8 +680,15 @@ namespace XHWK.WKTool
655 680
                     flg = 11;
656 681
                     APP.W_PracticeWindow.Blue();
657 682
                     APP.W_PracticeWindow.Show();
658
-                    this.Owner = APP.W_PracticeWindow;
659
-                    this.Topmost = true;
683
+                    new Thread(new ThreadStart(new Action(() =>
684
+                    {
685
+                        Thread.Sleep(100);
686
+                        Dispatcher.Invoke(() =>
687
+                        {
688
+                            this.Owner = APP.W_PracticeWindow;
689
+                            this.Topmost = true;
690
+                        });
691
+                    }))).Start();
660 692
                 }
661 693
             }
662 694
             catch (Exception ex)
@@ -915,7 +947,7 @@ namespace XHWK.WKTool
915 947
                         borTwo.Background = new SolidColorBrush(Colors.DodgerBlue);
916 948
                     });
917 949
                     flg = 0;
918
-                    this.Owner = null;
950
+                    //this.Owner = null;
919 951
                     APP.W_PracticeWindow.ReturnPractice();
920 952
                 }
921 953
                 else if (flg == 11)
@@ -951,8 +983,19 @@ namespace XHWK.WKTool
951 983
                     flg = 10;
952 984
                     APP.W_PracticeWindow.Red();
953 985
                     APP.W_PracticeWindow.Show();
954
-                    this.Owner = APP.W_PracticeWindow;
955
-                    this.Topmost = true;
986
+
987
+
988
+                    new Thread(new ThreadStart(new Action(() =>
989
+                    {
990
+                        Thread.Sleep(100);
991
+                        Dispatcher.Invoke(() =>
992
+                        {
993
+                            this.Owner = APP.W_PracticeWindow;
994
+                            this.Topmost = true;
995
+                        });
996
+                    }))).Start();
997
+                 
998
+                    
956 999
                 }
957 1000
             }
958 1001
             catch (Exception ex)

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

@@ -20,7 +20,7 @@
20 20
                 </Style>
21 21
             </TextBox.Resources>
22 22
         </TextBox>
23
-        <Button x:Name="BtnNameModifyOK" HorizontalAlignment="Left" Margin="200,147,0,0" VerticalAlignment="Top" Width="30" Height="30" Background="White" BorderBrush="#FFABADB3" Click="BtnNameModifyOK_Click" Visibility="Hidden">
23
+        <Button Cursor="Hand" x:Name="BtnNameModifyOK" HorizontalAlignment="Left" Margin="200,147,0,0" VerticalAlignment="Top" Width="30" Height="30" Background="White" BorderBrush="#FFABADB3" Click="BtnNameModifyOK_Click" Visibility="Hidden">
24 24
             <Button.Resources>
25 25
                 <Style TargetType="{x:Type Border}">
26 26
                     <Setter Property="CornerRadius" Value="3"/>
@@ -32,11 +32,11 @@
32 32
 
33 33
         <Label x:Name="lblDateSize" Content="2020-10-10 10:10:00|1000.00MB" HorizontalAlignment="Center" Margin="0,175,0,0" VerticalAlignment="Top" Height="30" Width="240" Foreground="#FF9A9A9A" FontSize="13" HorizontalContentAlignment="Center"/>
34 34
         <Border x:Name="BorUploadBtn" CornerRadius="3" HorizontalAlignment="Left" Margin="25,210,0,0" VerticalAlignment="Top" Width="90" Height="40" Background="#FF3492F4">
35
-            <Button x:Name="BtnUpload" Content="上传" HorizontalAlignment="Left"  Width="90" Height="40" Foreground="White" FontSize="18" Click="BtnUpload_Click"  Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"/>
35
+            <Button Cursor="Hand" x:Name="BtnUpload" Content="上传" HorizontalAlignment="Left"  Width="90" Height="40" Foreground="White" FontSize="18" Click="BtnUpload_Click"  Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"/>
36 36
         </Border>
37 37
         <Border CornerRadius="3" Width="90" Height="40" Background="#FFF0582C" HorizontalAlignment="Right" Margin="0,210,25,0" VerticalAlignment="Top">
38 38
 
39
-            <Button x:Name="BtnDelVideo" Content="删除"  Width="90" Height="40" Foreground="White" FontSize="18" Background="Transparent" Click="BtnDelVideo_Click"  Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
39
+            <Button Cursor="Hand" x:Name="BtnDelVideo" Content="删除"  Width="90" Height="40" Foreground="White" FontSize="18" Background="Transparent" Click="BtnDelVideo_Click"  Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}">
40 40
       
41 41
         </Button>
42 42
         </Border>

+ 5
- 7
XHWK.WKTool/UControl/Uc_VideoItem.xaml.cs Переглянути файл

@@ -49,10 +49,7 @@ namespace XHWK.WKTool.UControl
49 49
         /// 上传页面
50 50
         /// </summary>
51 51
         UploadWindow W_UploadWindow = null;
52
-        /// <summary>
53
-        /// 是否正在
54
-        /// </summary>
55
-        bool IsUpLoad = false;
52
+      
56 53
         #endregion
57 54
 
58 55
         #region 初始化
@@ -63,6 +60,7 @@ namespace XHWK.WKTool.UControl
63 60
         public Uc_VideoItem(Model_Video model_Video)
64 61
         {
65 62
             InitializeComponent();
63
+            APP.IsUpLoad = false;
66 64
             VideoModel = model_Video;
67 65
             if (FileToolsCommon.IsExistFile(VideoModel.ThumbnailPath))
68 66
             {
@@ -314,9 +312,9 @@ namespace XHWK.WKTool.UControl
314 312
                 Click_UploadLogin();
315 313
                 return;
316 314
             }
317
-            if (!IsUpLoad)
315
+            if (!APP.IsUpLoad)
318 316
             {
319
-                IsUpLoad = true;
317
+                APP.IsUpLoad = true;
320 318
                 //BtnUpload.IsEnabled = false;
321 319
                 //BtnUpload.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#9EA0A7"));
322 320
                 //BtnUpload.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999"));
@@ -340,7 +338,7 @@ namespace XHWK.WKTool.UControl
340 338
                 }
341 339
                 else
342 340
                 {
343
-                    IsUpLoad = false;
341
+                    APP.IsUpLoad = false;
344 342
                     MessageWindow.Show(ErrMessage);
345 343
                 }
346 344
             }

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

@@ -3,7 +3,7 @@
3 3
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 4
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
-        xmlns:local="clr-namespace:XHWK.WKTool"
6
+        xmlns:local="clr-namespace:XHWK.WKTool" xmlns:Views="clr-namespace:XHWK.WKTool.Helpers"
7 7
         mc:Ignorable="d"
8 8
         Title="UploadWindow" Height="346" Width="457"   AllowsTransparency="True"
9 9
     WindowStartupLocation="CenterScreen"
@@ -84,6 +84,27 @@
84 84
                     </ControlTemplate>
85 85
                 </Button.Template>
86 86
             </Button>
87
+            <Views:ZJClippingBorder Grid.Row="0" Grid.RowSpan="2" x:Name="tip_outer" Margin="0" Background="#FFE6EAF0" CornerRadius="4" Visibility="Collapsed">
88
+                <Grid>
89
+                    <Label Content="上传中..." HorizontalAlignment="Center" Margin="0,7,0,0" Height="35" VerticalAlignment="Top" FontSize="20"></Label>
90
+                    <ProgressBar BorderBrush="#4597FF"
91
+                             Foreground="#4597FF"
92
+                    Grid.Row="0"
93
+                    x:Name="pgbProcess"
94
+                    Height="20"
95
+                    Margin="50,20,50,0"
96
+                    Visibility="Visible" />
97
+                    <Label Grid.Row="0"
98
+                    HorizontalAlignment="Center" Width="60"
99
+                    x:Name="lbProcess"
100
+                    Height="30"
101
+                    Margin="0,20,0,0"
102
+                       FontSize="16"
103
+                    Content=""
104
+                       Foreground="White"
105
+                    Visibility="Visible" />
106
+                </Grid>
107
+            </Views:ZJClippingBorder>
87 108
         </Grid>
88 109
     </Viewbox>
89 110
 </Window>

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

@@ -2,12 +2,14 @@
2 2
 
3 3
 using System;
4 4
 using System.Collections.ObjectModel;
5
+using System.Threading;
5 6
 using System.Windows;
6 7
 using System.Windows.Controls;
7 8
 using System.Windows.Input;
8 9
 
9 10
 using XHWK.Model;
10 11
 using XHWK.WKTool.DAL;
12
+using XHWK.WKTool.UControl;
11 13
 using static XHWK.WKTool.XHMicroLessonSystemWindow;
12 14
 
13 15
 namespace XHWK.WKTool
@@ -47,6 +49,7 @@ namespace XHWK.WKTool
47 49
         /// 当前视频的下标
48 50
         /// </summary>
49 51
        private int i = 0;
52
+        private System.Timers.Timer times;
50 53
         public UploadWindow()
51 54
         {
52 55
             InitializeComponent();
@@ -61,6 +64,7 @@ namespace XHWK.WKTool
61 64
             Resourcesize = _resourcesize;
62 65
             Suffix = _suffix;
63 66
             Guid = _guid;
67
+            tip_outer.Visibility = Visibility.Collapsed;
64 68
             Tsubjectbook();
65 69
         }
66 70
         /// <summary>
@@ -182,6 +186,7 @@ namespace XHWK.WKTool
182 186
 
183 187
         private void BtnDown_Click(object sender, RoutedEventArgs e)
184 188
         {
189
+            APP.IsUpLoad = false;
185 190
             Hide();
186 191
         }
187 192
         /// <summary>
@@ -191,7 +196,24 @@ namespace XHWK.WKTool
191 196
         /// <param name="e"></param>
192 197
         private void BtnStart_Click(object sender, RoutedEventArgs e)
193 198
         {
199
+                if(string.IsNullOrWhiteSpace(book_list.Text))
200
+                {
201
+                    MessageWindow.Show("教材不能为空!");
202
+                }
203
+                btnStart.IsEnabled = false;
204
+            book_list.IsEnabled = false;
205
+            cmbTeachingMaterial.IsEnabled = false;
206
+                Thread myThread = new Thread(StartUpload);
194 207
 
208
+                num = 0;
209
+                tip_outer.Visibility = Visibility.Visible;
210
+                myThread.Start();
211
+                times = new System.Timers.Timer(100);
212
+                times.Elapsed += Times_ElapsedClick;
213
+                times.Start();
214
+        }
215
+        private void StartUpload()
216
+        {
195 217
             try
196 218
             {
197 219
                 DAL_Upload dAL_Upload = new DAL_Upload();
@@ -217,25 +239,30 @@ namespace XHWK.WKTool
217 239
                     //schoolid: 12
218 240
                     //suffix: "mp4"
219 241
                     //uid: 80
220
-                    Model_ResourceAdd model_ResourceAdd = new Model_ResourceAdd
242
+                    Model_ResourceAdd model_ResourceAdd = new Model_ResourceAdd();
243
+                    Dispatcher.Invoke(() =>
221 244
                     {
222
-                        converted = 0,
223
-                        createid = APP.UserInfo.Userid,
224
-                        directorid = Convert.ToInt32(cmbTeachingMaterial.SelectedValue.ToString()),
225
-                        duration = APP.ResourceAddTwo.duration,
226
-                        imgUrl = "",
227
-                        level = 2,
228
-                        lsbid = Convert.ToInt32(book_list.SelectedValue.ToString()),
229
-                        mp4code = APP.ResourceAddTwo.mp4code,
230
-                        resourcebelong = 3,
231
-                        resourceclass = 2,
232
-                        resourcecover = APP.ResourceAddTwo.coverpath,
233
-                        resourcename = Resourcename,
234
-                        resourcesize = Resourcesize,
235
-                        resourcetype = 0,
236
-                        resourceurl = APP.ResourceAddTwo.videopath,
237
-                        schoolid = APP.UserInfo.Schoolid
238
-                    };
245
+                         model_ResourceAdd = new Model_ResourceAdd
246
+                        {
247
+                            converted = 0,
248
+                            createid = APP.UserInfo.Userid,
249
+                            directorid = Convert.ToInt32(cmbTeachingMaterial.SelectedValue.ToString()),
250
+                            duration = APP.ResourceAddTwo.duration,
251
+                            imgUrl = "",
252
+                            level = 2,
253
+                            lsbid = Convert.ToInt32(book_list.SelectedValue.ToString()),
254
+                            mp4code = APP.ResourceAddTwo.mp4code,
255
+                            resourcebelong = 3,
256
+                            resourceclass = 2,
257
+                            resourcecover = APP.ResourceAddTwo.coverpath,
258
+                            resourcename = Resourcename,
259
+                            resourcesize = Resourcesize,
260
+                            resourcetype = 0,
261
+                            resourceurl = APP.ResourceAddTwo.videopath,
262
+                            schoolid = APP.UserInfo.Schoolid
263
+                        };
264
+                    });
265
+                    
239 266
                     if (Suffix.Equals("FLV"))
240 267
                     {
241 268
                         Suffix = "flv";
@@ -254,27 +281,86 @@ namespace XHWK.WKTool
254 281
                     int code = @interface.ResourceAdd(model_ResourceAdd);
255 282
                     if (code == 0)
256 283
                     {
257
-                        MessageWindow.Show("视频上传成功!");
258
-                        ChangeTextEvents("上传成功",i);
259
-                        Hide();
284
+                        Dispatcher.Invoke(() =>
285
+                        {
286
+                            btnStart.IsEnabled = true;
287
+                            book_list.IsEnabled = true;
288
+                            cmbTeachingMaterial.IsEnabled = true;
289
+                            num = 99;
290
+                            times.Stop();
291
+                            pgbProcess.Value = 100;
292
+                            lbProcess.Content = "100%";
293
+                            MessageWindow.Show("视频上传成功!");
294
+                            tip_outer.Visibility = Visibility.Collapsed;
295
+                            ChangeTextEvents("上传成功", i);
296
+                            Hide();
297
+                        });
260 298
                     }
261 299
                     else
262 300
                     {
263
-                        MessageWindow.Show(APP.ServerMsg);
301
+                        Dispatcher.Invoke(() =>
302
+                        {
303
+                            btnStart.IsEnabled = true;
304
+                            book_list.IsEnabled = true;
305
+                            cmbTeachingMaterial.IsEnabled = true;
306
+                            times.Stop();
307
+                            tip_outer.Visibility = Visibility.Collapsed;
308
+                            MessageWindow.Show(APP.ServerMsg);
309
+                        });
264 310
                     }
265 311
                 }
266 312
                 else
267 313
                 {
268
-                    MessageWindow.Show(ErrMessage);
314
+                    Dispatcher.Invoke(() =>
315
+                    {
316
+                        btnStart.IsEnabled = true;
317
+                        book_list.IsEnabled = true;
318
+                        cmbTeachingMaterial.IsEnabled = true;
319
+                        times.Stop();
320
+                        tip_outer.Visibility = Visibility.Collapsed;
321
+                        MessageWindow.Show(ErrMessage);
322
+                    });
269 323
                 }
270 324
             }
271 325
             catch (Exception ex)
272 326
             {
273
-                MessageWindow.Show("视频上传失败!");
274
-                Hide();
275
-                LogHelper.WriteErrLog("【UploadWindow】(BtnStart_Click)" + ex.Message, ex);
327
+                Dispatcher.Invoke(() =>
328
+                {
329
+                    btnStart.IsEnabled = true;
330
+                    book_list.IsEnabled = true;
331
+                    cmbTeachingMaterial.IsEnabled = true;
332
+                    times.Stop();
333
+                    tip_outer.Visibility = Visibility.Collapsed;
334
+                    MessageWindow.Show("视频上传失败!");
335
+                    APP.IsUpLoad = false;
336
+                    Hide();
337
+                    LogHelper.WriteErrLog("【UploadWindow】(BtnStart_Click)" + ex.Message, ex);
338
+                });
276 339
             }
277 340
         }
341
+        int num = 0;
342
+        /// <summary>
343
+        /// 计时器
344
+        /// </summary>
345
+        /// <param name="sender"></param>
346
+        /// <param name="e"></param>
347
+        private void Times_ElapsedClick(object sender, System.Timers.ElapsedEventArgs e)
348
+        {
349
+            Dispatcher.Invoke(() =>
350
+            {
351
+                pgbProcess.Value = num;
352
+                lbProcess.Content = num.ToString() + "%";
353
+                if (num < 99)
354
+                {
355
+                    num++;
356
+                    times.Interval += (num / 2);
357
+                }
358
+                else
359
+                {
360
+                    times.Stop();
361
+                }
362
+            });
363
+        }
278 364
     }
279 365
     public class LoginPageData : NotifyModel
280 366
     {

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

@@ -262,7 +262,7 @@
262 262
                         <StackPanel Orientation="Vertical">
263 263
                             <Image x:Name="ImgAdd" Source="./Images/microLessonSystem_25.png" Visibility="Visible"/>
264 264
                             <Image x:Name="ImgAddTwo" Source="./Images/microLessonSystem_24.png" Visibility="Collapsed"/>
265
-                            <TextBlock Text="加" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
265
+                            <TextBlock Text="加" FontSize="14" Padding="0,6,0,0" Foreground="#FFFFFF" HorizontalAlignment="Center"/>
266 266
                         </StackPanel>
267 267
                     </Button>
268 268
                     <Button Cursor="Hand" x:Name="btnPrint" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,30,0" Click="BtnPrint_Click">

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

@@ -118,6 +118,7 @@ namespace XHWK.WKTool
118 118
         /// </summary>
119 119
         public XHMicroLessonSystemWindow()
120 120
         {
121
+            new Aspose.Words.License().SetLicense(new MemoryStream(Convert.FromBase64String("PExpY2Vuc2U+CiAgPERhdGE+CiAgICA8TGljZW5zZWRUbz5TdXpob3UgQXVuYm94IFNvZnR3YXJlIENvLiwgTHRkLjwvTGljZW5zZWRUbz4KICAgIDxFbWFpbFRvPnNhbGVzQGF1bnRlYy5jb208L0VtYWlsVG8+CiAgICA8TGljZW5zZVR5cGU+RGV2ZWxvcGVyIE9FTTwvTGljZW5zZVR5cGU+CiAgICA8TGlj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ZTYvRFZXWFNIY1o4d2FiVEFQQXlSR0pEOGI3L00zVkV4YWZpQnd5U2h3YWtrNGI5N2c2eGtnTjhtbUFGY3J0c0cwd1ZDcnp6MytVYk9iQjRYUndTZWxsTFdXeXNDL0haTDNpN01SMC9jZUFxaVZFOU0rWndOQkR4RnlRbE9uYTFQajhQMzhzR1grQ3ZsemJLZFZPZXk1S3A2dDN5c0dqYWtaL1E9PC9TaWduYXR1cmU+CjwvTGljZW5zZT4=")));
122 123
             new Aspose.Slides.License().SetLicense(new MemoryStream(Convert.FromBase64String("PExpY2Vuc2U+CiAgPERhdGE+CiAgICA8TGljZW5zZWRUbz5TdXpob3UgQXVuYm94IFNvZnR3YXJlIENvLiwgTHRkLjwvTGljZW5zZWRUbz4KICAgIDxFbWFpbFRvPnNhbGVzQGF1bnRlYy5jb208L0VtYWlsVG8+CiAgICA8TGljZW5zZVR5cGU+RGV2ZWxvcGVyIE9FTTwvTGljZW5zZVR5cGU+CiAgICA8TGljZW5zZU5vdGU+TGltaXRlZCB0byAxIGRldmVsb3BlciwgdW5saW1pdGVkIHBoeXNpY2FsIGxvY2F0aW9uczwvTGljZW5zZU5vdGU+CiAgICA8T3JkZXJJRD4xOTA4MjYwODA3NTM8L09yZGVySUQ+CiAgICA8VXNlcklEPjEzNDk3NjAwNjwvVXNlcklEPgogICAgPE9FTT5UaGlzIGlzIGEgcmVkaXN0cmlidXRhYmxlIGxpY2Vuc2U8L09FTT4KICAgIDxQcm9kdWN0cz4KICAgICAgPFByb2R1Y3Q+QXNwb3NlLlRvdGFsIGZvciAuTkVUPC9Qcm9kdWN0PgogICAgPC9Qcm9kdWN0cz4KICAgIDxFZGl0aW9uVHlwZT5FbnRlcnByaXNlPC9FZGl0aW9uVHlwZT4KICAgIDxTZXJpYWxOdW1iZXI+M2U0NGRlMzAtZmNkMi00MTA2LWIzNWQtNDZjNmEzNzE1ZmMyPC9TZXJpYWxOdW1iZXI+CiAgICA8U3Vic2NyaXB0aW9uRXhwaXJ5PjIwMjAwODI3PC9TdWJzY3JpcHRpb25FeHBpcnk+CiAgICA8TGljZW5zZVZlcnNpb24+My4wPC9MaWNlbnNlVmVyc2lvbj4KICAgIDxMaWNlbnNlSW5zdHJ1Y3Rpb25zPmh0dHBzOi8vcHVyY2hhc2UuYXNwb3NlLmNvbS9wb2xpY2llcy91c2UtbGljZW5zZTwvTGljZW5zZUluc3RydWN0aW9ucz4KICA8L0RhdGE+CiAgPFNpZ25hdHVyZT53UGJtNUt3ZTYvRFZXWFNIY1o4d2FiVEFQQXlSR0pEOGI3L00zVkV4YWZpQnd5U2h3YWtrNGI5N2c2eGtnTjhtbUFGY3J0c0cwd1ZDcnp6MytVYk9iQjRYUndTZWxsTFdXeXNDL0haTDNpN01SMC9jZUFxaVZFOU0rWndOQkR4RnlRbE9uYTFQajhQMzhzR1grQ3ZsemJLZFZPZXk1S3A2dDN5c0dqYWtaL1E9PC9TaWduYXR1cmU+CjwvTGljZW5zZT4=")));
123 124
             InitializeComponent();

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

@@ -72,8 +72,8 @@
72 72
       <SpecificVersion>False</SpecificVersion>
73 73
       <HintPath>..\dl\Aspose.Slides.dll</HintPath>
74 74
     </Reference>
75
-    <Reference Include="Aspose.Words">
76
-      <HintPath>..\dl\Aspose.Words.dll</HintPath>
75
+    <Reference Include="Aspose.Words, Version=19.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56, processorArchitecture=MSIL">
76
+      <HintPath>..\packages\Aspose.Words.19.1.0\lib\net40\Aspose.Words.dll</HintPath>
77 77
     </Reference>
78 78
     <Reference Include="itextsharp, Version=5.5.13.1, Culture=neutral, PublicKeyToken=8354ae6d2174ddca, processorArchitecture=MSIL">
79 79
       <HintPath>..\packages\iTextSharp.5.5.13.1\lib\itextsharp.dll</HintPath>

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

@@ -8,6 +8,7 @@
8 8
   <package id="AForge.Video.DirectShow" version="2.2.5" targetFramework="net452" />
9 9
   <package id="Aspose.PDF" version="19.1.0" targetFramework="net452" />
10 10
   <package id="Aspose.Slides.NET" version="19.10.0" targetFramework="net452" />
11
+  <package id="Aspose.Words" version="19.1.0" targetFramework="net452" />
11 12
   <package id="iTextSharp" version="5.5.13.1" targetFramework="net452" />
12 13
   <package id="System.Management" version="4.7.0" targetFramework="net452" />
13 14
   <package id="WpfAnimatedGif" version="2.0.0" targetFramework="net452" />

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