Browse Source

ui优化

tags/录制修改前
zhangxueyang 4 years ago
parent
commit
7472c5d8f2

+ 2
- 0
XHWK.WKTool/App.cs View File

131
         /// 提示窗口
131
         /// 提示窗口
132
         /// </summary>
132
         /// </summary>
133
         public static PromptWindow W_PromptWindow = null;
133
         public static PromptWindow W_PromptWindow = null;
134
+        public static LoadDialog myloading;
134
         #endregion
135
         #endregion
135
         #endregion
136
         #endregion
136
 
137
 
137
         [STAThread]
138
         [STAThread]
138
         private static void Main()
139
         private static void Main()
139
         {
140
         {
141
+            myloading = new LoadDialog();
140
             StopSameProcess();
142
             StopSameProcess();
141
             Killffmpeg();
143
             Killffmpeg();
142
             LatticeFileHelper.RunPrintConfig();
144
             LatticeFileHelper.RunPrintConfig();

+ 98
- 64
XHWK.WKTool/FileDirectoryWindow.xaml View File

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" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" MouseLeftButtonUp="Window_MouseLeftButtonUp"
9
     ShowInTaskbar="False" MouseLeftButtonDown="Window_MouseLeftButtonDown_1" MouseLeftButtonUp="Window_MouseLeftButtonUp"
10
-    WindowStartupLocation="CenterOwner"
10
+    WindowStartupLocation="CenterOwner" 
11
     WindowStyle="None">
11
     WindowStyle="None">
12
     <Window.Resources>
12
     <Window.Resources>
13
         <!--  ListBox容器样式  -->
13
         <!--  ListBox容器样式  -->
31
         </Style>
31
         </Style>
32
         <DataTemplate x:Key="TongjiItem">
32
         <DataTemplate x:Key="TongjiItem">
33
             <UniformGrid
33
             <UniformGrid
34
-                Height="36"
34
+                Height="50"
35
                 Margin="0,0,0,0"
35
                 Margin="0,0,0,0"
36
                 Background="{Binding Colour}"
36
                 Background="{Binding Colour}"
37
                 Columns="5"
37
                 Columns="5"
40
                 <TextBlock 
40
                 <TextBlock 
41
                     HorizontalAlignment="Center"
41
                     HorizontalAlignment="Center"
42
                     VerticalAlignment="Center"
42
                     VerticalAlignment="Center"
43
-                    FontSize="15"
43
+                    FontSize="16"
44
                     Text="{Binding SerialNumber}" />
44
                     Text="{Binding SerialNumber}" />
45
                 <Grid>
45
                 <Grid>
46
                     <StackPanel Orientation="Horizontal"   HorizontalAlignment="Center"
46
                     <StackPanel Orientation="Horizontal"   HorizontalAlignment="Center"
48
                         <TextBox IsEnabled="{Binding IsEnabled}"
48
                         <TextBox IsEnabled="{Binding IsEnabled}"
49
                     HorizontalAlignment="Center"
49
                     HorizontalAlignment="Center"
50
                     VerticalAlignment="Center"
50
                     VerticalAlignment="Center"
51
-                    FontSize="15"
52
-                    Text="{Binding VideoName,Mode=TwoWay}" />
51
+                    FontSize="16" Height="30" Padding="0,5,0,0"
52
+                    Text="{Binding VideoName,Mode=TwoWay}" Width="150"/>
53
                         <Button x:Name="btnModify" Background="Transparent"
53
                         <Button x:Name="btnModify" Background="Transparent"
54
                                 Cursor="Hand"
54
                                 Cursor="Hand"
55
                         BorderThickness="0" Click="BtnModify_Click">
55
                         BorderThickness="0" Click="BtnModify_Click">
56
                             <Grid>
56
                             <Grid>
57
-                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
58
-                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
57
+                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
58
+                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
59
                             </Grid>
59
                             </Grid>
60
                         </Button>
60
                         </Button>
61
                     </StackPanel>
61
                     </StackPanel>
73
                 <TextBlock
73
                 <TextBlock
74
                     HorizontalAlignment="Center"
74
                     HorizontalAlignment="Center"
75
                     VerticalAlignment="Center"
75
                     VerticalAlignment="Center"
76
-                    FontSize="15"
76
+                    FontSize="16"
77
                     Text="{Binding VideoSize}" />
77
                     Text="{Binding VideoSize}" />
78
                 <!--最短时长-->
78
                 <!--最短时长-->
79
                 <TextBlock
79
                 <TextBlock
80
                     HorizontalAlignment="Center"
80
                     HorizontalAlignment="Center"
81
                     VerticalAlignment="Center"
81
                     VerticalAlignment="Center"
82
-                    FontSize="15"
82
+                    FontSize="16"
83
                     Text="{Binding VideoTime}" />
83
                     Text="{Binding VideoTime}" />
84
 
84
 
85
                 <Grid>
85
                 <Grid>
89
                                 Cursor="Hand"
89
                                 Cursor="Hand"
90
                         BorderThickness="0" Click="BtnPlay_Click">
90
                         BorderThickness="0" Click="BtnPlay_Click">
91
                             <Grid>
91
                             <Grid>
92
-                                <Image Source="./Images/fileDirectory1.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
93
-                                <Image Source="./Images/fileDirectory2.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
92
+                                <Image Source="./Images/fileDirectory1.png" Margin="10" Height="20" Visibility="{Binding vis}"/>
93
+                                <Image Source="./Images/fileDirectory2.png" Margin="10" Visibility="{Binding cos}"/>
94
                             </Grid>
94
                             </Grid>
95
                         </Button>
95
                         </Button>
96
                         <Button x:Name="btnUpload" Background="Transparent"
96
                         <Button x:Name="btnUpload" Background="Transparent"
97
                                 Cursor="Hand"
97
                                 Cursor="Hand"
98
                         BorderThickness="0" Click="BtnUpload_Click">
98
                         BorderThickness="0" Click="BtnUpload_Click">
99
                             <Grid>
99
                             <Grid>
100
-                                <Image Source="./Images/fileDirectory7.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
101
-                                <Image Source="./Images/fileDirectory8.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
100
+                                <Image Source="./Images/fileDirectory7.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
101
+                                <Image Source="./Images/fileDirectory8.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
102
                             </Grid>
102
                             </Grid>
103
                         </Button>
103
                         </Button>
104
                         <Button x:Name="btnDelete" Background="Transparent"
104
                         <Button x:Name="btnDelete" Background="Transparent"
105
                                 Cursor="Hand"
105
                                 Cursor="Hand"
106
                         BorderThickness="0" Click="BtnDelete_Click">
106
                         BorderThickness="0" Click="BtnDelete_Click">
107
                             <Grid>
107
                             <Grid>
108
-                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Visibility="{Binding vis}"/>
109
-                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Visibility="{Binding cos}"/>
108
+                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
109
+                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
110
                             </Grid>
110
                             </Grid>
111
                         </Button>
111
                         </Button>
112
                     </StackPanel>
112
                     </StackPanel>
117
         </DataTemplate>
117
         </DataTemplate>
118
     </Window.Resources>
118
     </Window.Resources>
119
     <Viewbox>
119
     <Viewbox>
120
-        <Grid Height="729" Width="1030" >
121
-            <!--分4行-->
122
-            <Grid.RowDefinitions>
123
-                <RowDefinition Height="45"/>
124
-                <RowDefinition Height="*"/>
125
-                <RowDefinition Height="30"/>
126
-            </Grid.RowDefinitions>
127
-            <!--第一行 标题-->
128
-            <Border Grid.Row="0" Background="#2D8CF0">
129
-                <Grid  MouseLeftButtonDown="Window_MouseLeftButtonDown">
130
-                    <TextBlock Text="文件目录" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
131
-                    <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnDown_Click"/>
132
-                </Grid>
133
-            </Border>
134
-           <!--第二行 内容-->
135
-            <Grid Grid.Row="1" Margin="0,15,0,0">
136
-                <Grid.RowDefinitions>
137
-                    <RowDefinition Height="45"/>
138
-                    <RowDefinition Height="*"/>
139
-                </Grid.RowDefinitions>
140
-                <UniformGrid x:Name="uniStatisticsByTitle"
120
+        <Border Background="#fefefe" Height="729" Width="1030">
121
+            <Border Background="#fdfdfd" Height="727" Width="1028">
122
+                <Border Background="#fcfcfc" Height="725" Width="1026">
123
+                    <Border Background="#fafafa" Height="723" Width="1024">
124
+                        <Border Background="#f9f9f9" Height="721" Width="1022">
125
+                            <Border Background="#f6f6f6" Height="719" Width="1020">
126
+                                <Border Background="#f3f3f3" Height="717" Width="1018">
127
+                                    <Border Background="#eeeeee" Height="715" Width="1016">
128
+                                        <Border Background="#e9e9e9" Height="713" Width="1014">
129
+                                            <Border Background="#e2e2e2" Height="711" Width="1012">
130
+                                                <Border Background="#dcdcdc" Height="709" Width="1010">
131
+                                                    <Border Background="#d3d3d3" Height="707" Width="1008">
132
+                                                        <Border Background="#cccccc" Height="705" Width="1006">
133
+                                                            <Border Background="#bfbfbf" Height="703" Width="1004">
134
+                                                                <Border Background="#aeaeae" Height="701" Width="1002">
135
+                                                                    <Border Background="#bababa" Height="699" Width="1000">
136
+                                                                        <Border Background="#e4e4e4" Height="697" Width="998">
137
+                                                                            <Grid Height="695" Width="998" Background="#FFFFFF" Margin="0,-1,0,0">
138
+                                                                                <!--分4行-->
139
+                                                                                <Grid.RowDefinitions>
140
+                                                                                    <RowDefinition Height="45"/>
141
+                                                                                    <RowDefinition Height="*"/>
142
+                                                                                    <RowDefinition Height="30"/>
143
+                                                                                </Grid.RowDefinitions>
144
+                                                                                <!--第一行 标题-->
145
+                                                                                <Border Grid.Row="0" Background="#2D8CF0">
146
+                                                                                    <Grid  MouseLeftButtonDown="Window_MouseLeftButtonDown">
147
+                                                                                        <TextBlock Text="文件目录" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
148
+                                                                                        <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="btnDown_Click"/>
149
+                                                                                    </Grid>
150
+                                                                                </Border>
151
+                                                                                <!--第二行 内容-->
152
+                                                                                <Grid Grid.Row="1" Margin="0,15,0,0">
153
+                                                                                    <Grid.RowDefinitions>
154
+                                                                                        <RowDefinition Height="45"/>
155
+                                                                                        <RowDefinition Height="*"/>
156
+                                                                                    </Grid.RowDefinitions>
157
+                                                                                    <UniformGrid x:Name="uniStatisticsByTitle"
141
                 Grid.Row="0"
158
                 Grid.Row="0"
142
                 Margin="10,0,10,0"
159
                 Margin="10,0,10,0"
143
                 Background="#2D8CF0"
160
                 Background="#2D8CF0"
144
                 Columns="5"
161
                 Columns="5"
145
                 Rows="1">
162
                 Rows="1">
146
-                    <TextBlock
163
+                                                                                        <TextBlock
147
                     HorizontalAlignment="Center"
164
                     HorizontalAlignment="Center"
148
                     VerticalAlignment="Center"
165
                     VerticalAlignment="Center"
149
-                    FontSize="15"
166
+                    FontSize="16"
150
                     Text="序号" Foreground="White" />
167
                     Text="序号" Foreground="White" />
151
-                    <TextBlock
168
+                                                                                        <TextBlock
152
                     HorizontalAlignment="Center"
169
                     HorizontalAlignment="Center"
153
                     VerticalAlignment="Center"
170
                     VerticalAlignment="Center"
154
-                    FontSize="15"
171
+                    FontSize="16"
155
                     Text="视频名称" Foreground="White" />
172
                     Text="视频名称" Foreground="White" />
156
-                    <!--<TextBlock
173
+                                                                                        <!--<TextBlock
157
                     HorizontalAlignment="Center"
174
                     HorizontalAlignment="Center"
158
                     VerticalAlignment="Center"
175
                     VerticalAlignment="Center"
159
                     FontSize="15"
176
                     FontSize="15"
160
                     Text="视频时长" Foreground="White" />-->
177
                     Text="视频时长" Foreground="White" />-->
161
-                    <TextBlock
178
+                                                                                        <TextBlock
162
                     HorizontalAlignment="Center"
179
                     HorizontalAlignment="Center"
163
                     VerticalAlignment="Center"
180
                     VerticalAlignment="Center"
164
-                    FontSize="15"
181
+                    FontSize="16"
165
                     Text="视频大小" Foreground="White" />
182
                     Text="视频大小" Foreground="White" />
166
-                    <TextBlock
183
+                                                                                        <TextBlock
167
                     HorizontalAlignment="Center"
184
                     HorizontalAlignment="Center"
168
                     VerticalAlignment="Center"
185
                     VerticalAlignment="Center"
169
-                    FontSize="15"
186
+                    FontSize="16"
170
                     Text="日期" Foreground="White" />
187
                     Text="日期" Foreground="White" />
171
-                    <TextBlock
188
+                                                                                        <TextBlock
172
                     HorizontalAlignment="Center"
189
                     HorizontalAlignment="Center"
173
                     VerticalAlignment="Center"
190
                     VerticalAlignment="Center"
174
-                    FontSize="15"
191
+                    FontSize="16"
175
                     Text="操作" Foreground="White" />
192
                     Text="操作" Foreground="White" />
176
-                </UniformGrid>
177
-                <ListBox Grid.Row="1"
193
+                                                                                    </UniformGrid>
194
+                                                                                    <ListBox Grid.Row="1"
178
                     x:Name="listView1"
195
                     x:Name="listView1"
179
                     BorderThickness="0"
196
                     BorderThickness="0"
180
                     FontSize="20"
197
                     FontSize="20"
183
                     ItemsSource="{Binding menuList}" 
200
                     ItemsSource="{Binding menuList}" 
184
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
201
                            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
185
                                 ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
202
                                 ScrollViewer.VerticalScrollBarVisibility="Disabled"/>
186
-            </Grid>
187
-            <!--第三行 删除 上传 按钮-->
188
-            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Height="32">
189
-                <TextBlock Text="共" FontSize="20" Padding="0,5,0,0"/>
190
-                <TextBlock x:Name="txbSum" Text="0" FontSize="20" Padding="0,5,0,0"/>
191
-                <TextBlock Text="条" FontSize="20" Padding="0,5,0,0"/>
192
-                <Button Background="Transparent"
203
+                                                                                </Grid>
204
+                                                                                <!--第三行 删除 上传 按钮-->
205
+                                                                                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Height="32">
206
+                                                                                    <TextBlock Text="共" FontSize="20" Padding="0,5,0,0"/>
207
+                                                                                    <TextBlock x:Name="txbSum" Text="0" FontSize="20" Padding="0,5,0,0"/>
208
+                                                                                    <TextBlock Text="条" FontSize="20" Padding="0,5,0,0"/>
209
+                                                                                    <Button Background="Transparent"
193
                                 Cursor="Hand"
210
                                 Cursor="Hand"
194
                         BorderThickness="0" Content="上一页" FontSize="20" Margin="10,0,0,0" >
211
                         BorderThickness="0" Content="上一页" FontSize="20" Margin="10,0,0,0" >
195
-                    <!--<Image Source="./Images/class_p1.png"/>-->
196
-                </Button>
197
-                <Button Background="Transparent"
212
+                                                                                        <!--<Image Source="./Images/class_p1.png"/>-->
213
+                                                                                    </Button>
214
+                                                                                    <Button Background="Transparent"
198
                                 Cursor="Hand"
215
                                 Cursor="Hand"
199
                         BorderThickness="0" Content="下一页" FontSize="20" Margin="10,0,0,0" >
216
                         BorderThickness="0" Content="下一页" FontSize="20" Margin="10,0,0,0" >
200
-                    <!--<Image Source="./Images/class_p2.png"/>-->
201
-                </Button>
202
-            </StackPanel>
203
-            
204
-        </Grid>
217
+                                                                                        <!--<Image Source="./Images/class_p2.png"/>-->
218
+                                                                                    </Button>
219
+                                                                                </StackPanel>
220
+
221
+                                                                            </Grid>
222
+                                                                        </Border>
223
+                                                                    </Border>
224
+                                                                </Border>
225
+                                                            </Border>
226
+                                                        </Border>
227
+                                                    </Border>
228
+                                                </Border>
229
+                                            </Border>
230
+                                        </Border>
231
+                                    </Border>
232
+                                </Border>
233
+                            </Border>
234
+                        </Border>
235
+                    </Border>
236
+                </Border>
237
+            </Border>
238
+        </Border>
205
     </Viewbox>
239
     </Viewbox>
206
 </Window>
240
 </Window>

+ 25
- 17
XHWK.WKTool/FileDirectoryWindow.xaml.cs View File

50
         /// </summary>
50
         /// </summary>
51
         public void Initialize()
51
         public void Initialize()
52
         {
52
         {
53
+            APP.myloading.Show();
53
             MouseNumber = 0;
54
             MouseNumber = 0;
54
             IsModify = false;
55
             IsModify = false;
55
             //加载视频列表
56
             //加载视频列表
91
                     vis = "Collapsed";
92
                     vis = "Collapsed";
92
                     cos = "Visible";
93
                     cos = "Visible";
93
                 }
94
                 }
94
-                pageData.menuList.Add(new FileDirectoryModel()
95
+                if (i <= 16)
95
                 {
96
                 {
96
-                    SerialNumber = i,
97
-                    VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
98
-                    Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
99
-                    FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
100
-                    VideoDuration = 0,
101
-                    VideoSize = videoinfo.VideoSize,
102
-                    VideoTime = videoinfo.RSTime,
103
-                    IsEnabled = false,
104
-                    Path = videoinfo.VideoPath,
105
-                    Colour = colour,
106
-                    Visi = vis,
107
-                    Coll = cos,
108
-                    FileGuid = videoinfo.FileGuid,
109
-                    VideoType = videoinfo.VideoType.ToString()
110
-                }); ;
97
+                    pageData.menuList.Add(new FileDirectoryModel()
98
+                    {
99
+                        SerialNumber = i,
100
+                        VideoName = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
101
+                        Name = Common.system.FileToolsCommon.GetIOFileName(videoinfo.VideoPath).Replace(".MP4", "").Replace(".FLV", "").Replace(".AVI", "").Trim(),
102
+                        FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
103
+                        VideoDuration = 0,
104
+                        VideoSize = videoinfo.VideoSize,
105
+                        VideoTime = videoinfo.RSTime,
106
+                        IsEnabled = false,
107
+                        Path = videoinfo.VideoPath,
108
+                        Colour = colour,
109
+                        Visi = vis,
110
+                        Coll = cos,
111
+                        FileGuid = videoinfo.FileGuid,
112
+                        VideoType = videoinfo.VideoType.ToString()
113
+                    }); ;
114
+                }
115
+
116
+
117
+
111
                 i++;
118
                 i++;
112
             }
119
             }
