终端一体化运控平台
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 

134 líneas
7.1 KiB

  1. <UserControl
  2. x:Class="BPASmartClient.DosingSystem.View.ConveyerBeltManualView"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:BPASmartClient.DosingSystem.View"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. xmlns:pry="clr-namespace:BPASmartClient.CustomResource.UserControls;assembly=BPASmartClient.CustomResource"
  9. xmlns:vm="clr-namespace:BPASmartClient.DosingSystem.ViewModel"
  10. d:DesignHeight="450"
  11. d:DesignWidth="800"
  12. mc:Ignorable="d">
  13. <UserControl.Resources>
  14. <Style x:Key="radioButtonStyle" TargetType="RadioButton">
  15. <Setter Property="Template">
  16. <Setter.Value>
  17. <ControlTemplate TargetType="RadioButton">
  18. <Grid Name="gr" Opacity="0.8">
  19. <ContentControl
  20. Margin="{TemplateBinding Margin}"
  21. HorizontalAlignment="Center"
  22. VerticalAlignment="Center"
  23. HorizontalContentAlignment="Center"
  24. VerticalContentAlignment="Center"
  25. Content="{TemplateBinding Content}"
  26. FontSize="{TemplateBinding FontSize}"
  27. Foreground="{TemplateBinding Foreground}" />
  28. <Image
  29. Name="image"
  30. Source="/BPASmartClient.CustomResource;component/Image/边框线.png"
  31. Stretch="Fill" />
  32. </Grid>
  33. <ControlTemplate.Triggers>
  34. <Trigger Property="IsChecked" Value="False">
  35. <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/边框线.png" />
  36. </Trigger>
  37. <Trigger Property="IsChecked" Value="True">
  38. <Setter TargetName="image" Property="Source" Value="/BPASmartClient.CustomResource;component/Image/透明背景.png" />
  39. </Trigger>
  40. <Trigger Property="IsMouseOver" Value="True">
  41. <Setter TargetName="gr" Property="Opacity" Value="1" />
  42. </Trigger>
  43. </ControlTemplate.Triggers>
  44. </ControlTemplate>
  45. </Setter.Value>
  46. </Setter>
  47. </Style>
  48. </UserControl.Resources>
  49. <UserControl.DataContext>
  50. <vm:ConveyerBeltManualViewModel />
  51. </UserControl.DataContext>
  52. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Hidden">
  53. <ItemsControl ItemsSource="{Binding ConveyerBeltModels}">
  54. <ItemsControl.ItemTemplate>
  55. <DataTemplate>
  56. <Grid Margin="8">
  57. <Grid
  58. Name="cy"
  59. Grid.Row="0"
  60. Margin="5">
  61. <pry:ImageBorder
  62. Grid.RowSpan="2"
  63. Width="{Binding ElementName=cy, Path=ActualWidth}"
  64. Height="{Binding ElementName=cy, Path=ActualHeight}" />
  65. <StackPanel Background="Transparent">
  66. <Grid Height="40">
  67. <Image
  68. Margin="2,3,0,0"
  69. HorizontalAlignment="Left"
  70. VerticalAlignment="Top"
  71. Source="/BPASmartClient.CustomResource;component/Image/标签.png" />
  72. <TextBlock
  73. Margin="10,10,0,0"
  74. VerticalAlignment="Top"
  75. FontSize="16"
  76. Foreground="Aqua"
  77. Text="{Binding Name}" />
  78. <StackPanel
  79. Margin="0,0,20,0"
  80. HorizontalAlignment="Right"
  81. Orientation="Horizontal">
  82. <TextBlock
  83. Margin="0,0,2,0"
  84. Style="{StaticResource TextBlockStyle}"
  85. Text="输送带速度:" />
  86. <TextBox
  87. Width="170"
  88. Height="35"
  89. HorizontalAlignment="Right"
  90. FontSize="20"
  91. Style="{StaticResource TextBoxStyle}"
  92. Text="{Binding Speed, UpdateSourceTrigger=PropertyChanged}" />
  93. <TextBlock
  94. Margin="20,0,5,0"
  95. VerticalAlignment="Center"
  96. FontSize="20"
  97. Foreground="#00c2f4"
  98. Text="输送带状态" />
  99. <ToggleButton
  100. Width="80"
  101. Height="30"
  102. Margin="5,0,5,0"
  103. Background="Transparent"
  104. IsEnabled="False"
  105. FontSize="20"
  106. IsChecked="{Binding ConveyerBeltWork}"
  107. Style="{StaticResource SwitchToggleButtonStyle}" />
  108. </StackPanel>
  109. </Grid>
  110. <Grid Name="gr" Height="200">
  111. <pry:ConveyBelt2
  112. Grid.RowSpan="4"
  113. Margin="-12,0,10,0"
  114. BeltDashThickess="50"
  115. BeltHeight="{Binding ElementName=gr, Path=ActualHeight}"
  116. BeltWidth="{Binding ElementName=gr, Path=ActualWidth}"
  117. IsRun="{Binding ConveyerBeltWork}" />
  118. </Grid>
  119. </StackPanel>
  120. </Grid>
  121. </Grid>
  122. </DataTemplate>
  123. </ItemsControl.ItemTemplate>
  124. </ItemsControl>
  125. </ScrollViewer>
  126. </UserControl>