<UserControl x:Class="VIZ.Package.Module.VizConfigSettingView"
              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:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
             xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm"
             xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
             xmlns:local="clr-namespace:VIZ.Package.Module"
             d:DataContext="{d:DesignInstance Type=local:VizConfigSettingViewModel}" 
             d:Background="White"
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="800">

    <dxmvvm:Interaction.Behaviors>
        <dxmvvm:EventToCommand EventName="Loaded" Command="{Binding Path=LoadedCommand}"></dxmvvm:EventToCommand>
    </dxmvvm:Interaction.Behaviors>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>

        <!-- GH 设置 -->
        <GroupBox Header="GH设置" Margin="10" Padding="10">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="120"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                </Grid.RowDefinitions>
                <!-- IP地址 -->
                <TextBlock Text="IP地址:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Column="1" Height="30"
                              EditValue="{Binding Path=GH_IP,Mode=TwoWay}"></dxe:TextEdit>
                <!-- 端口 -->
                <TextBlock Text="端口:" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Row="1" Grid.Column="1" Height="30" MaskType="RegEx"
                              Mask="[0-9]{0,7}" 
                              EditValue="{Binding Path=GH_Port,Mode=TwoWay}"></dxe:TextEdit>
                <!-- 服务名 -->
                <TextBlock Text="服务名:" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Row="2" Grid.Column="1" Height="30"
                              EditValue="{Binding Path=GH_ServerName,Mode=TwoWay}"></dxe:TextEdit>
                <!-- 用户名 -->
                <TextBlock Text="用户名:" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Row="3" Grid.Column="1" Height="30"
                              EditValue="{Binding Path=GH_UserName,Mode=TwoWay}"></dxe:TextEdit>
                <!-- 密码 -->
                <TextBlock Text="密码:" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Row="4" Grid.Column="1" Height="30"
                              EditValue="{Binding Path=GH_Password,Mode=TwoWay}"></dxe:TextEdit>
            </Grid>
        </GroupBox>

        <!-- 本机VIZ设置 -->
        <GroupBox Header="VIZ设置" Grid.Row="1" Margin="10" Padding="10">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="120"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                    <RowDefinition Height="50"></RowDefinition>
                </Grid.RowDefinitions>
                <!-- IP地址 -->
                <TextBlock Text="IP地址:" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Column="1" Height="30"
                              EditValue="{Binding Path=VIZ_IP,Mode=TwoWay}"></dxe:TextEdit>
                <!-- 端口 -->
                <TextBlock Text="端口:" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Row="1" Grid.Column="1" Height="30" MaskType="RegEx"
                              Mask="[0-9]{0,7}"
                              EditValue="{Binding Path=VIZ_Port,Mode=TwoWay}"></dxe:TextEdit>

                <!-- 用户名 -->
                <TextBlock Text="用户名:" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Row="2" Grid.Column="1" Height="30"
                              EditValue="{Binding Path=VIZ_UserName,Mode=TwoWay}"></dxe:TextEdit>

                <!-- 密码 -->
                <TextBlock Text="密码:" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <dxe:TextEdit Grid.Row="3" Grid.Column="1" Height="30"
                              EditValue="{Binding Path=VIZ_Password,Mode=TwoWay}"></dxe:TextEdit>

                <!-- 本机Eng3路径 -->
                <TextBlock Text="本机Eng3路径:" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <Grid Grid.Row="4" Grid.Column="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <dxe:TextEdit Height="30"
                                  EditValue="{Binding Path=VIZ_Eng3Path,Mode=TwoWay}"></dxe:TextEdit>
                    <Button Grid.Column="1" HorizontalAlignment="Right" Height="30" Width="80"
                            Content="..." Command="{Binding Path=SelectEng3PathCommand}"></Button>
                </Grid>
                <!-- 本机Eng4路径 -->
                <TextBlock Text="本机Eng4路径:" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
                <Grid Grid.Row="5" Grid.Column="1">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                        <ColumnDefinition Width="100"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <dxe:TextEdit Height="30"
                                  EditValue="{Binding Path=VIZ_Eng4Path,Mode=TwoWay}"></dxe:TextEdit>
                    <Button Grid.Column="1" HorizontalAlignment="Right" Height="30" Width="80"
                            Content="..." Command="{Binding SelectEng4PathCommand}"></Button>
                </Grid>
            </Grid>
        </GroupBox>
    </Grid>
</UserControl>