189 lines
9.4 KiB
XML
189 lines
9.4 KiB
XML
<UserControl x:Class="BOB.Views.Dialogs.IT6724CView"
|
|
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:BOB.Views.Dialogs"
|
|
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:ucs="clr-namespace:BOB.Views.UserControls"
|
|
mc:Ignorable="d"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:oxy="http://oxyplot.org/wpf"
|
|
Background="White"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
Height="850"
|
|
Width="900">
|
|
<prism:Dialog.WindowStyle>
|
|
<Style BasedOn="{StaticResource DialogUserManageStyle}"
|
|
TargetType="Window" />
|
|
</prism:Dialog.WindowStyle>
|
|
<Grid MouseLeftButtonDown="MouseLeftButtoDown">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="220" />
|
|
<RowDefinition />
|
|
<RowDefinition Height="350" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<GroupBox x:Name="实时监控区"
|
|
Header="实时监控"
|
|
Padding="0,0,0,0">
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<ucs:NumericalDisplay DataContext="{Binding 电压MV,Mode=TwoWay}"
|
|
Grid.Column="0" />
|
|
<ucs:NumericalDisplay DataContext="{Binding 电流MV,Mode=TwoWay}"
|
|
Grid.Column="1" />
|
|
<ucs:NumericalDisplay DataContext="{Binding 功率MV,Mode=TwoWay}"
|
|
Grid.Column="2" />
|
|
</Grid>
|
|
</GroupBox>
|
|
|
|
<!-- 实时曲线 -->
|
|
<GroupBox Header="实时曲线"
|
|
Grid.Row="1"
|
|
Padding="0,0,0,0">
|
|
<oxy:PlotView Model="{Binding 曲线Model}">
|
|
<oxy:PlotView.ContextMenu>
|
|
<ContextMenu>
|
|
<MenuItem Header="视图复位"
|
|
Command="{Binding ResetViewCommand}" />
|
|
</ContextMenu>
|
|
</oxy:PlotView.ContextMenu>
|
|
</oxy:PlotView>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="调试选项"
|
|
Grid.Row="2">
|
|
<TreeView Margin="10">
|
|
<TreeViewItem Header="连接状态设置">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="连接"
|
|
Margin="5"
|
|
Command="{Binding ConnectCommand}" />
|
|
<Button Content="断开"
|
|
Margin="5"
|
|
Command="{Binding DisconnectCommand}" />
|
|
</StackPanel>
|
|
</TreeViewItem>
|
|
<TreeViewItem Header="查询">
|
|
<TreeViewItem Header="查询设备标识">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="查询设备标识"
|
|
Margin="5"
|
|
Command="{Binding QueryDeviceInfoCommand}" />
|
|
<Label Content="结果"
|
|
Margin="5"
|
|
VerticalContentAlignment="Center" />
|
|
<TextBox Text="{Binding 设备标识字符串}"
|
|
MinWidth="100"
|
|
Margin="5"
|
|
materialDesign:HintAssist.Hint=""
|
|
VerticalContentAlignment="Center" />
|
|
</StackPanel>
|
|
</TreeViewItem>
|
|
</TreeViewItem>
|
|
<TreeViewItem Header="设置">
|
|
<TreeViewItem Header="远程">
|
|
<Button Content="设置为远程模式"
|
|
Command="{Binding SetRemoteModeCommand}"
|
|
Margin="5" />
|
|
</TreeViewItem>
|
|
<TreeViewItem Header="输出">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="开"
|
|
Command="{Binding PowerOnCommand}"
|
|
Margin="5" />
|
|
<Button Content="关"
|
|
Command="{Binding PowerOffCommand}"
|
|
Margin="5" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="设置电压(V)"
|
|
Command="{Binding SetOutputVoltageCommand}"
|
|
Margin="5" />
|
|
<Label Content="值:"
|
|
VerticalAlignment="Center" />
|
|
<TextBox Text="{Binding 输出电压}"
|
|
MinWidth="100"
|
|
materialDesign:HintAssist.Hint=""
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="设置电流(A)"
|
|
Command="{Binding SetOutputCurrentCommand}"
|
|
Margin="5" />
|
|
<Label Content="值:"
|
|
VerticalAlignment="Center" />
|
|
<TextBox Text="{Binding 输出电流}"
|
|
MinWidth="100"
|
|
materialDesign:HintAssist.Hint=""
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</TreeViewItem>
|
|
<TreeViewItem Header="电流保护(OCP)">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="开"
|
|
Command="{Binding EnableOCPCommand}"
|
|
Margin="5" />
|
|
<Button Content="关"
|
|
Command="{Binding DisableOCPCommand}"
|
|
Margin="5" />
|
|
<Button Content="清除报警"
|
|
Command="{Binding ClearOCPAlarmCommand}"
|
|
Margin="5" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="设置电流保护(A)"
|
|
Command="{Binding SetOCPCommand}"
|
|
Margin="5" />
|
|
<Label Content="值:"
|
|
VerticalAlignment="Center" />
|
|
<TextBox Text="{Binding OCP电流}"
|
|
MinWidth="100"
|
|
materialDesign:HintAssist.Hint=""
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</TreeViewItem>
|
|
<TreeViewItem Header="电压保护(OVP)">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="开"
|
|
Command="{Binding EnableOVPCommand}"
|
|
Margin="5" />
|
|
<Button Content="关"
|
|
Command="{Binding DisableOVPCommand}"
|
|
Margin="5" />
|
|
<Button Content="清除报警"
|
|
Command="{Binding ClearOVPAlarmCommand}"
|
|
Margin="5" />
|
|
</StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<Button Content="设置电压保护(V)"
|
|
Command="{Binding SetOVPCommand}"
|
|
Margin="5" />
|
|
<Label Content="值:"
|
|
VerticalAlignment="Center" />
|
|
<TextBox Text="{Binding OVP电压}"
|
|
MinWidth="100"
|
|
materialDesign:HintAssist.Hint=""
|
|
VerticalAlignment="Center" />
|
|
</StackPanel>
|
|
</TreeViewItem>
|
|
</TreeViewItem>
|
|
</TreeView>
|
|
</GroupBox>
|
|
<StackPanel Grid.Row="2"
|
|
VerticalAlignment="Bottom">
|
|
<Button Content="关闭"
|
|
Width="70"
|
|
Margin="10"
|
|
HorizontalAlignment="Right"
|
|
Command="{Binding CloseCommand}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|