Browse Source

修改视频名称

tags/录制修改前
zhangxueyang 4 years ago
parent
commit
8137641d5e

BIN
XHWK.WKTool/256.ico View File


+ 1
- 1
XHWK.WKTool/FileDirectoryWindow.xaml View File

6
         xmlns:local="clr-namespace:XHWK.WKTool"
6
         xmlns:local="clr-namespace:XHWK.WKTool"
7
         mc:Ignorable="d"
7
         mc:Ignorable="d"
8
         Title="FileDirectoryWindow" Height="729" Width="1030" AllowsTransparency="True" 
8
         Title="FileDirectoryWindow" Height="729" Width="1030" AllowsTransparency="True" 
9
-    ShowInTaskbar="False"
9
+    ShowInTaskbar="False" MouseLeftButtonDown="Window_MouseLeftButtonDown_1"
10
     WindowStartupLocation="CenterOwner"
10
     WindowStartupLocation="CenterOwner"
11
     WindowStyle="None">
11
     WindowStyle="None">
12
     <Window.Resources>
12
     <Window.Resources>

+ 58
- 4
XHWK.WKTool/FileDirectoryWindow.xaml.cs View File

22
         /// 视频模型
22
         /// 视频模型
23
         /// </summary>
23
         /// </summary>
24
         List<Model_Video> model_VideoList =null;
24
         List<Model_Video> model_VideoList =null;
25
+        /// <summary>
26
+        /// 数据列表
27
+        /// </summary>
25
         internal FileDirectoryData pageData = new FileDirectoryData();
28
         internal FileDirectoryData pageData = new FileDirectoryData();
26
         /// <summary>
29
         /// <summary>
30
+        /// 下标
31
+        /// </summary>
32
+        private int Subscript = 0;
33
+        /// <summary>
34
+        /// 是否是修改状态
35
+        /// </summary>
36
+        private bool IsModify = false;
37
+        /// <summary>
27
         /// 文件目录
38
         /// 文件目录
28
         /// </summary>
39
         /// </summary>
29
         public FileDirectoryWindow()
40
         public FileDirectoryWindow()
36
         /// </summary>
47
         /// </summary>
37
         public void Initialize()
48
         public void Initialize()
38
         {
49
         {
50
+            MouseNumber = 0;
51
+            IsModify = false;
39
             //加载视频列表
52
             //加载视频列表
40
             LoadingVideoList();
53
             LoadingVideoList();
41
             int i = 1;
54
             int i = 1;
78
                 pageData.menuList.Add(new FileDirectoryModel()
91
                 pageData.menuList.Add(new FileDirectoryModel()
79
                 {
92
                 {
80
                     SerialNumber = i,
93
                     SerialNumber = i,
81
-                    VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath),
94
+                    VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".mp4", "").Replace(".flv", "").Replace("avi", "").Trim(),
82
                     VideoDuration = 0,
95
                     VideoDuration = 0,
83
                     VideoSize = videoinfo.VideoSize,
96
                     VideoSize = videoinfo.VideoSize,
84
                     VideoTime = videoinfo.RSTime,
97
                     VideoTime = videoinfo.RSTime,
86
                     Path = videoinfo.VideoPath,
99
                     Path = videoinfo.VideoPath,
87
                     Colour = colour,
100
                     Colour = colour,
88
                     Visi = vis,
101
                     Visi = vis,
89
-                    Coll=cos,
90
-                    FileGuid= videoinfo.FileGuid,
91
-                }) ; ; 
102
+                    Coll = cos,
103
+                    FileGuid = videoinfo.FileGuid,
104
+                    VideoType = videoinfo.VideoType.ToString()
105
+                }) ; 
92
                 i++;
106
                 i++;
93
             }
107
             }
94
             txbSum.Text = pageData.menuList.Count.ToString();
108
             txbSum.Text = pageData.menuList.Count.ToString();
135
         /// <param name="e"></param>
149
         /// <param name="e"></param>
136
         private void BtnUpload_Click(object sender, RoutedEventArgs e) 
