105 lines
4.4 KiB
Plaintext
105 lines
4.4 KiB
Plaintext
|
|
<Window
|
|||
|
|
x:Class="SZBIM.StandardTools.ParameterManager.AddParamsWin"
|
|||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|||
|
|
xmlns:manager="clr-namespace:Sai.Common.Shared.ParameterManager"
|
|||
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|||
|
|
Title="添加参数"
|
|||
|
|
Width="530"
|
|||
|
|
Height="350"
|
|||
|
|
MinWidth="600"
|
|||
|
|
MinHeight="350"
|
|||
|
|
d:DataContext="{d:DesignInstance Type=manager:AddParamsViewModel}"
|
|||
|
|
mc:Ignorable="d">
|
|||
|
|
<Window.Resources>
|
|||
|
|
<ResourceDictionary>
|
|||
|
|
<ResourceDictionary.MergedDictionaries>
|
|||
|
|
<ResourceDictionary Source="/Sai.RvKits;component/Styles/WPFUI.xaml" />
|
|||
|
|
</ResourceDictionary.MergedDictionaries>
|
|||
|
|
</ResourceDictionary>
|
|||
|
|
</Window.Resources>
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="Auto" />
|
|||
|
|
<RowDefinition Height="*" />
|
|||
|
|
<RowDefinition Height="Auto" />
|
|||
|
|
<RowDefinition Height="Auto" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
<DataGrid
|
|||
|
|
x:Name="DataGridParams"
|
|||
|
|
Grid.Row="1"
|
|||
|
|
Grid.Column="0"
|
|||
|
|
d:ItemsSource="{d:SampleData}"
|
|||
|
|
AutoGenerateColumns="False"
|
|||
|
|
CanUserAddRows="False"
|
|||
|
|
ItemsSource="{Binding Parameter}">
|
|||
|
|
<DataGrid.Columns>
|
|||
|
|
<DataGridTextColumn Header="参数分组(共享)" />
|
|||
|
|
<DataGridTextColumn Header="族参数分组" />
|
|||
|
|
<DataGridTextColumn Header="参数名" />
|
|||
|
|
<DataGridTextColumn Header="值类型" />
|
|||
|
|
<DataGridTextColumn Header="参数类型" />
|
|||
|
|
</DataGrid.Columns>
|
|||
|
|
</DataGrid>
|
|||
|
|
<StackPanel
|
|||
|
|
Grid.Row="0"
|
|||
|
|
Grid.Column="0"
|
|||
|
|
HorizontalAlignment="Left"
|
|||
|
|
Orientation="Horizontal">
|
|||
|
|
<Button Command="{Binding ImportExcelCommand}">
|
|||
|
|
<materialDesign:PackIcon Kind="MicrosoftExcel" />
|
|||
|
|
</Button>
|
|||
|
|
<Button Command="{Binding AddParamItemCommand}">
|
|||
|
|
<materialDesign:PackIcon Kind="Add" />
|
|||
|
|
</Button>
|
|||
|
|
<Button Command="{Binding RemoveParamItemCommand}"
|
|||
|
|
CommandParameter="{Binding SelectedItem, ElementName=DataGridParams}">
|
|||
|
|
<materialDesign:PackIcon Kind="Remove" />
|
|||
|
|
</Button>
|
|||
|
|
<TextBox
|
|||
|
|
x:Name="TbXlsxPath"
|
|||
|
|
materialDesign:HintAssist.Hint="Excel文件:"
|
|||
|
|
Cursor="Arrow"
|
|||
|
|
IsReadOnly="True"
|
|||
|
|
Text="{Binding ExcelPath}"
|
|||
|
|
TextWrapping="NoWrap" />
|
|||
|
|
<ComboBox
|
|||
|
|
x:Name="CbSheetName"
|
|||
|
|
materialDesign:HintAssist.Hint="表名:"
|
|||
|
|
DisplayMemberPath="Name"
|
|||
|
|
ItemsSource="{Binding WorkSheets}"
|
|||
|
|
SelectedValuePath="Name" />
|
|||
|
|
</StackPanel>
|
|||
|
|
<StackPanel
|
|||
|
|
Grid.Row="2"
|
|||
|
|
Grid.Column="0"
|
|||
|
|
HorizontalAlignment="Right"
|
|||
|
|
Orientation="Horizontal">
|
|||
|
|
<RadioButton
|
|||
|
|
Content="项目参数(共享参数)"
|
|||
|
|
IsChecked="{Binding IsSharedProjectParam}"
|
|||
|
|
ToolTip="共享参数作为项目参数,关联到所选族的类别" />
|
|||
|
|
<RadioButton
|
|||
|
|
Content="族参数(共享参数)"
|
|||
|
|
IsChecked="{Binding IsSharedFamilyParam}"
|
|||
|
|
ToolTip="共享参数作为族参数,关联到所选族,可以出现在明细表" />
|
|||
|
|
<RadioButton
|
|||
|
|
Content="族参数"
|
|||
|
|
IsChecked="{Binding IsFamilyParam}"
|
|||
|
|
ToolTip="添加族参数,关联到所选族,不能出现在明细表" />
|
|||
|
|
<Button
|
|||
|
|
Command="{Binding AddParamsToProjectCommand}"
|
|||
|
|
CommandParameter="{Binding ItemsSource, ElementName=DataGridParams}"
|
|||
|
|
Content="添加到项目"
|
|||
|
|
Cursor="Hand" />
|
|||
|
|
<Button
|
|||
|
|
Command="{Binding AddParamsToFilesCommand}"
|
|||
|
|
CommandParameter="{Binding ItemsSource, ElementName=DataGridParams}"
|
|||
|
|
Content="添加到文件"
|
|||
|
|
Cursor="Hand"
|
|||
|
|
ToolTip="添加到族文件" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</Grid>
|
|||
|
|
</Window>
|