Browse Source

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

解决冲突
# Conflicts:
#	XHWK.WKTool/XHMicroLessonSystemWindow.xaml
#	XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs
tags/录制修改前
耀 4 years ago
parent
commit
4d5eecc5ae

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

76
             {
76
             {
77
                 imgPri.Source = new BitmapImage(new Uri(_imgPath));
77
                 imgPri.Source = new BitmapImage(new Uri(_imgPath));
78
             }
78
             }
79
+            else
80
+            {
81
+                imgPri.Source = null;
82
+            }
79
             I = 0;
83
             I = 0;
80
             if (t == null)
84
             if (t == null)
81
             {
85
             {

+ 2
- 6
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

625
                     <RowDefinition Height="50"/>
625
                     <RowDefinition Height="50"/>
626
                 </Grid.RowDefinitions>
626
                 </Grid.RowDefinitions>
627
                 <Label x:Name="lblVideoMess" Grid.Row="0" Content="暂无微课录制信息,请录制并等待保存完成后重试!" HorizontalAlignment="Center" Margin="0,0,0,100" VerticalAlignment="Center" FontSize="20" Visibility="Hidden"/>
627
                 <Label x:Name="lblVideoMess" Grid.Row="0" Content="暂无微课录制信息,请录制并等待保存完成后重试!" HorizontalAlignment="Center" Margin="0,0,0,100" VerticalAlignment="Center" FontSize="20" Visibility="Hidden"/>
628
-                <Button x:Name="BtnVideoUpPage" Content="上一页" HorizontalAlignment="Center" Margin="0,0,150,12" Grid.Row="1" VerticalAlignment="Bottom" Width="60" Background="{x:Null}" BorderBrush="{x:Null}" FontSize="16" Foreground="#FF333333" Click="BtnVideoUpPage_Click"/>
628
+                <Button x:Name="BtnVideoUpPage" Content="上一页" Cursor="Hand" HorizontalAlignment="Center" Margin="0,0,150,12" Grid.Row="1" VerticalAlignment="Bottom" Width="60" Background="{x:Null}" BorderBrush="{x:Null}" FontSize="16" Foreground="#FF333333" Click="BtnVideoUpPage_Click"/>
629
                 <Label x:Name="lblVideoPageNum" Grid.Row="1" FontSize="14" Content="100/100" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,10" Foreground="#FF333333" />
629
                 <Label x:Name="lblVideoPageNum" Grid.Row="1" FontSize="14" Content="100/100" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,10" Foreground="#FF333333" />
630
-                <Button x:Name="BtnVideoDownPage" Content="下一页" HorizontalAlignment="Center" Margin="150,0,0,12" Grid.Row="1" VerticalAlignment="Bottom" Width="60" Background="{x:Null}" BorderBrush="{x:Null}" FontSize="16" Foreground="#FF333333" Click="BtnVideoDownPage_Click"/>
630
+                <Button x:Name="BtnVideoDownPage" Content="下一页" Cursor="Hand" HorizontalAlignment="Center" Margin="150,0,0,12" Grid.Row="1" VerticalAlignment="Bottom" Width="60" Background="{x:Null}" BorderBrush="{x:Null}" FontSize="16" Foreground="#FF333333" Click="BtnVideoDownPage_Click"/>
631
             </Grid>
631
             </Grid>
632
-
633
             <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
632
             <Grid Grid.Row="2" Background="#EFF1F8" Margin="0,0,0,0">
634
                 <StackPanel Orientation="Horizontal" Margin="0,5,0,5">
633
                 <StackPanel Orientation="Horizontal" Margin="0,5,0,5">
635
                     <TextBlock Text="颜色:" FontSize="14" Padding="10,3,0,0"/>
634
                     <TextBlock Text="颜色:" FontSize="14" Padding="10,3,0,0"/>
636
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
635
                     <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
637
-
638
                     <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
636
                     <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
639
                         <Button Cursor="Hand" x:Name="btnRed" Width="20" Height="20" Background="#FF0000" Margin="1,1,1,1" HorizontalAlignment="Center"  Click="BtnRed_Click" Style="{StaticResource NoMouseOverButtonStyle}">
637
                         <Button Cursor="Hand" x:Name="btnRed" Width="20" Height="20" Background="#FF0000" Margin="1,1,1,1" HorizontalAlignment="Center"  Click="BtnRed_Click" Style="{StaticResource NoMouseOverButtonStyle}">
640
                             <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
638
                             <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
646
                         </Button>
644
                         </Button>
647
                     </Border>
645
                     </Border>
648
                     <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
646
                     <Border Background="#666666" Width="20" Height="20" Margin="5,2,0,0">
649
-
650
-
651
                         <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="1,1,1,1" Click="BtnCyanBlue_Click" Style="{StaticResource NoMouseOverButtonStyle}">
647
                         <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="1,1,1,1" Click="BtnCyanBlue_Click" Style="{StaticResource NoMouseOverButtonStyle}">
652
                             <Image x:Name="imgCyanBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
648
                             <Image x:Name="imgCyanBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
653
                         </Button>
649
                         </Button>

+ 10
- 3
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

473
                     //gridUpload.Visibility = Visibility.Collapsed;
473
                     //gridUpload.Visibility = Visibility.Collapsed;
474
                     GridMyVideo.Visibility = Visibility.Collapsed;
474
                     GridMyVideo.Visibility = Visibility.Collapsed;
475
                     txbStoragePath.Content = APP.WKData.WkPath;
475
                     txbStoragePath.Content = APP.WKData.WkPath;
476
-
476
+                    GridMyVideo.Visibility = Visibility.Collapsed;
477
                     #region 读取用户配置
477
                     #region 读取用户配置
478
                     //接口地址
478
                     //接口地址
479
                     if (!File.Exists(APP.dataPath + "interfaceAddress.txt")) //若为空
479
                     if (!File.Exists(APP.dataPath + "interfaceAddress.txt")) //若为空
987
                 ofd = new System.Windows.Forms.OpenFileDialog
987
                 ofd = new System.Windows.Forms.OpenFileDialog
988
                 {
988
                 {
989
                     //Filter = "文档|*.docx;*.doc;*.ppt;*.pptx",
989
                     //Filter = "文档|*.docx;*.doc;*.ppt;*.pptx",
990
-                    Filter = "文档|*.docx;*.doc;*.ppt;*.pptx;*.pdf",
990
+                    Filter = "文档|*.docx;*.doc;*.ppt;*.pptx",
991
                     InitialDirectory = desktopPath,
991
                     InitialDirectory = desktopPath,
992
                     Multiselect = false,
992
                     Multiselect = false,
993
                     AddExtension = true,
993
                     AddExtension = true,
3283
                 PageNum = APP.pageData.currpage
3283
                 PageNum = APP.pageData.currpage
3284
             };
3284
             };
3285
             APP.PageDrawList.Add(model_DrawData);
3285
             APP.PageDrawList.Add(model_DrawData);
3286
+             ImgPrint.Visibility = Visibility.Visible;//可打印
3287
+                                ImgPrintTwo.Visibility = Visibility.Collapsed;
3288
+                                btnPrint.IsEnabled = true;
3286
             //APP.SaveDraw();
3289
             //APP.SaveDraw();
3287
             if (btnImport.IsEnabled == true)
3290
             if (btnImport.IsEnabled == true)
3288
             {
3291
             {
3302
             try
3305
             try
3303
             {
3306
             {
3304
                 //3种情况  1.文档图片 2.截图图片 3.没有图片
3307
                 //3种情况  1.文档图片 2.截图图片 3.没有图片
3305
-
3308
+                if(APP.PageDrawList.Count==0)
3309
+                {
3310
+                    MessageWindow.Show("没有可打印的页,您可以新增、截图或导入来增加页!");
3311
+                    return;
3312
+                }
3306
 
3313
 
3307
 
3314
 
3308
                 iTextSharp.text.Document document = new iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 25, 25, 25, 25);
3315
                 iTextSharp.text.Document document = new iTextSharp.text.Document(iTextSharp.text.PageSize.A4, 25, 25, 25, 25);

Loading…
Cancel
Save