123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139 |
- <UserControl x:Class="MECF.Framework.UI.Client.CenterViews.Configs.SignalTowerConfig.SignalTowerConfigView"
- 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:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:micro="clr-namespace:Caliburn.Micro"
- xmlns:controls="clr-namespace:OpenSEMI.Ctrlib.Controls"
- xmlns:converter="clr-namespace:MECF.Framework.UI.Client.Ctrlib.Converter"
- xmlns:signalTowerConfig="clr-namespace:MECF.Framework.UI.Client.CenterViews.Configs.SignalTowerConfig"
- mc:Ignorable="d"
- d:DesignHeight="1024" d:DesignWidth="1900">
- <UserControl.Resources>
- <converter:Bool2Not x:Key="Bool2Not"/>
- <converter:BoolCollapsedConverter x:Key="BoolVisibility"/>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="30"/>
- <RowDefinition Height="*"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="150"/>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="100"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Button Content="Save" Grid.Column="1" Width="90" Height="30" Margin="0" Padding="0" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <micro:ActionMessage MethodName="SaveSelection">
- </micro:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Content="Cancel" Grid.Column="2" Width="90" Height="30" Margin="0" Padding="0" >
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <micro:ActionMessage MethodName="CancelSelection">
- </micro:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </Grid>
- <Grid Grid.Row="1">
- <DataGrid HorizontalAlignment="Left" CanUserAddRows="False" AutoGenerateColumns="False" RowHeaderWidth="0"
- VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.VirtualizationMode="Recycling"
- ItemsSource="{Binding SignalTowerData}" Margin="0,5,0,0" >
- <DataGrid.Columns>
- <DataGridTemplateColumn Header="Condition Name" Width="300">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name}" Margin="5,0" FontFamily="Arial" FontSize="14" Foreground="{DynamicResource FG_Black}" HorizontalAlignment="Left" VerticalAlignment="Center" >
- </TextBlock>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Red" Width="140">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Border HorizontalAlignment="Stretch" Background="OrangeRed">
- <StackPanel Orientation="Horizontal">
- <CheckBox VerticalContentAlignment="Center" VerticalAlignment="Center" Content="ON" IsChecked="{Binding Path=IsRed, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="50" Height="25" ></CheckBox>
- <CheckBox Padding="10,0,0,0" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="Blinking" IsChecked="{Binding Path=IsRedBlinking, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Height="25" ></CheckBox>
- </StackPanel>
- </Border>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Yellow" Width="140">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Border HorizontalAlignment="Stretch" Background="LightGoldenrodYellow">
- <StackPanel Orientation="Horizontal">
- <CheckBox VerticalContentAlignment="Center" VerticalAlignment="Center" Content="ON" IsChecked="{Binding Path=IsYellow, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="50" Height="25" ></CheckBox>
- <CheckBox Padding="10,0,0,0" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="Blinking" IsChecked="{Binding Path=IsYellowBlinking, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Height="25" ></CheckBox>
- </StackPanel> </Border>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Green" Width="140">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Border HorizontalAlignment="Stretch" Background="LightGreen">
- <StackPanel Orientation="Horizontal">
- <CheckBox VerticalContentAlignment="Center" VerticalAlignment="Center" Content="ON" IsChecked="{Binding Path=IsGreen, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="50" Height="25" ></CheckBox>
- <CheckBox Padding="10,0,0,0" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="Blinking" IsChecked="{Binding Path=IsGreenBlinking, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Height="25" ></CheckBox>
- </StackPanel> </Border>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Blue" Width="140">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Border HorizontalAlignment="Stretch" Background="LightBlue">
- <StackPanel Orientation="Horizontal">
- <CheckBox VerticalContentAlignment="Center" VerticalAlignment="Center" Content="ON" IsChecked="{Binding Path=IsBlue, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="50" Height="25" ></CheckBox>
- <CheckBox Padding="10,0,0,0" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="Blinking" IsChecked="{Binding Path=IsBlueBlinking, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Height="25" ></CheckBox>
- </StackPanel> </Border>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- <DataGridTemplateColumn Header="Buzzer" Width="140">
- <DataGridTemplateColumn.CellTemplate>
- <DataTemplate>
- <Border HorizontalAlignment="Stretch" Background="White">
- <StackPanel Orientation="Horizontal">
- <CheckBox VerticalContentAlignment="Center" VerticalAlignment="Center" Content="ON" IsChecked="{Binding Path=IsBuzzer, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="50" Height="25" ></CheckBox>
- <CheckBox Padding="10,0,0,0" VerticalContentAlignment="Center" VerticalAlignment="Center" Content="Blinking" IsChecked="{Binding Path=IsBuzzerBlinking, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="80" Height="25" ></CheckBox>
- </StackPanel> </Border>
- </DataTemplate>
- </DataGridTemplateColumn.CellTemplate>
- </DataGridTemplateColumn>
- </DataGrid.Columns>
- </DataGrid>
- </Grid>
- </Grid>
- </UserControl>
|