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

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

142
                 {
142
                 {
143
                     DAL_Upload dAL_Upload = new DAL_Upload();
143
                     DAL_Upload dAL_Upload = new DAL_Upload();
144
 
144
 
145
-
146
                     if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
145
                     if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
147
                     {
146
                     {
148
                         pageData.menuList[i].Visi = "Visible";
147
                         pageData.menuList[i].Visi = "Visible";
149
                         pageData.menuList[i].Coll = "Collapsed";
148
                         pageData.menuList[i].Coll = "Collapsed";
149
+
150
                         DataContext = pageData;
150
                         DataContext = pageData;
151
+
151
                         MessageBox.Show("视频上传成功!");
152
                         MessageBox.Show("视频上传成功!");
152
                     }
153
                     }
153
                     else
154
                     else
171
             {
172
             {
172
                 if (buttons[i] == sender)
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
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
4
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
-         xmlns:local="clr-namespace:WPFMediaPlayerApp"
6
+        
7
         mc:Ignorable="d"
7
         mc:Ignorable="d"
8
         Title="VideoPlaybackWindow" Height="693" Width="1039" AllowsTransparency="True" 
8
         Title="VideoPlaybackWindow" Height="693" Width="1039" AllowsTransparency="True" 
9
     ShowInTaskbar="False"
9
     ShowInTaskbar="False"
21
             <TextBlock x:Name="txbVideoName" Text="微课1.mp4" HorizontalAlignment="Center" Foreground="#FFFFFF" FontSize="16"/>
21
             <TextBlock x:Name="txbVideoName" Text="微课1.mp4" HorizontalAlignment="Center" Foreground="#FFFFFF" FontSize="16"/>
22
         </Grid>
22
         </Grid>
23
         <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
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
                 <Image Source="./Images/microLessonSystem_19.png"/>
25
                 <Image Source="./Images/microLessonSystem_19.png"/>
26
             </Button>
26
             </Button>
27
             <Button Cursor="Hand" x:Name="btnEnlarge" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="8,0,8,0">
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"/>
28
                         <Image Source="./Images/microLessonSystem_8.png"/>
29
                     </Button>
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
                 <Image Source="./Images/microLessonSystem_10.png"/>
31
                 <Image Source="./Images/microLessonSystem_10.png"/>
32
             </Button>
32
             </Button>
33
         </StackPanel>
33
         </StackPanel>

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

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

Loading…
Cancel
Save