113
             txbSum.Text = pageData.menuList.Count.ToString();
120
             txbSum.Text = pageData.menuList.Count.ToString();
121
+            APP.myloading.Hide();
114
             DataContext = pageData;
122
             DataContext = pageData;
115
         }
123
         }
116
         /// <summary>
124
         /// <summary>
202
         /// <param name="e"></param>
210
         /// <param name="e"></param>
203
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
211
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
204
         {
212
         {
205
-        
213
+
206
             pageData.menuList[Subscript].IsEnabled = false;
214
             pageData.menuList[Subscript].IsEnabled = false;
207
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
215
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
208
             for (int i = 0; i < buttons.Count; i++)
216
             for (int i = 0; i < buttons.Count; i++)

+ 43
- 9
XHWK.WKTool/LoginWindow.xaml View File

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:XHWK.WKTool"
6
         xmlns:local="clr-namespace:XHWK.WKTool"
7
         mc:Ignorable="d"
7
         mc:Ignorable="d"
8
-        Title="LoginWindow" Height="341" Width="454"   AllowsTransparency="True"
8
+        Title="LoginWindow" Height="358" Width="471"   AllowsTransparency="True"
9
     ShowInTaskbar="False"
9
     ShowInTaskbar="False"
10
     WindowStartupLocation="CenterOwner"
10
     WindowStartupLocation="CenterOwner"
11
     WindowStyle="None">
11
     WindowStyle="None">
12
     <Viewbox>
12
     <Viewbox>
13
-        <Grid Height="341" Width="454" >
13
+        <Border Background="#fefefe" Height="358" Width="471">
14
+            <Border Background="#fdfdfd" Height="357" Width="470">
15
+                <Border Background="#fcfcfc" Height="356" Width="469">
16
+                    <Border Background="#fafafa" Height="355" Width="468">
17
+                        <Border Background="#f9f9f9" Height="354" Width="467">
18
+                            <Border Background="#f6f6f6" Height="353" Width="466">
19
+                                <Border Background="#f3f3f3" Height="352" Width="465">
20
+                                    <Border Background="#eeeeee" Height="351" Width="464">
21
+                                        <Border Background="#e9e9e9" Height="350" Width="463">
22
+                                            <Border Background="#e2e2e2" Height="349" Width="462">
23
+                                                <Border Background="#dcdcdc" Height="348" Width="461">
24
+                                                    <Border Background="#d3d3d3" Height="347" Width="460">
25
+                                                        <Border Background="#cccccc" Height="346" Width="459">
26
+                                                            <Border Background="#bfbfbf" Height="345" Width="458">
27
+                                                                <Border Background="#aeaeae" Height="344" Width="457">
28
+                                                                    <Border Background="#bababa" Height="343" Width="456">
29
+                                                                        <!--<Border Background="#e4e4e4" Height="342" Width="455">-->
30
+                                                                        <Grid Height="343" Width="456" Background="#FFFFFF">
14
             <!--分5行-->
31
             <!--分5行-->
15
             <Grid.RowDefinitions>
32
             <Grid.RowDefinitions>
16
                 <RowDefinition Height="45"/>
33
                 <RowDefinition Height="45"/>
30
             <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
47
             <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
31
                 <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
48
                 <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
32
                 <!--输入框-->
49
                 <!--输入框-->
33
-                <Border Background="#CDD6E0" Width="371" Height="43" CornerRadius="3">
34
-                    <TextBox x:Name="txbAccountNumber" Text="" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="369" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
50
+                                                                                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
51
+                    <TextBox x:Name="txbAccountNumber" Text="" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
35
                 </Border>
52
                 </Border>
36
             </StackPanel>
53
             </StackPanel>
37
             <!--第三行 密码-->
54
             <!--第三行 密码-->
38
             <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
55
             <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
39
                 <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
56
                 <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
40
                 <!--输入框-->
57
                 <!--输入框-->
41
-                <Border Background="#CDD6E0" Width="371" Height="43" CornerRadius="3">
42
-                    <PasswordBox x:Name="pobPassword" FontSize="16" Foreground="#333333" PasswordChar="*" Padding="5,12,2,2" Width="369" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
58
+                                                                                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
59
+                    <PasswordBox x:Name="pobPassword" FontSize="16" Foreground="#333333" PasswordChar="*" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
43
                 </Border>
60
                 </Border>
44
             </StackPanel>
61
             </StackPanel>
45
-            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20,0,0,0">
62
+            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="20,10,0,0">
46
                 <Viewbox Height="23">
63
                 <Viewbox Height="23">
47
                     <CheckBox   x:Name="ckSaveName" Click="CkSaveName_Click"/>
64
                     <CheckBox   x:Name="ckSaveName" Click="CkSaveName_Click"/>
48
                 </Viewbox>
65
                 </Viewbox>
50
             </StackPanel>
67
             </StackPanel>
51
             
68
             
52
             <!--第五行 开始按钮-->
69
             <!--第五行 开始按钮-->
53
-            <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="登录" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="43" Margin="10,0,10,0" Click="BtnStart_Click">
70
+            <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="登录" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="50" Margin="10,0,10,0" Click="BtnStart_Click">
54
                 <Button.Template>
71
                 <Button.Template>
55
                     <ControlTemplate TargetType="{x:Type Button}">
72
                     <ControlTemplate TargetType="{x:Type Button}">
56
                         <Border
73
                         <Border
57
                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
74
                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
58
                                 BorderThickness="1"
75
                                 BorderThickness="1"
59
-                                CornerRadius="2">
76
+                                CornerRadius="7">
60
                             <Border.Background>#2D8CF0</Border.Background>
77
                             <Border.Background>#2D8CF0</Border.Background>
61
                             <ContentPresenter
78
                             <ContentPresenter
62
                                     HorizontalAlignment="Center"
79
                                     HorizontalAlignment="Center"
67
                 </Button.Template>
84
                 </Button.Template>
68
             </Button>
85
             </Button>
69
         </Grid>
86
         </Grid>
87
+                                                                        </Border>
88
+                                                                    </Border>
89
+                                                                </Border>
90
+                                                            </Border>
91
+                                                        </Border>
92
+                                                    </Border>
93
+                                                </Border>
94
+                                            </Border>
95
+                                        </Border>
96
+                                    </Border>
97
+                                </Border>
98
+                            </Border>
99
+                        </Border>
100
+                    </Border>
101
+                </Border>
102
+            </Border>
103
+        <!--</Border>-->
70
     </Viewbox>
104
     </Viewbox>
71
 </Window>
105
 </Window>

+ 3
- 1
XHWK.WKTool/LoginWindow.xaml.cs View File

68
                 MessageBox.Show("密码未输入");
68
                 MessageBox.Show("密码未输入");
69
                 return;
69
                 return;
70
             }
70
             }
