176 lines
9.1 KiB
XML
176 lines
9.1 KiB
XML
<Grid x:Class="ManagePartPanelV"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:local="clr-namespace:Icarus"
|
|
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
|
Width="150"
|
|
VerticalAlignment="Stretch">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="1*"/>
|
|
</Grid.RowDefinitions>
|
|
<Border Margin="0,0,0,2.5"
|
|
Style="{StaticResource Title_Border}">
|
|
<TextBlock Text="PART MANAGER"
|
|
Style="{StaticResource Title_TextBlock}"/>
|
|
</Border>
|
|
<Border Grid.Row="1"
|
|
Padding="0,2.5,0,0"
|
|
Margin="0,2.5,0,0"
|
|
Style="{StaticResource BottomGrayRow_Border}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="2*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="1*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<TextBlock Text="Part Entity List"
|
|
Margin="0,2.5,0,2.5"
|
|
Style="{StaticResource Title_TextBlock}"/>
|
|
<TreeView x:Name="ManagerPartTreeView"
|
|
Grid.Row="1"
|
|
ItemsSource="{Binding ManagerPartList}"
|
|
MinHeight="200"
|
|
IsEnabled="{Binding IsEnabled}"
|
|
Margin="0,2.5,0,2.5"
|
|
FontSize="12"
|
|
Foreground="{StaticResource Icarus_Gray}">
|
|
<TreeView.Resources>
|
|
<HierarchicalDataTemplate DataType="{x:Type local:ManagePart_Part}"
|
|
ItemsSource="{Binding LayerList}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<!--<Image Source="/Resources/TreeView/Folder.png"
|
|
Height="15"/>-->
|
|
<Grid>
|
|
<TextBlock Text="{Binding sName}"
|
|
Visibility="{Binding TextBlock_Visibility}"
|
|
Style="{StaticResource BaseTextBlock}"/>
|
|
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
|
Visibility="{Binding TextBox_Visibility}">
|
|
<EgtWPFLib5:EgtTextBox.Style>
|
|
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource OptionTextBox}">
|
|
<EventSetter Event="PreviewKeyDown" Handler="TextBox_PreviewKeyDown"/>
|
|
</Style>
|
|
</EgtWPFLib5:EgtTextBox.Style>
|
|
</EgtWPFLib5:EgtTextBox>
|
|
</Grid>
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
<HierarchicalDataTemplate DataType="{x:Type local:ManagePart_Layer}"
|
|
ItemsSource="{Binding EntityList, UpdateSourceTrigger=PropertyChanged}">
|
|
<StackPanel Orientation="Horizontal">
|
|
<!--<Image Source="/Resources/TreeView/Folder.png"
|
|
Height="15"/>-->
|
|
<TextBlock Text="{Binding sName}"
|
|
Style="{StaticResource BaseTextBlock}"/>
|
|
</StackPanel>
|
|
</HierarchicalDataTemplate>
|
|
<HierarchicalDataTemplate DataType="{x:Type local:PartManager_GeomEntity}">
|
|
<Grid>
|
|
<TextBlock Text="{Binding sName}"
|
|
Style="{StaticResource BaseTextBlock}"/>
|
|
<EgtWPFLib5:EgtTextBox Text="{Binding sName, UpdateSourceTrigger=Explicit}"
|
|
IsExplicitFocused="{Binding UserShouldEditValueNow}"
|
|
Visibility="{Binding TextBox_Visibility}">
|
|
<EgtWPFLib5:EgtTextBox.Style>
|
|
<Style TargetType="{x:Type EgtWPFLib5:EgtTextBox}" BasedOn="{StaticResource OptionTextBox}">
|
|
<EventSetter Event="PreviewKeyDown" Handler="TextBox_PreviewKeyDown"/>
|
|
</Style>
|
|
</EgtWPFLib5:EgtTextBox.Style>
|
|
</EgtWPFLib5:EgtTextBox>
|
|
</Grid>
|
|
</HierarchicalDataTemplate>
|
|
<!-- Menu' tasto destro -->
|
|
<ContextMenu x:Key="RowMenu"
|
|
ItemsSource="{Binding MenuList}"
|
|
Style="{StaticResource Icarus_ContextMenu}">
|
|
<ContextMenu.ItemContainerStyle>
|
|
<Style TargetType="MenuItem" BasedOn="{StaticResource Icarus_MenuItem}">
|
|
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
|
<Setter Property="Header" Value="{Binding sMsg}"/>
|
|
</Style>
|
|
</ContextMenu.ItemContainerStyle>
|
|
</ContextMenu>
|
|
</TreeView.Resources>
|
|
<TreeView.ItemContainerStyle>
|
|
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource {x:Type TreeViewItem}}">
|
|
<Setter Property="IsSelected" Value="{Binding bIsSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
|
|
<Setter Property="IsExpanded" Value="True"/>
|
|
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}"/>
|
|
<Setter Property="ContextMenuService.Placement" Value="Right"/>
|
|
<EventSetter Event="ContextMenuOpening" Handler="Item_ContextMenuOpening"/>
|
|
</Style>
|
|
</TreeView.ItemContainerStyle>
|
|
</TreeView>
|
|
<TextBlock Grid.Row="2"
|
|
Text="Imported Entity List"
|
|
Visibility="{Binding IsImport_Visibility}"
|
|
Margin="0,2.5,0,2.5"
|
|
Style="{StaticResource Title_TextBlock}"/>
|
|
<ListBox Grid.Row="3"
|
|
ItemsSource="{Binding ImportedEntityList, UpdateSourceTrigger=PropertyChanged}"
|
|
SelectedItem="{Binding SelImportedEntity}"
|
|
MinHeight="100"
|
|
IsEnabled="{Binding IsEnabled}"
|
|
Visibility="{Binding IsImport_Visibility}"
|
|
Margin="0,2.5,0,2.5">
|
|
<ListBox.Resources>
|
|
<!-- Menu' tasto destro -->
|
|
<ContextMenu x:Key="RowMenu"
|
|
ItemsSource="{Binding MenuList}"
|
|
Style="{StaticResource Icarus_ContextMenu}">
|
|
<ContextMenu.ItemContainerStyle>
|
|
<Style TargetType="{x:Type MenuItem}" BasedOn="{StaticResource Icarus_MenuItem}">
|
|
<Setter Property="Command" Value="{Binding MenuItem_Command}"/>
|
|
<Setter Property="Header" Value="{Binding sMsg}"/>
|
|
</Style>
|
|
</ContextMenu.ItemContainerStyle>
|
|
</ContextMenu>
|
|
</ListBox.Resources>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="ListBoxItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="ContextMenu" Value="{StaticResource RowMenu}" />
|
|
<Setter Property="ContextMenuService.Placement" Value="Right" />
|
|
<Setter Property="ContextMenuService.VerticalOffset" Value="-3" />
|
|
</Style>
|
|
</ListBox.ItemContainerStyle>
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid HorizontalAlignment="Stretch">
|
|
<Grid.InputBindings>
|
|
<MouseBinding Gesture="LeftDoubleClick"
|
|
Command="{Binding GeomEntityDoubleClick_Command}"/>
|
|
</Grid.InputBindings>
|
|
<TextBlock Text="{Binding ghName}">
|
|
</TextBlock>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
<UniformGrid Grid.Row="4"
|
|
Rows="1"
|
|
IsEnabled="{Binding IsEnabled}"
|
|
Margin="0,2.5,0,0">
|
|
<Button Command="{Binding Ok_Command}"
|
|
IsDefault="True"
|
|
Margin="0,0,2.5,0"
|
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
|
<Image Source="\Resources\Common\Ok.png"
|
|
Style="{StaticResource Button_Image}"/>
|
|
</Button>
|
|
<Button Command="{Binding Cancel_Command}"
|
|
Visibility="{Binding IsImport_Visibility}"
|
|
Margin="0,0,2.5,0"
|
|
Style="{StaticResource RightPanel_HalfRound_Button}">
|
|
<Image Source="\Resources\Common\Cancel.png"
|
|
Style="{StaticResource Button_Image}"/>
|
|
</Button>
|
|
</UniformGrid>
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|