<UserControl x:Class="BOB.Views.Dialogs.SQ0030G1DView"
             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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
             mc:Ignorable="d"
             xmlns:prism="http://prismlibrary.com/"
             Background="White"
             prism:ViewModelLocator.AutoWireViewModel="True"
             Height="850"
             Width="900">
    <prism:Dialog.WindowStyle>
        <Style BasedOn="{StaticResource DialogUserManageStyle}"
               TargetType="Window" />
    </prism:Dialog.WindowStyle>
    <GroupBox Header="AC源手动设置"
              Padding="0,0,0,0"
              MouseLeftButtonDown="MouseLeftButtonDown">
        <Grid >
            <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="电压开关设置">
                    <StackPanel Orientation="Horizontal">
                        <Button Content="开启"
                                Margin="5"
                                Command="{Binding OpenPowerSupplyCommand}" />
                        <Button Content="关闭"
                                Margin="5"
                                Command="{Binding ClosePowerSupplyCommand}" />
                    </StackPanel>
                </TreeViewItem>

                <TreeViewItem Header="设置">
                    <TreeViewItem Header="设定三相电压输出">
                        <TreeViewItem Header="设定三相电压档位">
                            <StackPanel Orientation="Horizontal">
                                <Button Content="低档"
                                        Margin="5"
                                        Command="{Binding SetVoltageLevelLowCommand}" />
                                <Button Content="高档"
                                        Margin="5"
                                        Command="{Binding SetVoltageLevelHighCommand}" />
                            </StackPanel>
                        </TreeViewItem>

                        <TreeViewItem Header="输出">
                            <StackPanel Orientation="Vertical">
                                <Button Content="设定三相输出电压"
                                        Margin="5"
                                        Command="{Binding SetThreePhaseVoltageCommand}" />
                                <StackPanel Orientation="Horizontal">
                                    <Label Content="U相输出电压"
                                           Margin="5"
                                           VerticalContentAlignment="Center" />
                                    <TextBox Text="{Binding UPhaseVoltage}"
                                             MinWidth="50"
                                             materialDesign:HintAssist.Hint=""
                                             Margin="5"
                                             VerticalContentAlignment="Center" />
                                    <Label Content="V"
                                           Margin="5"
                                           VerticalContentAlignment="Center" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal">
                                    <Label Content="V相输出电压"
                                           Margin="5"
                                           VerticalContentAlignment="Center" />
                                    <TextBox Text="{Binding VPhaseVoltage}"
                                             MinWidth="50"
                                             materialDesign:HintAssist.Hint=""
                                             Margin="5"
                                             VerticalContentAlignment="Center" />
                                    <Label Content="V"
                                           Margin="5"
                                           VerticalContentAlignment="Center" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal">
                                    <Label Content="W相输出电压"
                                           Margin="5"
                                           VerticalContentAlignment="Center" />
                                    <TextBox Text="{Binding WPhaseVoltage}"
                                             MinWidth="50"
                                             materialDesign:HintAssist.Hint=""
                                             Margin="5"
                                             VerticalContentAlignment="Center" />
                                    <Label Content="V"
                                           Margin="5"
                                           VerticalContentAlignment="Center" />
                                </StackPanel>
                            </StackPanel>
                        </TreeViewItem>
                    </TreeViewItem>

                    <TreeViewItem Header="设定通用功能输出">
                        <StackPanel Orientation="Vertical">
                            <StackPanel Orientation="Horizontal">
                                <Button Content="设定通用功能输出电压"
                                        Margin="5"
                                        Command="{Binding SetCommonOutputVoltageCommand}" />
                                <Label Content="输出电压"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                                <TextBox Text="{Binding CommonOutputVoltage}"
                                         MinWidth="50"
                                         materialDesign:HintAssist.Hint=""
                                         Margin="5"
                                         VerticalContentAlignment="Center" />
                                <Label Content="V"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Button Content="设定通用功能输出频率"
                                        Margin="5"
                                        Command="{Binding SetCommonOutputFrequencyCommand}" />
                                <Label Content="输出频率"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                                <TextBox Text="{Binding CommonOutputFrequency}"
                                         MinWidth="50"
                                         Margin="5"
                                         materialDesign:HintAssist.Hint=""
                                         VerticalContentAlignment="Center" />
                                <Label Content="Hz"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                            </StackPanel>
                        </StackPanel>
                    </TreeViewItem>

                    <TreeViewItem Header="设定步阶功能输出">
                        <StackPanel Orientation="Vertical">
                            <StackPanel Orientation="Horizontal">
                                <Button Content="设定步阶功能输出电压"
                                        Margin="5"
                                        Command="{Binding SetStepOutputVoltageCommand}" />
                                <Label Content="组号"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                                <TextBox Text="{Binding StepOutputVoltageGroup}"
                                         MinWidth="50"
                                         Margin="5"
                                         materialDesign:HintAssist.Hint=""
                                         VerticalContentAlignment="Center" />
                                <Label Content="输出电压"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                                <TextBox Text="{Binding StepOutputVoltage}"
                                         MinWidth="50"
                                         Margin="5"
                                         materialDesign:HintAssist.Hint=""
                                         VerticalContentAlignment="Center" />
                                <Label Content="V"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <Button Content="设定步阶功能输出频率"
                                        Margin="5"
                                        Command="{Binding SetStepOutputFrequencyCommand}" />
                                <Label Content="组号"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                                <TextBox Text="{Binding StepOutputFrequencyGroup}"
                                         MinWidth="50"
                                         Margin="5"
                                         materialDesign:HintAssist.Hint=""
                                         VerticalContentAlignment="Center" />
                                <Label Content="输出频率"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                                <TextBox Text="{Binding StepOutputFrequency}"
                                         MinWidth="50"
                                         Margin="5"
                                         materialDesign:HintAssist.Hint=""
                                         VerticalContentAlignment="Center" />
                                <Label Content="Hz"
                                       Margin="5"
                                       VerticalContentAlignment="Center" />
                            </StackPanel>
                        </StackPanel>
                    </TreeViewItem>

                </TreeViewItem>
            </TreeView>
            <StackPanel Grid.Row="2"
                        VerticalAlignment="Bottom">
                <Button Content="关闭"
                        Width="70"
                        Margin="10"
                        HorizontalAlignment="Right"
                        Command="{Binding CloseCommand}" />
            </StackPanel>
        </Grid>
    </GroupBox>
</UserControl>
