C00225155-02/C00225155/MegaRobo.C00225155/MegaRobo.C00225155App/DevicesViews/Weight_TS02_View.xaml

90 lines
6.0 KiB
XML

<UserControl x:Class="MegaRobo.C00225155App.DevicesViews.Weight_TS02_View"
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:exToolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:local="clr-namespace:MegaRobo.C00225155App.DevicesViews"
mc:Ignorable="d" DataContext="{Binding Weight_TS02_VM, Source={StaticResource vmLocator}}"
d:DesignHeight="800" d:DesignWidth="800" Height="800" Width="800">
<Border BorderBrush="Black" BorderThickness="1,0,1,1">
<Grid Background="WhiteSmoke">
<Grid.RowDefinitions>
<RowDefinition Height="45"/>
<RowDefinition />
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Background="White" BorderBrush="#1778e9" BorderThickness="0,1,0,1">
<Label Content="TS02称重仪___自定义通讯" Margin="10,0" FontSize="18" Foreground="Black"/>
</Border>
<StackPanel Grid.Row="1" Grid.Column="0" >
<StackPanel Orientation="Horizontal" Margin="10">
<Label Content="称值:" FontSize="15" VerticalAlignment="Center"/>
<Border BorderBrush="Gray" BorderThickness="1" Width="100" Height="40">
<TextBlock Text="{Binding WeightValue,StringFormat=F1}" />
</Border>
<!--<Label Content="小数点位数:" FontSize="15" VerticalAlignment="Center"/>
<Border BorderBrush="Gray" BorderThickness="1" Width="80" Height="40">
<TextBox Text="{Binding DecimelNumber}" />
</Border>-->
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="10">
<Button Content="读取值" Style="{StaticResource btnMenu}" Command="{Binding OperateCommand}" CommandParameter="ReadWeight"/>
<Button Content="称清零" Style="{StaticResource btnMenu}" Command="{Binding OperateCommand}" CommandParameter="Zero"/>
<Button Content="去皮" Style="{StaticResource btnMenu}" Command="{Binding OperateCommand}" CommandParameter="Peel"/>
<!--<Button Content="设置小数点" Style="{StaticResource btnMenu}" Command="{Binding OperateCommand}" CommandParameter="SetDecimelNumber"/>-->
</StackPanel>
</StackPanel>
<StackPanel Grid.Row="1" Grid.Column="1">
<StackPanel Orientation="Horizontal">
<Label Content="投料站扫码枪:" FontSize="15" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Scann_Dose}" Width="150" Height="40" Style="{StaticResource txtBlockStyle}" Foreground="Black"/>
<Button Content="触发扫码" Style="{StaticResource btnMenu}" Margin="10,10,40,10" Command="{Binding OperateCommand}" CommandParameter="scan_dose"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="粉末扫码枪:" FontSize="15" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Scann_Powder}" Width="150" Height="40" Style="{StaticResource txtBlockStyle}" Foreground="Black"/>
<Button Content="触发扫码" Style="{StaticResource btnMenu}" Margin="10,10,40,10" Command="{Binding OperateCommand}" CommandParameter="scan_powder"/>
</StackPanel>
<!--<StackPanel Orientation="Horizontal">
<Label Content="反应站扫码枪:" FontSize="15" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Scann_React}" Width="150" Height="40" Style="{StaticResource txtBlockStyle}" Foreground="Black"/>
<Button Content="触发扫码" Style="{StaticResource btnMenu}" Margin="10,10,40,10" Command="{Binding OperateCommand}" CommandParameter="scan_react"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="料架扫码枪:" FontSize="15" VerticalAlignment="Center"/>
<TextBlock Text="{Binding Scann_ReactRack}" Width="150" Height="40" Style="{StaticResource txtBlockStyle}" Foreground="Black"/>
<Button Content="触发扫码" Style="{StaticResource btnMenu}" Margin="10,10,40,10" Command="{Binding OperateCommand}" CommandParameter="scan_reactrack"/>
</StackPanel>-->
</StackPanel>
<!--<StackPanel Orientation="Horizontal" Margin="10" Grid.Row="1" Grid.Column="1" VerticalAlignment="Top" >
<Label Content="波特率:" FontSize="15" VerticalAlignment="Center"/>
<ComboBox ItemsSource="{Binding BaudRateList}" SelectedItem="{Binding BaudRate}" Width="140" Height="32" Margin="5" HorizontalAlignment="Center"/>
<Button Content="设置波特率" Style="{StaticResource btnMenu}" Command="{Binding OperateCommand}" CommandParameter="SetBaudRate"/>
</StackPanel>-->
<Border Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Gray" BorderThickness="1" Margin="5">
<StackPanel>
<TextBlock Text="状态记录">
<TextBlock.Effect>
<DropShadowEffect Color="#00BFFF" BlurRadius="5" Opacity="0.5" ShadowDepth="0"/>
</TextBlock.Effect>
</TextBlock>
<ListBox VerticalAlignment="Top" ItemsSource="{Binding LogInfos}"/>
</StackPanel>
</Border>
</Grid>
</Border>
</UserControl>