150
         private void BtnUpload_Click(object sender, RoutedEventArgs e) 
137
         {
151
         {
152
+            pageData.menuList[Subscript].IsEnabled = false;
138
             List<Button> buttons = FindChilds<Button>(listView1, "btnUpload");
153
             List<Button> buttons = FindChilds<Button>(listView1, "btnUpload");
139
             for (int i = 0; i < buttons.Count; i++)
154
             for (int i = 0; i < buttons.Count; i++)
140
             {
155
             {
167
         /// <param name="e"></param>
182
         /// <param name="e"></param>
168
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
183
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
169
         {
184
         {
185
+            pageData.menuList[Subscript].IsEnabled = false;
170
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
186
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
171
             for (int i = 0; i < buttons.Count; i++)
187
             for (int i = 0; i < buttons.Count; i++)
172
             {
188
             {
203
         /// <param name="e"></param>
219
         /// <param name="e"></param>
204
         private void BtnPlay_Click(object sender, RoutedEventArgs e)
220
         private void BtnPlay_Click(object sender, RoutedEventArgs e)
205
         {
221
         {
222
+            pageData.menuList[Subscript].IsEnabled = false;
206
             List<Button> buttons = FindChilds<Button>(listView1, "btnPlay");
223
             List<Button> buttons = FindChilds<Button>(listView1, "btnPlay");
207
             for (int i = 0; i < buttons.Count; i++)
224
             for (int i = 0; i < buttons.Count; i++)
208
             {
225
             {
278
         /// <param name="e"></param>
295
         /// <param name="e"></param>
279
         private void BtnModify_Click(object sender, RoutedEventArgs e)
296
         private void BtnModify_Click(object sender, RoutedEventArgs e)
280
         {
297
         {
298
+            if(IsModify)
299
+            {
300
+                pageData.menuList[Subscript].IsEnabled = false;
301
+            }
302
+
281
             List<Button> buttons = FindChilds<Button>(listView1, "btnModify");
303
             List<Button> buttons = FindChilds<Button>(listView1, "btnModify");
282
             for (int i = 0; i < buttons.Count; i++)
304
             for (int i = 0; i < buttons.Count; i++)
283
             {
305
             {
284
                 if (buttons[i] == sender)
306
                 if (buttons[i] == sender)
285
                 {
307
                 {
286
                     pageData.menuList[i].IsEnabled = true;
308
                     pageData.menuList[i].IsEnabled = true;
309
+                    Subscript = i;
310
+                    IsModify = true;
311
+                }
312
+            }
313
+        }
314
+        int MouseNumber = 0;
315
+        /// <summary>
316
+        /// 鼠标按下
317
+        /// </summary>
318
+        /// <param name="sender"></param>
319
+        /// <param name="e"></param>
320
+        private void Window_MouseLeftButtonDown_1(object sender, MouseButtonEventArgs e)
321
+        {
322
+            if(IsModify)
323
+            {
324
+                if(MouseNumber>0&& pageData.menuList.Count> Subscript)
325
+                {
326
+                    pageData.menuList[Subscript].IsEnabled = false;
327
+                    try
328
+                    {
329
+                        //FileToolsCommon.MoveDirectory(pageData.menuList[Subscript].Path,);
330
+                    }
331
+                    catch (Exception ex)
332
+                    {
333
+                        MessageBox.Show("无法修改视频名称!" + ex.Message);
334
+                        return;
335
+                    }
287
                 }
336
                 }
337
+                MouseNumber++;
288
             }
338
             }
289
         }
339
         }
290
     }
340
     }
422
         /// 唯一编号
472
         /// 唯一编号
423
         /// </summary>
473
         /// </summary>
424
         public string FileGuid { get; set; } 
474
         public string FileGuid { get; set; } 
475
+        /// <summary>
476
+        /// 视频类型
477
+        /// </summary>
478
+        public string VideoType { get; set; }
425
     }
479
     }
426
 }
480
 }

BIN
XHWK.WKTool/Images/256.ico View File


+ 0
- 22
XHWK.WKTool/UCCamera.xaml View File

1
-<Window x:Class="XHWK.WKTool.UCCamera"
2
-      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
-      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
-      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
5
-      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6
-      xmlns:local="clr-namespace:XHWK.WKTool"
7
-        xmlns:wfi ="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
8
-xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
9
-      mc:Ignorable="d" 
10
-      d:DesignHeight="450" d:DesignWidth="800"
11
-      Title="UCCamera">
12
-
13
-    <Grid>
14
-        <wfi:WindowsFormsHost Grid.Row="0" Grid.Column="0" Height="200" Width="300">
15
-            <aforge:VideoSourcePlayer x:Name="player" Height="200" Width="300"/>
16
-        </wfi:WindowsFormsHost>
17
-        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
18
-            <Button  Name="btnOpenCamera" Click="btnOpenCamera_Click">打开摄像头</Button>
19
-            <Button x:Name="btnDown" Click="btnDown_Click" Content="关闭摄像头"/>
20
-        </StackPanel>
21
-    </Grid>
22
-</Window>

+ 0
- 33
XHWK.WKTool/UCCamera.xaml.cs View File

1
-using Common.system;
2
-
3
-using System.Windows;
4
-
5
-namespace XHWK.WKTool
6
-{
7
-    /// <summary>
8
-    /// UCCamera.xaml 的交互逻辑
9
-    /// </summary>
10
-    public partial class UCCamera : Window
11
-    {
12
-        public UCCamera()
13
-        {
14
-            InitializeComponent();
15
-        }
16
-
17
-        private void btnOpenCamera_Click(object sender, RoutedEventArgs e)
18
-        {
19
-            CameraHelper.IsDisplay = true;
20
-            CameraHelper.SourcePlayer = player;
21
-            CameraHelper.UpdateCameraDevices();
22
-            if (CameraHelper.CameraDevices.Count > 0)
23
-            {
24
-                CameraHelper.SetCameraDevice(0);
25
-            }
26
-        }
27
-
28
-        private void btnDown_Click(object sender, RoutedEventArgs e)
29
-        {
30
-            CameraHelper.CloseDevice();
31
-        }
32
-    }
33
-}

+ 0
- 35
XHWK.WKTool/VideoPlaybackWindow.xaml View File

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
-        
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}}"  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}}"  >
31
-                <Image Source="./Images/microLessonSystem_10.png"/>
32
-            </Button>
33
-        </StackPanel>
34
-    </Grid>
35
-</Window>

+ 0
- 27
XHWK.WKTool/VideoPlaybackWindow.xaml.cs View File

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
-}

+ 1
- 1
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

7
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
7
         xmlns:aforge ="clr-namespace:AForge.Controls;assembly=AForge.Controls"
8
         xmlns:local="clr-namespace:XHWK.WKTool"
8
         xmlns:local="clr-namespace:XHWK.WKTool"
9
         mc:Ignorable="d"
9
         mc:Ignorable="d"
10
-        Title="XHMicroLessonSystemWindow" Height="1040.8" Width="875" WindowStartupLocation="CenterScreen"
10
+        Title="星火微课系统" Height="1040.8" Width="875" WindowStartupLocation="CenterScreen"
11
     WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True"
11
     WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True"
12
    >
12
    >
13
     
13
     

+ 1
- 1
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

1427
             {
1427
             {
1428
                 APP.W_PrintWindow.Initialize("");
1428
                 APP.W_PrintWindow.Initialize("");
1429
             }
1429
             }
1430
-            APP.W_PrintWindow.Show();
1430
+            APP.W_PrintWindow.ShowDialog();
1431
             //int pr = 1;
1431
             //int pr = 1;
1432
             //string msg = string.Empty;
1432
             //string msg = string.Empty;
1433
             //string outPut = string.Empty;
1433
             //string outPut = string.Empty;

+ 6
- 14
XHWK.WKTool/XHWK.WKTool.csproj View File

34
     <ErrorReport>prompt</ErrorReport>
34
     <ErrorReport>prompt</ErrorReport>
35
     <WarningLevel>4</WarningLevel>
35
     <WarningLevel>4</WarningLevel>
36
   </PropertyGroup>
36
   </PropertyGroup>
37
+  <PropertyGroup>
38
+    <ApplicationIcon>256.ico</ApplicationIcon>
39
+  </PropertyGroup>
37
   <ItemGroup>
40
   <ItemGroup>
38
     <Reference Include="AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb, processorArchitecture=MSIL">
41
     <Reference Include="AForge, Version=2.2.5.0, Culture=neutral, PublicKeyToken=c1db6ff4eaa06aeb, processorArchitecture=MSIL">
39
       <HintPath>..\packages\AForge.2.2.5\lib\AForge.dll</HintPath>
42
       <HintPath>..\packages\AForge.2.2.5\lib\AForge.dll</HintPath>
146
     <Compile Include="ScreenRecordingToolbarWindow.xaml.cs">
149
     <Compile Include="ScreenRecordingToolbarWindow.xaml.cs">
147
       <DependentUpon>ScreenRecordingToolbarWindow.xaml</DependentUpon>
150
       <DependentUpon>ScreenRecordingToolbarWindow.xaml</DependentUpon>
148
     </Compile>
151
     </Compile>
149
-    <Compile Include="UCCamera.xaml.cs">
150
-      <DependentUpon>UCCamera.xaml</DependentUpon>
151
-    </Compile>
152
-    <Compile Include="VideoPlaybackWindow.xaml.cs">
153
-      <DependentUpon>VideoPlaybackWindow.xaml</DependentUpon>
154
-    </Compile>
155
     <Compile Include="XHMicroLessonSystemWindow.xaml.cs">
152
     <Compile Include="XHMicroLessonSystemWindow.xaml.cs">
156
       <DependentUpon>XHMicroLessonSystemWindow.xaml</DependentUpon>
153
       <DependentUpon>XHMicroLessonSystemWindow.xaml</DependentUpon>
157
     </Compile>
154
     </Compile>
184
       <Generator>MSBuild:Compile</Generator>
181
       <Generator>MSBuild:Compile</Generator>
185
       <SubType>Designer</SubType>
182
       <SubType>Designer</SubType>
186
     </Page>
183
     </Page>
187
-    <Page Include="VideoPlaybackWindow.xaml">
188
-      <SubType>Designer</SubType>
189
-      <Generator>MSBuild:Compile</Generator>
190
-    </Page>
191
     <Page Include="XHMicroLessonSystemWindow.xaml">
184
     <Page Include="XHMicroLessonSystemWindow.xaml">
192
       <Generator>MSBuild:Compile</Generator>
185
       <Generator>MSBuild:Compile</Generator>
193
       <SubType>Designer</SubType>
186
       <SubType>Designer</SubType>
204
       <SubType>Designer</SubType>
197
       <SubType>Designer</SubType>
205
       <Generator>MSBuild:Compile</Generator>
198
       <Generator>MSBuild:Compile</Generator>
206
     </Page>
199
     </Page>
207
-    <Page Include="UCCamera.xaml">
208
-      <SubType>Designer</SubType>
209
-      <Generator>MSBuild:Compile</Generator>
210
-    </Page>
211
   </ItemGroup>
200
   </ItemGroup>
212
   <ItemGroup>
201
   <ItemGroup>
213
     <Compile Include="Properties\AssemblyInfo.cs">
202
     <Compile Include="Properties\AssemblyInfo.cs">
1505
     <Resource Include="Images\fileDirectory7.png" />
1494
     <Resource Include="Images\fileDirectory7.png" />
1506
     <Resource Include="Images\fileDirectory8.png" />
1495
     <Resource Include="Images\fileDirectory8.png" />
1507
   </ItemGroup>
1496
   </ItemGroup>
1497
+  <ItemGroup>
1498
+    <Resource Include="256.ico" />
1499
+  </ItemGroup>
1508
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1500
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
1509
 </Project>
1501
 </Project>

Loading…
Cancel
Save