71
+            APP.myloading.Show();
71
             Login();
72
             Login();
72
         }
73
         }
73
         /// <summary>
74
         /// <summary>
99
                     System.IO.File.WriteAllText(applicationData, accountNumbers, Encoding.Default);//存放账号
100
                     System.IO.File.WriteAllText(applicationData, accountNumbers, Encoding.Default);//存放账号
100
                 }
101
                 }
101
 
102
 
102
-
103
+                APP.myloading.Hide();
103
                 //UpdateSettingString("userName", txbAccountNumber.Text);
104
                 //UpdateSettingString("userName", txbAccountNumber.Text);
104
                 APP.IsLoginType = true;
105
                 APP.IsLoginType = true;
105
                 txbAccountNumber.Text = string.Empty;
106
                 txbAccountNumber.Text = string.Empty;
131
             }
132
             }
132
             else
133
             else
133
             {
134
             {
135
+                APP.myloading.Hide();
134
                 MessageBox.Show(APP.ServerMsg);
136
                 MessageBox.Show(APP.ServerMsg);
135
             }
137
             }
136
         }
138
         }

+ 8
- 14
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

8
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
8
         xmlns:gifLib="http://wpfanimatedgif.codeplex.com"
9
         xmlns:local="clr-namespace:XHWK.WKTool"
