Ver código fonte

zhao:1修改倒计时 2解决转码失败 3调整上传

tags/录制修改前
耀 4 anos atrás
pai
commit
ceba946abf

+ 2
- 4
XHWK.WKTool/CountdownWindow.xaml Ver arquivo

@@ -20,9 +20,7 @@
20 20
                     Height="600"
21 21
                     gifLib:ImageBehavior.AnimatedSource=".\Images\countdown.gif" MediaElement.MediaEnded="Image_MediaEnded"/>-->
22 22
         <Image x:Name="imgLoding"
23
-                    Width="600"
24
-                    Height="600"
25
-                    Source=".\Images\countdown3_1.png" />
26
-        <Label x:Name="lblShortcut" Content="开始/暂停:Ctrl+F5     停止:Ctrl+S" Height="77" Margin="0,750,0,0" Width="682" Foreground="#FF5B5151" FontSize="36" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Visibility="Collapsed"/>
23
+                    Source=".\Images\countdown3_1.png" HorizontalAlignment="Center" VerticalAlignment="Center" Width="300" />
24
+        <Label x:Name="lblShortcut" Content="开始/暂停:Ctrl+F5     停止:Ctrl+S" Height="77" Margin="0,450,0,0" Width="682" Foreground="#FF5B5151" FontSize="36" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Visibility="Collapsed"/>
27 25
     </Grid>
28 26
 </Window>

+ 7
- 7
XHWK.WKTool/UControl/Uc_VideoItem.xaml Ver arquivo

@@ -5,14 +5,14 @@
5 5
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
6 6
              xmlns:local="clr-namespace:XHWK.WKTool.UControl"
7 7
              mc:Ignorable="d" 
8
-             d:DesignHeight="300" d:DesignWidth="250">
8
+             d:DesignHeight="270" d:DesignWidth="250">
9 9
     <Grid>
10 10
         <Button x:Name="BtnVideoPlay" HorizontalAlignment="Center" Width="200" Height="130" Margin="25,10,25,0" VerticalAlignment="Top" Cursor="Hand" Click="BtnVideoPlay_Click">
11 11
             <Image x:Name="ImgVideo" VerticalAlignment="Top"  Width="200" Height="130" Margin="0,0,0,0" Cursor="Hand" Stretch="Fill"/>
12 12
         </Button>
13 13
         <Image x:Name="ImgVideoPlay" Source="/星火微课;component/Images/VideoList_Play.png" HorizontalAlignment="Center" VerticalAlignment="Top" Width="60" Margin="0,50,0,0" Cursor="Hand" MouseLeftButtonDown="Image_MouseLeftButtonDown" />
14
-        <TextBlock x:Name="TbName" Text="一二三四五六七八九十..." HorizontalAlignment="Center" Margin="15,160,15,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#FF3492F4" FontSize="18" TextAlignment="Center" ToolTip="" Visibility="Visible" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
15
-        <TextBox x:Name="TxtModify" HorizontalAlignment="Left" Height="30" Margin="25,157,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="180" FontSize="16" Visibility="Hidden" LostFocus="TxtModify_LostFocus" KeyUp="TxtModify_KeyUp">
14
+        <TextBlock x:Name="TbName" Text="一二三四五六七八九十一..." HorizontalAlignment="Center" Margin="15,150,15,0" TextWrapping="Wrap" VerticalAlignment="Top" Foreground="#FF3492F4" FontSize="18" TextAlignment="Center" ToolTip="" Visibility="Visible" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown"/>
15
+        <TextBox x:Name="TxtModify" HorizontalAlignment="Left" Height="30" Margin="25,147,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="180" FontSize="16" Visibility="Hidden" LostFocus="TxtModify_LostFocus" KeyUp="TxtModify_KeyUp">
16 16
             <TextBox.Resources>
17 17
                 <Style TargetType="{x:Type Border}">
18 18
                     <Setter Property="CornerRadius" Value="3"/>
