| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258 | <UserControl x:Class="FurnaceUI.Views.Operations.InterlockView"             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"              xmlns:d="http://schemas.microsoft.com/expression/blend/2008"              xmlns:local="clr-namespace:FurnaceUI.Views.Operations" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:cal="http://www.caliburn.org"             mc:Ignorable="d"              Height="840" Width="1260">    <UserControl.Resources>        <DataTemplate  x:Key="LimitTemplate">            <TextBlock Text="{Binding ItemName}" Width="310" Height="30" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="0,5,0,0"/>        </DataTemplate>        <DataTemplate  x:Key="LimitTemplssate">            <TextBlock Text="{Binding LimitName}" Width="310" Height="30" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="0,5,0,0"/>        </DataTemplate>        <DataTemplate  x:Key="ValueTemplate">            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,0,1,0" Margin="-8,0,-5,0">                <TextBlock Text="{Binding LimitValue}"  Width="153" Height="30" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="5,5,0,0"/>            </Border>        </DataTemplate>        <DataTemplate  x:Key="ConditionTemplate">            <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,0,1,0" Margin="-8,0,-5,0">                <TextBlock Text="{Binding LimitCondition}"  Width="140" Height="30" VerticalAlignment="Center" HorizontalAlignment="Left" Padding="5,5,0,0"/>            </Border>        </DataTemplate>    </UserControl.Resources>    <Grid>        <Grid.ColumnDefinitions>            <ColumnDefinition  Width="420"/>            <ColumnDefinition Width="*"/>        </Grid.ColumnDefinitions>        <Grid.RowDefinitions>            <RowDefinition Height="40"/>            <RowDefinition Height="*"/>        </Grid.RowDefinitions>        <StackPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">            <Button Content="-- Collapse All" Width="120" Height="30" Margin="0,5,0,3">                <i:Interaction.Triggers>                    <i:EventTrigger EventName="Click">                        <cal:ActionMessage MethodName="CollapseAll">                        </cal:ActionMessage>                    </i:EventTrigger>                </i:Interaction.Triggers>            </Button>            <Button Content="++ Expand All" Width="120" Height="30" Margin="5,5,0,3">                <i:Interaction.Triggers>                    <i:EventTrigger EventName="Click">                        <cal:ActionMessage MethodName="ExpandAll">                        </cal:ActionMessage>                    </i:EventTrigger>                </i:Interaction.Triggers>            </Button>            <RadioButton Content="Tube" GroupName="interlock" Width="120" Height="30" Margin="5,0,0,3" IsChecked="{Binding IsShowInterlockPM}"/>            <RadioButton Content="Edit Detail" GroupName="interlock" Width="120" Height="30" Margin="5,0,0,3" IsChecked="{Binding IsShowInterlockEditDetail}"/>            <TextBox x:Name="TxtInterlockKeyText" Margin="5,3,0,3" Width="160"/>            <Button Content="Find" Width="80" Height="30" Margin="5,0,0,3" >                <i:Interaction.Triggers>                    <i:EventTrigger EventName="Click">                        <cal:ActionMessage MethodName="InterlockFind">                            <cal:Parameter Value="{Binding ElementName=TxtInterlockKeyText,Path=Text}"/>                        </cal:ActionMessage>                    </i:EventTrigger>                </i:Interaction.Triggers>            </Button>        </StackPanel>        <Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Padding="5,5" Visibility="{Binding IsShowInterlockPM,Converter={StaticResource bool2VisibilityConverter}}">            <Grid>                <Grid.RowDefinitions>                    <RowDefinition Height="40"/>                    <RowDefinition Height="700"/>                </Grid.RowDefinitions>                <StackPanel Orientation="Horizontal">                    <Border>                        <Button Content="Action"  Margin="27,0,0,0" Width="442" Height="40"/>                    </Border>                    <Border>                        <Button Content="SetValue" Margin="1,0" Width="110" Height="40"/>                    </Border>                    <Border>                        <Button Content="LimitValue" Margin="1,0" Width="109" Height="40"/>                    </Border>                    <Border>                        <Button Content="Interlock OK" Margin="1,0" Width="109" Height="40"/>                    </Border>                    <Border>                        <Button Content="Condition" Margin="1,0" Width="110" Height="40"/>                    </Border>                </StackPanel>                <TreeView Grid.Row="1" x:Name="PART_TREE_PM" Margin="5,0,5,5" ItemsSource="{Binding InterlockTreePM}">                    <TreeView.ItemTemplate>                        <HierarchicalDataTemplate DataType="{x:Type local:InterlockBase}" ItemsSource="{Binding Path=Children}">                            <StackPanel Orientation="Horizontal">                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="430" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding SetValue}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding LimitValue}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2" Width="110" Height="36">                                    <Ellipse  HorizontalAlignment="Center" VerticalAlignment="Center"  Stroke="Gray" StrokeThickness="2"  Width="15" Height="15"                                                Fill="{Binding InterlockOKFill}" Style="{x:Null}"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding Condition}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                            </StackPanel>                        </HierarchicalDataTemplate>                    </TreeView.ItemTemplate>                    <TreeView.ItemContainerStyle>                        <Style TargetType="{x:Type TreeViewItem}">                            <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></Setter>                        </Style>                    </TreeView.ItemContainerStyle>                </TreeView>            </Grid>        </Border>        <Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Padding="5,5" Visibility="{Binding IsShowInterlockEditDetail,Converter={StaticResource bool2VisibilityConverter}}">            <Grid>                <Grid.RowDefinitions>                    <RowDefinition Height="40"/>                    <RowDefinition Height="700"/>                </Grid.RowDefinitions>                <StackPanel Orientation="Horizontal">                    <Border>                        <Button Content="Action" Margin="27,0,0,0" Width="442" Height="40"/>                    </Border>                    <Border>                        <Button Content="SetValue" Margin="1,0" Width="110" Height="40"/>                    </Border>                    <Border>                        <Button Content="LimitValue" Margin="1,0" Width="109" Height="40"/>                    </Border>                    <Border>                        <Button Content="Interlock OK" Margin="1,0" Width="109" Height="40"/>                    </Border>                    <Border>                        <Button Content="Condition" Margin="1,0" Width="110" Height="40"/>                    </Border>                </StackPanel>                <TreeView Grid.Row="1" x:Name="PART_TREE_EDITDETAIL" Margin="5,0,5,5" ItemsSource="{Binding InterlockTreeEdit}">                    <TreeView.ItemTemplate>                        <HierarchicalDataTemplate DataType="{x:Type local:InterlockBase}" ItemsSource="{Binding Path=Children}">                            <StackPanel Orientation="Horizontal">                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="430" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding SetValue}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding LimitValue}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2" Width="110" Height="36">                                    <Ellipse  HorizontalAlignment="Center" VerticalAlignment="Center"  Stroke="Gray" StrokeThickness="2"  Width="15" Height="15"                                                        Fill="{Binding InterlockOKFill}" Style="{x:Null}"/>                                </Border>                                <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                    <TextBlock Text="{Binding Condition}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                </Border>                            </StackPanel>                        </HierarchicalDataTemplate>                    </TreeView.ItemTemplate>                    <TreeView.ItemContainerStyle>                        <Style TargetType="{x:Type TreeViewItem}">                            <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></Setter>                        </Style>                    </TreeView.ItemContainerStyle>                    <i:Interaction.Triggers>                        <i:EventTrigger EventName="SelectedItemChanged">                            <cal:ActionMessage MethodName="EditTreeSelectChanged">                                <cal:Parameter Value="{Binding SelectedItem, ElementName=PART_TREE_EDIT}" />                            </cal:ActionMessage>                        </i:EventTrigger>                    </i:Interaction.Triggers>                </TreeView>            </Grid>        </Border>        <Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="{DynamicResource Table_BD}" BorderThickness="1" Background="{DynamicResource Table_BG_Content}" Padding="5,5" Visibility="{Binding IsShowInterlockEdit,Converter={StaticResource bool2VisibilityConverter}}">            <Grid>                <Grid.RowDefinitions>                    <RowDefinition Height="*"/>                </Grid.RowDefinitions>                <Border Grid.Row="0">                    <Grid>                        <Grid.RowDefinitions>                            <RowDefinition Height="40"/>                            <RowDefinition Height="*"/>                        </Grid.RowDefinitions>                        <StackPanel Grid.Row="0" Orientation="Horizontal">                            <Border>                                <Button Content="Action"  Margin="27,0,0,0" Width="442" Height="40"/>                            </Border>                            <Border>                                <Button Content="SetValue"  Margin="1,0" Width="110" Height="40"/>                            </Border>                            <Border>                                <Button Content="LimitValue"  Margin="1,0" Width="109" Height="40"/>                            </Border>                            <Border>                                <Button Content="Interlock OK"  Margin="1,0" Width="109" Height="40"/>                            </Border>                            <Border>                                <Button Content="Condition"  Margin="1,0" Width="110" Height="40"/>                            </Border>                        </StackPanel>                        <TreeView Grid.Row="1" x:Name="PART_TREE_EDIT" Margin="5,0,5,5" ItemsSource="{Binding InterlockTreeEdit}">                            <TreeView.ItemTemplate>                                <HierarchicalDataTemplate DataType="{x:Type local:InterlockBase}" ItemsSource="{Binding Path=Children}">                                    <StackPanel Orientation="Horizontal">                                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="1,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                            <TextBlock Text="{Binding Name}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="430" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                        </Border>                                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                            <TextBlock Text="{Binding SetValue}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                        </Border>                                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                            <TextBlock Text="{Binding LimitValue}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                        </Border>                                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2" Width="110" Height="36">                                            <Ellipse  HorizontalAlignment="Center" VerticalAlignment="Center"  Stroke="Gray" StrokeThickness="2"  Width="15" Height="15"                                                        Fill="{Binding InterlockOKFill}" Style="{x:Null}"/>                                        </Border>                                        <Border BorderBrush="{DynamicResource Table_BD}" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Title}" Padding="5,1" Margin="0,2">                                            <TextBlock Text="{Binding Condition}" TextWrapping="Wrap" Foreground="{DynamicResource FG_Black}" Width="100" FontSize="13" FontFamily="Arial" VerticalAlignment="Center" HorizontalAlignment="Left"/>                                        </Border>                                    </StackPanel>                                </HierarchicalDataTemplate>                            </TreeView.ItemTemplate>                            <TreeView.ItemContainerStyle>                                <Style TargetType="{x:Type TreeViewItem}">                                    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></Setter>                                </Style>                            </TreeView.ItemContainerStyle>                            <i:Interaction.Triggers>                                <i:EventTrigger EventName="SelectedItemChanged">                                    <cal:ActionMessage MethodName="EditTreeSelectChanged">                                        <cal:Parameter Value="{Binding SelectedItem, ElementName=PART_TREE_EDIT}" />                                    </cal:ActionMessage>                                </i:EventTrigger>                            </i:Interaction.Triggers>                        </TreeView>                    </Grid>                </Border>            </Grid>        </Border>    </Grid></UserControl>
 |