소스 검색

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

# Conflicts:
#	XHWK.WKTool/FileDirectoryWindow.xaml.cs
tags/录制修改前
zhangxueyang 4 년 전
부모
커밋
7694e4b0e0

+ 10
- 8
Common/system/FileToolsCommon.cs 파일 보기

@@ -300,13 +300,13 @@ namespace Common.system
300 300
         /// 获取一个文件的长度,单位为Byte  
301 301
         /// </summary>  
302 302
         /// <param name="filePath">文件的绝对路径</param>          
303
-        public static int GetFileSize(string filePath)
303
+        public static long GetFileSize(string filePath)
304 304
         {
305 305
             //创建一个文件对象  
306 306
             FileInfo fi = new FileInfo(filePath);
307 307
 
308 308
             //获取文件的大小  
309
-            return (int)fi.Length;
309
+            return fi.Length;
310 310
         }
311 311
 
312 312
         /// <summary>  
@@ -317,9 +317,10 @@ namespace Common.system
317 317
         {
318 318
             //创建一个文件对象  
319 319
             FileInfo fi = new FileInfo(filePath);
320
-            long size = fi.Length / 1024;
320
+            //double size = fi.Length / 1024;
321
+            double size = Math.Round(((double)fi.Length / 1024.0), 2, MidpointRounding.AwayFromZero);
321 322
             //获取文件的大小  
322
-            return double.Parse(size.ToString());
323
+            return size;
323 324
         }
324 325
 
325 326
         /// <summary>  
@@ -330,9 +331,10 @@ namespace Common.system
330 331
         {
331 332
             //创建一个文件对象  
332 333
             FileInfo fi = new FileInfo(filePath);
333
-            long size = fi.Length / 1024 / 1024;
334
+            //double size = fi.Length / 1024 / 1024;
335
+            double size = Math.Round(((double)fi.Length / 1024.0 / 1024.0), 2, MidpointRounding.AwayFromZero);
334 336
             //获取文件的大小  
335
-            return double.Parse(size.ToString());
337
+            return size;
336 338
         }
337 339
         #endregion
338 340
 
@@ -536,7 +538,7 @@ namespace Common.system
536 538
         public static byte[] FileToBytes(string filePath)
