Parcourir la source

修改视频名称

tags/录制修改前
zhangxueyang il y a 4 ans
Parent
révision
8137641d5e

BIN
XHWK.WKTool/256.ico Voir le fichier


+ 1
- 1
XHWK.WKTool/FileDirectoryWindow.xaml Voir le fichier

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

+ 58
- 4
XHWK.WKTool/FileDirectoryWindow.xaml.cs Voir le fichier

@@ -22,8 +22,19 @@ namespace XHWK.WKTool
22 22
         /// 视频模型
23 23
         /// </summary>
24 24
         List<Model_Video> model_VideoList =null;
25
+        /// <summary>
26
+        /// 数据列表
27
+        /// </summary>
25 28
         internal FileDirectoryData pageData = new FileDirectoryData();
26 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 39
         /// </summary>
29 40
         public FileDirectoryWindow()
@@ -36,6 +47,8 @@ namespace XHWK.WKTool
36 47
         /// </summary>
37 48
         public void Initialize()
38 49
         {
50
+            MouseNumber = 0;
51
+            IsModify = false;
39 52
             //加载视频列表
40 53
             LoadingVideoList();
41 54
             int i = 1;
@@ -78,7 +91,7 @@ namespace XHWK.WKTool
78 91
                 pageData.menuList.Add(new FileDirectoryModel()
79 92
                 {
80 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 95
                     VideoDuration = 0,
83 96
                     VideoSize = videoinfo.VideoSize,
84 97
                     VideoTime = videoinfo.RSTime,
@@ -86,9 +99,10 @@ namespace XHWK.WKTool
86 99
                     Path = videoinfo.VideoPath,
87 100
                     Colour = colour,
88 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 106
                 i++;
93 107
             }
94 108
             txbSum.Text = pageData.menuList.Count.ToString();
@@ -135,6 +149,7 @@ namespace XHWK.WKTool
135 149
         /// <param name="e"></param>
136 150
         private void BtnUpload_Click(object sender, RoutedEventArgs e) 
137 151
         {
152
+            pageData.menuList[Subscript].IsEnabled = false;
138 153
             List<Button> buttons = FindChilds<Button>(listView1, "btnUpload");
139 154
             for (int i = 0; i < buttons.Count; i++)
140 155
             {
@@ -167,6 +182,7 @@ namespace XHWK.WKTool
167 182
         /// <param name="e"></param>
168 183
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
169 184
         {
185
+            pageData.menuList[Subscript].IsEnabled = false;
170 186
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
171 187
             for (int i = 0; i < buttons.Count; i++)
172 188
             {
@@ -203,6 +219,7 @@ namespace XHWK.WKTool
203 219
         /// <param name="e"></param>
204 220
         private void BtnPlay_Click(object sender, RoutedEventArgs e)
205 221
         {
222
+            pageData.menuList[Subscript].IsEnabled = false;
206 223
             List<Button> buttons = FindChilds<Button>(listView1, "btnPlay");
207 224
             for (int i = 0; i < buttons.Count; i++)
208 225
             {
@@ -278,13 +295,46 @@ namespace XHWK.WKTool
278 295
         /// <param name="e"></param>
279 296
         private void BtnModify_Click(object sender, RoutedEventArgs e)
280 297
         {
298
+            if(IsModify)
299
+            {
300
+                pageData.menuList[Subscript].IsEnabled = false;
301
+            }
302
+
281 303
             List<Button> buttons = FindChilds<Button>(listView1, "btnModify");
282 304
             for (int i = 0; i < buttons.Count; i++)
283 305
             {
284 306
                 if (buttons[i] == sender)
285 307
                 {
286 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,5 +472,9 @@ namespace XHWK.WKTool
422 472
         /// 唯一编号
423 473
         /// </summary>
424 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 Voir le fichier


+ 0
- 22
XHWK.WKTool/UCCamera.xaml Voir le fichier

@@ -1,22 +0,0 @@
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 Voir le fichier

@@ -1,33 +0,0 @@
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 Voir le fichier

@@ -1,35 +0,0 @@
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 Voir le fichier

@@ -1,27 +0,0 @@
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 Voir le fichier

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

+ 1
- 1
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Voir le fichier

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

+ 6
- 14
XHWK.WKTool/XHWK.WKTool.csproj Voir le fichier

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

Chargement…
Annuler
Enregistrer