@@ -20,7 +20,7 @@
20 20
                 </Style>
21 21
             </TextBox.Resources>
22 22
         </TextBox>
23
-        <Button x:Name="BtnNameModifyOK" HorizontalAlignment="Left" Margin="200,157,0,0" VerticalAlignment="Top" Width="30" Height="30" Background="White" BorderBrush="#FFABADB3" Click="BtnNameModifyOK_Click" Visibility="Hidden">
23
+        <Button x:Name="BtnNameModifyOK" HorizontalAlignment="Left" Margin="200,147,0,0" VerticalAlignment="Top" Width="30" Height="30" Background="White" BorderBrush="#FFABADB3" Click="BtnNameModifyOK_Click" Visibility="Hidden">
24 24
             <Button.Resources>
25 25
                 <Style TargetType="{x:Type Border}">
26 26
                     <Setter Property="CornerRadius" Value="3"/>
@@ -29,9 +29,9 @@
29 29
             </Button.Resources>
30 30
             <Image Source="/星火微课;component/Images/VideoList_OK.png"></Image>
31 31
         </Button>
32
-        <Label x:Name="lblDateSize" Content="2020-10-10 10:10:00|1000.00MB" HorizontalAlignment="Center" Margin="0,205,0,0" VerticalAlignment="Top" Height="30" Width="240" Foreground="#FF9A9A9A" FontSize="13" HorizontalContentAlignment="Center"/>
33
-        <Button x:Name="BtnUpload" Content="上传" HorizontalAlignment="Left" Margin="25,248,0,0" VerticalAlignment="Top" Width="90" Height="34" Background="#FF3492F4" Foreground="White" FontSize="18" Click="BtnUpload_Click"/>
34
-        <Button x:Name="BtnDelVideo" Content="删除" HorizontalAlignment="Right" Margin="0,248,25,0" VerticalAlignment="Top" Width="90" Height="34" Foreground="White" FontSize="18" Background="#FFF0582C" Click="BtnDelVideo_Click"/>
32
+        <Label x:Name="lblDateSize" Content="2020-10-10 10:10:00|1000.00MB" HorizontalAlignment="Center" Margin="0,180,0,0" VerticalAlignment="Top" Height="30" Width="240" Foreground="#FF9A9A9A" FontSize="13" HorizontalContentAlignment="Center"/>
33
+        <Button x:Name="BtnUpload" Content="上传" HorizontalAlignment="Left" Margin="25,220,0,0" VerticalAlignment="Top" Width="90" Height="34" Background="#FF3492F4" Foreground="White" FontSize="18" Click="BtnUpload_Click"/>
34
+        <Button x:Name="BtnDelVideo" Content="删除" HorizontalAlignment="Right" Margin="0,220,25,0" VerticalAlignment="Top" Width="90" Height="34" Foreground="White" FontSize="18" Background="#FFF0582C" Click="BtnDelVideo_Click"/>
35 35
 
36 36
     </Grid>
37 37
 </UserControl>

+ 16
- 9
XHWK.WKTool/UControl/Uc_VideoItem.xaml.cs Ver arquivo

@@ -69,13 +69,16 @@ namespace XHWK.WKTool.UControl
69 69
                 ImgVideo.Source = ImageHelper.ReadBitmapImageFile(VideoModel.ThumbnailPath);// new BitmapImage(new Uri(VideoModel.ThumbnailPath));
70 70
             }
71 71
             string videoName = FileToolsCommon.GetIOFileNameNoExtension(VideoModel.VideoPath);
72
-            TbName.Text = videoName.Length > 20 ? videoName.Substring(0, 20) + "..." : videoName;
72
+            TbName.Text = videoName.Length > 11 ? videoName.Substring(0, 11) + "..." : videoName;
73 73
             TbName.ToolTip = videoName;
74 74
             lblDateSize.Content = VideoModel.RSTime + "|" + VideoModel.VideoSize;
