WritePLCView.xaml 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <UserControl x:Class="PLCTool.Views.BusinessManageView.WritePLCView"
  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:PLCTool.Views.BusinessManageView"
  7. mc:Ignorable="d"
  8. BorderBrush="#CBCBCB" BorderThickness="1"
  9. Height="300" Width="500" >
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="40"/>
  13. <RowDefinition />
  14. <RowDefinition />
  15. <RowDefinition />
  16. </Grid.RowDefinitions>
  17. <Grid Grid.Row="0" Cursor="Hand" >
  18. <StackPanel Orientation="Horizontal" Margin="10,5,0,0">
  19. <TextBlock Text="向PLC写入值" FontSize="15"/>
  20. </StackPanel>
  21. </Grid>
  22. <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center">
  23. <TextBlock Text="PLC地址:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0" TextAlignment="Right" Width="80"/>
  24. <!--<ComboBox Height="28" Width="120" ItemsSource="{Binding PLCVars}" SelectedItem="{Binding SelectPLCVar}" />-->
  25. <TextBox Height="28" Width="120" Text="{Binding PLCAddr}" IsReadOnly="True" />
  26. </StackPanel>
  27. <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center">
  28. <TextBlock Text="数据值:" Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0" TextAlignment="Right" Width="80"/>
  29. <TextBox Height="28" Width="120" Text="{Binding PLCValue}" IsReadOnly="True" />
  30. </StackPanel>
  31. <StackPanel Orientation="Horizontal" Grid.Row="3" HorizontalAlignment="Center">
  32. <Button Content="取消" Width="80" Margin="5,0" Command="{Binding CancelCommand}" Opacity="0.7" Style="{StaticResource NormalButtonStyle}" />
  33. <Button Content="确认" Width="80" Margin="5,0" Command="{Binding SureCommand}" Style="{StaticResource NormalButtonStyle}" />
  34. </StackPanel>
  35. </Grid>
  36. </UserControl>