Browse Source

样式

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

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

@@ -123,7 +123,14 @@ namespace XHWK.WKTool
123 123
         /// 我的视频
124 124
         /// </summary>
125 125
         public static FileDirectoryWindow fileDirectoryWindow = null;
126
+        /// <summary>
127
+        /// 打印
128
+        /// </summary>
126 129
         public static PrintWindow W_PrintWindow = null;
130
+        /// <summary>
131
+        /// 提示窗口
132
+        /// </summary>
133
+        public static PromptWindow W_PromptWindow = null;
127 134
         #endregion
128 135
         #endregion
129 136
 

+ 12
- 2
XHWK.WKTool/FileDirectoryWindow.xaml.cs View File

@@ -94,8 +94,8 @@ namespace XHWK.WKTool
94 94
                 pageData.menuList.Add(new FileDirectoryModel()
95 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(),
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 99
                     FilePath = videoinfo.VideoPath.Replace(FileToolsCommon.GetIOFileName(videoinfo.VideoPath), "").Trim(),
100 100
                     VideoDuration = 0,
101 101
                     VideoSize = videoinfo.VideoSize,
@@ -202,12 +202,22 @@ namespace XHWK.WKTool
202 202
         /// <param name="e"></param>
203 203
         private void BtnDelete_Click(object sender, RoutedEventArgs e)
204 204
         {
205
+        
205 206
             pageData.menuList[Subscript].IsEnabled = false;
206 207
             List<Button> buttons = FindChilds<Button>(listView1, "btnDelete");
207 208
             for (int i = 0; i < buttons.Count; i++)
208 209
             {
209 210
                 if (buttons[i] == sender)
210 211
                 {
212
+
213
+                    //if (APP.W_PromptWindow == null)
214
+                    //{
215
+                    //    APP.W_PromptWindow = new PromptWindow();
216
+                    //    APP.W_PromptWindow.Owner = this;
217
+                    //}
218
+                    //APP.W_PromptWindow.Initialize(pageData.menuList[i].VideoName);
219
+                    //APP.W_PromptWindow.ShowDialog();
220
+
211 221
                     foreach (Model_WKData wKData in APP.WKDataList)
212 222
                     {
213 223
                         if (wKData.VideoList == null)

+ 4
- 4
XHWK.WKTool/PrintWindow.xaml View File

@@ -5,7 +5,7 @@
5 5
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6 6
         xmlns:local="clr-namespace:XHWK.WKTool"
7 7
         mc:Ignorable="d"
8
-        Title="PrintWindow" Height="729" Width="1028" AllowsTransparency="True"
8
+        Title="PrintWindow" Height="600" Width="900" AllowsTransparency="True"
9 9
     ShowInTaskbar="False"
10 10
     WindowStartupLocation="CenterOwner"
11 11
     WindowStyle="None">
@@ -25,14 +25,14 @@
25 25
             <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,10,0,0">
26 26
                 <TextBlock  Text="打印机:" Width="210" FontSize="20"/>
27 27
                 <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0"/>
28
-                <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" Padding="50,10,0,0" Background="White" />
28
+                <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White" />
29 29
                 <Grid>
30 30
                     <Grid.RowDefinitions>
31 31
                         <RowDefinition Height="auto"/>
32 32
                         <RowDefinition Height="auto"/>
33 33
                     </Grid.RowDefinitions>
34
-                    <Button Grid.Row="0" x:Name="btnLess" Content="-" Click="BtnLess_Click"/>
35
-                    <Button Grid.Row="1" x:Name="btnAdd" Content="+" Click="BtnAdd_Click"/>
34
+                    <Button Grid.Row="0" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
35
+                    <Button Grid.Row="1" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
36 36
                 </Grid>
37 37
             </StackPanel>
38 38
             <Button Grid.Row="1" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,20,0" Click="BtnClose_Click">

+ 33
- 0
XHWK.WKTool/PromptWindow.xaml View File

@@ -0,0 +1,33 @@
1
+<Window x:Class="XHWK.WKTool.PromptWindow"
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
+        xmlns:local="clr-namespace:XHWK.WKTool"
7
+        mc:Ignorable="d"
8
+        Title="PromptWindow" Height="210" Width="553" WindowStartupLocation="CenterOwner"
9
+    WindowStyle="None" AllowsTransparency="True"    WindowState="Normal"
10
+    ShowInTaskbar="True"   ResizeMode="NoResize"
11
+  >
12
+    <Grid Background="#FFFFFF">
13
+        <Grid.RowDefinitions>
14
+            <RowDefinition Height="auto"/>
15
+            <RowDefinition Height="auto"/>
16
+            <RowDefinition Height="auto"/>
17
+        </Grid.RowDefinitions>
18
+        <TextBlock Grid.Row="0" Text="确定删除" FontSize="24" Margin="25,26,0,0"/>
19
+        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="25,36,0,0">
20
+            <TextBlock Text="删除" FontSize="18" Foreground="#919191" />
21
+            <TextBlock x:Name="txbName" Text="微课01" FontSize="18" Foreground="#919191"/>
22
+        </StackPanel>
23
+       
24
+        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,30,0,0">
25
+            <Border x:Name="borCancel" Background="#E5E5E5" CornerRadius="6" >
26
+                <Button x:Name="btnCancel" Width="104" Height="42" Content="取消" FontSize="18" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="Transparent"/>
27
+            </Border>
28
+            <Border Background="#E5E5E5" CornerRadius="6" Margin="30,0,20,0">
29
+                <Button Width="104" Height="42" Content="确定" FontSize="18" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Background="Transparent"/>
30
+            </Border>
31
+        </StackPanel>
32
+    </Grid>
33
+</Window>

+ 47
- 0
XHWK.WKTool/PromptWindow.xaml.cs View File

@@ -0,0 +1,47 @@
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
+    /// PromptWindow.xaml 的交互逻辑
19
+    /// </summary>
20
+    public partial class PromptWindow : Window
21
+    {
22
+        public PromptWindow()
23
+        {
24
+            InitializeComponent();
25
+        }
26
+        public void Initialize(string _name)
27
+        {
28
+            txbName.Text = _name;
29
+        }
30
+        private void Window_SizeChanged(object sender, SizeChangedEventArgs e)
31
+        {
32
+            System.Windows.Rect r = new System.Windows.Rect(e.NewSize);
33
+            RectangleGeometry gm = new RectangleGeometry(r, 1, 1);
34
+            ((UIElement)sender).Clip = gm;
35
+        }
36
+
37
+        private void Window_SizeChanged_1(object sender, SizeChangedEventArgs e)
38
+        {
39
+
40
+        }
41
+
42
+        private void Window_SizeChanged1(object sender, SizeChangedEventArgs e)
43
+        {
44
+
45
+        }
46
+    }
47
+}

+ 62
- 56
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

@@ -116,55 +116,61 @@
116 116
                 </StackPanel>
117 117
             </Grid>
118 118
             <!--主内容-->
119
-            <ScrollViewer Grid.Row="1"  Height="585" VerticalScrollBarVisibility="Visible">
120
-                <Grid Grid.Row="1" x:Name="GridMain"  Margin="0,0,0,0" Background="#FFFFFF" Width="793.700787401575" Height="1142.51968503937" Visibility="Visible">
121
-               
122
-                    <Grid>
123
-                        <Border Grid.Row="1"  CornerRadius="5">
124
-                            <Grid x:Name="IMG" Margin="0,0,0,0">
125
-                                <Grid.Resources>
126
-                                    <TransformGroup x:Key="Imageview">
127
-                                        <ScaleTransform/>
128
-                                        <TranslateTransform/>
129
-                                    </TransformGroup>
130
-                                </Grid.Resources>
131
-                                <Label Content="" Grid.Column="0" HorizontalAlignment="Left" Height="10" VerticalAlignment="Top" Width="10" Background="#FF0F0F0F" Margin="1,0,0,0"/>
132
-                                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
119
+            <Grid Grid.Row="1" x:Name="GridMain" Width="793.700787401575">
120
+                <ScrollViewer x:Name="scroMain" Height="580" VerticalScrollBarVisibility="Visible">
121
+                    <Grid   Margin="0,0,0,0" Background="#FFFFFF" Width="793.700787401575" Height="1142.51968503937" Visibility="Visible">
122
+                        <Grid>
123
+                            <Border Grid.Row="1"  CornerRadius="5">
124
+                                <Grid x:Name="IMG" Margin="0,0,0,0">
125
+                                    <Grid.Resources>
126
+                                        <TransformGroup x:Key="Imageview">
127
+                                            <ScaleTransform/>
128
+                                            <TranslateTransform/>
129
+                                        </TransformGroup>
130
+                                    </Grid.Resources>
131
+                               
132
+                                    <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled"   Cursor="SizeAll"
133 133
                   Margin="0,0,0,0" Focusable="False" x:Name="BackFrame">
134
-                                    <ContentControl  MouseLeftButtonDown="IMG1_MouseLeftButtonDown"   
134
+                                        <ContentControl  MouseLeftButtonDown="IMG1_MouseLeftButtonDown"   
135 135
                              MouseLeftButtonUp="IMG1_MouseLeftButtonUp"
136 136
                              MouseMove="IMG1_MouseMove"
137 137
                              MouseWheel="IMG1_MouseWheel" >
138
-                                        <Image Name="imgCanvas" Width="635" Height="auto" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}">
139
-                                        </Image>
140
-                                    </ContentControl>
141
-                                </ScrollViewer>
142
-                            </Grid>
143
-                        </Border>
144
-                    </Grid>
145
-                    <Image x:Name="imgDocumentation"/>
146
-                    <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
147
-                    <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
148
-                    <!--摄像头-->
149
-                    <!--<wfi:WindowsFormsHost Grid.Row="0" Grid.Column="1" x:Name="wfhCamera" Height="124" Width="172" HorizontalAlignment="Right" Margin="0,10,30.10,0" VerticalAlignment="Top">
138
+                                            <Image Name="imgCanvas" Width="635" Height="auto" Stretch="Uniform" MouseDown="PicEMap_MouseDown" RenderTransform="{StaticResource Imageview}">
139
+                                            </Image>
140
+                                        </ContentControl>
141
+                                    </ScrollViewer>
142
+                                </Grid>
143
+                            </Border>
144
+                        </Grid>
145
+                        <Image x:Name="imgDocumentation"/>
146
+                        <!--<Button Cursor="Hand" x:Name="btnOk" Height="50" Width="50" Content="√" FontSize="26" Background="#2E8CF0" Foreground="#FFFFFF" Click="btnOk_Click" Visibility="Collapsed"/>-->
147
+                        <InkCanvas Grid.Row="0" x:Name="blackboard_canvas"  Background="Transparent" Visibility="Collapsed" Grid.ColumnSpan="2" />
148
+                        <!--摄像头-->
149
+                        <!--<wfi:WindowsFormsHost Grid.Row="0" Grid.Column="1" x:Name="wfhCamera" Height="124" Width="172" HorizontalAlignment="Right" Margin="0,10,30.10,0" VerticalAlignment="Top">
150 150
                     <aforge:VideoSourcePlayer x:Name="player" Height="124" Width="172"  />
151 151
                 </wfi:WindowsFormsHost>-->
152
-                    <Image x:Name="imgPlayerLeft" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
153
-                    <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
154
-                    <Image x:Name="imgPlayerLeftUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
155
-                    <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
152
+             
156 153
 
157
-                    <Label Content="" Grid.Column="0" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
158
-                    <Label Content="" Grid.Column="1" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,2,0"/>
159
-                    <Label Content="" Grid.Column="1" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,2,0"/>
160
-                </Grid>
161
-            </ScrollViewer>
154
+                    
155
+       
156
+                    </Grid>
157
+                </ScrollViewer>
158
+                <Image x:Name="imgPlayerLeft" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Top" Visibility="Collapsed"/>
159
+                <Image x:Name="imgPlayerRight" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right"  Margin="10,7,26,10" VerticalAlignment="Top" Visibility="Collapsed"/>
160
+                <Image x:Name="imgPlayerLeftUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Left"  Margin="10,7,10,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
161
+                <Image x:Name="imgPlayerRightUnder" Width="172" Height="124" Source="./Images/microLessonSystem_17.png"  HorizontalAlignment="Right" Margin="10,7,26,10" VerticalAlignment="Bottom" Visibility="Collapsed"/>
162
+                <Label Content="" Grid.Column="0" HorizontalAlignment="Left" Height="10" VerticalAlignment="Top" Width="10" Background="#FF0F0F0F" Margin="1,0,0,0"/>
163
+                <Label Content="" Grid.Column="1" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,16,0"/>
164
+                <Label Content="" Grid.Column="0" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="1,0,0,0"/>
165
+                <Label Content="" Grid.Column="1" Height="10" Width="10" Background="#FF0F0F0F" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,16,0"/>
166
+            </Grid>
167
+           
162 168
             <Grid Grid.Row="1">
163 169
                 <StackPanel Grid.Row="0" Orientation="Horizontal" Background="#FFFFFF" Width="180" HorizontalAlignment="Center"
164
-            Height="58" Margin="0,500,0,0" Grid.Column="1">
170
+            Height="58" Margin="0,520,0,0" Grid.Column="1">
165 171
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
166 172
                     x:Name="last_button"
167
-                    Width="60" Height="60"
173
+                    Width="60" Height="50"
168 174
                     Click="last_button_Click">
169 175
                         <Button.Content>
170 176
                             <StackPanel>
@@ -172,14 +178,14 @@
172 178
                             </StackPanel>
173 179
                         </Button.Content>
174 180
                     </Button>
175
-                    <Grid Width="60">
181
+                    <Grid Width="60"  Background="Transparent">
176 182
                         <Grid.RowDefinitions>
177 183
                             <RowDefinition Height="311*"/>
178 184
                             <RowDefinition Height="483*"/>
179 185
                         </Grid.RowDefinitions>
180
-                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-25,0,0" Grid.Row="1" >
186
+                        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,-25,0,0" Grid.Row="1"  Background="Transparent">
181 187
 
182
-                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
188
+                            <StackPanel HorizontalAlignment="Center" Orientation="Horizontal"  Background="Transparent">
183 189
                                 <TextBlock x:Name="txbCurrpage" Text="{Binding currpage}" TextAlignment="Center" FontSize="15"/>
184 190
                                 <TextBlock Text="/" TextAlignment="Center" FontSize="15"/>
185 191
                                 <TextBlock Text="{Binding pagenum}" TextAlignment="Center" FontSize="15"/>
@@ -187,8 +193,8 @@
187 193
                         </StackPanel>
188 194
                     </Grid>
189 195
                     <Button Cursor="Hand" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}"
190
-                    x:Name="next_btn"
191
-                    Width="60" Height="60"
196
+                    x:Name="next_btn"  Background="Transparent"
197
+                    Width="60" Height="50"
192 198
                     Click="next_btn_Click">
193 199
                         <Button.Content>
194 200
                             <StackPanel>
@@ -201,38 +207,38 @@
201 207
             <!--设置-->
202 208
             <Grid Grid.Row="1" x:Name="gridSetUp" Margin="20,0,20,0" Background="#FFFFFF" Visibility="Collapsed">
203 209
                 <Grid.RowDefinitions>
204
-                    <RowDefinition Height="120"/>
205
-                    <RowDefinition Height="90"/>
206
-                    <RowDefinition Height="90"/>
207
-                    <RowDefinition Height="80"/>
208
-                    <RowDefinition Height="80"/>
209
-                    <RowDefinition Height="90"/>
210 210
                     <RowDefinition Height="90"/>
211
+                    <RowDefinition Height="70"/>
212
+                    <RowDefinition Height="70"/>
213
+                    <RowDefinition Height="70"/>
214
+                    <RowDefinition Height="70"/>
215
+                    <RowDefinition Height="70"/>
216
+                    <RowDefinition Height="70"/>
211 217
                     <RowDefinition Height="*"/>
212 218
                 </Grid.RowDefinitions>
213
-                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
219
+                <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,30,0,0">
214 220
                     <TextBlock Text="   点阵笔" FontSize="16" Foreground="#2D8CF0"/>
215 221
                     <TextBlock x:Name="txbNotConnecteds"  Text="未连接" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
216 222
                 </StackPanel>
217
-                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left">
223
+                <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
218 224
                     <TextBlock Text="视频格式" FontSize="16" Foreground="#2D8CF0"/>
219 225
                     <RadioButton x:Name="rbnMP4" Cursor="Hand" Content="MP4" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
220 226
                     <RadioButton x:Name="rbnFLV" Cursor="Hand" Content="FLV" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
221 227
                     <RadioButton x:Name="rbnAVI" Cursor="Hand" Content="AVI" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
222 228
                 </StackPanel>
223
-                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left">
229
+                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
224 230
                     <TextBlock Text="头像位置" FontSize="16" Foreground="#2D8CF0"/>
225 231
                     <RadioButton Cursor="Hand" x:Name="rbnRight" Content="右上" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
226 232
                     <RadioButton Cursor="Hand" x:Name="rbnRightUnder" Content="右下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
227 233
                     <RadioButton Cursor="Hand" x:Name="rbnLeft" Content="左上" FontSize="14" Foreground="#333333" Margin="20,2,0,0" />
228 234
                     <RadioButton Cursor="Hand" x:Name="rbnLeftUnder" Content="左下" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
229 235
                 </StackPanel>
230
-                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left">
236
+                <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
231 237
                     <TextBlock Text="视频声音" FontSize="16" Foreground="#2D8CF0"/>
232 238
                     <RadioButton x:Name="rbnY" Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
233 239
                     <RadioButton x:Name="rbnN" Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
234 240
                 </StackPanel>
235
-                <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left">
241
+                <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,0,0,0">
236 242
                     <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Foreground="#2D8CF0" Padding="2,36,10,0"/>
237 243
                     <!--输入框-->
238 244
                     <Border Background="#CDD6E0" Width="525" Height="43" CornerRadius="3">
@@ -256,11 +262,11 @@
256 262
                         </Button.Template>
257 263
                     </Button>
258 264
                 </StackPanel>
259
-                <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
265
+                <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,30,0,0">
260 266
                     <TextBlock Text="    版本号" FontSize="16" Foreground="#2D8CF0"/>
261 267
                     <TextBlock Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
262 268
                 </StackPanel>
263
-                <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Left" Margin="0,30,0,0">
269
+                <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Left" Margin="10,30,0,0">
264 270
                     <TextBlock Text="版权所有" FontSize="16" Foreground="#2D8CF0"/>
265 271
                     <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
266 272
                 </StackPanel>

+ 31
- 57
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

@@ -843,31 +843,23 @@ namespace XHWK.WKTool
843 843
                                 }
844 844
                             }
