123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <UserControl x:Class="VirgoUI.Client.Models.PMs.PmIoView"
- 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:cal="http://www.caliburn.org"
- xmlns:toolkit="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit"
- xmlns:ctrl="http://OpenSEMI.Ctrlib.com/presentation"
- xmlns:local="clr-namespace:VirgoUI.Client.Models.PMs"
- mc:Ignorable="d">
- <UserControl.Resources>
- <local:DisplayNameConverter x:Key="DisplayConverter" />
- </UserControl.Resources>
- <Grid ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Visible">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="1.2*" />
- </Grid.ColumnDefinitions>
- <TabControl Grid.Column="0" Margin="5,0,0,0">
- <TabItem Header="DI">
- <ListView ItemsSource="{Binding Path=DIs}" AlternationCount="2" VerticalAlignment="Top" Name="DIListView">
- <ListView.View>
- <GridView>
- <GridViewColumn Width="30" Header="" DisplayMemberBinding="{Binding Path=Index}" />
- <GridViewColumn Width="220" Header="Name">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
- <GridViewColumn Width="40" Header="Val">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <Grid Width="35">
- <ctrl:SwitchButton HorizontalAlignment="Center" ON="{Binding Value}" Style="{StaticResource Lamp-Button}"></ctrl:SwitchButton>
- </Grid>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- </GridView>
- </ListView.View>
- </ListView>
- </TabItem>
- </TabControl>
- <TabControl Grid.Column="1" Margin="5,0,0,0">
- <TabItem Header="DO">
- <ListView ItemsSource="{Binding Path=DOs}" AlternationCount="2" VerticalAlignment="Top" Name="DOListView">
- <ListView.View>
- <GridView>
- <GridViewColumn Width="30" Header="" DisplayMemberBinding="{Binding Path=Index}" />
- <GridViewColumn Width="200" Header="Name">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
- <GridViewColumn Width="40" Header="Val">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <Grid Width="35">
- <ctrl:SwitchButton HorizontalAlignment="Center" ON="{Binding Value}" Style="{StaticResource Lamp-Button}"></ctrl:SwitchButton>
- </Grid>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <GridViewColumn Width="40" Header="Set">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <Grid Width="35">
- <ctrl:SwitchButton ON="{Binding Value}" Style="{StaticResource OperationButton}" HorizontalAlignment="Center">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="SetDO">
- <cal:Parameter Value="{Binding }" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ctrl:SwitchButton>
- </Grid>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- </GridView>
- </ListView.View>
- </ListView>
- </TabItem>
- </TabControl>
- <TabControl Grid.Column="2" Margin="5,0,0,0">
- <TabItem Header="AI">
- <ListView ItemsSource="{Binding Path=AIs}" AlternationCount="2" Name="AIListView" VerticalAlignment="Top">
- <ListView.View>
- <GridView>
- <GridViewColumn Width="30" Header="" DisplayMemberBinding="{Binding Path=Index}" />
- <GridViewColumn Width="200" Header="Name">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
- <GridViewColumn Width="80" Header="Value" DisplayMemberBinding="{Binding Path=Value}" />
- </GridView>
- </ListView.View>
- </ListView>
- </TabItem>
- </TabControl>
- <TabControl Grid.Column="3" Margin="5,0,0,0">
- <TabItem Header="AO">
- <ListView ItemsSource="{Binding Path=AOs}" AlternationCount="2" VerticalAlignment="Top" Name="AOListView">
- <ListView.View>
- <GridView>
- <GridViewColumn Width="30" Header="" DisplayMemberBinding="{Binding Path=Index}" />
- <GridViewColumn Width="210" Header="Name">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Name, Converter={StaticResource DisplayConverter}}" FontSize="12px"/>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <!--<GridViewColumn Width="70" Header="Address" DisplayMemberBinding="{Binding Path=Address}" />-->
- <GridViewColumn Width="50" Header="Value" DisplayMemberBinding="{Binding Path=Value}" />
- <GridViewColumn Width="80" Header="New Value">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <toolkit:IntegerUpDown Text="{Binding Path=NewValue}" Width="60" />
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- <GridViewColumn Width="65" Header="Operation">
- <GridViewColumn.CellTemplate>
- <DataTemplate>
- <Button Content="Set" Height="20" Width="35">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="SetAO">
- <cal:Parameter Value="{Binding }" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </DataTemplate>
- </GridViewColumn.CellTemplate>
- </GridViewColumn>
- </GridView>
- </ListView.View>
- </ListView>
- </TabItem>
- </TabControl>
- </Grid>
- </UserControl>
|