537 539
         {
538 540
             //获取文件的大小   
539
-            int fileSize = GetFileSize(filePath);
541
+            long fileSize = GetFileSize(filePath);
540 542
 
541 543
             //创建一个临时缓冲区  
542 544
             byte[] buffer = new byte[fileSize];
@@ -548,7 +550,7 @@ namespace Common.system
548 550
             try
549 551
             {
550 552
                 //将文件流读入缓冲区  
551
-                fs.Read(buffer, 0, fileSize);
553
+                fs.Read(buffer, 0, (int)fileSize);
552 554
 
553 555
                 return buffer;
554 556
             }

+ 53
- 8
XHWK.WKTool/App.cs 파일 보기

@@ -4,6 +4,8 @@ using Common.system;
4 4
 using System;
5 5
 using System.Collections.Generic;
6 6
 using System.Diagnostics;
7
+using System.Reflection;
8
+using System.Security.Principal;
7 9
 using System.Security.RightsManagement;
8 10
 using System.Threading;
9 11
 using System.Windows;
@@ -123,15 +125,58 @@ namespace XHWK.WKTool
123 125
         [STAThread]
124 126
         private static void Main()
125 127
         {
126
-            // 定义Application对象作为整个应用程序入口
127
-            Application app = new Application();
128
-            UserInfo = new Model_UserInfo();
129
-             WKDataList = new List<Model_WKData>();
130
-            WKData = new Model_WKData();
131
-            VideoList = new List<Model_Video>();
128
+            try
129
+            {
130
+                UserInfo = new Model_UserInfo();
131
+                WKDataList = new List<Model_WKData>();
132
+                WKData = new Model_WKData();
133
+                VideoList = new List<Model_Video>();
134
+                #region 强制以管理员方式运行 修改人:赵耀 修改时间:2020年9月7日
135
+                WindowsIdentity identity = WindowsIdentity.GetCurrent();
136
+                WindowsPrincipal principal = new WindowsPrincipal(identity);
137
+                //判断当前登录用户是否为管理员
138
+                if (principal.IsInRole(WindowsBuiltInRole.Administrator))
139
+                {
140
+                    //如果是管理员,则直接运行
141
+                    W_CreateAMicroLessonWindow = new CreateAMicroLessonWindow();
142
+                    // 定义Application对象作为整个应用程序入口
143
+                    Application app = new Application();
144
+                    app.Run(W_CreateAMicroLessonWindow);
145
+                }
146
+                else
147
+                {
148
+                    //创建启动对象
149
+                    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
150
+                    startInfo.UseShellExecute = true;
151
+                    startInfo.WorkingDirectory = Environment.CurrentDirectory;
152
+                    startInfo.FileName = Assembly.GetExecutingAssembly().Location;
153
+                    //设置启动动作,确保以管理员身份运行
154
+                    startInfo.Verb = "runas";
155
+                    try
156
+                    {
157
+                        System.Diagnostics.Process.Start(startInfo);
158
+                    }
159
+                    catch
160
+                    {
161
+                        return;
162
+                    }
163
+                    //退出
164
+                    Application.Current.Shutdown();
165
+
166
+                }
167
+                #endregion
168
+            }
169
+            catch (Exception ex)
170
+            {
171
+
172
+                string ErrMessage = "【进程】(Main):进程意外关闭。 " + ex.Message;
173
+                LogHelper.WriteErrLog(ErrMessage, ex);
174
+            }
175
+
132 176
             //app.DispatcherUnhandledException += MyApp_DispatcherUnhandledException;
133
-            W_CreateAMicroLessonWindow = new CreateAMicroLessonWindow();
134
-            app.Run(W_CreateAMicroLessonWindow);
177
+            //Application app = new Application();
178
+            //W_CreateAMicroLessonWindow = new CreateAMicroLessonWindow();
179
+            //app.Run(W_CreateAMicroLessonWindow);
135 180
             //LogHelper.WriteInfoLog("启动项目");
136 181
             StopSameProcess();
137 182
             Killffmpeg();

+ 1
- 1
XHWK.WKTool/CreateAMicroLessonWindow.xaml 파일 보기

@@ -7,7 +7,7 @@
7 7
         mc:Ignorable="d"
8 8
         Title="MainWindow" Height="341" Width="454"   AllowsTransparency="True"
9 9
     ShowInTaskbar="False"
10
-    WindowStartupLocation="CenterOwner"
10
+    WindowStartupLocation="CenterScreen"
11 11
     WindowStyle="None">
12 12
     <Viewbox>
13 13
         <Grid Height="341" Width="454" >

+ 20
- 25
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs 파일 보기

@@ -84,29 +84,7 @@ namespace XHWK.WKTool
84 84
                 System.Windows.MessageBox.Show("路径不可为空!");
85 85
                 return;
86 86
             }
87
-            APP.WKData.WkPath = FileToolsCommon.GetLegalPath(txbStoragePath.Text) + txbExplainName.Text.Trim() + "/";
88
-            if (APP.UserInfo != null)
89
-            {
90
-                if (!string.IsNullOrWhiteSpace(APP.UserInfo.Username))
91
-                {
92
-                    //判断课程是否存在
93
-                    if (APP.WKDataList.Exists(x => x.WkName == APP.WKData.WkName))
94
-                    {
95
-                        MessageBoxResult dr = System.Windows.MessageBox.Show("此微课已存在是否覆盖?", "提示", MessageBoxButton.OKCancel);
96
-                        if (dr == MessageBoxResult.OK)
97
-                        {
98
-                            FileToolsCommon.DeleteDirectory(APP.WKData.WkPath);
99
-                            FileToolsCommon.CreateDirectory(APP.WKData.WkPath);
100
-                            APP.WKDataList.RemoveAll(x => x.WkName == APP.WKData.WkName);
101
-                        }
102
-                        else
103
-                        {
104
-                            return;
105
-                        }
106
-                    }
107
-                    APP.WKData.WkPath += APP.UserInfo.Username + "/";
108
-                }
109
-            }
87
+            APP.WKData.WkPath = FileToolsCommon.GetLegalPath(txbStoragePath.Text) + txbExplainName.Text.Trim() + "/"+APP.UserInfo.Username + "/";
110 88
             #endregion
111 89
             //创建文件夹
112 90
             FileToolsCommon.CreateDirectory(APP.WKData.WkPath);
@@ -114,14 +92,31 @@ namespace XHWK.WKTool
114 92
             FileToolsCommon.SetConfigValue("VideoSavePath", txbStoragePath.Text);
115 93
             APP.WKData.WkName = txbExplainName.Text;
116 94
             APP.WKData.WkCreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
95
+            //判断微课是否存在,存在则询问
96
+            if (APP.WKDataList != null&& APP.WKDataList.Count>0)
97
+            {
98
+                if (APP.WKDataList.Exists(x => x.WkName == APP.WKData.WkName))
99
+                {
100
+                    MessageBoxResult dr = System.Windows.MessageBox.Show("此微课已存在是否覆盖?", "提示", MessageBoxButton.OKCancel);
101
+                    if (dr == MessageBoxResult.OK)
102
+                    {
103
+                        FileToolsCommon.DeleteDirectory(APP.WKData.WkPath);
104
+                        FileToolsCommon.CreateDirectory(APP.WKData.WkPath);
105
+                        APP.WKDataList.RemoveAll(x => x.WkName == APP.WKData.WkName);
106
+                    }
107
+                    else
108
+                    {
109
+                        return;
110
+                    }
111
+                }
112
+            }
117 113
             if (APP.W_XHMicroLessonSystemWindow == null)
118 114
             {
119 115
                 APP.W_XHMicroLessonSystemWindow = new XHMicroLessonSystemWindow();
120 116
                 //APP.W_XHMicroLessonSystemWindow .Topmost = true;
121 117
             }
122
-            this.Hide();
123 118
             APP.W_XHMicroLessonSystemWindow.Show();
124
-          
119
+            this.Hide();
125 120
         }
