功能更新
This commit is contained in:
@@ -0,0 +1,127 @@
|
||||
<ui:MelWindow
|
||||
x:Class="ShrlAlgoToolkit.RevitAddins.Standardizer.WriteParametersView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:ShrlAlgoToolkit.RevitAddins.Standardizer"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="https://github.com/ShrlAlgo/Melskin"
|
||||
Title="实例参数编辑"
|
||||
Width="500"
|
||||
Height="420"
|
||||
d:DataContext="{d:DesignInstance Type=local:WriteParametersViewModel}"
|
||||
mc:Ignorable="d">
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="pack://application:,,,/ShrlAlgoToolkit.RevitAddins;component/WPFUI.xaml" />
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<DataGrid
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
d:ItemsSource="{d:SampleData}"
|
||||
AutoGenerateColumns="False"
|
||||
CanUserAddRows="False"
|
||||
ItemsSource="{Binding Items}">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn
|
||||
Binding="{Binding Name}"
|
||||
Header="参数名"
|
||||
IsReadOnly="True" />
|
||||
<DataGridTextColumn Binding="{Binding Value, UpdateSourceTrigger=PropertyChanged}" Header="参数值" />
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
<UniformGrid
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Center"
|
||||
Rows="1">
|
||||
<CheckBox
|
||||
MinWidth="5"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
Content="仅选中"
|
||||
IsChecked="{Binding IsSelectedItems}"
|
||||
ToolTip="选中元素修改,否则全部可见(临时隐藏也算不可见)元素修改" />
|
||||
<CheckBox
|
||||
MinWidth="5"
|
||||
Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
Content="覆盖现值"
|
||||
IsChecked="{Binding IsOverride}"
|
||||
ToolTip="已有值会被表中填写值覆盖" />
|
||||
<ListBox
|
||||
Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center">
|
||||
<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="SelectionChanged">
|
||||
<b:InvokeCommandAction Command="{Binding InitCommand}" CommandParameter="{Binding SelectedIndex, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}}" />
|
||||
</b:EventTrigger>
|
||||
</b:Interaction.Triggers>
|
||||
<ListBox.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
<ListBoxItem Content="土建" ToolTip="加载默认土建填写参数" />
|
||||
<ListBoxItem Content="机电" ToolTip="加载默认机电填写参数" />
|
||||
</ListBox>
|
||||
</UniformGrid>
|
||||
<UniformGrid
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
Rows="1">
|
||||
<TextBox
|
||||
Margin="5"
|
||||
ui:InputAssist.PlaceholderText="Excel文件路径"
|
||||
Text="{Binding ExcelPath, UpdateSourceTrigger=PropertyChanged}"
|
||||
ToolTip="输入路径回车读取文件">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Return" Command="{Binding OpenExcelCommand}" />
|
||||
</TextBox.InputBindings>
|
||||
<!--<b:Interaction.Triggers>
|
||||
<b:EventTrigger EventName="LostFocus">
|
||||
<b:InvokeCommandAction Command="{Binding OpenExcelCommand}" CommandParameter="{Binding Text, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=TextBox}}" />
|
||||
</b:EventTrigger>
|
||||
</b:Interaction.Triggers>-->
|
||||
</TextBox>
|
||||
<!--<TextBox md:HintAssist.Hint="忽略属性" Text="{Binding ExcelPath, UpdateSourceTrigger=PropertyChanged}" ToolTip="输入路径回车读取文件">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Return" Command="{Binding OpenExcelCommand}" />
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>-->
|
||||
<Button
|
||||
Margin="5"
|
||||
Command="{Binding BrowserExcelFileCommand}"
|
||||
Content="打开Excel文件" />
|
||||
<Button
|
||||
Margin="5"
|
||||
Command="{Binding GetParamsCommand}"
|
||||
Content="从构件提取参数" />
|
||||
</UniformGrid>
|
||||
<UniformGrid
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
HorizontalAlignment="Center"
|
||||
Rows="1">
|
||||
<Button
|
||||
Margin="5"
|
||||
Command="{Binding ExportExcelCommand}"
|
||||
Content="导出Excel文件" />
|
||||
<Button
|
||||
Margin="5"
|
||||
HorizontalAlignment="Center"
|
||||
Command="{Binding WriteParamsCommand}"
|
||||
Content="填写属性值"
|
||||
ToolTip="深圳轨道交通标准的属性未填值会默认为“/”并且会跳过修改“ID-100-编号”" />
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</ui:MelWindow>
|
||||
Reference in New Issue
Block a user