Skip to content

Commit

Permalink
Added "Open in browser" button (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Aug 13, 2022
1 parent 240ec65 commit 8dc5b57
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 6 deletions.
10 changes: 5 additions & 5 deletions InternetTest/InternetTest/Pages/StatusPage.xaml
Expand Up @@ -23,8 +23,8 @@
</StackPanel>

<StackPanel Grid.Row="1" VerticalAlignment="Center">
<TextBlock x:Name="StatusIconTxt" Text="&#xF299;" FontSize="76" FontFamily="../Fonts/#FluentSystemIcons-Filled" Foreground="{Binding Source={StaticResource AccentColor}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock x:Name="StatusTxt" d:Text="{x:Static lang:Resources.GetStarted}" FontSize="14" VerticalAlignment="Center" FontWeight="ExtraBold" Margin="5,0,0,0" HorizontalAlignment="Center"/>
<TextBlock x:Name="StatusIconTxt" Text="&#xF4AB;" FontSize="76" FontFamily="../Fonts/#FluentSystemIcons-Filled" Foreground="{Binding Source={StaticResource Gray}}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
<TextBlock x:Name="StatusTxt" Text="{x:Static lang:Resources.LaunchTestToCheckConnection}" FontSize="14" VerticalAlignment="Center" FontWeight="ExtraBold" Margin="5,0,0,0" HorizontalAlignment="Center"/>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<Button x:Name="TestBtn" Click="TestBtn_Click" Cursor="Hand" Content="{x:Static lang:Resources.Test}" Margin="5 10" Padding="5 2" BorderThickness="0" Background="{Binding Source={StaticResource AccentColor}}" Foreground="{Binding Source={StaticResource WindowButtonsHoverForeground1}}" FontWeight="ExtraBold" Style="{DynamicResource PrimaryButton}"/>
<Button x:Name="BrowserBtn" Click="BrowserBtn_Click" Cursor="Hand" Content="{x:Static lang:Resources.OpenBrowser}" Margin="5 10" Padding="5 2" BorderThickness="0" Background="{Binding Source={StaticResource LightAccentColor}}" Foreground="{Binding Source={StaticResource AccentColor}}" FontWeight="ExtraBold" Style="{DynamicResource PrimaryButton}"/>
Expand All @@ -51,7 +51,7 @@
<TextBlock Text="{x:Static lang:Resources.Status}" Foreground="{Binding Source={StaticResource DarkGray}}" FontWeight="ExtraBold" />
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock Text="&#xF2F0;" Margin="0 0 5 0" FontFamily="../Fonts/#FluentSystemIcons-Regular" VerticalAlignment="Center" FontSize="22"/>
<TextBlock x:Name="DetailsStatusTxt" d:Text="200" VerticalAlignment="Center" FontWeight="ExtraBold" FontSize="18"/>
<TextBlock x:Name="DetailsStatusTxt" Text="N/A" VerticalAlignment="Center" FontWeight="ExtraBold" FontSize="18"/>
</StackPanel>
</Grid>
</Border>
Expand All @@ -70,7 +70,7 @@
<TextBlock Text="{x:Static lang:Resources.TimeElapsed}" Foreground="{Binding Source={StaticResource DarkGray}}" FontWeight="ExtraBold" />
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock Text="&#xF2F0;" Margin="0 0 5 0" FontFamily="../Fonts/#FluentSystemIcons-Regular" VerticalAlignment="Center" FontSize="22"/>
<TextBlock x:Name="DetailsTimeTxt" d:Text="200" VerticalAlignment="Center" FontWeight="ExtraBold" FontSize="18"/>
<TextBlock x:Name="DetailsTimeTxt" Text="0ms" VerticalAlignment="Center" FontWeight="ExtraBold" FontSize="18"/>
</StackPanel>
</Grid>
</Border>
Expand All @@ -89,7 +89,7 @@
<TextBlock Text="{x:Static lang:Resources.StatusMessage}" Foreground="{Binding Source={StaticResource DarkGray}}" FontWeight="ExtraBold" />
<StackPanel Grid.Row="1" Orientation="Horizontal">
<TextBlock Text="&#xF2F0;" Margin="0 0 5 0" FontFamily="../Fonts/#FluentSystemIcons-Regular" VerticalAlignment="Center" FontSize="22"/>
<TextBlock x:Name="DetailsMessageTxt" d:Text="200" VerticalAlignment="Center" FontWeight="ExtraBold" FontSize="18"/>
<TextBlock x:Name="DetailsMessageTxt" Text="N/A" VerticalAlignment="Center" FontWeight="ExtraBold" FontSize="18"/>
</StackPanel>
</Grid>
</Border>
Expand Down
3 changes: 2 additions & 1 deletion InternetTest/InternetTest/Pages/StatusPage.xaml.cs
Expand Up @@ -25,6 +25,7 @@ MIT License
using LeoCorpLibrary;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Net.Http;
using System.Text;
Expand Down Expand Up @@ -116,6 +117,6 @@ private void TestBtn_Click(object sender, RoutedEventArgs e)

private void BrowserBtn_Click(object sender, RoutedEventArgs e)
{

Process.Start("explorer.exe", "https://bing.com");
}
}
9 changes: 9 additions & 0 deletions InternetTest/InternetTest/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions InternetTest/InternetTest/Properties/Resources.en-US.resx
Expand Up @@ -213,4 +213,7 @@
<data name="Error" xml:space="preserve">
<value>Error</value>
</data>
<data name="LaunchTestToCheckConnection" xml:space="preserve">
<value>Launch a test to check your connection</value>
</data>
</root>
3 changes: 3 additions & 0 deletions InternetTest/InternetTest/Properties/Resources.fr-FR.resx
Expand Up @@ -213,4 +213,7 @@
<data name="Error" xml:space="preserve">
<value>Erreur</value>
</data>
<data name="LaunchTestToCheckConnection" xml:space="preserve">
<value>Lancez un test pour vérifier votre connexion</value>
</data>
</root>
3 changes: 3 additions & 0 deletions InternetTest/InternetTest/Properties/Resources.resx
Expand Up @@ -213,4 +213,7 @@
<data name="Error" xml:space="preserve">
<value>Error</value>
</data>
<data name="LaunchTestToCheckConnection" xml:space="preserve">
<value>Launch a test to check your connection</value>
</data>
</root>
3 changes: 3 additions & 0 deletions InternetTest/InternetTest/Properties/Resources.zh-CN.resx
Expand Up @@ -213,4 +213,7 @@
<data name="Error" xml:space="preserve">
<value>错误</value>
</data>
<data name="LaunchTestToCheckConnection" xml:space="preserve">
<value>启动测试以检查您的连接</value>
</data>
</root>

0 comments on commit 8dc5b57

Please sign in to comment.