87 lines
4.5 KiB
Plaintext
87 lines
4.5 KiB
Plaintext
|
|
<Window x:Class="MvdLiteSnoop.MainWindow"
|
|||
|
|
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:local1="clr-namespace:MvdLiteSnoop"
|
|||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|||
|
|
xmlns:md="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|||
|
|
Width="800"
|
|||
|
|
Height="450"
|
|||
|
|
mc:Ignorable="d"
|
|||
|
|
d:DataContext="{d:DesignInstance Type=local1:MainWindow}"
|
|||
|
|
Style="{StaticResource MaterialDesignWindow}"
|
|||
|
|
Title="浏览MvdLite数据">
|
|||
|
|
<Grid>
|
|||
|
|
<Grid>
|
|||
|
|
<Grid.RowDefinitions>
|
|||
|
|
<RowDefinition Height="Auto" />
|
|||
|
|
<RowDefinition Height="Auto" />
|
|||
|
|
<RowDefinition Height="*" />
|
|||
|
|
</Grid.RowDefinitions>
|
|||
|
|
<Grid.ColumnDefinitions>
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
<ColumnDefinition Width="*" />
|
|||
|
|
</Grid.ColumnDefinitions>
|
|||
|
|
<!-- <md:TreeListView>
|
|||
|
|
<md:TreeListViewItem Content="测试1" />
|
|||
|
|
<md:TreeListViewItem Content="测试1" />
|
|||
|
|
<md:TreeListViewItem Content="测试1" />
|
|||
|
|
<md:TreeListViewItem Content="测试1" />
|
|||
|
|
</md:TreeListView> -->
|
|||
|
|
<!-- <Button Margin="5"
|
|||
|
|
Click="Button_Click"
|
|||
|
|
Content="Excel" /> -->
|
|||
|
|
<UniformGrid Grid.ColumnSpan="2" Rows="1">
|
|||
|
|
<Button Margin="5"
|
|||
|
|
Click="Read"
|
|||
|
|
Content="MvdLite" />
|
|||
|
|
<TextBox x:Name="TbToSearch" Margin="5"/>
|
|||
|
|
<Button Content="查询" Click="Search" Margin="5"/>
|
|||
|
|
<Button Content="导出所有属性" Click="Export" Margin="5"/>
|
|||
|
|
<Button Content="测试表格" Click="Test" Margin="5"/>
|
|||
|
|
</UniformGrid>
|
|||
|
|
<TreeView x:Name="SignTree"
|
|||
|
|
Grid.Row="1"
|
|||
|
|
Grid.RowSpan="2"
|
|||
|
|
ItemsSource="{Binding EntityNodes}">
|
|||
|
|
<!-- 绑定数据源 -->
|
|||
|
|
<TreeView.ItemTemplate>
|
|||
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
|||
|
|
<StackPanel Orientation="Horizontal">
|
|||
|
|
<TextBlock Text="{Binding Data.Name}" />
|
|||
|
|
</StackPanel>
|
|||
|
|
</HierarchicalDataTemplate>
|
|||
|
|
</TreeView.ItemTemplate>
|
|||
|
|
</TreeView>
|
|||
|
|
<StackPanel Grid.Row="1" Grid.Column="1">
|
|||
|
|
<TextBox IsReadOnly="True" Margin="5"
|
|||
|
|
md:HintAssist.Hint="名称:"
|
|||
|
|
Style="{StaticResource MaterialDesignOutlinedTextBox}"
|
|||
|
|
Text="{Binding ElementName=SignTree, Path=SelectedItem.Data.Name}" />
|
|||
|
|
<!-- <TextBlock Margin="5" Text="{Binding ElementName=SignTree, Path=SelectedItem.Data.Description}"/> -->
|
|||
|
|
<TextBox IsReadOnly="True" Margin="5"
|
|||
|
|
md:HintAssist.Hint="IFC类:"
|
|||
|
|
Style="{StaticResource MaterialDesignOutlinedTextBox}"
|
|||
|
|
Text="{Binding ElementName=SignTree, Path=SelectedItem.Data.IfcMap}" />
|
|||
|
|
<ComboBox IsReadOnly="True" Margin="5"
|
|||
|
|
ItemsSource="{Binding ElementName=SignTree, Path=SelectedItem.Data.TypeLabels}"
|
|||
|
|
md:HintAssist.Hint="类型标签:"
|
|||
|
|
Style="{StaticResource MaterialDesignOutlinedComboBox}" />
|
|||
|
|
<ComboBox IsReadOnly="True" Margin="5"
|
|||
|
|
ItemsSource="{Binding ElementName=SignTree, Path=SelectedItem.Data.Conditions}"
|
|||
|
|
md:HintAssist.Hint="约束:"
|
|||
|
|
Style="{StaticResource MaterialDesignOutlinedComboBox}" />
|
|||
|
|
</StackPanel>
|
|||
|
|
<DataGrid Grid.Row="2"
|
|||
|
|
Grid.Column="1"
|
|||
|
|
IsReadOnly="True"
|
|||
|
|
ItemsSource="{Binding ElementName=SignTree, Path=SelectedItem.Data.Constraints}">
|
|||
|
|
<DataGrid.Columns>
|
|||
|
|
<DataGridTextColumn Binding="{Binding PropName, TargetNullValue=''}" Header="属性名" />
|
|||
|
|
<DataGridTextColumn Binding="{Binding ValueRange, TargetNullValue=''}" Header="属性约束" />
|
|||
|
|
</DataGrid.Columns>
|
|||
|
|
</DataGrid>
|
|||
|
|
</Grid>
|
|||
|
|
</Grid>
|
|||
|
|
|
|||
|
|
</Window>
|