<Window x:Class="FLYAD7.Simulation.Battery.RayLaser.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:FLYAD7.Simulation.Battery.RayLaser"
        Title="MainWindow" Height="313"  Closed="Window_Closed">
    <Grid>
        <Grid.Resources>
            <ResourceDictionary>
                <local:IO2BinConverter x:Key="io2bconv" />
            </ResourceDictionary>
        </Grid.Resources>
        <StackPanel Orientation="Horizontal">
            <StackPanel>
                <GroupBox Header="连接" Margin="5" >
                    <StackPanel>
                        <Grid DataContext="{Binding Gage.FlyAdRay}">
                            <TextBlock Margin="5">
                                <TextBlock.Inlines>
                                    <Run Text="射线 LocalEP:"/>
                                    <Run Text="{Binding LocalEP,Mode=OneWay}"/>
                                </TextBlock.Inlines>
                            </TextBlock>
                        </Grid>
                        <Grid DataContext="{Binding Gage.FlyAdLaser}">
                            <TextBlock Margin="5">
                                <TextBlock.Inlines>
                                    <Run Text="激光 LocalEP:"/>
                                    <Run Text="{Binding LocalEP,Mode=OneWay}"/>
                                </TextBlock.Inlines>
                            </TextBlock>
                        </Grid>
                    </StackPanel>
                </GroupBox>
                <StackPanel Orientation="Horizontal">
                    <GroupBox Header="射线 当前数据" HorizontalAlignment="Left" Margin="5" DataContext="{Binding FlyADClientUIRay}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="67" />
                                <ColumnDefinition Width="181*" />
                            </Grid.ColumnDefinitions>
                            <Grid.Resources>
                                <ResourceDictionary>
                                    <Style TargetType="TextBlock">
                                        <Setter Property="Margin" Value="2"/>
                                        <Setter Property="Height" Value="23"/>
                                        <Setter Property="HorizontalAlignment" Value="Left"/>
                                    </Style>
                                    <Style TargetType="TextBox">
                                        <Setter Property="Margin" Value="2"/>
                                        <Setter Property="Height" Value="23"/>
                                        <Setter Property="Width" Value="120"/>
                                        <Setter Property="HorizontalAlignment" Value="Left"/>
                                    </Style>
                                </ResourceDictionary>
                            </Grid.Resources>


                            <TextBox Grid.Row="0" Grid.Column="1"   Text="{Binding AD}" IsEnabled="False"/>
                            <TextBlock Grid.Row="0"  Text="AD" />
                            <TextBlock Grid.Row="1"  Text="POS" />
                            <TextBox Grid.Row="1"  Grid.Column="1"  Text="{Binding Position}" IsEnabled="False" />

                            <TextBox  Grid.Row="2" Grid.Column="1" Text="{Binding IStatus,Converter={StaticResource ResourceKey=io2bconv}}"/>
                            <TextBlock Grid.Row="2" Text="IN"  />
                            <TextBox Grid.Row="3" Grid.Column="1"  Text="{Binding OStatus,Converter={StaticResource ResourceKey=io2bconv}}"/>
                            <TextBlock Grid.Row="3" Text="OUT" />
                            <TextBlock Grid.Row="5"  Text="POS2" />
                            <TextBox Grid.Row="5"  Grid.Column="1"  Text="{Binding Position2}" IsEnabled="False" />

                        </Grid>
                    </GroupBox>
                    <GroupBox Header="射线 当前数据" HorizontalAlignment="Left" Margin="5" DataContext="{Binding FlyADClientUILaser}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                                <RowDefinition Height="auto" />
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="67" />
                                <ColumnDefinition Width="181*" />
                            </Grid.ColumnDefinitions>
                            <Grid.Resources>
                                <ResourceDictionary>
                                    <Style TargetType="TextBlock">
                                        <Setter Property="Margin" Value="2"/>
                                        <Setter Property="Height" Value="23"/>
                                        <Setter Property="HorizontalAlignment" Value="Left"/>
                                    </Style>
                                    <Style TargetType="TextBox">
                                        <Setter Property="Margin" Value="2"/>
                                        <Setter Property="Height" Value="23"/>
                                        <Setter Property="Width" Value="120"/>
                                        <Setter Property="HorizontalAlignment" Value="Left"/>
                                    </Style>
                                </ResourceDictionary>
                            </Grid.Resources>


                            <TextBox Grid.Row="0" Grid.Column="1"   Text="{Binding AD}" IsEnabled="False"/>
                            <TextBlock Grid.Row="0"  Text="AD" />
                            <TextBlock Grid.Row="1"  Text="POS" />
                            <TextBox Grid.Row="1"  Grid.Column="1"  Text="{Binding Position}" IsEnabled="False" />

                            <TextBox  Grid.Row="2" Grid.Column="1" Text="{Binding IStatus,Converter={StaticResource ResourceKey=io2bconv}}"/>
                            <TextBlock Grid.Row="2" Text="IN"  />
                            <TextBox Grid.Row="3" Grid.Column="1"  Text="{Binding OStatus,Converter={StaticResource ResourceKey=io2bconv}}"/>
                            <TextBlock Grid.Row="3" Text="OUT" />
                            <TextBlock Grid.Row="5"  Text="POS2" />
                            <TextBox Grid.Row="5"  Grid.Column="1"  Text="{Binding Position2}" IsEnabled="False" />

                        </Grid>
                    </GroupBox>
                </StackPanel>
            </StackPanel>
            <GroupBox Header="周期调试" Height="65" VerticalAlignment="Top" Margin="5" Width="227">
                <Grid>
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="103,8,0,0" Name="textBox5" Text="{Binding TimeSpan1ms}" IsEnabled="False" VerticalAlignment="Top" Width="105" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="7,11,0,0" Name="textBlock5" Text="timegrid周期" VerticalAlignment="Top" />
                </Grid>
            </GroupBox>
        </StackPanel>

        


    </Grid>
</Window>
