|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <Page
- x:Class="MQTTnet.TestApp.UniversalWindows.MainPage"
- 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"
- d:DesignHeight="800"
- d:DesignWidth="800"
- mc:Ignorable="d">
-
- <Grid Margin="10">
-
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
- <RowDefinition Height="Auto" />
- </Grid.RowDefinitions>
-
- <Pivot Grid.Row="0" >
- <PivotItem Header="Connection">
- <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
- <TextBlock>Server:</TextBlock>
- <TextBox x:Name="Server"></TextBox>
- <TextBlock>User:</TextBlock>
- <TextBox x:Name="User"></TextBox>
- <TextBlock>Password:</TextBlock>
- <TextBox x:Name="Password"></TextBox>
- <TextBlock>ClientId:</TextBlock>
- <TextBox x:Name="ClientId"></TextBox>
-
- <StackPanel Orientation="Horizontal">
- <RadioButton x:Name="UseTcp" IsChecked="True" GroupName="connection">TCP</RadioButton>
- <RadioButton x:Name="UseWs" GroupName="connection">WS</RadioButton>
- <CheckBox x:Name="UseTls">Use TLS</CheckBox>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal">
- <Button Click="Connect" Width="120" Margin="0,0,10,0">Connect</Button>
- <Button Click="Disconnect" Width="120">Disconnect</Button>
- </StackPanel>
- </StackPanel>
-
- </PivotItem>
- <PivotItem Header="Publish">
- <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
- <TextBlock>Topic:</TextBlock>
- <TextBox x:Name="Topic"></TextBox>
-
- <TextBlock>Payload:</TextBlock>
- <TextBox x:Name="Payload"></TextBox>
- <StackPanel Orientation="Horizontal">
- <RadioButton x:Name="Text" IsChecked="True" GroupName="payload">Text</RadioButton>
- <RadioButton x:Name="Base64" GroupName="payload">Base64</RadioButton>
- </StackPanel>
-
- <TextBlock>Retain:</TextBlock>
- <CheckBox x:Name="Retain"></CheckBox>
-
- <TextBlock>QoS:</TextBlock>
- <StackPanel Orientation="Horizontal">
- <RadioButton Margin="0,0,10,0" IsChecked="True" GroupName="qos">0 (At most once)</RadioButton>
- <RadioButton Margin="0,0,10,0" x:Name="QoS1" GroupName="qos">1 (At least once)</RadioButton>
- <RadioButton Margin="0,0,10,0" x:Name="QoS2" GroupName="qos">2 (Exactly once)</RadioButton>
- </StackPanel>
- <Button Click="Publish" Width="120">Publish</Button>
- </StackPanel>
- </PivotItem>
- <PivotItem Header="Subscribe">
- <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
- <TextBlock>Topic:</TextBlock>
- <TextBox x:Name="SubscribeTopic"></TextBox>
-
- <TextBlock>QoS:</TextBlock>
- <StackPanel Orientation="Horizontal">
- <RadioButton Margin="0,0,10,0" IsChecked="True" GroupName="sqos">0 (At most once)</RadioButton>
- <RadioButton Margin="0,0,10,0" x:Name="SubscribeQoS1" GroupName="sqos">1 (At least once)</RadioButton>
- <RadioButton Margin="0,0,10,0" x:Name="SubscribeQoS2" GroupName="sqos">2 (Exactly once)</RadioButton>
- </StackPanel>
-
- <StackPanel Orientation="Horizontal">
- <Button Click="Subscribe" Width="120" Margin="0,0,10,0">Subscribe</Button>
- <Button Click="Unsubscribe" Width="120">Unsubscribe</Button>
- </StackPanel>
- </StackPanel>
- </PivotItem>
- <PivotItem Header="Server">
- <StackPanel Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
- <TextBlock>Port:</TextBlock>
- <TextBox x:Name="ServerPort" Text="1883"></TextBox>
-
- <StackPanel Orientation="Horizontal">
- <Button Width="120" Margin="0,0,10,0" Click="StartServer">Start</Button>
- <Button Width="120" Margin="0,0,10,0" Click="StopServer">Stop</Button>
- </StackPanel>
- </StackPanel>
- </PivotItem>
- </Pivot>
-
- <ScrollViewer Margin="12,10,12,0" Grid.Row="1" Background="Black" Foreground="WhiteSmoke" FontFamily="Consolas" HorizontalScrollMode="Enabled" VerticalScrollMode="Enabled" HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible">
- <TextBlock x:Name="Trace" FontSize="11"></TextBlock>
- </ScrollViewer>
-
- <StackPanel Margin="12,0,12,10" Grid.Row="2">
- <Button Click="Clear" Width="120">Clear</Button>
- </StackPanel>
- </Grid>
-
- </Page>
|