<Window x:Class="RealPlayDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:host="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"   
        xmlns:winform="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
        Title="{StaticResource ID_TITLE}" Height="628" Width="948" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize">
    <!--Layout about MainWindow-->
    <Grid Margin="10">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid Grid.Column="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="*" />
                <RowDefinition Height="280"/>
            </Grid.RowDefinitions>
            <Grid Grid.Row="0">
                <TabControl>
                    <TabItem Header="{StaticResource ID_GENERAL}" Width="98">
                        <Border BorderBrush="Gray" BorderThickness="1" CornerRadius="2">
                            <StackPanel>
                                <StackPanel Orientation="Horizontal" Margin="0,10,0,0" HorizontalAlignment="Center">
                                    <Button Height="25" Width="80" Margin="0,10,0,0" Content="{StaticResource ID_ADD_DEVICE}" Click="Login_Clicked"/>
                                    <Button Height="25" Width="80" Margin="10,10,0,0" Content="{StaticResource ID_DEL_DEVICE}" Click="Logout_Clicked" />
                                </StackPanel>
                                <StackPanel >
                                    <ComboBox x:Name="type_combox" Margin="0,10,0,0" Width="170" Height="25" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button Height="25" Width="80" Margin="0,10,0,0" Content="{StaticResource ID_STOPREAL}" Click="StopReal_Clicked"/>
                                    <Button Height="25" Width="80" Margin="10,10,0,0" Content="{StaticResource ID_STOPALLREAL}" Click="StopAllReal_Clicked"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="5">
                                    <Button Content="{StaticResource ID_OPENSOUND}" Margin="0,10,0,0" Height="25" Width="80" Click="OpenSound_Clicked"/>
                                    <Button Content="{StaticResource ID_CLOSESOUND}" Margin="10,10,0,0" Height="25" Width="80" Click="CloseSound_Cliceked" />
                                </StackPanel>
                                <Button Content="{StaticResource ID_SAVEREALDATA}" Margin="0,10,0,0" Height="25" Width="170" Click="Save_Clicked"/>
                                <Button Content="{StaticResource ID_STOPREALDATA}" Margin="0,10,0,0" Height="25" Width="170" Click="StopSave_Cliceked" />
                                <Button Content="{StaticResource ID_CAPTURE}" Margin="0,10,0,0" Height="25" Width="170" Click="Capture_Clicked"/>
                            </StackPanel>
                        </Border>
                    </TabItem>
                    <TabItem Header="{StaticResource ID_PTZ}" Width="98">
                        <Border BorderBrush="Gray" BorderThickness="1" CornerRadius="2">
                            <StackPanel>
                                <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                    <Button Content="↖" Margin="10,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="TopLeft_Down" PreviewMouseUp="TopLeft_Up"/>
                                    <Button Content="↑" Margin="40,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="Top_Down" PreviewMouseUp="Top_Up"/>
                                    <Button Content="↗" Margin="40,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="TopRight_Down" PreviewMouseUp="TopRight_Up"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                    <Button Content="←" Margin="10,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="Left_Down" PreviewMouseUp="Left_Up"/>
                                    <Button Content="→" Margin="110,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="Right_Down" PreviewMouseUp="Right_Up"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
                                    <Button Content="↙" Margin="10,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="BottomLeft_Down" PreviewMouseUp="BottomLeft_Up"/>
                                    <Button Content="↓" Margin="40,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="Bottom_Down" PreviewMouseUp="Bottom_Up"/>
                                    <Button Content="↘" Margin="40,0,0,0" VerticalAlignment="Center" Width="30" Height="30" PreviewMouseDown="BottomRight_Down" PreviewMouseUp="BottomRight_Up"/>
                                </StackPanel>
                                <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
                                    <TextBlock Margin="10,0,0,0" Width="60" VerticalAlignment="Center" Text="{StaticResource ID_ZOOM}" />
                                    <Button Margin="30,0,0,0" VerticalAlignment="Center" Content="╋" Width="30" Height="30" PreviewMouseDown="ZoomA_Down" PreviewMouseUp="ZoomA_Up"/>
                                    <Button Margin="20,0,0,0" VerticalAlignment="Center" Content="━" Width="30" Height="30" PreviewMouseDown="ZoomD_Down" PreviewMouseUp="ZoomD_Up"/>
                                </StackPanel>
                                <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
                                    <TextBlock Margin="10,0,0,0" Width="60" VerticalAlignment="Center" Text="{StaticResource ID_FOCUS}" />
                                    <Button Margin="30,0,0,0" VerticalAlignment="Center" Content="╋" Width="30" Height="30" PreviewMouseDown="FocusA_Down" PreviewMouseUp="FocusA_Up"/>
                                    <Button Margin="20,0,0,0" VerticalAlignment="Center" Content="━" Width="30" Height="30" PreviewMouseDown="FocusD_Down" PreviewMouseUp="FocusD_Up"/>
                                </StackPanel>
                                <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
                                    <TextBlock Margin="10,0,0,0" Width="60" VerticalAlignment="Center" Text="{StaticResource ID_APERTURE}" />
                                    <Button Margin="30,0,0,0" VerticalAlignment="Center" Content="╋" Width="30" Height="30" PreviewMouseDown="ApertureA_Down" PreviewMouseUp="ApertureA_Up"/>
                                    <Button Margin="20,0,0,0" VerticalAlignment="Center" Content="━" Width="30" Height="30" PreviewMouseDown="ApertureD_Down" PreviewMouseUp="ApertureD_Up"/>
                                </StackPanel>
                            </StackPanel>
                        </Border>
                    </TabItem>
                </TabControl>
            </Grid>
            <Grid Grid.Row="1">
                <GroupBox Header="{StaticResource ID_DEVICELIST}">
                    <TreeView x:Name="treeView" />
                </GroupBox>
            </Grid>
        </Grid>
        <Grid Grid.Column="1" x:Name="showPanel1">
            <Border BorderBrush="Gray" BorderThickness="0.5">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <Grid Grid.Row="0" Grid.Column="0">
                        <Border BorderBrush="Red" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host0">
                                <winform:PictureBox x:Name="realPlayLayout0" DoubleClick="realPlayLayout_Click" Tag="0" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="0" Grid.Column="1" >
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host1">
                                <winform:PictureBox x:Name="realPlayLayout1" DoubleClick="realPlayLayout_Click" Tag="1" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="0" Grid.Column="2">
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host2">
                                <winform:PictureBox x:Name="realPlayLayout2" DoubleClick="realPlayLayout_Click" Tag="2" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="1" Grid.Column="0">
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host3">
                                <winform:PictureBox x:Name="realPlayLayout3" DoubleClick="realPlayLayout_Click" Tag="3" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="1" Grid.Column="1">
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host4">
                                <winform:PictureBox x:Name="realPlayLayout4" DoubleClick="realPlayLayout_Click" Tag="4" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="1" Grid.Column="2">
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host5">
                                <winform:PictureBox x:Name="realPlayLayout5" DoubleClick="realPlayLayout_Click" Tag="5" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="2" Grid.Column="0">
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host6">
                                <winform:PictureBox x:Name="realPlayLayout6" DoubleClick="realPlayLayout_Click" Tag="6" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="2" Grid.Column="1">
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host7">
                                <winform:PictureBox x:Name="realPlayLayout7" DoubleClick="realPlayLayout_Click" Tag="7" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                    <Grid Grid.Row="2" Grid.Column="2">
                        <Border BorderBrush="Gray" BorderThickness="1" Margin="2" Background="LightSkyBlue">
                            <host:WindowsFormsHost x:Name="host8">
                                <winform:PictureBox x:Name="realPlayLayout8" DoubleClick="realPlayLayout_Click" Tag="8" Click="Item_Selected"/>
                            </host:WindowsFormsHost>
                        </Border>
                    </Grid>
                </Grid>
            </Border>
        </Grid>
        <Grid Grid.Column="1" x:Name="showPanel2" Visibility="Collapsed">
            <Border BorderBrush="Gray" BorderThickness="2" Background="LightSkyBlue">
                <host:WindowsFormsHost x:Name="winFormHost">
                </host:WindowsFormsHost>
            </Border>
        </Grid>
    </Grid>
</Window>
