Bladeren bron

Merge remote-tracking branch 'origin/zxy' into zyy

tags/录制修改前
耀 4 jaren geleden
bovenliggende
commit
489d9f9051

+ 0
- 1
Common/Common.csproj Bestand weergeven

@@ -134,7 +134,6 @@
134 134
     <Compile Include="system\LogHelper.cs" />
135 135
     <Compile Include="system\PrimaryScreen.cs" />
136 136
     <Compile Include="Properties\AssemblyInfo.cs" />
137
-    <Compile Include="system\QueueSync.cs" />
138 137
     <Compile Include="system\SplashScreen.cs" />
139 138
     <Compile Include="system\XmlUtilHelper.cs" />
140 139
   </ItemGroup>

+ 119
- 2
XHWK.WKTool/FileDirectoryWindow.xaml Bestand weergeven

@@ -9,6 +9,76 @@
9 9
     ShowInTaskbar="False"
10 10
     WindowStartupLocation="CenterOwner"
11 11
     WindowStyle="None">
12
+    <Window.Resources>
13
+        <!--  ListBox容器样式  -->
14
+        <Style x:Key="ListBoxItemContainerStyle" TargetType="{x:Type ListBoxItem}">
15
+            <Setter Property="HorizontalContentAlignment" Value="Stretch" />
16
+            <Setter Property="HorizontalAlignment" Value="Stretch" />
17
+            <Setter Property="Template">
18
+                <Setter.Value>
19
+                    <ControlTemplate TargetType="{x:Type ListBoxItem}">
20
+                        <Border
21
+                            x:Name="itemBox"
22
+                            Background="Transparent"
23
+                            BorderBrush="Transparent"
24
+                            BorderThickness="0">
25
+                            <ContentPresenter />
26
+                        </Border>
27
+                        <ControlTemplate.Triggers />
28
+                    </ControlTemplate>
29
+                </Setter.Value>
30
+            </Setter>
31
+        </Style>
32
+        <DataTemplate x:Key="TongjiItem">
33
+            <UniformGrid
34
+                Height="36"
35
+                Margin="0,0,0,0"
36
+                
37
+                Columns="9"
38
+                Rows="1">
39
+                <!--题号-->
40
+                <TextBlock
41
+                    HorizontalAlignment="Center"
42
+                    VerticalAlignment="Center"
43
+                    FontSize="15"
44
+                    Text="{Binding SerialNumber}" />
45
+                <!--题型-->
46
+                <TextBlock
47
+                    HorizontalAlignment="Center"
48
+                    VerticalAlignment="Center"
49
+                    FontSize="15"
50
+                    Text="{Binding VideoName}" />
51
+                <!--分值-->
52
+                <TextBlock
53
+                    HorizontalAlignment="Center"
54
+                    VerticalAlignment="Center"
55
+                    FontSize="15"
56
+                    Text="{Binding VideoDuration}" />
57
+
58
+                <!--平均时长-->
59
+                <TextBlock
60
+                    HorizontalAlignment="Center"
61
+                    VerticalAlignment="Center"
62
+                    FontSize="15"
63
+                    Text="{Binding VideoSize}" />
64
+                <!--最短时长-->
65
+                <TextBlock
66
+                    HorizontalAlignment="Center"
67
+                    VerticalAlignment="Center"
68
+                    FontSize="15"
69
+                    Text="{Binding VideoTime}" />
70
+                <Grid>
71
+
72
+                    <Button Cursor="Hand" Content="详情" FontSize="15"
73
+                        Background="Transparent"
74
+                            Foreground="#2D8CF0"
75
+                        BorderThickness="0"
76
+                     >
77
+                    </Button>
78
+                </Grid>
79
+            </UniformGrid>
80
+        </DataTemplate>
81
+    </Window.Resources>
12 82
     <Viewbox>
13 83
         <Grid Height="729" Width="1030" >
14 84
             <!--分4行-->
@@ -25,8 +95,55 @@
25 95
                 </Grid>
26 96
             </Border>
27 97
            <!--第二行 内容-->
28
-            <Grid>
29
-                
98
+            <Grid Grid.Row="1" Margin="0,15,0,0">
99
+                <Grid.RowDefinitions>
100
+                    <RowDefinition Height="45"/>
101
+                    <RowDefinition Height="*"/>
102
+                </Grid.RowDefinitions>
103
+                <UniformGrid x:Name="uniStatisticsByTitle"
104
+                Grid.Row="0"
105
+                Margin="10,0,10,0"
106
+                Background="#2D8CF0"
107
+                Columns="6"
108
+                Rows="1">
109
+                    <TextBlock
110
+                    HorizontalAlignment="Center"
111
+                    VerticalAlignment="Center"
112
+                    FontSize="15"
113
+                    Text="序号" Foreground="White" />
114
+                    <TextBlock
115
+                    HorizontalAlignment="Center"
116
+                    VerticalAlignment="Center"
117
+                    FontSize="15"
118
+                    Text="视频名称" Foreground="White" />
119
+                    <TextBlock
120
+                    HorizontalAlignment="Center"
121
+                    VerticalAlignment="Center"
122
+                    FontSize="15"
123
+                    Text="视频时长" Foreground="White" />
124
+                    <TextBlock
125
+                    HorizontalAlignment="Center"
126
+                    VerticalAlignment="Center"
127
+                    FontSize="15"
128
+                    Text="视频大小" Foreground="White" />
129
+                    <TextBlock
130
+                    HorizontalAlignment="Center"
131
+                    VerticalAlignment="Center"
132
+                    FontSize="15"
133
+                    Text="日期" Foreground="White" />
134
+                    <TextBlock
135
+                    HorizontalAlignment="Center"
136
+                    VerticalAlignment="Center"
137
+                    FontSize="15"
138
+                    Text="操作" Foreground="White" />
139
+                </UniformGrid>
140
+                <ListBox Grid.Row="1"
141
+                    x:Name="listView1"
142
+                    BorderThickness="0"
143
+                    FontSize="20"
144
+                    ItemContainerStyle="{StaticResource ListBoxItemContainerStyle}"
145
+                    ItemTemplate="{StaticResource TongjiItem}"
146
+                    ItemsSource="{Binding menuList}" />
30 147
             </Grid>