126 121
         /// <summary>
127 122
         /// 窗体移动

+ 21
- 1
XHWK.WKTool/DAL/DAL_Upload.cs 파일 보기

@@ -120,7 +120,27 @@ namespace XHWK.WKTool.DAL
120 120
             ErrMessage = "";
121 121
             try
122 122
             {
123
-                Model_Video VideoInfo = APP.VideoList.Find(x => x.FileGuid == VideoGuid);
123
+                Model_Video VideoInfo = null;
124
+                foreach (Model_WKData Vdata in APP.WKDataList)
125
+                {
126
+                    if (Vdata.VideoList == null)
127
+                        continue;
128
+                    foreach (Model_Video videoinfo in Vdata.VideoList)
129
+                    {
130
+                        if(videoinfo.FileGuid== VideoGuid)
131
+                        {
132
+                            VideoInfo = videoinfo;
133
+                            break;
134
+                        }
135
+                    }
136
+                    if (VideoInfo != null)
137
+                        break;
138
+                }
139
+                if (VideoInfo==null)
140
+                {
141
+                    ErrMessage = "未找到课程!";
142
+                    return false;
143
+                }
124 144
                 string UploadUrl = FileRequestAddress + "/chunkdb/upchunk";
125 145
                 if (VideoInfo.IsUpload)
126 146
                 {

+ 3
- 1
XHWK.WKTool/FileDirectoryWindow.xaml 파일 보기

@@ -180,7 +180,9 @@
180 180
                     FontSize="20"
181 181
                     ItemContainerStyle="{StaticResource ListBoxItemContainerStyle}"
182 182
                     ItemTemplate="{StaticResource TongjiItem}"
183
-                    ItemsSource="{Binding menuList}" />
183
+                    ItemsSource="{Binding menuList}" 
184
+                           ScrollViewer.HorizontalScrollBarVisibility="Disabled"
185
+                                ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
184 186
             </Grid>
185 187
             <!--第三行 删除 上传 按钮-->
186 188
             <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" Height="32">

+ 9
- 6
XHWK.WKTool/FileDirectoryWindow.xaml.cs 파일 보기

@@ -40,6 +40,7 @@ namespace XHWK.WKTool
40 40
             LoadingVideoList();
41 41
             int i = 1;
42 42
             bool isColour = true;
43
+            pageData.menuList.Clear();
43 44
             //显示视频
44 45
             foreach (Model_Video videoinfo in model_VideoList)
45 46
             {
@@ -74,7 +75,6 @@ namespace XHWK.WKTool
74 75
                     vis= "Collapsed";
75 76
                     cos= "Visible";
76 77
                 }
77
-
78 78
                 pageData.menuList.Add(new FileDirectoryModel()
79 79
                 {
80 80
                     SerialNumber = i,
@@ -141,18 +141,21 @@ namespace XHWK.WKTool
141 141
                 if (buttons[i] == sender)
142 142
                 {
143 143
                     DAL_Upload dAL_Upload = new DAL_Upload();
144
-                    string msg = string.Empty;
145
-                    bool isOK= dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid,out msg);
146
-                    if(isOK)
144
+
145
+
146
+                    if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
147 147
                     {
148 148
                         pageData.menuList[i].Visi = "Visible";
149 149
                         pageData.menuList[i].Coll = "Collapsed";
150
+                        DataContext = pageData;
151
+                        MessageBox.Show("视频上传成功!");
150 152
                     }
151 153
                     else
152 154
                     {
153
-                        System.Windows.Forms.MessageBox.Show(msg, "", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information, System.Windows.Forms.MessageBoxDefaultButton.Button1, System.Windows.Forms.MessageBoxOptions.DefaultDesktopOnly);
154
-                        return;
155
+                        MessageBox.Show(ErrMessage);
155 156
                     }
157
+                    
158
+
156 159
                 }
157 160
             }
158 161
         }

+ 3
- 1
XHWK.WKTool/LoginWindow.xaml.cs 파일 보기

@@ -95,7 +95,9 @@ namespace XHWK.WKTool
95 95
                         }