9
         xmlns:local="clr-namespace:XHWK.WKTool"
10
         mc:Ignorable="d"
10
         mc:Ignorable="d"
11
-        Title="星火微课系统" Height="1040" Width="1276" WindowStartupLocation="CenterScreen"
11
+        Title="星火微课系统" Height="1040" Width="1280" WindowStartupLocation="CenterScreen"
12
     WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True" ResizeMode="CanMinimize"
12
     WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True" ResizeMode="CanMinimize"
13
    >
13
    >
14
     
14
     
15
     <Viewbox>
15
     <Viewbox>
16
-        <Grid x:Name="GridContent" Height="1040">
16
+        <Border Background="#cdcdcd" Height="1040" Width="1280">
17
+            <Grid x:Name="GridContent" Height="1036" Width="1276">
17
 
18
 
18
             <!--分3行-->
19
             <!--分3行-->
19
             <Grid.RowDefinitions>
20
             <Grid.RowDefinitions>
20
-                <RowDefinition Height="110"/>
21
+                <RowDefinition Height="106"/>
21
                 <RowDefinition Height="*"/>
22
                 <RowDefinition Height="*"/>
22
                 <RowDefinition Height="40"/>
23
                 <RowDefinition Height="40"/>
23
             </Grid.RowDefinitions>
