261 lines
12 KiB
Plaintext
Raw Permalink Normal View History

2025-08-15 16:34:31 +08:00
<UserControl
x:Class="SWS.CAD.Views.NewDrawing"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:SWS.CAD.Views.CustomControl"
xmlns:prism="http://prismlibrary.com/"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
Width="300"
Height="550">
<UserControl.Resources>
<ResourceDictionary Source="pack://application:,,,/SWS.CAD;component/Views/Style/CustomStyles.xaml" />
</UserControl.Resources>
<telerik:RadBusyIndicator BusyContent="{Binding BusyContent}" IsBusy="{Binding IsBusy}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<!-- 自定义标题栏 -->
<local:customWindowTitleBar />
<!-- 主要内容区 -->
<Grid Grid.Row="1" Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<!-- 第一行 图纸名字 -->
<TextBlock Style="{StaticResource sysLabel}" Text="图纸名字:" />
<TextBox
Grid.Column="1"
Grid.ColumnSpan="2"
Style="{StaticResource sysTextBox}"
Text="{Binding dwgObj.DrawingFileName, Mode=TwoWay}" />
<!-- 第二行 图纸版本 -->
<TextBlock
Grid.Row="1"
Style="{StaticResource sysLabel}"
Text="图纸版本:" />
<TextBox
Grid.Row="1"
Grid.Column="1"
Grid.ColumnSpan="2"
Style="{StaticResource sysTextBox}"
Text="{Binding dwgObj.FileVersion, Mode=TwoWay}" />
<!-- 第三行 图纸模板 -->
<TextBlock
Grid.Row="2"
Style="{StaticResource sysLabel}"
Text="图纸模板:" />
<!-- TreeItemStyle="{StaticResource TreeViewItemStyle1}" -->
<local:TreeComboBox
Grid.Row="2"
Grid.Column="1"
Grid.ColumnSpan="2"
DisplayPath="Text"
IsEnabled="{Binding IsEnableTemplate}"
ItemsSource="{Binding templates}"
SelectedItem="{Binding SelectedTemplateItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource sysTreeCombobox}"
TreeItemStyle="{StaticResource TreeViewItemStyle1}">
<local:TreeComboBox.TreeItemItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
<TextBlock Text="{Binding Text}" />
</HierarchicalDataTemplate>
</local:TreeComboBox.TreeItemItemTemplate>
</local:TreeComboBox>
<!-- 第四行 图纸目录 -->
<TextBlock
Grid.Row="3"
Style="{StaticResource sysLabel}"
Text="图纸目录:" />
<!-- TreeItemStyle="{StaticResource TreeViewItemStyle1}" -->
<local:TreeComboBox
Grid.Row="3"
Grid.Column="1"
Grid.ColumnSpan="2"
DisplayPath="Text"
ItemsSource="{Binding dwgCatalogueID}"
SelectedItem="{Binding SelectedCatalogueIDItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource sysTreeCombobox}"
TreeItemStyle="{StaticResource TreeViewItemStyle1}">
<local:TreeComboBox.TreeItemItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
<TextBlock Text="{Binding Text}" />
</HierarchicalDataTemplate>
</local:TreeComboBox.TreeItemItemTemplate>
</local:TreeComboBox>
<!-- 第五行 图纸类型 -->
<TextBlock
Grid.Row="4"
Style="{StaticResource sysLabel}"
Text="图纸类型:" />
<telerik:RadComboBox
Grid.Row="4"
Grid.Column="1"
Grid.ColumnSpan="2"
DisplayMemberPath="DataItemName"
IsEnabled="{Binding IsEnableTemplate}"
ItemsSource="{Binding dwgType}"
SelectedValue="{Binding dwgObj.DrawingType}"
SelectedValuePath="DataItemDetailID"
Style="{StaticResource sysCombobox}" />
<!-- 第六行 设计阶段 -->
<TextBlock
Grid.Row="5"
Style="{StaticResource sysLabel}"
Text="设计阶段:" />
<telerik:RadComboBox
Grid.Row="5"
Grid.Column="1"
Grid.ColumnSpan="2"
DisplayMemberPath="DataItemName"
IsEnabled="False"
IsReadOnly="True"
ItemsSource="{Binding dwgStage}"
SelectedValue="{Binding dwgObj.DrawingStage}"
SelectedValuePath="DataItemDetailID"
Style="{StaticResource sysCombobox}" />
<!-- 第七行 所属系统 -->
<TextBlock
Grid.Row="6"
Style="{StaticResource sysLabel}"
Text="所属系统:" />
<local:TreeComboBox
Grid.Row="6"
Grid.Column="1"
Grid.ColumnSpan="2"
DisplayPath="Text"
ItemsSource="{Binding dwgSystem}"
SelectedItem="{Binding SelectedSystemItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource sysTreeCombobox}"
TreeItemStyle="{StaticResource TreeViewItemStyle1}">
<local:TreeComboBox.TreeItemItemTemplate>
<HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
<TextBlock Text="{Binding Text}" />
</HierarchicalDataTemplate>
</local:TreeComboBox.TreeItemItemTemplate>
</local:TreeComboBox>
<!-- 第八行 统计方式 -->
<TextBlock
Grid.Row="7"
Style="{StaticResource sysLabel}"
Text="统计方式:" />
<telerik:RadComboBox
Grid.Row="7"
Grid.Column="1"
Grid.ColumnSpan="2"
DisplayMemberPath="DataItemName"
ItemsSource="{Binding dwgMaterialCensus}"
SelectedValue="{Binding dwgObj.MaterialCensus}"
SelectedValuePath="DataItemDetailID"
Style="{StaticResource sysCombobox}" />
<!-- 第九行 统计范围 -->
<TextBlock
Grid.Row="8"
Style="{StaticResource sysLabel}"
Text="统计范围:" />
<telerik:RadComboBox
Grid.Row="8"
Grid.Column="1"
Grid.ColumnSpan="2"
DisplayMemberPath="DataItemName"
ItemsSource="{Binding dwgMaterialRange}"
SelectedValue="{Binding dwgObj.MaterialRange}"
SelectedValuePath="DataItemDetailID"
Style="{StaticResource sysCombobox}" />
<!-- 第十行 排序编号 -->
<TextBlock
Grid.Row="9"
Style="{StaticResource sysLabel}"
Text="排序编号:" />
<TextBox
Grid.Row="9"
Grid.Column="1"
Grid.ColumnSpan="2"
InputMethod.IsInputMethodEnabled="False"
PreviewTextInput="TextBox_PreviewTextInput"
Style="{StaticResource sysTextBox}"
Text="{Binding dwgObj.OrderID, Mode=TwoWay}" />
<!-- 第十一行 图纸描述1 -->
<TextBlock
Grid.Row="10"
Style="{StaticResource sysLabel}"
Text="图纸描述1" />
<TextBox
Grid.Row="10"
Grid.Column="1"
Grid.ColumnSpan="2"
Style="{StaticResource sysDescribeTextBox}"
Text="{Binding dwgObj.Describe1, Mode=TwoWay}" />
<!-- 第十二行 图纸描述2 -->
<TextBlock
Grid.Row="11"
Style="{StaticResource sysLabel}"
Text="图纸描述2" />
<TextBox
Grid.Row="11"
Grid.Column="1"
Grid.ColumnSpan="2"
Style="{StaticResource sysDescribeTextBox}"
Text="{Binding dwgObj.Describe2, Mode=TwoWay}" />
<!-- 第十三行 图纸描述3 -->
<TextBlock
Grid.Row="12"
Style="{StaticResource sysLabel}"
Text="图纸描述3" />
<TextBox
Grid.Row="12"
Grid.Column="1"
Grid.ColumnSpan="2"
Style="{StaticResource sysDescribeTextBox}"
Text="{Binding dwgObj.Describe3, Mode=TwoWay}" />
</Grid>
<Border
Grid.Row="2"
Height="30"
Background="{StaticResource ColorPrimary}">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<telerik:RadButton
Margin="5"
Command="{Binding CloseCommand}"
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
Content="取消"
Style="{StaticResource sysBtn2}" />
<telerik:RadButton
Margin="5"
Command="{Binding OKCommand}"
CommandParameter=""
Content="保存"
Style="{StaticResource sysBtn}" />
</StackPanel>
</Border>
</Grid>
</telerik:RadBusyIndicator>
</UserControl>