<Window
    x:Class="v2rayN.Desktop.Views.AddServer2Window"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
    xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
    Title="{x:Static resx:ResUI.menuAddCustomServer}"
    Width="700"
    Height="500"
    x:DataType="vms:AddServer2ViewModel"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <DockPanel Margin="{StaticResource Margin8}">
        <StackPanel
            Margin="{StaticResource Margin4}"
            HorizontalAlignment="Center"
            DockPanel.Dock="Bottom"
            Orientation="Horizontal">
            <Button
                x:Name="btnSave"
                Width="100"
                Content="{x:Static resx:ResUI.TbConfirm}"
                Cursor="Hand"
                IsDefault="True" />
            <Button
                x:Name="btnCancel"
                Width="100"
                Margin="{StaticResource MarginLr8}"
                Content="{x:Static resx:ResUI.TbCancel}"
                Cursor="Hand"
                IsCancel="True" />
        </StackPanel>
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <Grid ColumnDefinitions="Auto,Auto,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">

                <TextBlock
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    Text="{x:Static resx:ResUI.menuServers}" />

                <TextBlock
                    Grid.Row="1"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.TbRemarks}" />

                <TextBox
                    x:Name="txtRemarks"
                    Grid.Row="1"
                    Grid.Column="1"
                    Width="400"
                    Margin="{StaticResource Margin4}"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center" />

                <TextBlock
                    Grid.Row="2"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.TbAddress}" />
                <TextBox
                    x:Name="txtAddress"
                    Grid.Row="2"
                    Grid.Column="1"
                    Width="400"
                    Margin="{StaticResource Margin4}"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    IsReadOnly="True" />
                <StackPanel
                    Grid.Row="2"
                    Grid.Column="2"
                    VerticalAlignment="Center"
                    Orientation="Horizontal">
                    <Button
                        x:Name="btnBrowse"
                        Margin="{StaticResource MarginLr4}"
                        Content="{x:Static resx:ResUI.TbBrowse}" />
                    <Button
                        x:Name="btnEdit"
                        Margin="{StaticResource MarginLr4}"
                        Content="{x:Static resx:ResUI.TbEdit}" />
                </StackPanel>

                <TextBlock
                    Grid.Row="3"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.TbCoreType}" />
                <ComboBox
                    x:Name="cmbCoreType"
                    Grid.Row="3"
                    Grid.Column="1"
                    Width="200"
                    Margin="{StaticResource Margin4}"
                    HorizontalAlignment="Left"
                    MaxDropDownHeight="1000" />

                <TextBlock
                    Grid.Row="4"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.TbDisplayLog}" />
                <StackPanel
                    Grid.Row="4"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    Orientation="Horizontal">
                    <ToggleSwitch
                        x:Name="togDisplayLog"
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Left" />
                    <TextBlock
                        Margin="{StaticResource MarginLr8}"
                        VerticalAlignment="Center"
                        Text="{x:Static resx:ResUI.TipDisplayLog}" />
                </StackPanel>

                <TextBlock
                    Grid.Row="5"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.TbPreSocksPort}" />
                <TextBox
                    x:Name="txtPreSocksPort"
                    Grid.Row="5"
                    Grid.Column="1"
                    Width="200"
                    Margin="{StaticResource Margin4}"
                    HorizontalAlignment="Left" />
                <StackPanel
                    Grid.Row="6"
                    Grid.Column="1"
                    Grid.ColumnSpan="2"
                    Margin="{StaticResource Margin4}">
                    <TextBlock
                        Width="500"
                        VerticalAlignment="Center"
                        Text="{x:Static resx:ResUI.TipPreSocksPort}"
                        TextWrapping="Wrap" />
                    <TextBlock
                        Width="500"
                        Margin="{StaticResource MarginLr8}"
                        VerticalAlignment="Center"
                        Text="{x:Static resx:ResUI.CustomServerTips}"
                        TextWrapping="Wrap" />
                </StackPanel>
            </Grid>
        </ScrollViewer>
    </DockPanel>
</Window>
