<Page x:Class="WPF_Sample.Views.Settings"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:p="clr-namespace:WPF_Sample.Properties"
      mc:Ignorable="d" 
      d:DesignHeight="508" d:DesignWidth="608"
	Title="Settings" Loaded="Page_Loaded" Unloaded="Page_Unloaded">

    <Grid>

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

            <ColumnDefinition Width="*" />

            <ColumnDefinition Width="10" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="10" />
            <RowDefinition Height="*" />
            <RowDefinition Height="10" />
        </Grid.RowDefinitions>

        <!-- WEB SERVIES-->
        <Label Content="Web Services" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Name="label3" VerticalAlignment="Top" Margin="6,50,0,0" FontWeight="Bold" FontSize="14" />
        <Label Content="Configuration" FontSize="22" Grid.Column="1" Height="44" HorizontalAlignment="Left" Name="lblConfigurationHeader" VerticalAlignment="Top" Width="165" FontWeight="Normal" Margin="0,6,0,0" Grid.RowSpan="2" />
        <Rectangle Grid.Column="1" Grid.Row="1" Height="1" HorizontalAlignment="Stretch" Margin="6,32,11,0" Name="rectangle1" Stroke="Black" VerticalAlignment="Top" Grid.ColumnSpan="3" />

        <Label Content="V1 SOAP URL:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,78,0,0" Name="lblSoapUrl" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="26,99,0,0" VerticalAlignment="Top" Width="543" IsReadOnly="True" Name="txtSoapV1Url" Background="#FFEFEFEF" />

        <Label Content="Shared Key:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Name="lblSharedKey" VerticalAlignment="Top" Margin="22,213,0,0" />
        <TextBox DataContext="{Binding}" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Name="txtWSSharedKey" VerticalAlignment="Top" Width="543" Margin="25,235,0,0" />

        <Label Content="Password:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Name="lblPassword" VerticalAlignment="Top" Margin="22,261,0,0" />
        <TextBox  Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Name="txtWSPassword" VerticalAlignment="Top" Width="543" Margin="25,282,0,0"  />

        <!-- sso -->
        <Label Content="Single Sign-On" FontSize="14" FontWeight="Bold" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Left" Name="lblSSOHeader" Margin="11,409,0,51" />
        <Label Content="Shared Key:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Name="lblSSOSharedKey" VerticalAlignment="Top" Margin="21,436,0,0" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="24,458,0,0" Name="txtSSOSharedKey" VerticalAlignment="Top" Width="542" />

        <!-- DEFAULTS -->
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="26,186,0,0" Name="txtCustomerAlias" VerticalAlignment="Top" Width="542" DataContext="{Binding}" />
        <Label Content="Customer Alias:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="22,165,0,0" Name="lblCustomerAlias" VerticalAlignment="Top" />



        <Button Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Right" Margin="554,1,0,0" Name="btnHelp" VerticalAlignment="Top" Width="28" BorderBrush="#00DEDEDE" Focusable="False" Click="btnHelp_Click">
            <Button.Background>
                <ImageBrush ImageSource="/WPF-Sample;component/Images/help2.png" />
            </Button.Background>
        </Button>
        <Label Content="Token:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Name="label1" VerticalAlignment="Top" Margin="23,308,0,0" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="61" HorizontalAlignment="Left" Margin="26,329,0,0" Name="txtToken" VerticalAlignment="Top" Width="450" TextWrapping="Wrap" IsReadOnly="True" Background="#FFEFEFEF" />
        <Label Content="(edit in app.config or update STWS service reference to match your url)" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" Margin="107,122,0,0" Name="label2" VerticalAlignment="Top" FontStyle="Italic" FontSize="11" />
        <TextBlock FontSize="14" Grid.Column="1" Grid.Row="1" Margin="509,78,22,391" Name="txtPingTest"><Hyperlink Click="Hyperlink_Click" Name="lnkPingTest">Ping Test</Hyperlink></TextBlock>
        <Button Content="Clear" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="482,358,0,0" Name="btnClear" VerticalAlignment="Top" Width="75" Click="btnClear_Click" />
        <Button Content="Generate" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="482,328,0,0" Name="btnTokenUpdate" VerticalAlignment="Top" Width="75" Click="btnTokenUpdate_Click" />
        <Label Content="V2 SOAP URL:" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="23,122,0,0" x:Name="lblSoapUrl_Copy" />
        <TextBox Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="26,142,0,0" VerticalAlignment="Top" Width="543" IsReadOnly="True" x:Name="txtSoapV2Url" Background="#FFEFEFEF" />
        <Label Content="(Deprecated)" Grid.Column="1" Grid.Row="1" Height="28" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="101,77,0,0" x:Name="lblSoapUrl_Copy1" />
    </Grid>
</Page>
