<Window
    x:Class="uBIMEarthTools.Commands.DesignDataEntry.DesignDataEntryWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:uBIMEarthTools.Commands.DesignDataEntry"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Width="350"
    Height="340"
    WindowStartupLocation="CenterOwner"
    WindowStyle="ToolWindow"
    mc:Ignorable="d">
    <Window.DataContext>
        <local:DesignDataEntry />
    </Window.DataContext>
    <StackPanel
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Orientation="Vertical">
        <StackPanel HorizontalAlignment="Center" Orientation="Horizontal">
            <Label>选择数据来源：</Label>
            <Button
                Width="220"
                Command="{Binding SelectFileCommand}"
                Content="{Binding FilePath}" />
        </StackPanel>
        <StackPanel
            Margin="0,20"
            HorizontalAlignment="Center"
            Orientation="Horizontal">
            <Label Width="93" HorizontalContentAlignment="Right">选择桩族：</Label>
            <ComboBox
                Width="220"
                ItemsSource="{Binding FamilyNames}"
                SelectedItem="{Binding SelectedFamily}" />
        </StackPanel>
        <StackPanel
            Margin="0,0,0,20"
            HorizontalAlignment="Center"
            Orientation="Horizontal">
            <Label Width="93" HorizontalContentAlignment="Right">选择地质文件：</Label>
            <ComboBox
                Width="220"
                ItemsSource="{Binding LinkFiles}"
                SelectedItem="{Binding SelectedLink}" />
        </StackPanel>
        <StackPanel
            Margin="0,0,0,20"
            HorizontalAlignment="Center"
            Orientation="Horizontal">
            <Label Width="93" HorizontalContentAlignment="Right">选择持力层：</Label>
            <ComboBox
                Width="220"
                ItemsSource="{Binding Types}"
                SelectedItem="{Binding SelectedType}" />
        </StackPanel>
        <StackPanel
            Margin="0,0,0,20"
            HorizontalAlignment="Center"
            Orientation="Horizontal">
            <Label Width="93" HorizontalContentAlignment="Right">入岩深度：直径</Label>
            <TextBox Width="180" Text="{Binding Depth}" />
            <Label>倍</Label>
        </StackPanel>
        <StackPanel
            Margin="0,0,0,10"
            HorizontalAlignment="Center"
            Orientation="Horizontal">
            <Label Width="93" HorizontalContentAlignment="Right">桩起始位置：</Label>
            <RadioButton
                Width="100"
                VerticalContentAlignment="Center"
                IsChecked="{Binding Current}">
                保持当前高度
            </RadioButton>
            <RadioButton
                Width="100"
                VerticalContentAlignment="Center"
                IsChecked="{Binding Surface}">
                地表高度
            </RadioButton>
        </StackPanel>
        <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
            <Button
                Width="75"
                Margin="0,0,10,0"
                Command="{Binding OkCommand}"
                CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
                确定
            </Button>
            <Button
                Width="75"
                Command="{Binding CancelCommand}"
                CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}">
                取消
            </Button>
        </StackPanel>
    </StackPanel>
</Window>