31 148
             <!--第三行 删除 上传 按钮-->
32 149
             <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center">

+ 107
- 0
XHWK.WKTool/FileDirectoryWindow.xaml.cs Bestand weergeven

@@ -1,5 +1,6 @@
1 1
 using Org.BouncyCastle.Asn1.Crmf;
2 2
 using System.Collections.Generic;
3
+using System.Collections.ObjectModel;
3 4
 using System.Windows;
4 5
 using System.Windows.Input;
5 6
 using XHWK.Model;
@@ -15,6 +16,7 @@ namespace XHWK.WKTool
15 16
         /// 视频模型
16 17
         /// </summary>
17 18
         List<Model_Video> model_VideoList =null;
19
+        internal FileDirectoryData pageData = new FileDirectoryData();
18 20
         /// <summary>
19 21
         /// 文件目录
20 22
         /// </summary>
@@ -30,6 +32,7 @@ namespace XHWK.WKTool
30 32
         {
31 33
             //加载视频列表
32 34
             LoadingVideoList();
35
+            int i = 1;
33 36
             //显示视频
34 37
             foreach (Model_Video videoinfo in model_VideoList)
35 38
             {
@@ -45,7 +48,19 @@ namespace XHWK.WKTool
45 48
                 //videoinfo.FileGuid;
46 49
                 //文件存储路径
47 50
                 //videoinfo.VidePath;
51
+
52
+                pageData.menuList.Add(new FileDirectoryModel()
53
+                {
54
+                    SerialNumber = i,
55
+                    VideoName = Common.system.FileToolsCommon.GetIOFileName( videoinfo.VidePath),
56
+                    VideoDuration = 0,
57
+                    VideoSize = videoinfo.VideoSize,
58
+                    VideoTime = videoinfo.RSTime,
59
+
60
+                });
61
+                i++;
48 62
             }
63
+            DataContext = pageData;
49 64
         }
50 65
         /// <summary>
51 66
         /// 加载视频列表
@@ -81,5 +96,97 @@ namespace XHWK.WKTool
81 96
         {
82 97
             DragMove();
83 98
         }
99
+     
100
+    }
101
+    public class FileDirectoryData : NotifyModel
102
+    {
103
+        public ObservableCollection<FileDirectoryModel> menuList { get; set; }
104
+
105
+        public FileDirectoryData()
106
+        {
107
+            menuList = new ObservableCollection<FileDirectoryModel>();
108
+        }
109
+    }
110
+
111
+    public class FileDirectoryModel : NotifyModel
112
+    {
113
+        private int _serialNumber;
114
+        /// <summary>
115
+        /// 序号
116
+        /// </summary>
117
+        public int SerialNumber 
118
+        {
119
+            get => _serialNumber;
120
+            set
121
+            {
122
+                _serialNumber = value;
123
+                OnPropertyChanged("SerialNumber");
124
+            }
125
+        }
126
+        private string _videoName;
127
+        /// <summary>
128
+        /// 视频名称
129
+        /// </summary>
130
+        public string VideoName
131
+        {
132
+            get => _videoName;
133
+            set
134
+            {
135
+                _videoName = value;
136
+                OnPropertyChanged("VideoName");
137
+            }
138
+        }
139
+        private int _videoDuration;
140
+        /// <summary>
141
+        /// 视频时长
142
+        /// </summary>
143
+        public int VideoDuration
144
+        {
145
+            get => _videoDuration;
146
+            set
147
+            {
148
+                _videoDuration = value;
149
+                OnPropertyChanged("VideoDuration");
150
+            }
151
+        }
152
+        private string _videoSize;
153
+        /// <summary>
154
+        /// 视频大小
155
+        /// </summary>
156
+        public string VideoSize
157
+        {
158
+            get => _videoSize;
159
+            set
160
+            {
161
+                _videoSize = value;
162
+                OnPropertyChanged("VideoSize");
163
+            }
164
+        }
165
+        private string _videoTime;
166
+        /// <summary>
167
+        /// 日期
168
+        /// </summary>
169
+        public string VideoTime
170
+        {
171
+            get => _videoTime;
172
+            set
173
+            {
174
+                _videoTime = value;
175
+                OnPropertyChanged("VideoTime");
176
+            }
177
+        }
178
+        private string _colour; 
179
+        /// <summary>
180
+        /// 颜色
181
+        /// </summary>
182
+        public string Colour
183
+        {
184
+            get => _colour;
185
+            set
186
+            {
187
+                _colour = value;
188
+                OnPropertyChanged("Colour");
189
+            }
190
+        }
84 191
     }
85 192
 }

+ 5
- 5
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Bestand weergeven

@@ -292,11 +292,11 @@ namespace XHWK.WKTool
292 292
         /// <param name="e"></param>
293 293
         private void BtnUpload_Click(object sender, RoutedEventArgs e)
294 294
         {
295
-            if (APP.IsLoginType == false)
296
-            {
297
-                Login();
298
-                return;
299
-            }
295
+            //if (APP.IsLoginType == false)
296
+            //{
297
+            //    Login();
298
+            //    return;
299
+            //}
300 300
             APP.fileDirectoryWindow = new FileDirectoryWindow();
301 301
             APP.fileDirectoryWindow.Show();
302 302
 

Laden…
Annuleren
Opslaan