终端一体化运控平台
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 

159 строки
10 KiB

  1. <UserControl x:Class="BPASmartClient.MilkWithTea.View.ParameterSetting"
  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.MilkWithTea.View"
  7. xmlns:vm="clr-namespace:BPASmartClient.MilkWithTea.ViewModel"
  8. mc:Ignorable="d"
  9. d:DesignHeight="900" d:DesignWidth="1400" Background="Transparent" >
  10. <UserControl.DataContext>
  11. <vm:PatrameterSettiongViewModel/>
  12. </UserControl.DataContext>
  13. <UserControl.Resources>
  14. <Style TargetType="TextBlock">
  15. <Setter Property="FontSize" Value="18"/>
  16. <Setter Property="Foreground" Value="DarkSlateGray"/>
  17. <Setter Property="VerticalAlignment" Value="Center"/>
  18. <Setter Property="HorizontalAlignment" Value="Center"/>
  19. <Setter Property="FontSize" Value="18"/>
  20. </Style>
  21. </UserControl.Resources>
  22. <Grid Background="#F3F6F9" Margin="20" >
  23. <Grid.ColumnDefinitions>
  24. <ColumnDefinition Width="*"/>
  25. <ColumnDefinition Width="*"/>
  26. </Grid.ColumnDefinitions>
  27. <Grid.RowDefinitions>
  28. <RowDefinition Height="*"/>
  29. <RowDefinition Height="*"/>
  30. <RowDefinition Height="*"/>
  31. </Grid.RowDefinitions>
  32. <GroupBox Grid.ColumnSpan="2" Header="参数调试" FontSize="20" Style="{StaticResource GroupBoxStyle1}" Padding="40,20" Margin="20,10">
  33. <GroupItem>
  34. <Grid>
  35. <Grid.RowDefinitions>
  36. <RowDefinition Height="*"/>
  37. <RowDefinition Height="20"/>
  38. <RowDefinition Height="*"/>
  39. </Grid.RowDefinitions>
  40. <StackPanel Orientation="Horizontal">
  41. <TextBlock Text="通道口:"/>
  42. <ComboBox ItemsSource="{Binding materialPosions}"
  43. SelectedIndex="{Binding MaterialID ,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
  44. Margin="10,0" Width="120 " Style="{StaticResource cmbstyle}"/>
  45. <TextBlock Text="出料量:" Margin="10,0,0,0" />
  46. <TextBox Text="{Binding OutMaterailWeight}" Width="60" Margin="10,0" VerticalContentAlignment="Center"/>
  47. <TextBlock Text="g" Margin="2,0"/>
  48. <Button Content="出料" Style="{StaticResource buttonNormal}" Height="36" Width="100" Margin="30,0" Command="{Binding OutMaterailCommad}"/>
  49. <TextBlock Text="转盘位置:" Margin="60,0,10,0"/>
  50. <ComboBox ItemsSource="{Binding TurntablePosion}"
  51. SelectedIndex="{Binding TurntableID,Mode=TwoWay ,UpdateSourceTrigger=PropertyChanged}"
  52. Margin="10,0" Width="100 " Style="{StaticResource cmbstyle}"/>
  53. <Button Content="转动" Style="{StaticResource buttonNormal}" Height="36" Width="80" Margin="30,0"
  54. Command="{Binding TurntableCommad}"/>
  55. </StackPanel>
  56. <CheckBox Grid.Row="2" Content="禁用本地奶茶下单" HorizontalAlignment="Left" Margin="0,10"
  57. HorizontalContentAlignment="Center" VerticalContentAlignment="Center"
  58. IsChecked="{Binding IsEnable}"/>
  59. </Grid>
  60. </GroupItem>
  61. </GroupBox>
  62. <GroupBox Grid.ColumnSpan="2" Grid.Row="1" Header="通道矫正" FontSize="20" BorderThickness="10" Style="{StaticResource GroupBoxStyle1}" Margin="20,10">
  63. <GroupItem>
  64. <Grid Margin="20">
  65. <Grid.RowDefinitions>
  66. <RowDefinition Height="40"/>
  67. <RowDefinition Height="100"/>
  68. <RowDefinition Height="*"/>
  69. </Grid.RowDefinitions>
  70. <Grid.ColumnDefinitions>
  71. <ColumnDefinition Width="140"/>
  72. <ColumnDefinition Width="140"/>
  73. <ColumnDefinition Width="140"/>
  74. <ColumnDefinition Width="140"/>
  75. <ColumnDefinition Width="140"/>
  76. <ColumnDefinition Width="140"/>
  77. <ColumnDefinition Width="140"/>
  78. <ColumnDefinition Width="*"/>
  79. </Grid.ColumnDefinitions>
  80. <TextBlock Text="通道" />
  81. <TextBlock Text="名称" Grid.Column="1"/>
  82. <TextBlock Text="开关" Grid.Column="2"/>
  83. <TextBlock Text="校正后的重量" Grid.Column="5"/>
  84. <TextBlock Text="出料时间" Grid.Column="3"/>
  85. <ComboBox Grid.Row="1" Width="100" Style="{StaticResource cmbstyle}" ItemsSource="{Binding materialPosions}"
  86. SelectedIndex="{Binding CorrectPassway ,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" SelectionChanged="ComboBox_SelectionChanged" />
  87. <TextBlock Grid.Row="1" Grid.Column="1" ></TextBlock>
  88. <CheckBox x:Name="OpenIsCheck"
  89. Grid.Row="1" Grid.Column="2" Style="{StaticResource OpenCheckBoxStyle1}" Height="40"
  90. IsChecked="{Binding PasswayIsOpen,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
  91. Command="{Binding OpenPasswayCommand}"/>
  92. <TextBox Text="{Binding CorrectMatetailWeight,Mode=TwoWay}" Grid.Row="1" Grid.Column="5" Width="60" Height="30"></TextBox>
  93. <TextBlock Text="克" Grid.Row="1" Grid.Column="5" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
  94. <TextBox Text="{Binding OutTime}" Grid.Row="1" Grid.Column="3" Width="60" Height="30"></TextBox>
  95. <TextBlock Text="秒" Grid.Row="1" Grid.Column="3" HorizontalAlignment="Right" Margin="0,0,16,0"></TextBlock>
  96. <TextBlock Text="矫正方法" Grid.Column="7"/>
  97. <Button Content="开始矫正" Style="{StaticResource buttonNormal}"
  98. Grid.Row="1" Grid.Column="4" HorizontalAlignment="Center"
  99. Height="40" Width="120"
  100. Command="{Binding CheckPasswayCommad}"/>
  101. <Button Content="确认重量" Style="{StaticResource buttonNormal}"
  102. Grid.Row="1" Grid.Column="6" HorizontalAlignment="Center"
  103. Height="40" Width="120"
  104. Command="{Binding CheckMaterailWeightCommand}"/>
  105. <TextBlock Text=" 准备好校正电子秤,打开需要校正的通道,点击“开始校正”的按钮,填入校正后的重量并确认。"
  106. Margin="6,0" TextWrapping="Wrap"
  107. Grid.Column="7" Grid.Row="1" />
  108. </Grid>
  109. </GroupItem>
  110. </GroupBox>
  111. <GroupBox Grid.ColumnSpan="2" Grid.Row="2" Header="设备配置" FontSize="20" BorderThickness="10" Style="{StaticResource GroupBoxStyle1}" Margin="20,10">
  112. <Grid Margin="30,5">
  113. <Grid.ColumnDefinitions>
  114. <ColumnDefinition Width="100"/>
  115. <ColumnDefinition Width="90"/>
  116. <ColumnDefinition Width="110"/>
  117. <ColumnDefinition Width="90"/>
  118. <ColumnDefinition Width="60"/>
  119. <ColumnDefinition Width="60"/>
  120. <ColumnDefinition/>
  121. </Grid.ColumnDefinitions>
  122. <Grid.RowDefinitions>
  123. <RowDefinition Height="*"/>
  124. <RowDefinition Height="*"/>
  125. <RowDefinition Height="*"/>
  126. <RowDefinition Height="*"/>
  127. </Grid.RowDefinitions>
  128. <TextBlock Text="店铺名称:" Grid.ColumnSpan="2" FontSize="22" Height="28" Width="94" HorizontalAlignment="Left" Margin="20,0"/>
  129. <TextBox Text="{Binding ShopName}" Grid.Column="2" Grid.ColumnSpan="2" Margin="-20,10,30,10" VerticalContentAlignment="Center"/>
  130. <TextBlock Text="店铺ID:" Grid.Row="1" Height="23" Width="60" HorizontalAlignment="Left" Margin="20,0"/>
  131. <TextBlock Text="设备ID:" Grid.Column="2" Grid.Row="1" Height="23" Width="60" />
  132. <TextBlock Text="PLC地址:" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Height="23" Width="72" HorizontalAlignment="Left" Margin="20,0"/>
  133. <TextBox Text="{Binding ShopID}" Width="60" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="0,12"/>
  134. <TextBox Text="{Binding DeviceID}" Width="60" Grid.Column="3" Grid.Row="1" HorizontalAlignment="Left" VerticalContentAlignment="Center" Margin="0,12"/>
  135. <TextBox Text="{Binding PLCAdress}" Grid.Column="2" Grid.Row="2" Grid.ColumnSpan="2" Margin="-20,10,30,10"
  136. VerticalContentAlignment="Center"/>
  137. <Button Style="{StaticResource buttonNormal}"
  138. Grid.Column="4" Grid.ColumnSpan="2" Grid.Row="0" Grid.RowSpan="3"
  139. Height="130" Width="80"
  140. Command="{Binding SaveDevicesCommand}">
  141. <Grid>
  142. <Grid.RowDefinitions>
  143. <RowDefinition Height="*"/>
  144. <RowDefinition Height="10"/>
  145. <RowDefinition Height="*"/>
  146. </Grid.RowDefinitions>
  147. <TextBlock Text="保存" TextWrapping="Wrap" Foreground="White" FontSize="20" />
  148. <TextBlock Text="配置" TextWrapping="Wrap" Foreground="White" FontSize="20" Grid.Row="2"/>
  149. </Grid>
  150. </Button>
  151. </Grid>
  152. </GroupBox>
  153. </Grid>
  154. </UserControl>