Skip to content

Commit 6290d8d

Browse files
committed
Created WiFi page (#671)
1 parent 891dcec commit 6290d8d

File tree

12 files changed

+146
-2
lines changed

12 files changed

+146
-2
lines changed

InternetTest/InternetTest/Components/Sidebar.xaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
Padding="5"
132132
HorizontalContentAlignment="Left"
133133
Background="Transparent"
134+
Command="{Binding WiFiPageCommand}"
134135
Content="{x:Static lang:Resources.WiFi}"
135136
GroupName="Sidebar"
136137
Style="{DynamicResource SidebarButton}" />
@@ -250,9 +251,10 @@
250251

251252
<RadioButton
252253
Grid.Row="4"
253-
Padding="5" Command="{Binding SettingsPageCommand}"
254+
Padding="5"
254255
HorizontalContentAlignment="Left"
255256
Background="Transparent"
257+
Command="{Binding SettingsPageCommand}"
256258
GroupName="Sidebar"
257259
Style="{DynamicResource SidebarButton}">
258260
<StackPanel Orientation="Horizontal">

InternetTest/InternetTest/MainWindow.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@
9292
<DataTemplate DataType="{x:Type vm:SettingsPageViewModel}">
9393
<views:SettingsPage />
9494
</DataTemplate>
95+
<DataTemplate DataType="{x:Type vm:WiFiPageViewModel}">
96+
<views:WiFiPage/>
97+
</DataTemplate>
9598
</Grid.Resources>
9699
<Grid DataContext="{Binding SidebarViewModel}">
97100
<Grid.Resources>

InternetTest/InternetTest/Properties/Resources.Designer.cs

Lines changed: 10 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

InternetTest/InternetTest/Properties/Resources.en-US.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,4 +1173,7 @@ Absolutely NO data is sent to Léo Corporation.</value>
11731173
<data name="About" xml:space="preserve">
11741174
<value>About</value>
11751175
</data>
1176+
<data name="WiFiNetworksDesc" xml:space="preserve">
1177+
<value>Manage your wireless network connections.</value>
1178+
</data>
11761179
</root>

InternetTest/InternetTest/Properties/Resources.fr-FR.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,4 +1173,7 @@ Absolument AUCUNE donnée n'est envoyée à Léo Corporation.</value>
11731173
<data name="About" xml:space="preserve">
11741174
<value>A propos</value>
11751175
</data>
1176+
<data name="WiFiNetworksDesc" xml:space="preserve">
1177+
<value>Gérez vos connexions réseau sans fil.</value>
1178+
</data>
11761179
</root>

InternetTest/InternetTest/Properties/Resources.it-IT.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,4 +1173,7 @@ Assolutamente NESSUN dato verrà inviato a Léo Corporation.</value>
11731173
<data name="About" xml:space="preserve">
11741174
<value>Informazioni</value>
11751175
</data>
1176+
<data name="WiFiNetworksDesc" xml:space="preserve">
1177+
<value>Gestisci le tue connessioni di rete wireless.</value>
1178+
</data>
11761179
</root>

InternetTest/InternetTest/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1173,4 +1173,7 @@ Absolutely NO data is sent to Léo Corporation.</value>
11731173
<data name="About" xml:space="preserve">
11741174
<value>About</value>
11751175
</data>
1176+
<data name="WiFiNetworksDesc" xml:space="preserve">
1177+
<value>Manage your wireless network connections.</value>
1178+
</data>
11761179
</root>

InternetTest/InternetTest/Properties/Resources.zh-CN.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,4 +1164,7 @@
11641164
<data name="About" xml:space="preserve">
11651165
<value>关于</value>
11661166
</data>
1167+
<data name="WiFiNetworksDesc" xml:space="preserve">
1168+
<value>管理您的无线网络连接。</value>
1169+
</data>
11671170
</root>

InternetTest/InternetTest/ViewModels/Components/SidebarViewModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,15 @@ public class SidebarViewModel : ViewModelBase
3232

3333
public ICommand HomePageCommand { get; }
3434
public ICommand SettingsPageCommand { get; }
35+
public ICommand WiFiPageCommand { get; }
3536

3637
public SidebarViewModel(MainViewModel mainViewModel)
3738
{
3839
_mainViewModel = mainViewModel;
3940

4041
HomePageCommand = new RelayCommand(HomePage);
4142
SettingsPageCommand = new RelayCommand(SettingsPage);
43+
WiFiPageCommand = new RelayCommand(WiFiPage);
4244
}
4345

4446
private void HomePage(object? obj)
@@ -50,4 +52,9 @@ private void SettingsPage(object? obj)
5052
{
5153
_mainViewModel.CurrentViewModel = new SettingsPageViewModel(_mainViewModel);
5254
}
55+
56+
private void WiFiPage(object? obj)
57+
{
58+
_mainViewModel.CurrentViewModel = new WiFiPageViewModel(_mainViewModel.Settings);
59+
}
5360
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
MIT License
3+
4+
Copyright (c) Léo Corporation
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
23+
*/
24+
using InternetTest.Models;
25+
using System;
26+
using System.Collections.Generic;
27+
using System.Linq;
28+
using System.Text;
29+
using System.Threading.Tasks;
30+
31+
namespace InternetTest.ViewModels;
32+
public class WiFiPageViewModel : ViewModelBase
33+
{
34+
private readonly Settings _settings;
35+
36+
public WiFiPageViewModel(Settings settings)
37+
{
38+
_settings = settings;
39+
}
40+
}

0 commit comments

Comments
 (0)