NavisworksTransport/src/UI/WPF/Views/GenerateNavigationMapDialog.xaml

133 lines
6.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--
NavisworksTransport 生成导航地图对话框 - 采用与主界面一致的Navisworks 2026风格
功能说明:
1. 输出格式选择JPEG/PNG/Windows位图
2. 图像尺寸设置:自定义宽度和高度
3. 渲染质量选择:标准渲染/高质量渲染/包含覆盖层
4. 确定/取消操作
设计原则:参考导出动画界面的布局和样式,保持界面一致性
-->
<Window x:Class="NavisworksTransport.UI.WPF.Views.GenerateNavigationMapDialog"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Title="生成导航地图"
Height="380"
Width="460"
ResizeMode="NoResize"
WindowStartupLocation="CenterOwner"
ShowInTaskbar="True"
Topmost="True">
<Window.Resources>
<!-- 引用共享的Navisworks 2026样式资源 -->
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/TransportPlugin;component/src/UI/WPF/Resources/NavisworksStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!-- 对话框专用样式 -->
<Style x:Key="DialogSectionStyle" TargetType="GroupBox">
<Setter Property="Foreground" Value="#FF2B579A"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Margin" Value="0,10,0,10"/>
<Setter Property="Padding" Value="10"/>
</Style>
<Style x:Key="DialogLabelStyle" TargetType="Label">
<Setter Property="Foreground" Value="#FF333333"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Margin" Value="0,0,10,0"/>
</Style>
<Style x:Key="DialogTextBoxStyle" TargetType="TextBox">
<Setter Property="Height" Value="24"/>
<Setter Property="Padding" Value="4,2"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#FFCCCCCC"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
</Style>
</ResourceDictionary>
</Window.Resources>
<Grid Margin="20">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<!-- 输出格式选择 -->
<GroupBox Grid.Row="0" Header="输出" Style="{StaticResource DialogSectionStyle}">
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="格式:" Style="{StaticResource DialogLabelStyle}" Width="80"/>
<ComboBox Name="FormatComboBox" Width="120" Height="24" SelectedIndex="0">
<ComboBoxItem Content="JPEG"/>
<ComboBoxItem Content="PNG"/>
<ComboBoxItem Content="Windows 位图"/>
</ComboBox>
</StackPanel>
</StackPanel>
</GroupBox>
<!-- 尺寸设置 -->
<GroupBox Grid.Row="1" Header="尺寸" Style="{StaticResource DialogSectionStyle}">
<StackPanel>
<!-- 预设尺寸 -->
<StackPanel Orientation="Horizontal" Margin="0,5">
<Label Content="预设:" Style="{StaticResource DialogLabelStyle}" Width="80"/>
<ComboBox Name="PresetSizeComboBox" Width="200" Height="24" SelectedIndex="0"
SelectionChanged="PresetSizeComboBox_SelectionChanged">
<ComboBoxItem Content="使用当前视窗尺寸" Tag="CurrentViewport"/>
<ComboBoxItem Content="自定义" Tag="Custom"/>
<ComboBoxItem Content="3840 x 2160 (4K)" Tag="3840x2160"/>
<ComboBoxItem Content="1920 x 1080 (Full HD)" Tag="1920x1080"/>
<ComboBoxItem Content="1280 x 720 (HD)" Tag="1280x720"/>
<ComboBoxItem Content="1024 x 768 (4:3)" Tag="1024x768"/>
<ComboBoxItem Content="800 x 600 (4:3)" Tag="800x600"/>
</ComboBox>
</StackPanel>
<!-- 自定义尺寸 -->
<Grid Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="20"/>
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Content="自定义:" Style="{StaticResource DialogLabelStyle}"/>
<TextBox Grid.Column="1" Name="WidthTextBox" Text="1920" Style="{StaticResource DialogTextBoxStyle}"
TextAlignment="Center"/>
<Label Grid.Column="2" Content="×" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<TextBox Grid.Column="3" Name="HeightTextBox" Text="1080" Style="{StaticResource DialogTextBoxStyle}"
TextAlignment="Center"/>
<Label Grid.Column="4" Content="像素" VerticalAlignment="Center" Margin="10,0,0,0"/>
</Grid>
</StackPanel>
</GroupBox>
<!-- 操作按钮 -->
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,20,0,0">
<Button Name="OkButton" Content="确定"
Style="{StaticResource ActionButtonStyle}"
Width="80" Height="32" Margin="0,0,10,0"
Click="OkButton_Click"/>
<Button Name="CancelButton" Content="取消"
Style="{StaticResource SecondaryButtonStyle}"
Width="80" Height="32"
Click="CancelButton_Click"/>
</StackPanel>
</Grid>
</Window>