星火微课系统客户端
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

PrintWindow.xaml 9.3KB

před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <Window x:Class="XHWK.WKTool.PrintWindow"
  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" xmlns:Views="clr-namespace:XHWK.WKTool.Helpers"
  7. mc:Ignorable="d"
  8. Title="PrintWindow" AllowsTransparency="True"
  9. ShowInTaskbar="False"
  10. WindowStartupLocation="CenterOwner"
  11. WindowStyle="None" BorderThickness="7" Width="914" Height="614">
  12. <Window.Effect>
  13. <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
  14. </Window.Effect>
  15. <Window.Resources>
  16. <Style x:Key="NoMouseOverButtonStyle" TargetType="{x:Type Button}">
  17. <Setter Property="BorderThickness" Value="1"/>
  18. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  19. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  20. <Setter Property="VerticalContentAlignment" Value="Center"/>
  21. <Setter Property="Padding" Value="1"/>
  22. <Setter Property="Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type Button}">
  25. <Border x:Name="Chrome" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  26. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  27. </Border>
  28. </ControlTemplate>
  29. </Setter.Value>
  30. </Setter>
  31. </Style>
  32. </Window.Resources>
  33. <Viewbox>
  34. <Grid x:Name="GridContent" Width="900" Height="600">
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="120"/>
  37. <RowDefinition Height="*"/>
  38. <RowDefinition Height="80"/>
  39. </Grid.RowDefinitions>
  40. <Grid Grid.Row="0" Background="#E6EAF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
  41. <Grid.RowDefinitions>
  42. <RowDefinition Height="50"/>
  43. <RowDefinition Height="50"/>
  44. <RowDefinition Height="*"/>
  45. </Grid.RowDefinitions>
  46. <Button Cursor="Hand" Grid.Row="0" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,10,0" Click="BtnClose_Click" Style="{StaticResource NoMouseOverButtonStyle}">
  47. </Button>
  48. <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0" Height="40">
  49. <TextBlock Text="打印机:" FontSize="20" Padding="0,5,0,0"/>
  50. <ComboBox Cursor="Hand" Width="210"
  51. x:Name="cmbClass"
  52. Padding="30,0,10,0"
  53. VerticalContentAlignment="Center"
  54. BorderThickness="0"
  55. DisplayMemberPath="Value"
  56. FontSize="14"
  57. SelectedValuePath="Key"
  58. />
  59. <TextBlock Text="份数:" FontSize="20" Margin="50,0,0,0" Padding="0,5,0,0" HorizontalAlignment="Right"/>
  60. <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White"/>
  61. <Grid>
  62. <Grid.RowDefinitions>
  63. <RowDefinition Height="auto"/>
  64. <RowDefinition Height="auto"/>
  65. </Grid.RowDefinitions>
  66. <Button Cursor="Hand" Grid.Row="0" x:Name="btnAdd" Content="+" Click="BtnAdd_Click"/>
  67. <Button Cursor="Hand" Grid.Row="1" x:Name="btnLess" Content="-" Click="BtnLess_Click"/>
  68. </Grid>
  69. <TextBlock Text="DPI:" FontSize="20" Padding="50,5,0,0"/>
  70. <ComboBox Cursor="Hand" Width="210"
  71. x:Name="CbxDpi"
  72. Padding="30,0,10,0"
  73. VerticalContentAlignment="Center"
  74. BorderThickness="0"
  75. DisplayMemberPath="Value"
  76. FontSize="14"
  77. SelectedValuePath="Key"
  78. />
  79. <!--<TextBlock Text="点型:" FontSize="20" Margin="120,10,0,0"/>
  80. <RadioButton x:Name="rbnSquarePoint" Content="方点" FontSize="16" Margin="0,15,0,0" IsChecked="True"/>
  81. <RadioButton x:Name="rbnDots" Content="圆点" FontSize="16" Margin="0,15,0,0"/>-->
  82. </StackPanel>
  83. <TextBlock Text="类型:" FontSize="20" Padding="50,5,0,0" Margin="523,0,273,10" Visibility="Hidden" />
  84. <ComboBox Cursor="Hand"
  85. x:Name="CbxType"
  86. Padding="30,0,10,0"
  87. VerticalContentAlignment="Center"
  88. BorderThickness="0"
  89. DisplayMemberPath="Value"
  90. FontSize="14"
  91. SelectedValuePath="Key"
  92. Margin="626,0,64,10" Visibility="Hidden"
  93. />
  94. </Grid>
  95. <Views:ZJClippingBorder Grid.Row="0" x:Name="tip_outer" Margin="0" Background="#FFE6EAF0" CornerRadius="4" Visibility="Collapsed">
  96. <Grid>
  97. <Label Content="打印中..." HorizontalAlignment="Center" Margin="0,20,0,0" Height="35" VerticalAlignment="Top" FontSize="20"></Label>
  98. <ProgressBar BorderBrush="#4597FF"
  99. Foreground="#4597FF"
  100. Grid.Row="0"
  101. x:Name="pgbProcess"
  102. Height="20"
  103. Margin="50,20,50,0"
  104. Visibility="Visible" />
  105. <Label Grid.Row="0"
  106. HorizontalAlignment="Center" Width="60"
  107. x:Name="lbProcess"
  108. Height="30"
  109. Margin="0,20,0,0"
  110. FontSize="16"
  111. Content=""
  112. Foreground="White"
  113. Visibility="Visible" />
  114. </Grid>
  115. </Views:ZJClippingBorder>
  116. <Grid Grid.Row="1">
  117. <Image x:Name="imgPri"/>
  118. </Grid>
  119. <Button
  120. x:Name="btnPrint"
  121. Grid.Row="2"
  122. Width="115"
  123. Height="46"
  124. Click="BtnPrint_Click"
  125. Content="打印"
  126. Foreground="White"
  127. FontSize="17"
  128. IsDefault="True"
  129. Cursor="Hand"
  130. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="0,0,150,0">
  131. <Button.Template>
  132. <ControlTemplate TargetType="{x:Type Button}">
  133. <Border
  134. BorderBrush="{TemplateBinding Control.BorderBrush}"
  135. BorderThickness="1"
  136. CornerRadius="7">
  137. <Border.Background>#2E8CF0</Border.Background>
  138. <ContentPresenter
  139. HorizontalAlignment="Center"
  140. VerticalAlignment="Center"
  141. Content="{TemplateBinding ContentControl.Content}" />
  142. </Border>
  143. </ControlTemplate>
  144. </Button.Template>
  145. </Button>
  146. <Button
  147. x:Name="btnPrintExplain"
  148. Grid.Row="2"
  149. Width="116"
  150. Height="46"
  151. Content="打印说明"
  152. Foreground="White"
  153. FontSize="17"
  154. IsDefault="True"
  155. Cursor="Hand"
  156. Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Margin="150,0,0,0" HorizontalAlignment="Center" Click="btnPrintExplain_Click">
  157. <Button.Template>
  158. <ControlTemplate TargetType="{x:Type Button}">
  159. <Border
  160. BorderBrush="{TemplateBinding BorderBrush}"
  161. BorderThickness="1"
  162. CornerRadius="7">
  163. <Border.Background>
  164. <Brush>#2E8CF0</Brush>
  165. </Border.Background>
  166. <ContentPresenter
  167. HorizontalAlignment="Center"
  168. VerticalAlignment="Center"
  169. Content="{TemplateBinding Content}" />
  170. </Border>
  171. </ControlTemplate>
  172. </Button.Template>
  173. </Button>
  174. </Grid>
  175. </Viewbox>
  176. </Window>