96 96
                         else
97 97
                         {
98
-                            APP.W_CreateAMicroLessonWindow.Show();
98
+                            APP.W_CreateAMicroLessonWindow.Owner = this;
99
+                            //APP.W_CreateAMicroLessonWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
100
+                            APP.W_CreateAMicroLessonWindow.ShowDialog();
99 101
                         }
100 102
                     }
101 103
                 }

+ 35
- 0
XHWK.WKTool/VideoPlaybackWindow.xaml 파일 보기

@@ -0,0 +1,35 @@
1
+<Window x:Class="XHWK.WKTool.VideoPlaybackWindow"
2
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
+         xmlns:local="clr-namespace:WPFMediaPlayerApp"
7
+        mc:Ignorable="d"
8
+        Title="VideoPlaybackWindow" Height="693" Width="1039" AllowsTransparency="True" 
9
+    ShowInTaskbar="False"
10
+    WindowStartupLocation="CenterOwner"
11
+    WindowStyle="None">
12
+    <Grid Background="#121212">
13
+        <Grid.RowDefinitions>
14
+            <RowDefinition Height="37"/>
15
+            <RowDefinition Height="*"/>
16
+            <RowDefinition Height="60"/>
17
+        </Grid.RowDefinitions>
18
+        <Grid Grid.Row="0" Margin="5,5,5,0">
19
+
20
+            <TextBlock Text="预览" HorizontalAlignment="Left" Foreground="#FFFFFF" FontSize="16"/>
21
+            <TextBlock x:Name="txbVideoName" Text="微课1.mp4" HorizontalAlignment="Center" Foreground="#FFFFFF" FontSize="16"/>
22
+        </Grid>
23
+        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
24
+            <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnShrink_Click" Margin="8,0,8,0">
25
+                <Image Source="./Images/microLessonSystem_19.png"/>
26
+            </Button>
27
+            <Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
28
+                        <Image Source="./Images/microLessonSystem_8.png"/>
29
+                    </Button>
30
+            <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click" >
31
+                <Image Source="./Images/microLessonSystem_10.png"/>
32
+            </Button>
33
+        </StackPanel>
34
+    </Grid>
35
+</Window>

+ 27
- 0
XHWK.WKTool/VideoPlaybackWindow.xaml.cs 파일 보기