75
-            //if (VideoModel.IsUpload)
76
-            //{
77
-            //    BtnUpload.Visibility = Visibility.Hidden;
78
-            //}
75
+            if (VideoModel.IsUpload)
76
+            {
77
+                //BtnUpload.Visibility = Visibility.Hidden;
78
+                BtnUpload.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#9EA0A7"));
79
+                BtnUpload.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999"));
80
+                BtnUpload.IsEnabled = false;
81
+            }
79 82
         }
80 83
         #endregion
81 84
 
@@ -137,7 +140,7 @@ namespace XHWK.WKTool.UControl
137 140
                 if (ModifyPathName(VideoModel.FileGuid, TxtModify.Text + "." + VideoModel.VideoType, out ErrMessage))
138 141
                 {
139 142
                     //保存成功
140
-                    TbName.Text = TxtModify.Text.Length > 20 ? TxtModify.Text.Substring(0, 20) + "..." : TxtModify.Text;
143
+                    TbName.Text = TxtModify.Text.Length > 11 ? TxtModify.Text.Substring(0, 11) + "..." : TxtModify.Text;
141 144
                     TbName.ToolTip = TxtModify.Text;
142 145
                     TbName.Visibility = Visibility.Visible;
143 146
                     TxtModify.Visibility = Visibility.Hidden;
@@ -313,7 +316,9 @@ namespace XHWK.WKTool.UControl
313 316
             if (!IsUpLoad)
314 317
             {
315 318
                 IsUpLoad = true;
316
-                BtnUpload.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#9EA0A7"));
319
+                //BtnUpload.IsEnabled = false;
320
+                //BtnUpload.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#9EA0A7"));
321
+                //BtnUpload.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999"));
317 322
                 DAL_Upload dAL_Upload = new DAL_Upload();
318 323
 
319 324
                 if (dAL_Upload.UploadVideo(VideoModel.FileGuid, out string ErrMessage))
@@ -335,7 +340,6 @@ namespace XHWK.WKTool.UControl
335 340
                 else
336 341
                 {
337 342
                     IsUpLoad = false;
338
-                    BtnUpload.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#3491F4"));
339 343
                     MessageWindow.Show(ErrMessage);
340 344
                 }
341 345
             }
@@ -350,7 +354,10 @@ namespace XHWK.WKTool.UControl
350 354
             if ("上传成功".Equals(text))
351 355
             {
352 356
                 W_UploadWindow.Close();
353
-                BtnUpload.Visibility = Visibility.Hidden;
357
+                //BtnUpload.Visibility = Visibility.Hidden;
358
+                BtnUpload.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#9EA0A7"));
359
+                BtnUpload.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#999999"));
360
+                BtnUpload.IsEnabled = false;
354 361
             }
355 362
         }
356 363
 

+ 2
- 2
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Ver arquivo

@@ -3140,8 +3140,8 @@ namespace XHWK.WKTool
3140 3140
                         //生成缩略图
3141 3141
                         bool ThuRes = APP.FFmpeg.GenerateThumbnails(VideoSynthesisPathName, ThumbnailPathName,200,130);
3142 3142
                         Thread.Sleep(500);
3143
-                        int imgW = (int)GridMain.ActualWidth + (GridMain.ActualWidth % 2 > 0 ? 1 : 0);
3144
-                        int imgH = (int)GridMain.ActualHeight + (GridMain.ActualHeight % 2 > 0 ? 1 : 0);
3143
+                        int imgW = (int)GridMain.ActualWidth + (((int)GridMain.ActualWidth) % 2 > 0 ? 1 : 0);
3144
+                        int imgH = (int)GridMain.ActualHeight + (((int)GridMain.ActualHeight) % 2 > 0 ? 1 : 0);
3145 3145
                         //if (ThuRes)
3146 3146
                         //{
3147 3147
                         //    Bitmap bmp = ImageHelper.ReadBitmapFile(ThumbnailPathName);

Carregando…
Cancelar
Salvar