845 845
                             #endregion
846
-
847
-                            //APP.Paths = images.ToArray();
848
-                            //ImgPDFPath = images.ToArray();
849
-
850 846
                             string[] page = images.ToArray();
851
-                            if(page.Length>0)
852
-                            {
853
-                                APP.PageDrawList = null;
854
-                                APP.PageDrawList = new List<Model_DrawData>();
855
-                            }
856
-                            for (int i = 0; i < page.Length; i++)//给画板模型加图片路径
847
+                            int num = 0;
848
+                            for (int i = 0 + APP.pageData.pagenum; i < page.Length + APP.pageData.pagenum; i++)//给画板模型加图片路径
857 849
                             {
858 850
                                 if (APP.PageDrawList != null && APP.PageDrawList.Count > i)
859 851
                                 {
860
-                                    APP.PageDrawList[i].PageImagePath = page[i]; //zxycs
861
-                                    APP.PageDrawList[i].PdfImagePath = page[i];
852
+                                    APP.PageDrawList[i].PageImagePath = page[i - APP.pageData.pagenum]; //zxycs
853
+                                    APP.PageDrawList[i].PdfImagePath = page[i - APP.pageData.pagenum];
862 854
                                     APP.PageDrawList[i].PageNum = i + 1;
863 855
                                     APP.PageDrawList[i].ImgDocumentation = true;
864 856
                                 }
865 857
                                 else
866 858
                                 {
867
-                                 
859
+
868 860
                                     Model_DrawData model_DrawData = new Model_DrawData();
869
-                                    model_DrawData.PageImagePath = page[i];
870
-                                    model_DrawData.PdfImagePath = page[i];
861
+                                    model_DrawData.PageImagePath = page[i - APP.pageData.pagenum];
862
+                                    model_DrawData.PdfImagePath = page[i - APP.pageData.pagenum];
871 863
                                     model_DrawData.PageNum = i + 1;
872 864
                                     model_DrawData.ImgDocumentation = true;
873 865
                                     APP.PageDrawList.Add(model_DrawData);
@@ -876,25 +868,15 @@ namespace XHWK.WKTool
876 868
                                 ImgPrintTwo.Visibility = Visibility.Collapsed;
877 869
                                 btnPrint.IsEnabled = true;
878 870
                                 APP.SaveDraw();
871
+                                num++;
879 872
                             }
880
-                            myblackboard.clear();
881
-                            APP.pageData.pagenum = 0;
882
-                            APP.pageData.currpage = 0;
883
-                            for (int i = 0; i < APP.PageDrawList.Count; i++)
884
-                            {
885
-                                APP.pageData.pagenum += 1;
886
-                            }
887
-                            //if (APP.pageData.pagenum > 1)
888
-                            //{
889
-                            //    APP.pageData.pagenum -= 1;
890
-                            //}
891
-                            if (IsStartCount && blackboard_canvas.Visibility == Visibility.Collapsed)
873
+                            if (num > 0)
892 874
                             {
893
-                                blackboard_canvas.Visibility = Visibility.Visible;
875
+                                APP.pageData.currpage = APP.pageData.pagenum + 1;
876
+                                APP.pageData.pagenum += num;
894 877
                             }
895
-                            if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage < APP.PageDrawList.Count)
878
+                            if (APP.pageData.currpage > 0 && APP.pageData.currpage < APP.PageDrawList.Count)
896 879
                             {
897
-                                //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
898 880
                                 imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
899 881
                                 imgCanvas.Source = null;
900 882
                                 ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
@@ -922,19 +904,13 @@ namespace XHWK.WKTool
922 904
                         {
923 905
                             string paths = AppDomain.CurrentDomain.BaseDirectory + "Temp\\";
924 906
                             string[] page = ConvertWordToImage(filepath, paths, "", 0, 0, null, 0).ToArray();
925
-                            //APP.Paths = page;//cs
926
-                            //ImgPDFPath = page;
927
-                            if (page.Length > 0)
928
-                            {
929
-                                APP.PageDrawList = null;
930
-                                APP.PageDrawList = new List<Model_DrawData>();
931
-                            }
932
-                            for (int i = 0; i < page.Length; i++)//给画板模型加图片路径
907
+                            int num = 0;
908
+                            for (int i = 0+ APP.pageData.pagenum; i < page.Length+ APP.pageData.pagenum; i++)//给画板模型加图片路径
933 909
                             {
934 910
                                 if (APP.PageDrawList!=null&&APP.PageDrawList.Count > i)
935 911
                                 {
936
-                                    APP.PageDrawList[i].PageImagePath = page[i]; //zxycs
937
-                                    APP.PageDrawList[i].PdfImagePath = page[i];
912
+                                    APP.PageDrawList[i].PageImagePath = page[i- APP.pageData.pagenum]; //zxycs
913
+                                    APP.PageDrawList[i].PdfImagePath = page[i- APP.pageData.pagenum];
938 914
                                     APP.PageDrawList[i].PageNum = i + 1;
939 915
                                     APP.PageDrawList[i].ImgDocumentation = true;
940 916
                                 }
@@ -942,8 +918,8 @@ namespace XHWK.WKTool
942 918
                                 {
943 919
                                   
944 920
                                     Model_DrawData model_DrawData = new Model_DrawData();
945
-                                    model_DrawData.PageImagePath = page[i];
946
-                                    model_DrawData.PdfImagePath = page[i];
921
+                                    model_DrawData.PageImagePath = page[i- APP.pageData.pagenum];
922
+                                    model_DrawData.PdfImagePath = page[i- APP.pageData.pagenum];
947 923
                                     model_DrawData.PageNum = i + 1;
948 924
                                     model_DrawData.ImgDocumentation = true;
949 925
                                     APP.PageDrawList.Add(model_DrawData);
@@ -951,23 +927,16 @@ namespace XHWK.WKTool
951 927
                                 ImgPrint.Visibility = Visibility.Visible;//导入成功可打印
952 928
                                 ImgPrintTwo.Visibility = Visibility.Collapsed;
953 929
                                 btnPrint.IsEnabled = true;
954
-
955 930
                                 APP.SaveDraw();
931
+                                num++;
956 932
                             }
957
-                            APP.pageData.pagenum = 1;
958
-                            APP.pageData.currpage = 1;
959
-                            //myblackboard.clear();
960
-                            for (int i = 0; i < APP.PageDrawList.Count; i++)
961
-                            {
962
-                                APP.pageData.pagenum += 1;
963
-                            }
964
-                            if (APP.pageData.pagenum > 1)
933
+                            if(num>0)
965 934
                             {
966
-                                APP.pageData.pagenum -= 1;
935
+                                APP.pageData.currpage = APP.pageData.pagenum + 1;
936
+                                APP.pageData.pagenum += num;
967 937
                             }
968
-                            if (!string.IsNullOrWhiteSpace(txbCurrpage.Text) && APP.pageData.currpage < APP.PageDrawList.Count)
938
+                            if (APP.pageData.currpage>0 && APP.pageData.currpage < APP.PageDrawList.Count)
969 939
                             {
970
-                                //imgCanvas.Source = new BitmapImage(new Uri(APP.Paths[APP.pageData.currpage - 1]));//cs
971 940
                                 imgDocumentation.Source = new BitmapImage(new Uri(APP.PageDrawList[APP.pageData.currpage - 1].PageImagePath));//给当前页面展示图片
972 941
                                 imgCanvas.Source = null;
973 942
                                 ImgScreenshot.Visibility = Visibility.Collapsed;//当前页为导入时不可截图
@@ -986,7 +955,7 @@ namespace XHWK.WKTool
986 955
                         }
987 956
                         catch (Exception ex)
988 957
                         {
989
-                            LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog PDF)" + ex.Message, ex);
958
+                            LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
990 959
                         }
991 960
                     }
992 961
 
@@ -1051,6 +1020,11 @@ namespace XHWK.WKTool
1051 1020
             {
1052 1021
                 blackboard_canvas.Visibility = Visibility.Visible;
1053 1022
             }
1023
+            else
1024
+            {
1025
+                System.Windows.MessageBox.Show("请先导入文档或截图!");
1026
+                return;
1027
+            }
1054 1028
             StartRecord();
1055 1029
         }