@@ -0,0 +1,27 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+using System.Windows;
7
+using System.Windows.Controls;
8
+using System.Windows.Data;
9
+using System.Windows.Documents;
10
+using System.Windows.Input;
11
+using System.Windows.Media;
12
+using System.Windows.Media.Imaging;
13
+using System.Windows.Shapes;
14
+
15
+namespace XHWK.WKTool
16
+{
17
+    /// <summary>
18
+    /// VideoPlaybackWindow.xaml 的交互逻辑
19
+    /// </summary>
20
+    public partial class VideoPlaybackWindow : Window
21
+    {
22
+        public VideoPlaybackWindow()
23
+        {
24
+            InitializeComponent();
25
+        }
26
+    }
27
+}

+ 45
- 36
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs 파일 보기

@@ -304,14 +304,14 @@ namespace XHWK.WKTool
304 304
             if(APP.fileDirectoryWindow==null)
305 305
             {
306 306
                 APP.fileDirectoryWindow = new FileDirectoryWindow();
307
-                APP.fileDirectoryWindow.Topmost = true;
307
+                //APP.fileDirectoryWindow.Topmost = true;
308 308
                 APP.fileDirectoryWindow.Owner = this;
309 309
             }
310 310
             else
311 311
             {
312
-                Initialize();
312
+                APP.fileDirectoryWindow.Initialize();
313 313
             }
314
-            APP.fileDirectoryWindow.Show();
314
+            APP.fileDirectoryWindow.ShowDialog();
315 315
         }
316 316
         /// <summary>
317 317
         /// 关闭事件
@@ -704,6 +704,7 @@ namespace XHWK.WKTool
704 704
                     if (APP.PageDrawList.Count >= APP.pageData.currpage && !string.IsNullOrWhiteSpace(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath))
705 705
                     {
706 706
                         //imgCanvas.Source = new BitmapImage(new Uri(APP.JPaths[APP.pageData.currpage]));
707
+                        imgDocumentation.Source = null;
707 708
                         imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));
708 709
                         //btnOk.Visibility = Visibility.Visible;
709 710
                         //blackboard_canvas.Visibility = Visibility.Collapsed;
@@ -882,10 +883,12 @@ namespace XHWK.WKTool
882 883
                             if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage < APP.PageDrawList.Count)
883 884
                             {
884 885
                                 //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
885
-                                imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
886
+                                imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
887
+                                imgCanvas.Source = null;
886 888
                             }
887 889
                             else
888 890
                             {
891
+                                imgDocumentation.Source = null;
889 892
                                 imgCanvas.Source = null;
890 893
                             }
891 894
                         }
@@ -946,10 +949,12 @@ namespace XHWK.WKTool
946 949
                             if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage < APP.PageDrawList.Count)
947 950
                             {
948 951
                                 //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
949
-                                imgCanvas.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
952
+                                imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
953
+                                imgCanvas.Source = null;
950 954
                             }
951 955
                             else
952 956
                             {
957
+                                imgDocumentation.Source = null;
953 958
                                 imgCanvas.Source = null;
954 959
                             }
955 960
                         }
