<UserControl x:Class="Plugin.CurrentSensorControl.SingleSensor"
|
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:local="clr-namespace:Plugin.CurrentSensorControl"
|
mc:Ignorable="d"
|
xmlns:hb="clr-namespace:HMI.Base;assembly=HMI.Base"
|
xmlns:uic="clr-namespace:HMI.UI.Converter;assembly=HMI.UI"
|
xmlns:ui="clr-namespace:HMI.UI;assembly=HMI.UI"
|
xmlns:mdi="clr-namespace:HMI.UI.MDI;assembly=HMI.UI"
|
xmlns:pw="https://opensource.panuon.com/wpf"
|
xmlns:pu="https://opensource.panuon.com/wpf-ui"
|
xmlns:dp="clr-namespace:HMI.UI.DpUtil;assembly=HMI.UI"
|
Background="#FFF"
|
Padding="5"
|
Width="Auto"
|
d:DesignHeight="450" d:DesignWidth="800">
|
<UserControl.Resources>
|
<ResourceDictionary>
|
<ResourceDictionary.MergedDictionaries>
|
<pu:StyleDictionary Includes="TabControl" />
|
<ResourceDictionary Source="/HMI.UI;component/Style/PanuonListView.xaml"/>
|
</ResourceDictionary.MergedDictionaries>
|
|
<Style TargetType="TextBox" x:Key="labelText">
|
<Setter Property="Height" Value="35"/>
|
<Setter Property="FontSize" Value="20"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Width" Value="120"/>
|
</Style>
|
</ResourceDictionary>
|
</UserControl.Resources>
|
|
<GroupBox Header="{x:Null}" Padding="5">
|
<Grid>
|
<Grid.RowDefinitions>
|
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="12"/>
|
</Grid.RowDefinitions>
|
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" dp:StackPanelHelper.ChildSpace="5">
|
<!--<TextBox IsReadOnly="True" Text="{Binding SensorName}" Style="{StaticResource labelText}">
|
<TextBox.ToolTip>
|
<ToolTip Padding="5" BorderThickness="1" BorderBrush="Black" Background="Yellow" Content="1231231"/>
|
</TextBox.ToolTip>
|
</TextBox>-->
|
|
<ui:ScrollLabel Width="80" Value="{Binding SensorName}"/>
|
<ui:LightBall Size="30" Value="{Binding IsConnected}"/>
|
<Button x:Name="controlBtn" Click="controlBtn_Click">
|
<Button.Style>
|
<Style TargetType="Button" BasedOn="{StaticResource ResetBtn}">
|
<Setter Property="Content" Value="连接"/>
|
<Setter Property="Background" Value="{DynamicResource GreenVerBar}"/>
|
<Style.Triggers>
|
<DataTrigger Binding="{Binding IsConnected}" Value="True">
|
<Setter Property="Background" Value="{DynamicResource DangerVerBar}"/>
|
<Setter Property="Content" Value="断开"/>
|
</DataTrigger>
|
</Style.Triggers>
|
</Style>
|
</Button.Style>
|
</Button>
|
</StackPanel>
|
<pu:FormGroup Grid.Row="1" Header="电流(A)" Style="{StaticResource InputFormGroupStyle}">
|
<TextBox IsReadOnly="True" Text="{Binding Current}" Style="{StaticResource EditorTextBoxStyle}"/>
|
</pu:FormGroup>
|
<Label Grid.Row="2" Foreground="Red" Padding="0" FontSize="10" Content="{Binding ErrMsg}"/>
|
</Grid>
|
</GroupBox>
|
</UserControl>
|