| | |
| | | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| | | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| | | xmlns:local="clr-namespace:Plugin.SeqEditor" |
| | | xmlns:sp="clr-namespace:Plugin.SeqEditor.SettingPanel" |
| | | mc:Ignorable="d" |
| | | xmlns:hcu="clr-namespace:HMI.Core.Util;assembly=HMI.Core" |
| | | xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base" |
| | | xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI" |
| | | xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI" |
| | |
| | | xmlns:pu="https://opensource.panuon.com/wpf-ui" |
| | | xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI" |
| | | xmlns:util="clr-namespace:Plugin.SeqEditor.Util" |
| | | xmlns:dd="urn:gong-wpf-dragdrop" |
| | | xmlns:i="http://schemas.microsoft.com/xaml/behaviors" |
| | | d:DesignHeight="450" d:DesignWidth="800"> |
| | | <i:Interaction.Triggers> |
| | |
| | | <UserControl.Resources> |
| | | <ResourceDictionary> |
| | | <ResourceDictionary.MergedDictionaries> |
| | | <ResourceDictionary Source="/HMI.UI;component/Style/PanuonDataGrid.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Controls/MultiCombox.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Controls/TreeGrid/Themes/TreeListView.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Controls/TreeGrid/Themes/TreeItemContentControl.xaml"/> |
| | | <ResourceDictionary Source="/HMI.UI;component/Controls/TreeGrid/Themes/TreeGrid.xaml"/> |
| | | </ResourceDictionary.MergedDictionaries> |
| | | |
| | | <x:Static x:Key="runModeResource" Member="util:RunModeData.ItemSource"/> |
| | | |
| | | <uic:IndentConverter x:Key="IndentConverter"/> |
| | | |
| | | <local:RowNumberConverter x:Key="treeNumber"/> |
| | | |
| | | <Style TargetType="pu:FormGroup"> |
| | | <Setter Property="Padding" Value="0,10"/> |
| | | <Setter Property="HeaderFontSize" Value="14"/> |
| | | <Setter Property="HeaderFontWeight" Value="Bold"/> |
| | | </Style> |
| | | |
| | | <Style x:Key="TreeTogg" TargetType="ToggleButton"> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate> |
| | | <Border Width="0"/> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | |
| | | <!-- 树Grid组件 --> |
| | |
| | | </CollectionViewSource.GroupDescriptions> |
| | | </CollectionViewSource> |
| | | |
| | | <hcu:BindingProxy x:Key="BindingProxy" Data="{Binding}"/> |
| | | |
| | | <ContextMenu x:Key="stepContextMenu"> |
| | | <ContextMenu.Resources> |
| | | <Style TargetType="MenuItem"> |
| | | <Setter Property="DataContext" Value="{Binding Data,Source={StaticResource BindingProxy}}"/> |
| | | </Style> |
| | | </ContextMenu.Resources> |
| | | <MenuItem Header="插入Step"> |
| | | <MenuItem Header="Tests"> |
| | | <!--<MenuItem Header="Pass/Fail" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Tests.PassFail"/> |
| | | <MenuItem Header="MultiNumber" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Tests.NI_MultipleNumericLimitTest"/>--> |
| | | <MenuItem Header="Number" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Tests.NumericLimitTest"/> |
| | | <MenuItem Header="String" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Tests.StringValueTest"/> |
| | | </MenuItem> |
| | | |
| | | <!--<MenuItem Header="Actions"> |
| | | <MenuItem Header="LabVIEW" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions.LabVIEW"/> |
| | | <MenuItem Header="LabWindows/CVI" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions.LabWindows/CVI"/> |
| | | <MenuItem Header="C/C++ DLL" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions.C/C++ DLL"/> |
| | | <MenuItem Header=".NET" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions..NET"/> |
| | | |
| | | <MenuItem Header="ActiveX/COM" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions.ActiveX/COM"/> |
| | | |
| | | <MenuItem Header="None" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions.None"/> |
| | | |
| | | <MenuItem Header="LabVIEW NXG" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions.LabVIEW NXG"/> |
| | | <MenuItem Header="Python" Command="{Binding AddStepCommand}" |
| | | CommandParameter="Actions.Python"/> |
| | | </MenuItem>--> |
| | | </MenuItem> |
| | | </ContextMenu> |
| | | |
| | | <Style x:Key="treeCell" TargetType="DataGridCell"> |
| | | <Setter Property="Background" Value="Transparent"/> |
| | | <Setter Property="Padding" Value="5"/> |
| | | <Setter Property="Margin" Value="0"/> |
| | | <Setter Property="BorderThickness" Value="0"/> |
| | | <Setter Property="VerticalAlignment" Value="Stretch"/> |
| | | <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorLevel=1,AncestorType=ui:TreeDataGrid}}"/> |
| | | <Setter Property="HorizontalContentAlignment" |
| | | Value="{Binding HorizontalContentAlignment, |
| | | RelativeSource={RelativeSource Mode=FindAncestor,AncestorLevel=1,AncestorType=ui:TreeDataGrid}}"/> |
| | | </Style> |
| | | |
| | | <Style x:Key="stepRowStyle" TargetType="ui:TreeDataGridRow"> |
| | | <Setter Property="ContextMenu" Value="{StaticResource stepContextMenu}"/> |
| | | <Setter Property="DetailsVisibility" Value="Collapsed"/> |
| | | |
| | | <Style.Triggers> |
| | | <Trigger Property="IsSelected" Value="True"> |
| | | <Setter Property="Background" Value="{StaticResource PrimaryColor}"/> |
| | | </Trigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | |
| | | <Style x:Key="sb" TargetType="ui:TreeDataGrid" BasedOn="{StaticResource DefaultDataGrid}"> |
| | | <Setter Property="pu:DataGridHelper.RowHeaderSeparatorVisibility" Value="Visible"/> |
| | | <Setter Property="pu:DataGridHelper.RowHeaderSeparatorBrush" Value="#FFF"/> |
| | | <Setter Property="AreRowDetailsFrozen" Value="False"/> |
| | | <Setter Property="HeadersVisibility" Value="Column"/> |
| | | <Setter Property="DataGridCell.VerticalContentAlignment" Value="Center"/> |
| | | <Setter Property="DataGridCell.HorizontalContentAlignment" Value="Left"/> |
| | | </Style> |
| | | |
| | | <Style x:Key="gvh" TargetType="GridViewColumnHeader"> |
| | | <Setter Property="Background" Value="{DynamicResource VerBar}"/> |
| | | </Style> |
| | | |
| | | <DataTemplate x:Key="gvht"> |
| | | <Border Padding="6"> |
| | | <TextBlock Foreground="#FFF" Text="{Binding }"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </ResourceDictionary> |
| | | </UserControl.Resources> |
| | | <Border Style="{StaticResource CardBoarder}" Padding="0"> |
| | | <Grid dp:GridHelper.Space="10" Cursor=""> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition/> |
| | | </Grid.RowDefinitions> |
| | | <Grid.ColumnDefinitions> |
| | | <ColumnDefinition Width="0"/> |
| | | <ColumnDefinition Width="8*"/> |
| | | <ColumnDefinition Width="2*"/> |
| | | <ColumnDefinition Width="8.5*"/> |
| | | <ColumnDefinition Width="1.5*"/> |
| | | </Grid.ColumnDefinitions> |
| | | |
| | | <DockPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Margin="0,0,0,10"> |
| | | <DockPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,0,10"> |
| | | <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" |
| | | dp:StackPanelHelper.ChildSpace="10"> |
| | | dp:StackPanelHelper.ChildSpace="10" Margin="0,5"> |
| | | <Button Style="{StaticResource AddBtn}" Content="{DynamicResource se.open}" Command="{Binding OpenSeqFileCommand}"/> |
| | | <Button Style="{StaticResource SaveBtn}" Content="{DynamicResource se.save}" Command="{Binding SaveSeqFileCommand}"/> |
| | | <Button Style="{StaticResource SaveBtn}" pu:ButtonHelper.Icon="" |
| | | Content="{DynamicResource se.saveTo}" |
| | | Command="{Binding SaveSeqFileCommand}"/> |
| | | Command="{Binding SaveToFileCommand}" Cursor="Hand"/> |
| | | <Button Style="{StaticResource DelBtn}" Content="{DynamicResource se.close}" |
| | | pu:ButtonHelper.Icon="" |
| | | Command="{Binding CloseSeqFileCommand}"/> |
| | | <!--<Button Style="{StaticResource DelBtn}" Content="一键展开" |
| | | x:Name="treeAll" |
| | | Click="Button_Click"/>--> |
| | | </StackPanel> |
| | | |
| | | <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TitleFontSize}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="{DynamicResource se.title}"/> |
| | | <TextBlock DockPanel.Dock="Right" FontSize="{StaticResource ContentFontSize2}" |
| | | Margin="20,0,20,0" |
| | | VerticalAlignment="Bottom" LineHeight="{StaticResource TitleFontSize}" HorizontalAlignment="Left"> |
| | | <Run Text="{Binding CurrentFileName}"/> |
| | | <Run DataContext="{Binding CurrentSeqUI}"> |
| | | <Run.Style> |
| | | <Style TargetType="Run"> |
| | | <Style.Triggers> |
| | | <DataTrigger Binding="{Binding IsChanged}" Value="True"> |
| | | <Setter Property="Text" Value="*"/> |
| | | </DataTrigger> |
| | | </Style.Triggers> |
| | | </Style> |
| | | </Run.Style> |
| | | </Run> |
| | | </TextBlock> |
| | | |
| | | <TextBlock DockPanel.Dock="Left" FontSize="{StaticResource ContentFontSize2}" |
| | | Margin="20,0,0,0" |
| | | VerticalAlignment="Bottom" LineHeight="{StaticResource TitleFontSize}" HorizontalAlignment="Left" Text="{Binding CurrentFileName}"/> |
| | | <!--<TextBlock DockPanel.Dock="Left" FontSize="{StaticResource TitleFontSize}" |
| | | VerticalAlignment="Center" HorizontalAlignment="Left" Text="{DynamicResource se.title}"/>--> |
| | | |
| | | <pu:FormGroup DockPanel.Dock="Left" Header="步骤类型" Style="{StaticResource InputFormGroupStyle}"> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <ui:MultiComboBox SelectedValues="{Binding TargetType}" |
| | | pu:ComboBoxHelper.ClearButtonVisibility="Collapsed" |
| | | Width="450" Margin="0,0,10,0" x:Name="CbFilter" IsEditable="True" IsReadOnly="True" > |
| | | |
| | | </ui:MultiComboBox> |
| | | <Button Style="{StaticResource RfhBtn}" Command="{Binding RefreshCommand}"/> |
| | | </StackPanel> |
| | | </pu:FormGroup> |
| | | </DockPanel> |
| | | |
| | | <!--<pu:FormGroup Header="{DynamicResource se.seq}" Orientation="Vertical" Grid.Row="1" Grid.Column="0"> |
| | |
| | | </DataGrid.Columns> |
| | | </DataGrid> |
| | | </pu:FormGroup>--> |
| | | <pu:FormGroup Grid.Row="1" Grid.Column="1" Header="步骤类型" Style="{StaticResource InputFormGroupStyle}"> |
| | | <StackPanel Orientation="Horizontal"> |
| | | |
| | | <!--<ComboBox Text="{Binding TargetType}" |
| | | MinWidth="180" Margin="0,0,10,0" x:Name="CbFilter" |
| | | SelectedValuePath="DataValue" IsEditable="True" > |
| | | <ComboBox.ItemTemplate> |
| | | <DataTemplate DataType="util:ItemData"> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <CheckBox IsChecked="{Binding IsChecked}" /> |
| | | <TextBlock Text="{Binding DisplayName}" /> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </ComboBox.ItemTemplate> |
| | | </ComboBox>--> |
| | | |
| | | <ui:MultiComboBox SelectedValues="{Binding TargetType}" |
| | | Style="{StaticResource FormComboxStyle}" |
| | | pu:ComboBoxHelper.ClearButtonVisibility="Collapsed" |
| | | MinWidth="180" Margin="0,0,10,0" x:Name="CbFilter" IsEditable="True" IsReadOnly="True" > |
| | | <ui:MultiComboBox.ItemTemplate> |
| | | <DataTemplate DataType="util:ItemData"> |
| | | <StackPanel Orientation="Horizontal"> |
| | | <CheckBox IsChecked="{Binding IsChecked,UpdateSourceTrigger=PropertyChanged}" /> |
| | | <TextBlock Text="{Binding DisplayName}" /> |
| | | </StackPanel> |
| | | </DataTemplate> |
| | | </ui:MultiComboBox.ItemTemplate> |
| | | </ui:MultiComboBox> |
| | | |
| | | <!--<ComboBox Style="{StaticResource FormComboxStyle}" MinWidth="180" Margin="0,0,10,0" x:Name="CbFilter"/>--> |
| | | |
| | | <Button Style="{StaticResource RfhBtn}" Command="{Binding RefreshCommand}"/> |
| | | </StackPanel> |
| | | </pu:FormGroup> |
| | | |
| | | |
| | | <pu:FormGroup Header="{Binding CurrentSeqTitle}" Orientation="Vertical" Grid.Row="2" Grid.Column="1"> |
| | | |
| | | <pu:FormGroup Header="{Binding CurrentSeqTitle}" Orientation="Vertical" Grid.Row="1" Grid.Column="0"> |
| | | <!--<DataGrid ItemsSource="{Binding Source={StaticResource cvs}}" |
| | | RowStyle="{StaticResource StepRow}" |
| | | SelectedItem="{Binding CurrentStepUI}"> |
| | |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | ItemsSource="{Binding AllSteps,Converter={StaticResource treeC}}" |
| | | PreviewMouseWheel="treeDataGrid_PreviewMouseWheel" |
| | | </DataGrid>--> |
| | | |
| | | <ui:TreeDataGrid Grid.Row="1" x:Name="treeDataGrid" |
| | | VirtualizingPanel.IsContainerVirtualizable="True" |
| | | VirtualizingPanel.IsVirtualizing="True" |
| | | VirtualizingPanel.VirtualizationMode="Recycling" |
| | | ScrollViewer.CanContentScroll="False" |
| | | VirtualizingPanel.IsVirtualizingWhenGrouping="True" |
| | | EnableColumnVirtualization="True" |
| | | EnableRowVirtualization="True" |
| | | PreviewMouseWheel="treeDataGrid_PreviewMouseWheel" |
| | | <!--<ui:TreeDataGrid Grid.Row="1" x:Name="treeDataGrid" |
| | | dd:DragDrop.IsDragSource="True" |
| | | dd:DragDrop.IsDropTarget="True" |
| | | dd:DragDrop.ShowAlwaysDropTargetAdorner="True" |
| | | dd:DragDrop.UseDefaultDragAdorner="True" |
| | | dd:DragDrop.DropHandler="{Binding StepDropHandler}" |
| | | SelectionUnit="FullRow" |
| | | AutoGenerateColumns="False" |
| | | IsReadOnly="True" |
| | | CanUserAddRows="False" |
| | | Style="{StaticResource DefaultDataGrid}" |
| | | ItemsSource="{Binding Source={StaticResource TreeGridFilter}}" |
| | | ItemsSource="{Binding TreeCollection,IsAsync=True}" |
| | | SelectedItem="{Binding TreeItemData}"> |
| | | |
| | | <!--<DataGrid.GroupStyle> |
| | | <DataGrid.GroupStyle> |
| | | <GroupStyle> |
| | | <GroupStyle.Panel> |
| | | <ItemsPanelTemplate> |
| | | <DataGridRowsPresenter/> |
| | | </ItemsPanelTemplate> |
| | | </GroupStyle.Panel> |
| | | <GroupStyle.ContainerStyle> |
| | | <Style TargetType="{x:Type GroupItem}"> |
| | | <Setter Property="Margin" Value="0,0,0,5" /> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="{x:Type GroupItem}"> |
| | | <GroupBox Header="{Binding Name}"> |
| | | <Expander BorderThickness="0" Background="DarkCyan" |
| | | Header="{Binding Name}" IsExpanded="True"> |
| | | <ItemsPresenter /> |
| | | </GroupBox> |
| | | </Expander> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | </GroupStyle.ContainerStyle> |
| | | </GroupStyle> |
| | | </DataGrid.GroupStyle>--> |
| | | </DataGrid.GroupStyle> |
| | | |
| | | <ui:TreeDataGrid.Columns> |
| | | <DataGrid.Columns> |
| | | <DataGridTemplateColumn IsReadOnly="True" Width="Auto"> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | |
| | | <DataGridTextColumn Header="名称" Width="1*" Binding="{Binding Data.Name}"></DataGridTextColumn> |
| | | <DataGridTextColumn Header="类型" Width="1*" Binding="{Binding Data.Type}"></DataGridTextColumn> |
| | | <DataGridTextColumn Header="描述" Width="7*" Binding="{Binding Data.Description}"></DataGridTextColumn> |
| | | <DataGridTextColumn Header="RunMode" Width="*" Binding="{Binding Data.RunMode}"></DataGridTextColumn> |
| | | </ui:TreeDataGrid.Columns> |
| | | </ui:TreeDataGrid> |
| | | <DataGridTextColumn Width="1*" Binding="{Binding Data.Name}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource se.name}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="1*" Binding="{Binding Data.Type}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource se.type}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTextColumn Width="6*" Binding="{Binding Data.Description}"> |
| | | <DataGridTextColumn.Header> |
| | | <TextBlock Text="{DynamicResource se.description}"/> |
| | | </DataGridTextColumn.Header> |
| | | </DataGridTextColumn> |
| | | |
| | | <DataGridTemplateColumn Width="1*"> |
| | | <DataGridTemplateColumn.Header> |
| | | <TextBlock Text="{DynamicResource se.runMode}"/> |
| | | </DataGridTemplateColumn.Header> |
| | | <DataGridTemplateColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Grid x:Name="border" Margin="0"> |
| | | <TextBlock x:Name="text" Margin="-1" Padding="0" VerticalAlignment="Center"/> |
| | | </Grid> |
| | | <DataTemplate.Triggers> |
| | | <DataTrigger Binding="{Binding Data.RunMode}" Value="Normal"> |
| | | <Setter TargetName="text" Property="Text" Value="{DynamicResource se.normal}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Data.RunMode}" Value="Skip"> |
| | | <Setter TargetName="text" Property="Text" Value="{DynamicResource se.skip}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Data.RunMode}" Value="Pass"> |
| | | <Setter TargetName="text" Property="Text" Value="{DynamicResource se.pass}"/> |
| | | </DataTrigger> |
| | | <DataTrigger Binding="{Binding Data.RunMode}" Value="Fail"> |
| | | <Setter TargetName="text" Property="Text" Value="{DynamicResource se.fail}"/> |
| | | </DataTrigger> |
| | | </DataTemplate.Triggers> |
| | | </DataTemplate> |
| | | </DataGridTemplateColumn.CellTemplate> |
| | | </DataGridTemplateColumn> |
| | | </DataGrid.Columns> |
| | | </ui:TreeDataGrid>--> |
| | | |
| | | |
| | | <ui:TreeListView Grid.Row="1" Grid.Column="0" ItemsSource="{Binding AllSteps}" |
| | | dd:DragDrop.IsDragSource="True" |
| | | FontSize="14" |
| | | x:Name="treeList" |
| | | pu:TreeViewHelper.ItemsHeight="{DynamicResource nanD}" |
| | | dd:DragDrop.IsDropTarget="True" |
| | | dd:DragDrop.DropTargetAdornerBrush="Red" |
| | | dd:DragDrop.DropHandler="{Binding StepDropHandler}" |
| | | SizeChanged="TreeListView_SizeChanged"> |
| | | <i:Interaction.Triggers> |
| | | <i:EventTrigger EventName="SelectedItemChanged"> |
| | | <i:InvokeCommandAction Command="{Binding SbCommand}" PassEventArgsToCommand="True"/> |
| | | </i:EventTrigger> |
| | | <i:EventTrigger EventName="PreviewMouseRightButtonDown"> |
| | | <i:InvokeCommandAction Command="{Binding Sb2Command}" PassEventArgsToCommand="True"/> |
| | | </i:EventTrigger> |
| | | </i:Interaction.Triggers> |
| | | <ui:TreeListView.Resources> |
| | | <Style x:Key="CellBorder" TargetType="Border"> |
| | | <Setter Property="Padding" Value="2"/> |
| | | <Setter Property="BorderBrush" Value="{DynamicResource CommonBoarder}"/> |
| | | <Setter Property="BorderThickness" Value="1,0,0,1"/> |
| | | <Setter Property="Margin" Value="-6,0"/> |
| | | </Style> |
| | | <Style TargetType="ScrollBar" BasedOn="{StaticResource ScrollStyle_Mobile}"/> |
| | | </ui:TreeListView.Resources> |
| | | |
| | | <ui:TreeListView.Style> |
| | | <Style TargetType="ui:TreeListView" BasedOn="{StaticResource DefaultTreeView}"> |
| | | <Setter Property="pu:TreeViewHelper.ToggleArrowToggleButtonStyle" Value="{StaticResource TreeTogg}"/> |
| | | <Setter Property="pu:TreeViewHelper.ItemsPadding" Value="0"/> |
| | | <Setter Property="Background" Value="#FFF"/> |
| | | <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/> |
| | | <Setter Property="ColumnHeaderContainerStyle" Value="{StaticResource gvh}"/> |
| | | <Setter Property="Template"> |
| | | <Setter.Value> |
| | | <ControlTemplate TargetType="ui:TreeListView"> |
| | | <Border BorderBrush="{TemplateBinding BorderBrush}" |
| | | BorderThickness="{TemplateBinding BorderThickness}" |
| | | Background="{TemplateBinding Background}"> |
| | | <Grid> |
| | | <Grid.RowDefinitions> |
| | | <RowDefinition Height="Auto"/> |
| | | <RowDefinition/> |
| | | </Grid.RowDefinitions> |
| | | <GridViewHeaderRowPresenter |
| | | Grid.Row="0" Columns="{TemplateBinding Columns}"> |
| | | <GridViewHeaderRowPresenter.ColumnHeaderContainerStyle> |
| | | <Style TargetType="GridViewColumnHeader"> |
| | | <Setter Property="Background" Value="{DynamicResource VerBar}"/> |
| | | </Style> |
| | | </GridViewHeaderRowPresenter.ColumnHeaderContainerStyle> |
| | | </GridViewHeaderRowPresenter> |
| | | <ScrollViewer Grid.Row="1" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="Auto"> |
| | | <ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/> |
| | | </ScrollViewer> |
| | | </Grid> |
| | | </Border> |
| | | </ControlTemplate> |
| | | </Setter.Value> |
| | | </Setter> |
| | | </Style> |
| | | </ui:TreeListView.Style> |
| | | |
| | | <ui:TreeListView.Columns> |
| | | <GridViewColumn Header="序号" HeaderContainerStyle="{StaticResource gvh}" |
| | | Width="80" |
| | | HeaderTemplate="{StaticResource gvht}"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"> |
| | | <ToggleButton x:Name="Expander" |
| | | Style="{StaticResource ExpandCollapseToggleStyle}" |
| | | Margin="{Binding level,Converter={StaticResource IndentConverter},RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ui:TreeListViewItem,AncestorLevel=1}}" |
| | | Grid.Column="0" |
| | | IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ui:TreeListViewItem,AncestorLevel=1}}" |
| | | ClickMode="Press"/> |
| | | <TextBlock Margin="5,0,0,0" Padding="6,0" |
| | | Text="{Binding CustomIndex}"/> |
| | | </StackPanel> |
| | | </Border> |
| | | |
| | | <DataTemplate.Triggers> |
| | | <DataTrigger Binding="{Binding HasItems, |
| | | RelativeSource={RelativeSource Mode=FindAncestor, |
| | | AncestorType=ui:TreeListViewItem,AncestorLevel=1}}" |
| | | Value="False"> |
| | | <Setter Property="Visibility" Value="Hidden" TargetName="Expander"/> |
| | | </DataTrigger> |
| | | </DataTemplate.Triggers> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Header="名称" HeaderContainerStyle="{StaticResource gvh}" |
| | | Width="200" |
| | | HeaderTemplate="{StaticResource gvht}"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Margin="5,0,0,0" Padding="6,0" Text="{Binding Name}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Header="{DynamicResource se.runMode}" |
| | | Width="100" |
| | | HeaderContainerStyle="{StaticResource gvh}" |
| | | HeaderTemplate="{StaticResource gvht}"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <!--<TextBlock Padding="6,0" Text="{Binding RunMode}"/>--> |
| | | <ui:TableComboBox CanEdit="True" |
| | | DisplayMemberPath="DisplayName" SelectedValuePath="DataValue" |
| | | ItemsSource="{StaticResource runModeResource}" |
| | | Value="{Binding RunMode,Mode=TwoWay}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Header="Low" HeaderContainerStyle="{StaticResource gvh}" |
| | | Width="300" |
| | | HeaderTemplate="{StaticResource gvht}"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <ui:EditBox Value="{Binding Low,Mode=TwoWay}" CanEdit="{Binding HasLow}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Header="High" HeaderContainerStyle="{StaticResource gvh}" |
| | | Width="300" |
| | | HeaderTemplate="{StaticResource gvht}"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <ui:EditBox Value="{Binding High,Mode=TwoWay}" CanEdit="{Binding HasHigh}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Header="类型" HeaderContainerStyle="{StaticResource gvh}" |
| | | Width="120" |
| | | HeaderTemplate="{StaticResource gvht}"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}"> |
| | | <TextBlock Padding="6,0" Text="{Binding Type}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | |
| | | <GridViewColumn Header="描述" HeaderContainerStyle="{StaticResource gvh}" |
| | | Width="500" |
| | | HeaderTemplate="{StaticResource gvht}"> |
| | | <GridViewColumn.CellTemplate> |
| | | <DataTemplate> |
| | | <Border Style="{StaticResource CellBorder}" BorderThickness="1,0,1,1"> |
| | | <TextBlock Padding="6,0" Text="{Binding Description}"/> |
| | | </Border> |
| | | </DataTemplate> |
| | | </GridViewColumn.CellTemplate> |
| | | </GridViewColumn> |
| | | </ui:TreeListView.Columns> |
| | | |
| | | <TreeView.ItemTemplate> |
| | | <HierarchicalDataTemplate ItemsSource="{Binding Children}"> |
| | | <GridViewRowPresenter |
| | | ContextMenu="{StaticResource stepContextMenu}" |
| | | Columns="{Binding Columns, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=ui:TreeListView,AncestorLevel=1}}" |
| | | Content="{Binding }"/> |
| | | </HierarchicalDataTemplate> |
| | | </TreeView.ItemTemplate> |
| | | </ui:TreeListView> |
| | | |
| | | </pu:FormGroup> |
| | | |
| | | <pu:FormGroup Header="{DynamicResource se.propertySetting}" Orientation="Vertical" |
| | | Grid.Row="2" Padding="0,10" Grid.Column="2"> |
| | | <Border x:Name="editPanelContainer" Background="#FFF"> |
| | | </Border> |
| | | </pu:FormGroup> |
| | | <StackPanel Grid.Row="1" Grid.Column="1"> |
| | | <pu:FormGroup Header="{DynamicResource se.propertySetting}" Orientation="Vertical" |
| | | Padding="0,10" > |
| | | <Border x:Name="editPanelContainer" Background="#FFF"> |
| | | </Border> |
| | | </pu:FormGroup> |
| | | <sp:LoopPanel x:Name="loopPanel" DataContext="{Binding CurrentStepUI}"/> |
| | | </StackPanel> |
| | | </Grid> |
| | | </Border> |
| | | </hb:PluginControl> |