<Window
        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:Web_Service_Toolbox"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid" x:Class="Web_Service_Toolbox.MainWindow"
        mc:Ignorable="d"
        Title="Web_Service_Toolbox" Height="810" Width="800">

    <StackPanel Margin="10">
        <Grid Margin="0 0 0 10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="2*" />
                <ColumnDefinition Width="4*" />
            </Grid.ColumnDefinitions>

            <TextBlock x:Name="lblUserName" Text="User Name:" Grid.Column="0" FontWeight="Bold" Margin="0 0 0 5" />
            <TextBlock x:Name="lblPassword" Text="Password:" Grid.Column="1" FontWeight="Bold" Margin="10 0 0 5" />
            <TextBlock x:Name="lblPasswordFiller" Text="" Grid.Column="2" FontWeight="Bold" Margin="10 0 0 5" />
        </Grid>

        <Grid Margin="0 0 0 10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="2*" />
                <ColumnDefinition Width="4*" />
            </Grid.ColumnDefinitions>

            <TextBox x:Name="tbUserName" Grid.Column="0" Padding="3" Margin="0 0 0 5" />
            <PasswordBox x:Name="tbPassword" Grid.Column="1" Padding="3" Margin="10 0 0 5" />
            <TextBlock x:Name="tbPasswordFiller" Text="" Grid.Column="2" FontWeight="Bold" Margin="10 0 0 5" />
        </Grid>

        <TextBlock x:Name="Spacer2" Text="" FontWeight="Bold" Margin="0 0 0 5" />

        <Grid Margin="0 0 0 10">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <TextBlock x:Name="lblFunctions" Text="Test Options:" Grid.Column="0" FontWeight="Bold" Margin="0 0 0 5" />
            <RadioButton x:Name="btnFolderItems" GroupName="TestOptions" Content="Folder Item Details" Grid.Column="1" FontWeight="Normal" Margin="10 0 0 5" Checked="btnFolderItems_Checked" />
            <RadioButton x:Name="btnSendRetrieve" GroupName="TestOptions" Content="Send/Retrieve" Grid.Column="2" FontWeight="Normal" Margin="10 0 0 5" Checked="btnSendRetrieve_Checked" />
            <RadioButton x:Name="btnLockUnlock" GroupName="TestOptions" Content="Lock/Unlock" Grid.Column="3" FontWeight="Normal" Margin="10 0 0 5" Checked="btnLockUnlock_Checked" />
            <RadioButton x:Name="btnCheckStatus" GroupName="TestOptions" Content="Check Status" Grid.Column="4" FontWeight="Normal" Margin="10 0 0 5" Checked="btnCheckStatus_Checked" />
            <TextBlock x:Name="tbOptionsFiller" Text="" Grid.Column="5" FontWeight="Normal" Margin="10 0 0 5" />
        </Grid>

        <TextBlock x:Name="Spacer3" Text="" FontWeight="Bold" Margin="0 0 0 5" />

        <Grid Margin="0 0 0 10">

            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <StackPanel x:Name="spFolderItems" Grid.Column="0" Visibility="Hidden" Margin="0">
                <!-- Panel for Folder Items -->
                <Grid Margin="0 0 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="5*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Remote Folder:" Grid.Column="0" FontWeight="Bold" Margin="0 0 0 5" />

                    <ComboBox x:Name="cbFolderName" Grid.Column="1" HorizontalAlignment="Left" Width="100" SelectionChanged="cbFolderName_SelectionChanged">
                        <ComboBoxItem>Send</ComboBoxItem>
                        <ComboBoxItem>Retrieve</ComboBoxItem>
                        <ComboBoxItem>Processed</ComboBoxItem>
                        <ComboBoxItem>Invalid</ComboBoxItem>
                    </ComboBox>

                    <TextBlock Grid.Column="2" FontWeight="Bold" Margin="0 0 0 5" />
                </Grid>

                <Grid x:Name="resultGrid" Margin="10 10 10 10" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>
                </Grid>

            </StackPanel>

            <StackPanel x:Name="spSendRetrieve" Grid.Column="0" Visibility="Hidden" Margin="0">
                <!-- Panel for Send/Retrieve -->
                <Grid Margin="0 0 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="2*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="3*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Repository:" Grid.Column="0" FontWeight="Bold" Margin="0 10 0 10" />

                    <ComboBox x:Name="cbRepository" Grid.Column="1" Margin="0 10 0 10" HorizontalAlignment="Left" Width="180">
                        <ComboBoxItem>Send</ComboBoxItem>
                        <ComboBoxItem>Retrieve</ComboBoxItem>
                    </ComboBox>

                    <Button x:Name="btnSend" IsEnabled="True" Margin="5 5 5 5" Grid.Column="2" Content="Send" Click="btnSend_Click"></Button>
                    <Button x:Name="btnRetrieve" IsEnabled="True" Margin="5 5 5 5" Grid.Column="3" Content="Retrieve" Click="btnRetrieve_Click"></Button>

                    <TextBlock Grid.Column="4" FontWeight="Bold" Margin="0 10 0 10" />
                </Grid>

                <Grid Margin="0 0 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="6*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Local Folder:" Grid.Column="0" FontWeight="Bold" Margin="0 10 0 10" />

                    <TextBox x:Name="tbLocalFolderName" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 10 0 10" />
                    <Button x:Name="btnBrowseLocalFolders" Grid.Column="2" Margin="10 10 10 10" Content="Browse" Click="btnBrowseLocalFolders_Click" />

                </Grid>

            </StackPanel>

            <StackPanel x:Name="spLockUnlock" Grid.Column="0" Visibility="Hidden" Margin="0">
                <!-- Panel for Send/Retrieve -->
                <Grid Margin="0 0 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="2*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="3*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Repository:" Grid.Column="0" FontWeight="Bold" Margin="0 10 0 10" />

                    <ComboBox x:Name="cbRepositoryName" Grid.Column="1" Margin="0 10 0 10" HorizontalAlignment="Left" Width="180" SelectionChanged="cbRepositoryName_SelectionChanged">
                        <ComboBoxItem>Send</ComboBoxItem>
                        <ComboBoxItem>Retrieve</ComboBoxItem>
                        <ComboBoxItem>Processed</ComboBoxItem>
                        <ComboBoxItem>Invalid</ComboBoxItem>
                    </ComboBox>
                </Grid>


                <Grid Margin="0 0 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="4*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Files:" Grid.Column="0" FontWeight="Bold" Margin="0 10 0 10" />

                    <ComboBox x:Name="cbFileNames" Grid.Column="1" Margin="0 10 0 10" HorizontalAlignment="Left" Width="370">
                    </ComboBox>

                    <Button x:Name="btnLock" IsEnabled="True" Margin="5 5 5 5" Grid.Column="2" Content="Lock" Click="btnLock_Click"></Button>
                    <Button x:Name="btnUnlock" IsEnabled="True" Margin="5 5 5 5" Grid.Column="3" Content="Unlock" Click="btnUnlock_Click"></Button>
                    <Button x:Name="btnDelete" IsEnabled="True" Margin="5 5 5 5" Grid.Column="4" Content="Delete" Click="btnDelete_Click"></Button>
                </Grid>

            </StackPanel>

            <StackPanel x:Name="spCheckStatus" Grid.Column="0" Visibility="Visible" Margin="0">
                <!-- Panel for CheckStatus -->
                <Grid Margin="0 0 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="5*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Submitter ID:" Grid.Column="0" FontWeight="Bold" Margin="0 10 0 10" />

                    <TextBox x:Name="tbSubmitterID" Grid.Column="1" Padding="3" Margin="0 10 0 10" />
                    <Button x:Name="btnGetStatus" Grid.Column="2" Margin="10 10 10 10" Content="Get Status" Click="btnGetStatus_Click" />
                    <TextBlock x:Name="tbGetStatusFiller" Text="" Grid.Column="3" FontWeight="Normal" Margin="10 0 0 5" />
                </Grid>

                <Grid Margin="0 0 0 0">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*" />
                        <ColumnDefinition Width="3*" />
                        <ColumnDefinition Width="4*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Primary Reference:" Grid.Column="0" FontWeight="Bold" Margin="0 10 0 10" />

                    <TextBox x:Name="tbPrimaryReference" Grid.Column="1" Padding="3" Margin="0 10 0 10" TextChanged="tbPrimaryReference_TextChanged"/>
                    <TextBlock x:Name="tbPrimaryReferenceFiller" Text="" Grid.Column="2" FontWeight="Normal" Margin="10 0 0 5" />
                </Grid>
                
                <Grid Margin="0 0 0 20">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*" />
                        <ColumnDefinition Width="3*" />
                        <ColumnDefinition Width="4*" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Text="Transaction History?" Grid.Column="0" FontWeight="Bold" Margin="0 10 0 10" />

                    <CheckBox x:Name="chkTransactionHistory" Grid.Column="1" Padding="3" Margin="0 10 0 10" Click="chkTransactionHistory_Click" />
                    <TextBlock x:Name="tbTransactionHistoryFiller" Text="" Grid.Column="2" FontWeight="Normal" Margin="10 0 0 5" />
                </Grid>

                    <Grid Margin="0 0 0 0">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>

                    <Border x:Name="panelTranDetails" Visibility="Hidden" Grid.Column="0" BorderBrush="Black" BorderThickness="1">
                        <StackPanel x:Name="spTranDetails"  Margin="0 0 0 0">

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Transaction Status Details" Grid.Column="0" Background="LightGray" TextAlignment="Center" FontWeight="Bold" Margin="0 0 0 10" Padding="3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Transaction ID:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbTransactionID" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Primary Ref:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbPrimaryRef" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Secondary Ref:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbSecondaryRef" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="County Name:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbCountyName" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Submitter ID:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbSubID" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Agent ID:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbAgentID" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Created By:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbCreatorUserName" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Created:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbDateCreated" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Last Modified:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbLastModified" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Status ID:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 3" />
                                <TextBox x:Name="tbStatusID" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 3" />
                            </Grid>

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="2*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Status Name:" Grid.Column="0" FontWeight="Bold" Margin="5 3 0 10" />
                                <TextBox x:Name="tbStatusName" IsReadOnly="true" Grid.Column="1" Padding="3" Margin="0 3 10 10" />
                            </Grid>
                        </StackPanel>
                    </Border>

                    <Border x:Name="panelTranHistory" Grid.Column="1" Visibility="Hidden" BorderBrush="Black" BorderThickness="1">
                        <StackPanel x:Name="spTranHistory" Visibility="Visible"  Margin="0 0 0 0">

                            <Grid Margin="0 0 0 0">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Transaction History" Grid.Column="0" Background="LightGray" TextAlignment="Center" FontWeight="Bold" Margin="0 0 0 10" Padding="3" />
                            </Grid>

                            <Grid x:Name="historyGrid" Margin="10 10 10 10" >
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="*" />
                                    <ColumnDefinition Width="4*" />
                                    <ColumnDefinition Width="3*" />
                                </Grid.ColumnDefinitions>

                                <TextBlock Text="Code" Grid.Column="0" Background="LightGray" TextAlignment="Center" FontWeight="Bold" Margin="0 0 0 10" Padding="3" />
                                <TextBlock Text="Status" Grid.Column="1" Background="LightGray" TextAlignment="Center" FontWeight="Bold" Margin="0 0 0 10" Padding="3" />
                                <TextBlock Text="Time Stamp" Grid.Column="2" Background="LightGray" TextAlignment="Center" FontWeight="Bold" Margin="0 0 0 10" Padding="3" />

                            </Grid>


                        </StackPanel>
                    </Border>
                </Grid>

            </StackPanel>


        </Grid>

        <TextBlock x:Name="Spacer4" Text="" FontWeight="Bold" Margin="0 0 0 5" />

        <TextBox x:Name="tbMessageLine" Text="" FontWeight="Bold" Foreground="Red" IsReadOnly="True" Padding="3" BorderThickness="0" Margin="0 0 0 5"/>
    </StackPanel>
</Window>
