Skip to content

Commit

Permalink
Created Requests page (#548)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Peyronnet committed Apr 13, 2024
1 parent 4d8fccc commit 874852f
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
40 changes: 40 additions & 0 deletions InternetTest/InternetTest/Pages/RequestsPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<Page
x:Class="InternetTest.Pages.RequestsPage"
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:lang="clr-namespace:InternetTest.Properties"
xmlns:local="clr-namespace:InternetTest.Pages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
Title="RequestsPage"
d:Background="White"
d:DesignHeight="450"
d:DesignWidth="800"
Background="Transparent"
FontFamily="../Fonts/#Hauora"
Foreground="{DynamicResource Foreground1}"
mc:Ignorable="d">

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>

<StackPanel Margin="10" Orientation="Horizontal">
<TextBlock
VerticalAlignment="Center"
FontFamily="../Fonts/#FluentSystemIcons-Regular"
FontSize="16"
Foreground="{DynamicResource Accent}"
Text="&#xF699;" />
<TextBlock
x:Name="TitleTxt"
Margin="5 0 0 0"
VerticalAlignment="Center"
d:Text="{x:Static lang:Resources.Requests}"
FontSize="14"
FontWeight="ExtraBold" />
</StackPanel>
</Grid>
</Page>
60 changes: 60 additions & 0 deletions InternetTest/InternetTest/Pages/RequestsPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
MIT License
Copyright (c) Léo Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/

using InternetTest.Classes;
using Synethia;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace InternetTest.Pages;
/// <summary>
/// Interaction logic for RequestsPage.xaml
/// </summary>
public partial class RequestsPage : Page
{
bool codeInjected = !Global.Settings.UseSynethia;
public RequestsPage()
{
InitializeComponent();
InitUI(); // Load the UI
Loaded += (o, e) => SynethiaManager.InjectSynethiaCode(this, Global.SynethiaConfig.PagesInfo, 8, ref codeInjected);
}

private void InitUI()
{
TitleTxt.Text = $"{Properties.Resources.Commands} > {Properties.Resources.Requests}";
}
}

0 comments on commit 874852f

Please sign in to comment.