24
             </Grid.RowDefinitions>
124
                         </StackPanel>
125
                         </StackPanel>
125
                     </Button>
126
                     </Button>
126
                 </StackPanel>
127
                 </StackPanel>
127
-                <Button Content="Button" HorizontalAlignment="Left" Margin="637,15,0,0" Grid.Row="1" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
128
             </Grid>
128
             </Grid>
129
             <!--主内容-->
129
             <!--主内容-->
130
-            <Grid Grid.Row="1" x:Name="GridMain" Width="1276">
130
+            <Grid Grid.Row="1" x:Name="GridMain" Width="1276" >
131
                 <ScrollViewer x:Name="scroMain" VerticalScrollBarVisibility="Visible">
131
                 <ScrollViewer x:Name="scroMain" VerticalScrollBarVisibility="Visible">
132
                     <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Visibility="Visible" Height="1780">
132
                     <Grid x:Name="gridM"  Margin="0,0,0,0" Background="#FFFFFF" Visibility="Visible" Height="1780">
133
                         <Grid>
133
                         <Grid>
180
                 <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,0"/>
180
                 <Label Content="" Grid.Column="1" Height="2" Width="2" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,0"/>
181
             </Grid>
181
             </Grid>
182
            <!--页码-->
182
            <!--页码-->
