<Window x:Class="OTDR.MainWindow"
        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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:OTDR"
        mc:Ignorable="d"
        x:Name="winCharts"
        Title="OTDR" Height="350" Width="525" SizeChanged="Window_SizeChanged">
    <Grid x:Name="grdMain">
        <Grid.RowDefinitions>
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
            <RowDefinition />
            <RowDefinition Height="160" />
        </Grid.RowDefinitions>
        <StatusBar Grid.Row="0" Panel.ZIndex="5">
            <Button Width="20" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnZoomPlus" Click="btnZoomPlus_Click" ToolTip="Zoom+">+</Button>
            <Button Width="20" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnZoomMinus" Click="btnZoomMinus_Click" ToolTip="Zoom-">-</Button>
            <Button Width="20" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnUnzoom" Click="btnUnzoom_Click" ToolTip="Zoom clear">O</Button>
            <Button Width="20" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnClearCanvas" Click="btnClearCanvas_Click" ToolTip="Clear all">X</Button>
            <Button Width="20" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnMoveEnable" Click="btnMoveEnable_Click" Background="LightGray" ToolTip="Move off">M</Button>
            <Button Width="20" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnEdges" Click="btnEdges_Click" ToolTip="Draw Markers">E</Button>
            <Button Width="40" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnAddMarker" Click="btnAddMarker_Click" ToolTip="Add Marker">AM</Button>
            <Button Width="80" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" x:Name="btnPdfExport" Click="btnPdfExport_Click" ToolTip="Export to PDF" IsEnabled="False">PDF Export</Button>
            <CheckBox x:Name="ckbEvntsFromSor" HorizontalAlignment="Left" Content="event from sor" />
            <CheckBox x:Name="ckbSmoothData" HorizontalAlignment="Left" Content="smooth data" Checked="ckbSmoothData_Checked" Unchecked="ckbSmoothData_Checked" />
        </StatusBar>
        <StackPanel Grid.Row="1" Orientation="Horizontal" Panel.ZIndex="5" Background="White">
            <Button x:Name="btnOpenFile" Width="70" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" Click="btnOpenFile_Click">Open File</Button>
            <TextBox x:Name="txbFile" Width="100" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" IsReadOnly="True" ></TextBox>
            <Border >
                <Rectangle x:Name="rctColor" Width="20" Height="20" Margin="5 0 0 0" Fill="Black" Stroke="Black"></Rectangle>
            </Border>
            <Button x:Name="btnInfoFile1" Width="20" Height="20" Content="i" Click="btnInfoFile_Click" />
            <Button x:Name="btnOpenFile2" Width="70" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" Click="btnOpenFile2_Click">Open File</Button>
            <TextBox x:Name="txbFile2" Width="100" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left"></TextBox>
            <Border >
                <Rectangle x:Name="rctColor2" Width="20" Height="20" Margin="5 0 0 0" Fill="Green" Stroke="Black"></Rectangle>
            </Border>
            <Button x:Name="btnInfoFile2" Width="20" Height="20" Content="i" Click="btnInfoFile_Click" />
            <Button x:Name="btnOpenFile3" Width="70" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left" Click="btnOpenFile3_Click">Open File</Button>
            <TextBox x:Name="txbFile3" Width="100" Height="20" Margin="5 0 0 0" HorizontalAlignment="Left"></TextBox>
            <Border >
                <Rectangle x:Name="rctColor3" Width="20" Height="20" Margin="5 0 0 0" Fill="Blue" Stroke="Black"></Rectangle>
            </Border>
            <Button x:Name="btnInfoFile3" Width="20" Height="20" Content="i" Click="btnInfoFile_Click" />
        </StackPanel>
        <Canvas x:Name="spnMain" Grid.Row="2" Panel.ZIndex="1" >
        </Canvas>
        <Grid Grid.Row="3" Panel.ZIndex="5" Background="White">
            <TabControl x:Name="tbcResults">
                <TabItem Header="Markers">
                    <Grid x:Name="grdMarkers" Visibility="Hidden">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="100" />
                            <ColumnDefinition Width="100" />
                            <ColumnDefinition Width="100" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <TextBlock Text="Marker" HorizontalAlignment="Center" Grid.Column="0" Grid.Row="0"/>
                        <TextBlock Text="Position" HorizontalAlignment="Center" Grid.Column="1" Grid.Row="0"/>
                        <TextBlock Text="Value" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="0"/>
                        <TextBlock Text="A" HorizontalAlignment="Center" Grid.Column="0" Grid.Row="1" />
                        <TextBlock Text="4327 km" x:Name="txblMarkerAPos" HorizontalAlignment="Center" Grid.Column="1" Grid.Row="1"/>
                        <TextBlock Text="16.00 dB" x:Name="txblMarkerAVal" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="1"/>
                        <TextBlock Text="B" HorizontalAlignment="Center" Grid.Column="0" Grid.Row="2" />
                        <TextBlock Text="4337 km" x:Name="txblMarkerBPos" HorizontalAlignment="Center" Grid.Column="1" Grid.Row="2"/>
                        <TextBlock Text="16.50 dB" x:Name="txblMarkerBVal" HorizontalAlignment="Center" Grid.Column="2" Grid.Row="2"/>
                        <TextBlock Text="Loss" HorizontalAlignment="Center" Grid.Column="0" Grid.Row="3" />
                        <TextBlock Text="4337 dB" x:Name="txblMarkerABLoss" HorizontalAlignment="Center" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="3"/>
                        <TextBlock Text="Distance A-B" HorizontalAlignment="Center" Grid.Column="0" Grid.Row="4" />
                        <TextBlock Text="4337 km" x:Name="txblMarkerABDist" HorizontalAlignment="Center" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="4"/>
                        <TextBlock Text="Attenuation" HorizontalAlignment="Center" Grid.Column="0" Grid.Row="5" />
                        <TextBlock Text="4337 dB / km" x:Name="txblMarkerABAtt" HorizontalAlignment="Center" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="5"/>
                    </Grid>
                </TabItem>
                <TabItem Header="Event Table">
                    <ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Disabled">
                        <Grid x:Name="grdEvents">
                        </Grid>
                    </ScrollViewer>
                </TabItem>
                <TabItem Header="Summary" Visibility="Hidden"></TabItem>
                <TabItem Header="Identification" Visibility="Hidden"></TabItem>
            </TabControl>
        </Grid>
    </Grid>
</Window>