@@ -1048,36 +1053,6 @@ namespace XHWK.WKTool
1048 1053
         {
1049 1054
             if (IsSuspendR)
1050 1055
             {
1051
-                ImgPrint.Visibility = Visibility.Collapsed;//录制中不可打印
1052
-                ImgPrintTwo.Visibility = Visibility.Visible;
1053
-                btnPrint.IsEnabled = false;
1054
-
1055
-                ImgScreenshot.Visibility = Visibility.Collapsed;//录制中不可截图
1056
-                ImgScreenshotTwo.Visibility = Visibility.Visible;
1057
-                btnScreenshot.IsEnabled = false;
1058
-
1059
-                ImgImport.Visibility = Visibility.Collapsed;//录制中不可导入文档
1060
-                ImgImportTwo.Visibility = Visibility.Visible;
1061
-                btnImport.IsEnabled = false;
1062
-
1063
-                ImgScreenRecording.Visibility = Visibility.Collapsed;//录制中不可录屏
1064
-                ImgScreenRecordingTwo.Visibility = Visibility.Visible;
1065
-                btnScreenRecording.IsEnabled = false;
1066
-
1067
-                ImgUpload.Visibility = Visibility.Collapsed;//录制中不可上传
1068
-                ImgUploadTwo.Visibility = Visibility.Visible;
1069
-                btnUpload.IsEnabled = false;
1070
-
1071
-                ImgMyMine.Visibility = Visibility.Collapsed;//录制中不可点击我的
1072
-                ImgMyMineTwo.Visibility = Visibility.Visible;
1073
-                btnMyMine.IsEnabled = false;
1074
-
1075
-                ImgSetUp.Visibility = Visibility.Collapsed;//录制中不可设置
1076
-                ImgSetUpTwo.Visibility = Visibility.Visible;
1077
-                btnSetUp.IsEnabled = false;
1078
-
1079
-                btnLoginType.IsEnabled = false;
1080
-
1081 1056
                 if (IsFirstR)//是否第一次录制  初始化录制
1082 1057
                 {
1083 1058
                     VideoInfo = new Model_Video();
@@ -1113,6 +1088,39 @@ namespace XHWK.WKTool
1113 1088
                             return;
1114 1089
                         }
1115 1090
                     }
1091
+
1092
+                    #region 禁用按钮
1093
+                    ImgPrint.Visibility = Visibility.Collapsed;//录制中不可打印
1094
+                    ImgPrintTwo.Visibility = Visibility.Visible;
1095
+                    btnPrint.IsEnabled = false;
1096
+
1097
+                    ImgScreenshot.Visibility = Visibility.Collapsed;//录制中不可截图
1098
+                    ImgScreenshotTwo.Visibility = Visibility.Visible;
1099
+                    btnScreenshot.IsEnabled = false;
1100
+
1101
+                    ImgImport.Visibility = Visibility.Collapsed;//录制中不可导入文档
1102
+                    ImgImportTwo.Visibility = Visibility.Visible;
1103
+                    btnImport.IsEnabled = false;
1104
+
1105
+                    ImgScreenRecording.Visibility = Visibility.Collapsed;//录制中不可录屏
1106
+                    ImgScreenRecordingTwo.Visibility = Visibility.Visible;
1107
+                    btnScreenRecording.IsEnabled = false;
1108
+
1109
+                    ImgUpload.Visibility = Visibility.Collapsed;//录制中不可上传
1110
+                    ImgUploadTwo.Visibility = Visibility.Visible;
1111
+                    btnUpload.IsEnabled = false;
1112
+
1113
+                    ImgMyMine.Visibility = Visibility.Collapsed;//录制中不可点击我的
1114
+                    ImgMyMineTwo.Visibility = Visibility.Visible;
1115
+                    btnMyMine.IsEnabled = false;
1116
+
1117
+                    ImgSetUp.Visibility = Visibility.Collapsed;//录制中不可设置
1118
+                    ImgSetUpTwo.Visibility = Visibility.Visible;
1119
+                    btnSetUp.IsEnabled = false;
1120
+
1121
+                    btnLoginType.IsEnabled = false;
1122
+                    #endregion
1123
+
1116 1124
                     IsFirstR = false;
1117 1125
                     RsImgName = new List<string>();
1118 1126
                     timer = new System.Timers.Timer(200);//设置执行一次(false)还是一直执行(true)
@@ -1279,10 +1287,11 @@ namespace XHWK.WKTool
1279 1287
                             Thread.Sleep(100);
1280 1288
                         }
1281 1289
                         FileToolsCommon.DeleteFile(ThumbnailPathName);
1282
-                        VideoInfo.VideoSize = FileToolsCommon.GetFileSizeByMB(VideoSavePathName).ToString() + " MB";
1283 1290
                         VideoInfo.RSTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
1284 1291
                         VideoInfo.VideoPath = VideoSavePathName;
1285 1292
                         VideoInfo.ThumbnailPath = ThumbnailPathName;
1293
+                        Thread.Sleep(500);
1294
+                        VideoInfo.VideoSize = FileToolsCommon.GetFileSizeByMB(VideoSavePathName).ToString() + " MB";
1286 1295
                         APP.FFmpeg.GenerateThumbnails(VideoSavePathName, ThumbnailPathName);
1287 1296
                         VideoInfo.FileGuid = Guid.NewGuid().ToString();
1288 1297
                         VideoInfo.IsUpload = false;

Loading…
취소
저장