2026-06-05 13:44:39 +09:00

167 lines
9.6 KiB
XML

<UserControl x:Class="MilUI.LineIntersectionSettingView"
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:behavior="http://schemas.microsoft.com/xaml/behaviors"
xmlns:milPattern="clr-namespace:MilPattern;assembly=MilPattern"
xmlns:visionCommonUI="clr-namespace:VisionCommonUI;assembly=VisionCommonUI"
xmlns:local="clr-namespace:MilUI"
xmlns:view="clr-namespace:Aurora.View;assembly=Aurora"
x:Name="lineIntersectionSettingView"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance Type=local:LineIntersectionSettingViewModel}"
Width="410" Height="950">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<view:SharedResourceDictionary Source="pack://application:,,,/VisionCommonUI;component/Styles/VisionResources.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:PolarityConverter x:Key="polarityConverter"/>
</ResourceDictionary>
</UserControl.Resources>
<behavior:Interaction.Triggers>
<behavior:PropertyChangedTrigger Binding="{Binding IsVisible, ElementName=lineIntersectionSettingView}">
<behavior:InvokeCommandAction
Command="{Binding CMD_VisibleChanged}"
CommandParameter="{Binding IsVisible, ElementName=lineIntersectionSettingView}"/>
</behavior:PropertyChangedTrigger>
</behavior:Interaction.Triggers>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="100"/>
<RowDefinition Height="4*"/>
<RowDefinition Height="100"/>
<RowDefinition Height="100"/>
<RowDefinition Height="5"/>
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<local:PatternInfoView Grid.Row="0" IsEnabled="{Binding ElementName=lineIntersectionSettingView, Path=DataContext.IsPatternRegistered}"
IsActivated="{Binding ElementName=lineIntersectionSettingView, Path=DataContext.PatternInfo.IsActivated}"
Description="{Binding ElementName=lineIntersectionSettingView, Path=DataContext.PatternInfo.Description}"/>
<GroupBox Grid.Row="1">
<GroupBox.Header>
<TextBlock Style="{StaticResource styleTextBlockSubTitleSmall}">
<Run Text="{Binding [Pattern], Source={StaticResource langTokens}, Mode=OneWay}"/>
<Run Text="{Binding [Blocks], Source={StaticResource langTokens}, Mode=OneWay}"/>
</TextBlock>
</GroupBox.Header>
<TabControl Background="#323232">
<TabItem>
<TabItem.Header>
<TextBlock Style="{StaticResource styleTextBlockSubTitleSmall}">
<Run Text="{Binding [Line], Source={StaticResource langTokens}, Mode=OneWay}"/>
<Run Text="1"/>
</TextBlock>
</TabItem.Header>
<local:LineSettingPatternBlockView Grid.Column="0" x:Name="line1SettingView" DataContext="{Binding Line1ViewModel}"/>
</TabItem>
<TabItem>
<TabItem.Header>
<TextBlock Style="{StaticResource styleTextBlockSubTitleSmall}">
<Run Text="{Binding [Line], Source={StaticResource langTokens}, Mode=OneWay}"/>
<Run Text="2"/>
</TextBlock>
</TabItem.Header>
<local:LineSettingPatternBlockView Grid.Column="1" x:Name="line2SettingView" DataContext="{Binding Line2ViewModel}"/>
</TabItem>
</TabControl>
</GroupBox>
<GroupBox Grid.Row="2" Margin="5">
<GroupBox.Header>
<TextBlock Style="{StaticResource styleTextBlockSubTitleSmall_Orange}">
<Run Text="{Binding [Setting], Source={StaticResource langTokens}, Mode=OneWay}"/>
<Run Text="{Binding [Control], Source={StaticResource langTokens}, Mode=OneWay}"/>
</TextBlock>
</GroupBox.Header>
<Grid Margin="0, 10">
<Grid.RowDefinitions>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Grid.Row="0" Grid.Column="0"
Style="{StaticResource styleBtnPatternSetting}"
Command="{Binding CMD_SetLight}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Style="{StaticResource stylePatternButtonImage}"
Source="pack://application:,,,/VisionCommonUI;component/Icons/ColorIcons/img_light.png"/>
<TextBlock Style="{StaticResource stylePatternButtonTextBlock}">
<Run Text="{Binding [Light], Source={StaticResource langTokens}, Mode=OneWay}"/>
</TextBlock>
</StackPanel>
</Button>
<Button Grid.Row="0" Grid.Column="1"
Style="{StaticResource styleBtnPatternSetting}"
Command="{Binding CMD_SetPreProc}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Style="{StaticResource stylePatternButtonImage}"
Source="pack://application:,,,/VisionCommonUI;component/Icons/ColorIcons/img_filtering.png"/>
<TextBlock Style="{StaticResource stylePatternButtonTextBlock}">
<Run Text="{Binding [Pre], Source={StaticResource langTokens}, Mode=OneWay}"/>
<Run Text="{Binding [Proc], Source={StaticResource langTokens}, Mode=OneWay}"/>
</TextBlock>
</StackPanel>
</Button>
<Button Grid.Row="0" Grid.Column="2"
Style="{StaticResource styleBtnPatternSetting}"
Command="{Binding CMD_FindPattern}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Style="{StaticResource stylePatternButtonImage}"
Source="pack://application:,,,/VisionCommonUI;component/Icons/ColorIcons/img_magnifying_glass.png"/>
<TextBlock Style="{StaticResource stylePatternButtonTextBlock}">
<Run Text="{Binding [Test], Source={StaticResource langTokens}, Mode=OneWay}"/>
<Run Text="{Binding [Find], Source={StaticResource langTokens}, Mode=OneWay}"/>
</TextBlock>
</StackPanel>
</Button>
</Grid>
</GroupBox>
<local:FixtureSettingView Grid.Row="3"
Enabled="{Binding ElementName=lineIntersectionSettingView, Path=DataContext.PatternInfo.FixtureSetting.Enabled}"
ItemsSource="{Binding ElementName=lineIntersectionSettingView, Path=DataContext.FixturePatterns}"
SelectedItem="{Binding ElementName=lineIntersectionSettingView, Path=DataContext.PatternInfo.FixtureSetting.Pattern1}"/>
<Separator Grid.Row="4"/>
<StackPanel Grid.Row="5" Margin="15, 10" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Style="{StaticResource styleBtnPatternSetting}"
Command="{Binding CMD_Save}"
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Style="{StaticResource stylePatternButtonImage}"
Source="pack://application:,,,/VisionCommonUI;component/Icons/ColorIcons/img_ok.png"/>
<TextBlock Style="{StaticResource stylePatternButtonTextBlock}"
Text="{Binding [Save], Source={StaticResource langTokens}, Mode=OneWay}"/>
</StackPanel>
</Button>
<Button Style="{StaticResource styleBtnPatternSetting}"
Command="{Binding CMD_Cancel}"
CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Style="{StaticResource stylePatternButtonImage}"
Source="pack://application:,,,/VisionCommonUI;component/Icons/ColorIcons/img_cancel.png"/>
<TextBlock Style="{StaticResource stylePatternButtonTextBlock}"
Text="{Binding [Close], Source={StaticResource langTokens}, Mode=OneWay}"/>
</StackPanel>
</Button>
</StackPanel>
</Grid>
</UserControl>