|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <UserControl x:Class="BPASmartClient.MorkTM.View.Monitor"
- 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:BPASmartClient.MorkTM.View"
- xmlns:vm="clr-namespace:BPASmartClient.MorkTM.ViewModel"
- mc:Ignorable="d"
- Name="监控画面"
- d:DesignHeight="450" d:DesignWidth="800">
- <Control.DataContext>
- <vm:MonitorViewModel/>
- </Control.DataContext>
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
- <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Margin="5" >
- <DataGrid Style="{StaticResource dataGrid_Style}" ItemsSource="{Binding alarms}"
- x:Name="gridAlarm" Margin="5" AutoGenerateColumns="False" RowHeight="100"
- LoadingRow="gridProducts_LoadingRow"
- FrozenColumnCount="1"
- VerticalAlignment="Top"
- IsReadOnly="True"
- CanUserResizeColumns="False" CanUserResizeRows="False" SelectionMode="Single"
- CanUserReorderColumns="False" AlternationCount="2" RowHeaderWidth="0" CanUserAddRows="False">
- <DataGrid.Columns>
-
- <DataGridTextColumn Header="ID" Binding="{Binding Path=ID ,Mode=TwoWay ,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="60"
- CellStyle="{StaticResource dataGridCell_Style}"/>
- <DataGridTextColumn Header="变量名" Binding="{Binding Path=VarName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="120"
- CellStyle="{StaticResource dataGridCell_Style}"/>
- <DataGridTextColumn Header="PLC地址" Binding="{Binding Path=PLCAddress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="120"
- CellStyle="{StaticResource dataGridCell_Style}"/>
- <DataGridTextColumn Header="Modbus TCP地址" Binding="{Binding Path=ModbusTCP,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="170"
- CellStyle="{StaticResource dataGridCell_Style}"/>
- <DataGridTextColumn Header="当前值" Binding="{Binding Path=Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="100"
- CellStyle="{StaticResource dataGridCell_Style}"/>
- <DataGridTextColumn Header="注释" Binding="{Binding Path=Notes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="*"
- CellStyle="{StaticResource dataGridCell_Style}"/>
- </DataGrid.Columns>
-
- </DataGrid>
-
- </Grid>
- </UserControl>
|