终端一体化运控平台
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 

51 行
3.5 KiB

  1. <UserControl x:Class="BPASmartClient.MorkTM.View.Monitor"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.MorkTM.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.MorkTM.ViewModel"
  8. mc:Ignorable="d"
  9. Name="监控画面"
  10. d:DesignHeight="450" d:DesignWidth="800">
  11. <Control.DataContext>
  12. <vm:MonitorViewModel/>
  13. </Control.DataContext>
  14. <UserControl.Resources>
  15. <ResourceDictionary>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/GenricStyle.xaml" />
  18. <ResourceDictionary Source="/BPASmartClient.CustomResource;component/Themes/MyStyle.xaml" />
  19. </ResourceDictionary.MergedDictionaries>
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <Grid Margin="5" >
  23. <DataGrid Style="{StaticResource dataGrid_Style}" ItemsSource="{Binding alarms}"
  24. x:Name="gridAlarm" Margin="5" AutoGenerateColumns="False" RowHeight="100"
  25. LoadingRow="gridProducts_LoadingRow"
  26. FrozenColumnCount="1"
  27. VerticalAlignment="Top"
  28. IsReadOnly="True"
  29. CanUserResizeColumns="False" CanUserResizeRows="False" SelectionMode="Single"
  30. CanUserReorderColumns="False" AlternationCount="2" RowHeaderWidth="0" CanUserAddRows="False">
  31. <DataGrid.Columns>
  32. <DataGridTextColumn Header="ID" Binding="{Binding Path=ID ,Mode=TwoWay ,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="60"
  33. CellStyle="{StaticResource dataGridCell_Style}"/>
  34. <DataGridTextColumn Header="变量名" Binding="{Binding Path=VarName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="120"
  35. CellStyle="{StaticResource dataGridCell_Style}"/>
  36. <DataGridTextColumn Header="PLC地址" Binding="{Binding Path=PLCAddress,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="120"
  37. CellStyle="{StaticResource dataGridCell_Style}"/>
  38. <DataGridTextColumn Header="Modbus TCP地址" Binding="{Binding Path=ModbusTCP,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="170"
  39. CellStyle="{StaticResource dataGridCell_Style}"/>
  40. <DataGridTextColumn Header="当前值" Binding="{Binding Path=Value,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="100"
  41. CellStyle="{StaticResource dataGridCell_Style}"/>
  42. <DataGridTextColumn Header="注释" Binding="{Binding Path=Notes,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" HeaderStyle="{StaticResource dataGridHeader_Style}" Width="*"
  43. CellStyle="{StaticResource dataGridCell_Style}"/>
  44. </DataGrid.Columns>
  45. </DataGrid>
  46. </Grid>
  47. </UserControl>