109 lines
5.8 KiB
XML
109 lines
5.8 KiB
XML
<Window x:Class="XP.ReportEngine.Views.ReportDemoWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
Title="报告生成演示 | Report Generation Demo"
|
|
Width="560" Height="580"
|
|
WindowStartupLocation="CenterScreen"
|
|
ResizeMode="NoResize">
|
|
<Grid Margin="20">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 标题 | Title -->
|
|
<TextBlock Grid.Row="0" Text="XP.ReportEngine 报告生成演示"
|
|
FontSize="18" FontWeight="Bold" Margin="0,0,0,12"/>
|
|
|
|
<!-- 输入表单 | Input form -->
|
|
<Grid Grid.Row="1" Margin="0,0,0,12">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="90"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="20"/>
|
|
<ColumnDefinition Width="90"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="28"/>
|
|
<RowDefinition Height="28"/>
|
|
<RowDefinition Height="28"/>
|
|
<RowDefinition Height="28"/>
|
|
<RowDefinition Height="28"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- 第一列 | Column 1 -->
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="产品名称:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding ProductName, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="0" Text="产品类型码:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding ProductCode, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="0" Text="工件 SN 码:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="2" Grid.Column="1" Text="{Binding WorkpieceSN, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Grid.Row="3" Grid.Column="0" Text="CNC 程序:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="3" Grid.Column="1" Text="{Binding CncProgram, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Grid.Row="4" Grid.Column="0" Text="操作员:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="4" Grid.Column="1" Text="{Binding OperatorName, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
<!-- 第二列 | Column 2 -->
|
|
<TextBlock Grid.Row="0" Grid.Column="3" Text="设备编号:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="0" Grid.Column="4" Text="{Binding DeviceId, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Grid.Row="1" Grid.Column="3" Text="生产机台号:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="1" Grid.Column="4" Text="{Binding MachineId, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
|
|
<TextBlock Grid.Row="2" Grid.Column="3" Text="描述:" VerticalAlignment="Center"/>
|
|
<TextBox Grid.Row="2" Grid.Column="4" Text="{Binding Description, UpdateSourceTrigger=PropertyChanged}" VerticalContentAlignment="Center"/>
|
|
</Grid>
|
|
|
|
<!-- 按钮区域 | Button area -->
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,12">
|
|
<Button Content="生成报告" Command="{Binding GenerateReportCommand}"
|
|
Width="100" Height="32" Margin="0,0,10,0"/>
|
|
<Button Content="查看 PDF" Command="{Binding OpenViewerCommand}"
|
|
Width="100" Height="32" Margin="0,0,10,0"/>
|
|
<Button Content="打印报告" Command="{Binding PrintReportCommand}"
|
|
Width="100" Height="32"/>
|
|
</StackPanel>
|
|
|
|
<!-- 说明区域 | Instructions -->
|
|
<Border Grid.Row="3" BorderBrush="#DDDDDD" BorderThickness="1"
|
|
Background="#F9F9F9" CornerRadius="4" Padding="10">
|
|
<TextBlock TextWrapping="Wrap" FontSize="12" Foreground="#555555">
|
|
<Run FontWeight="Bold">使用说明:</Run>
|
|
<LineBreak/>
|
|
<Run>1. 填写产品信息、设备信息和操作员</Run>
|
|
<LineBreak/>
|
|
<Run>2. 点击"生成报告",系统将使用模拟检测数据生成 PDF</Run>
|
|
<LineBreak/>
|
|
<Run>3. 生成完成后,可点击"查看 PDF"在阅读器中预览</Run>
|
|
<LineBreak/>
|
|
<Run>4. 点击"打印报告"可将 PDF 发送到打印机</Run>
|
|
<LineBreak/>
|
|
<LineBreak/>
|
|
<Run FontWeight="Bold">文件名模式(App.config 配置):</Run>
|
|
<LineBreak/>
|
|
<Run>{ReportId} {ProductName} {ProductCode} {WorkpieceSN}</Run>
|
|
<LineBreak/>
|
|
<Run>{CncProgram} {DeviceId} {MachineId} {Date} {Time} {Result}</Run>
|
|
<LineBreak/>
|
|
<LineBreak/>
|
|
<Run FontWeight="Bold">重复文件处理:</Run>
|
|
<Run>AutoIncrementOnDuplicate=true 时自动累加 (1)(2)...</Run>
|
|
</TextBlock>
|
|
</Border>
|
|
|
|
<!-- 状态栏 | Status bar -->
|
|
<Border Grid.Row="4" Background="#F0F0F0" Margin="0,10,0,0" Padding="8,5">
|
|
<TextBlock Text="{Binding StatusMessage}" FontSize="11" Foreground="#333333"
|
|
TextTrimming="CharacterEllipsis"/>
|
|
</Border>
|
|
</Grid>
|
|
</Window>
|