183
-            <Grid Grid.Row="1" x:Name="gridPage" Visibility="Collapsed">
183
+                <Grid Grid.Row="1" x:Name="gridPage" Visibility="Collapsed" Background="#FFFFFF">
184
                 <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Center"
184
                 <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Center"
185
             Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
185
             Height="30" Margin="0,0,0,0" Grid.Column="1" VerticalAlignment="Bottom">
186
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
186
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
218
                     </Button>
218
                     </Button>
219
                 </StackPanel>
219
                 </StackPanel>
220
             </Grid>
220
             </Grid>
221
-            <!--Loding-->
222
-            <Grid Grid.Row="1">
223
-                <Image x:Name="imgLoad"
224
-                    Width="300"
225
-                    Height="300"
226
-                    gifLib:ImageBehavior.AnimatedSource="./Images/img_load.gif" VerticalAlignment="Top" Margin="0,200,0,0" Visibility="Collapsed"/>
227
-            </Grid>
228
             <!--设置-->
221
             <!--设置-->
229
             <Grid Grid.Row="1" x:Name="gridSetUp"  Background="#FFFFFF" Visibility="Collapsed" Width="1276">
222
             <Grid Grid.Row="1" x:Name="gridSetUp"  Background="#FFFFFF" Visibility="Collapsed" Width="1276">
