Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
Added security settings page
Browse files Browse the repository at this point in the history
  • Loading branch information
COM8 committed May 22, 2018
1 parent a88fb8d commit 2018c97
Show file tree
Hide file tree
Showing 5 changed files with 97 additions and 13 deletions.
3 changes: 2 additions & 1 deletion UWP XMPP Client/Pages/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ private void loadSettingsCategories()
new SettingTemplate() {icon = "\xE12B", name = "Data", description = "Mobile Data, Wifi", page = typeof(DataSettingsPage)},
new SettingTemplate() {icon = "\xE15F", name = "Chat", description = "Availability", page = typeof(ChatSettingsPage)},
new SettingTemplate() {icon = "\xE71D", name = "Background Tasks", description = "Manage Tasks", page = typeof(BackgroundTasksSettingsPage)},
new SettingTemplate() {icon = "\uEB52", name = "Donate", description = "In-App Purchases, PayPal, Crypto", page = typeof(DonateSettingsPage)},
new SettingTemplate() {icon = "\uE72E", name = "Security", description = "Certificates", page = typeof(SecuritySettingsPage)},
new SettingTemplate() {icon = "\uEB52", name = "Donate", description = "In-App Purchases, PayPal, Liberapay", page = typeof(DonateSettingsPage)},
new SettingTemplate() {icon = "\xE713", name = "Misc", description = "Everything Else", page = typeof(MiscSettingsPage)},
};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
using Data_Manager2.Classes;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace UWP_XMPP_Client.Pages.SettingsPages
{
Expand Down
22 changes: 22 additions & 0 deletions UWP XMPP Client/Pages/SettingsPages/SecuritySettingsPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Page x:Class="UWP_XMPP_Client.Pages.SettingsPages.SecuritySettingsPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:UWP_XMPP_Client.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<ScrollViewer VerticalScrollBarVisibility="Auto">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<controls:SettingsHeaderControl Grid.Row="0"
Icon="&#xE72E;"
Text="Security" />
<StackPanel Grid.Row="1"
Margin="10,10,10,0" />
</Grid>
</ScrollViewer>
</Page>
66 changes: 66 additions & 0 deletions UWP XMPP Client/Pages/SettingsPages/SecuritySettingsPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;

namespace UWP_XMPP_Client.Pages.SettingsPages
{
public sealed partial class SecuritySettingsPage : Page
{
//--------------------------------------------------------Attributes:-----------------------------------------------------------------\\
#region --Attributes--


#endregion
//--------------------------------------------------------Constructor:----------------------------------------------------------------\\
#region --Constructors--
/// <summary>
/// Basic Constructor
/// </summary>
/// <history>
/// 05/22/2018 Created [Fabian Sauter]
/// </history>
public SecuritySettingsPage()
{
this.InitializeComponent();
Windows.UI.Core.SystemNavigationManager.GetForCurrentView().BackRequested += AbstractBackRequestPage_BackRequested;
}

#endregion
//--------------------------------------------------------Set-, Get- Methods:---------------------------------------------------------\\
#region --Set-, Get- Methods--


#endregion
//--------------------------------------------------------Misc Methods:---------------------------------------------------------------\\
#region --Misc Methods (Public)--


#endregion

#region --Misc Methods (Private)--


#endregion

#region --Misc Methods (Protected)--


#endregion
//--------------------------------------------------------Events:---------------------------------------------------------------------\\
#region --Events--
private void AbstractBackRequestPage_BackRequested(object sender, Windows.UI.Core.BackRequestedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
if (rootFrame == null)
{
return;
}
if (rootFrame.CanGoBack && e.Handled == false)
{
e.Handled = true;
rootFrame.GoBack();
}
}

#endregion
}
}
7 changes: 7 additions & 0 deletions UWP XMPP Client/UWP XMPP Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@
<Compile Include="Pages\SettingsPages\DonateSettingsPage.xaml.cs">
<DependentUpon>DonateSettingsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\SettingsPages\SecuritySettingsPage.xaml.cs">
<DependentUpon>SecuritySettingsPage.xaml</DependentUpon>
</Compile>
<Compile Include="Pages\UserProfilePage.xaml.cs">
<DependentUpon>UserProfilePage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -624,6 +627,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\SettingsPages\SecuritySettingsPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Pages\UserProfilePage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand Down

0 comments on commit 2018c97

Please sign in to comment.