Commit 65ac9ce4 authored by Rachit Bajpai's avatar Rachit Bajpai
Browse files

Merge remote-tracking branch 'Microsoft/master'

parents 9f08fd16 af09afd3
Loading
Loading
Loading
Loading
+25 −26
Original line number Diff line number Diff line
@@ -87,7 +87,8 @@ namespace SampleWdpClient.UniversalWindows
                        this.MarshalUpdateCommandOutput(sb.ToString());
                        portal.ConnectionStatus += (portal, connectArgs) =>
                        {
                        if (connectArgs.Status == DeviceConnectionStatus.Connected) { 
                            if (connectArgs.Status == DeviceConnectionStatus.Connected) 
                            { 
                                sb.Append("Connected to: ");
                                sb.AppendLine(portal.Address);
                                sb.Append("OS version: ");
@@ -108,13 +109,12 @@ namespace SampleWdpClient.UniversalWindows
                    
                        await portal.Connect();

                      
                        this.MarshalUpdateCommandOutput(sb.ToString());
                });

            Task continuationTask = connectTask.ContinueWith(
                (t) =>
                {
                    this.MarshalUpdateCommandOutput(sb.ToString());
                    this.MarshalEnableDeviceControls(true);
                    this.MarshalEnableConnectionControls(true);
                });
@@ -204,7 +204,6 @@ namespace SampleWdpClient.UniversalWindows
                        sb.AppendLine("Failed to get IP config info.");
                        sb.AppendLine(ex.GetType().ToString() + " - " + ex.Message);
                    }

                });

            Task continuationTask = getTask.ContinueWith(
+9 −0
Original line number Diff line number Diff line
<Application x:Class="SampleWdpClient.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:SampleWdpClient"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
         
    </Application.Resources>
</Application>
+11 −0
Original line number Diff line number Diff line
using System.Windows;

namespace SampleWdpClient
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
    }
}
+37 −0
Original line number Diff line number Diff line
<Window x:Class="SampleWdpClient.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:SampleWdpClient"
        mc:Ignorable="d"
        Title="Sample Windows Device Portal Client" Height="600" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <TextBlock x:Name="addressLabel" Grid.Column="0" HorizontalAlignment="Left" Margin="15,18,0,0" TextWrapping="Wrap" Text="Device Address" VerticalAlignment="Top" Height="20" Width="71"/>
        <TextBox x:Name="address" Grid.Column="0" Margin="91,12,15,0" TextWrapping="NoWrap" Text="" VerticalAlignment="Top" Height="32" TextChanged="Address_TextChanged"/>
        <TextBlock x:Name="usernameLabel" Grid.Column="0" HorizontalAlignment="Left" Margin="15,55,0,0" TextWrapping="Wrap" Text="User name" VerticalAlignment="Top" Height="20" Width="71"/>
        <TextBox x:Name="username" Grid.Column="0" Margin="91,49,15,0" TextWrapping="NoWrap" Text="" VerticalAlignment="Top" Height="32" TextChanged="Username_TextChanged"/>
        <TextBlock x:Name="passwordLabel" Grid.Column="0" HorizontalAlignment="Left" Margin="15,92,0,0" TextWrapping="Wrap" Text="Password" VerticalAlignment="Top" Height="20" Width="62"/>
        <PasswordBox x:Name="password" Grid.Column="0" Margin="90,85,16,0" VerticalAlignment="Top" Height="32" PasswordChanged="Password_PasswordChanged"/>
        <Button x:Name="connectToDevice" Content="Connect" Grid.Column="0" HorizontalAlignment="Left" Margin="16,123,0,0" VerticalAlignment="Top" Width="93" Click="ConnectToDevice_Click" Height="32" IsEnabled="False"/>
        <Button x:Name="rebootDevice" Content="Reboot" Grid.Column="0" HorizontalAlignment="Left" Margin="114,123,0,0" VerticalAlignment="Top" Width="93" Click="RebootDevice_Click" IsEnabled="False" Height="32"/>
        <Button x:Name="shutdownDevice" Content="Shutdown" Grid.Column="0" HorizontalAlignment="Left" Margin="212,123,0,0" VerticalAlignment="Top" Width="93" Click="ShutdownDevice_Click" IsEnabled="False" Height="32"/>

        <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" Height="1" Margin="15,160,15,0" VerticalAlignment="Top"/>

        <Button x:Name="getIPConfig" Content="Get IP Config" Grid.Column="0" HorizontalAlignment="Left" Margin="12,166,0,0" VerticalAlignment="Top" Width="144" Click="GetIPConfig_Click" IsEnabled="False" Height="32"/>
        <Button x:Name="getWiFiInfo" Content="Get WiFi Info" Grid.Column="0" HorizontalAlignment="Left" Margin="161,166,0,0" VerticalAlignment="Top" Width="144" Click="GetWifiInfo_Click" IsEnabled="False" Height="32"/>

        <Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Left" Grid.Column="1" Margin="0,15,0,15" Width="2" RenderTransformOrigin="0.5,0.5" />

        <CheckBox x:Name="clearOutput" Content="Clear output" HorizontalAlignment="Stretch" Margin="10,10,10,0" VerticalAlignment="Top" IsChecked="True" Grid.Column="1" Height="32"/>
        <ScrollViewer Grid.Column="1" Margin="10,42,10,10">
            <TextBox x:Name="commandOutput" Margin="0,0,0,0" TextWrapping="Wrap" Text=""/>
        </ScrollViewer>
    </Grid>
</Window>
Loading