230
                 <Grid.RowDefinitions>
223
                 <Grid.RowDefinitions>
309
                     </Button.Template>
302
                     </Button.Template>
310
                 </Button>
303
                 </Button>
311
             </Grid>
304
             </Grid>
312
-            <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,2,0,0">
305
+            <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
313
                 <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
306
                 <StackPanel Orientation="Horizontal" Margin="0,0,0,0">
314
                     <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
307
                     <TextBlock Text="颜色:" FontSize="14" Padding="10,10,0,0"/>
315
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0"/>
308
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0"/>
334
                 </StackPanel>
327
                 </StackPanel>
335
             </Grid>
328
             </Grid>
336
         </Grid>
329
         </Grid>
330
+        </Border>
337
     </Viewbox>
331
     </Viewbox>
338
 </Window>
332
 </Window>

+ 8
- 5
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

915
             {
915
             {
916
                 if (ofd.FileName != "")
916
                 if (ofd.FileName != "")
917
                 {
917
                 {
918
-                    imgLoad.Visibility = Visibility.Visible;
918
+                    APP.myloading.Show();
919
 
919
 
920
                     #region PPT转PDF
920
                     #region PPT转PDF
921
                     string filepath = ofd.FileName;
921
                     string filepath = ofd.FileName;
1017
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1017
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1018
                                 btnScreenshot.IsEnabled = true;
1018
                                 btnScreenshot.IsEnabled = true;
1019
                             }
1019
                             }
1020
-                            imgLoad.Visibility = Visibility.Collapsed;
1020
+                            APP.myloading.Hide();
1021
                         }
1021
                         }
