Browse Source

播放

# Conflicts:
#	XHWK.WKTool/FileDirectoryWindow.xaml.cs
tags/录制修改前
zhangxueyang 4 years ago
parent
commit
351ae3a605

+ 4
- 7
XHWK.WKTool/App.cs View File

@@ -9,6 +9,7 @@ using System.Security.Principal;
9 9
 using System.Security.RightsManagement;
10 10
 using System.Threading;
11 11
 using System.Windows;
12
+using System.Windows.Documents;
12 13
 using System.Windows.Threading;
13 14
 
14 15
 using TStudyDigitalPen.HID;
@@ -142,6 +143,7 @@ namespace XHWK.WKTool
142 143
                     // 定义Application对象作为整个应用程序入口
143 144
                     Application app = new Application();
144 145
                     app.Run(W_CreateAMicroLessonWindow);
146
+                    //Application.Run(W_CreateAMicroLessonWindow);
145 147
                 }
146 148
                 else
147 149
                 {
@@ -161,7 +163,8 @@ namespace XHWK.WKTool
161 163
                         return;
162 164
                     }
163 165
                     //退出
164
-                    Application.Current.Shutdown();
166
+                    //Current.Shutdown();
167
+                    Environment.Exit(0);
165 168
 
166 169
                 }
167 170
                 #endregion
@@ -172,12 +175,6 @@ namespace XHWK.WKTool
172 175
                 string ErrMessage = "【进程】(Main):进程意外关闭。 " + ex.Message;
173 176
                 LogHelper.WriteErrLog(ErrMessage, ex);
174 177
             }
175
-
176
-            //app.DispatcherUnhandledException += MyApp_DispatcherUnhandledException;
177
-            //Application app = new Application();
178
-            //W_CreateAMicroLessonWindow = new CreateAMicroLessonWindow();
179
-            //app.Run(W_CreateAMicroLessonWindow);
180
-            //LogHelper.WriteInfoLog("启动项目");
181 178
             StopSameProcess();
182 179
             Killffmpeg();
183 180
             LatticeFileHelper.RunPrintConfig();

+ 23
- 2
XHWK.WKTool/FileDirectoryWindow.xaml.cs View File

@@ -142,12 +142,13 @@ namespace XHWK.WKTool
142 142
                 {
143 143
                     DAL_Upload dAL_Upload = new DAL_Upload();
144 144
 
145
-
146 145
                     if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
147 146
                     {
148 147
                         pageData.menuList[i].Visi = "Visible";
149 148
                         pageData.menuList[i].Coll = "Collapsed";
149
+
150 150
                         DataContext = pageData;
151
+
151 152
                         MessageBox.Show("视频上传成功!");
152 153
                     }
153 154
                     else
@@ -171,7 +172,27 @@ namespace XHWK.WKTool
171 172
             {
172 173
                 if (buttons[i] == sender)
173 174
                 {
174
-
175
+                    foreach (Model_WKData wKData in APP.WKDataList)
176
+                    {
177
+                        if (wKData.VideoList == null)
178
+                            continue;
179
+                        if(wKData.VideoList.Exists(x=>x.FileGuid==pageData.menuList[i].FileGuid))
180
+                        {
181
+                            try
182
+                            {
183
+                                FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).VideoPath);
184
+                                FileToolsCommon.DeleteFile(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid).ThumbnailPath);
185
+                                wKData.VideoList.Remove(wKData.VideoList.Find(x => x.FileGuid == pageData.menuList[i].FileGuid));
186
+                                Initialize();
187
+                                return;
188
+                            }
189
+                            catch (Exception ex)
190
+                            {
191
+                                MessageBox.Show("无法删除视频!"+ex.Message);
192
+                                return;
193
+                            }
194
+                        }
195
+                    }
175 196
                 }
176 197
             }
177 198
         }

+ 3
- 3
XHWK.WKTool/VideoPlaybackWindow.xaml View File

@@ -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:WPFMediaPlayerApp"
6
+        
7 7
         mc:Ignorable="d"
8 8
         Title="VideoPlaybackWindow" Height="693" Width="1039" AllowsTransparency="True" 
9 9
     ShowInTaskbar="False"
@@ -21,13 +21,13 @@
21 21
             <TextBlock x:Name="txbVideoName" Text="微课1.mp4" HorizontalAlignment="Center" Foreground="#FFFFFF" FontSize="16"/>
22 22
         </Grid>
23 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">
24
+            <Button Cursor="Hand" x:Name="btnShrink" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"  Margin="8,0,8,0">
25 25
                 <Image Source="./Images/microLessonSystem_19.png"/>
26 26
             </Button>
27 27
             <Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
28 28
                         <Image Source="./Images/microLessonSystem_8.png"/>
29 29
                     </Button>
30
-            <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click" >
30
+            <Button Cursor="Hand" x:Name="btnDown" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"  >
31 31
                 <Image Source="./Images/microLessonSystem_10.png"/>
32 32
             </Button>
33 33
         </StackPanel>

+ 7
- 0
XHWK.WKTool/XHWK.WKTool.csproj View File

@@ -149,6 +149,9 @@
149 149
     <Compile Include="UCCamera.xaml.cs">
150 150
       <DependentUpon>UCCamera.xaml</DependentUpon>
151 151
     </Compile>
152
+    <Compile Include="VideoPlaybackWindow.xaml.cs">
153
+      <DependentUpon>VideoPlaybackWindow.xaml</DependentUpon>
154
+    </Compile>
152 155
     <Compile Include="XHMicroLessonSystemWindow.xaml.cs">
153 156
       <DependentUpon>XHMicroLessonSystemWindow.xaml</DependentUpon>
154 157
     </Compile>
@@ -181,6 +184,10 @@
181 184
       <Generator>MSBuild:Compile</Generator>
182 185
       <SubType>Designer</SubType>
183 186
     </Page>
187
+    <Page Include="VideoPlaybackWindow.xaml">
188
+      <SubType>Designer</SubType>
189
+      <Generator>MSBuild:Compile</Generator>
190
+    </Page>
184 191
     <Page Include="XHMicroLessonSystemWindow.xaml">
185 192
       <Generator>MSBuild:Compile</Generator>
186 193
       <SubType>Designer</SubType>

Loading…
Cancel
Save