1056 1030
         /// <summary>
@@ -1353,8 +1327,7 @@ namespace XHWK.WKTool
1353 1327
         /// <param name="e"></param>
1354 1328
         private void BtnAdd_Click(object sender, RoutedEventArgs e)
1355 1329
         {
1356
-                if (APP.pageData.currpage>0&&APP.PageDrawList != null && APP.PageDrawList.Count > 0 && APP.PageDrawList.Count > APP.pageData.currpage - 1
1357
-                    && APP.PageDrawList[APP.pageData.currpage - 1].ImageLocation != null)
1330
+                if (APP.pageData.currpage>0)
1358 1331
                 {
1359 1332
                     APP.PageDrawList[APP.pageData.currpage - 1].IsImageLocation = true;
1360 1333
                 }
@@ -1367,6 +1340,7 @@ namespace XHWK.WKTool
1367 1340
                 myblackboard.changepage(APP.pageData.currpage - 1);
1368 1341
                 ///清空页面图片UI
1369 1342
                 imgCanvas.Source = null;
1343
+            imgDocumentation.Source = null;
1370 1344
                 ///画板模型增加一页
1371 1345
                 Model_DrawData model_DrawData = new Model_DrawData();
1372 1346
                 model_DrawData.PageNum = APP.pageData.currpage;

Loading…
Cancel
Save