1022
                         catch (Exception ex)
1022
                         catch (Exception ex)
1023
                         {
1023
                         {
1024
-                            imgLoad.Visibility = Visibility.Collapsed;
1024
+                            APP.myloading.Hide();
1025
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog PPT)" + ex.Message, ex);
1025
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog PPT)" + ex.Message, ex);
1026
                         }
1026
                         }
1027
                     }
1027
                     }
1079
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1079
                                 ImgScreenshotTwo.Visibility = Visibility.Collapsed;
1080
                                 btnScreenshot.IsEnabled = true;
1080
                                 btnScreenshot.IsEnabled = true;
1081
                             }
1081
                             }
1082
-                            imgLoad.Visibility = Visibility.Collapsed;
1082
+                            APP.myloading.Hide();
1083
                         }
1083
                         }
1084
                         catch (Exception ex)
1084
                         catch (Exception ex)
1085
                         {
1085
                         {
1086
-                            imgLoad.Visibility = Visibility.Collapsed;
1086
+                            APP.myloading.Hide();
1087
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1087
                             LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1088
                         }
1088
                         }
1089
                     }
1089
                     }
2528
             //Common.system.SplashScreen.Show(typeof(LoadDialog));
2528
             //Common.system.SplashScreen.Show(typeof(LoadDialog));
2529
             //Thread.Sleep(5000);
2529
             //Thread.Sleep(5000);
2530
             //Common.system.SplashScreen.Close();
2530
             //Common.system.SplashScreen.Close();
2531
+            APP.myloading.Show();
2532
+            Thread.Sleep(1000);
2533
+            APP.myloading.Hide();
2531
         }
2534
         }
2532
     }
2535
     }
2533
 }
2536
 }

Loading…
Cancel
Save