Skip to content
Snippets Groups Projects
Commit bee4271f authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Andreas Traczyk
Browse files

ui/ux: add about page

Change-Id: I8a46ee316e6682b0e860e51e76972dd65430dea8
Tuleap: #790
parent 8c4ce963
No related branches found
No related tags found
No related merge requests found
<!-- **********************************************************************
* Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jäger Nicolas<nicolas.jager@savoirfairelinux.com> *
* Author: Traczyk Andreas<andreas.traczyk@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/> . *
*********************************************************************** -->
<Page x:Class="RingClientUWP.Views.AboutPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RingClientUWP"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
NavigationCacheMode="Enabled"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0"
Margin="24">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<Button x:Name="_aboutBasicButton_"
Content="About"
Margin="0,0,6,0"
BorderThickness="0"
FontSize="12"
Click="_aboutBasicButton__Click"
/>
<Button x:Name="_aboutCreditsButton_"
Content="Credits"
Margin="0,0,6,0"
BorderThickness="0"
FontSize="12"
Click="_aboutCreditsButton__Click"
/>
<Button x:Name="_aboutCloseButton_"
Content="Close"
Margin="0,0,6,0"
BorderThickness="0"
FontSize="12"
Click="_aboutCloseButton__Click"
/>
</StackPanel>
<Image x:Name="_welcomeImage_"
Source="Assets\Wide310x150Logo.scale-200.png"
Width="310"
HorizontalAlignment="Center"
Margin="0 10 0 30"
Height="150"/>
<Grid x:Name="_aboutNavGrid_">
<Grid.RowDefinitions>
<RowDefinition Height="0"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ScrollViewer x:Name="_aboutScrollViewer_"
Grid.Row="1"
VerticalScrollBarVisibility="Hidden">
<StackPanel MaxWidth="500"
Width="310">
<TextBlock Text="Ring v2.0.0"
TextWrapping="Wrap"
TextAlignment="Justify"
Margin="0,0,0,24"
FontSize="12"
FontWeight="Bold"
HorizontalAlignment="Center"/>
<TextBlock Text="version:"
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="12"
HorizontalAlignment="Center"/>
<TextBlock Text="Release: Alpha - Gaston Miron"
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="12"
HorizontalAlignment="Center"/>
<TextBlock Text="The Microsoft Windows Runtime client for Ring."
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="12"
HorizontalAlignment="Center"/>
<TextBlock Text="Ring is a secured and distributed communication software."
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="12"
HorizontalAlignment="Center"/>
<HyperlinkButton Content="www.ring.cx"
FontSize="10"
NavigateUri="http://ring.cx"
HorizontalAlignment="Center"/>
<TextBlock Text="© 2015-2016 Savoir-faire Linux"
Margin="0,24,0,0"
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="10"
HorizontalAlignment="Center"/>
<TextBlock Text="This program comes with absolutely no warranty"
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="10"
HorizontalAlignment="Center"/>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<TextBlock Text="See the "
Margin="0,0,4,0"
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="10"/>
<HyperlinkButton Content="GNU General Public License, version 3 or later"
FontSize="10"
NavigateUri="https://www.gnu.org/licenses/gpl-3.0.en.html">
<HyperlinkButton.RenderTransform>
<TranslateTransform Y="-6"/>
</HyperlinkButton.RenderTransform>
</HyperlinkButton>
<TextBlock Text=" for details."
TextWrapping="Wrap"
TextAlignment="Justify"
FontSize="10"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
<ScrollViewer x:Name="_creditsScrollViewer_"
Grid.Row="0"
VerticalScrollBarVisibility="Visible"
Height="auto"
MaxHeight="200"
Margin="24,0,24,24"
BorderBrush="Black"
BorderThickness="1">
<StackPanel>
<TextBlock Text="Created by:"
Margin="0,0,0,0"
TextWrapping="Wrap"
TextAlignment="Center"
FontWeight="Bold"
FontSize="12"
HorizontalAlignment="Center"/>
<TextBlock Margin="0,0,0,0"
TextWrapping="Wrap"
TextAlignment="Center"
FontSize="12"
HorizontalAlignment="Center">
<LineBreak/> Created by:
<LineBreak/> Adrien Béraud
<LineBreak/> Alexandr Sergheev
<LineBreak/> Alexandre Lision
<LineBreak/> Alexandre Viau
<LineBreak/> Aline Bonnet
<LineBreak/> Andreas Traczyk
<LineBreak/> Anthony Léonard
<LineBreak/> Cyrille Béraud
<LineBreak/> Dorina Mosku
<LineBreak/> Édric Milaret
<LineBreak/> Éloi Bail
<LineBreak/> Emmanuel Lepage-Vallée
<LineBreak/> Frédéric Guimont
<LineBreak/> Guillaume Roguez
<LineBreak/> Julien Grossholtz
<LineBreak/> Loïc Siret
<LineBreak/> Nicolas Jäger
<LineBreak/> Nicolas Reynaud
<LineBreak/> Olivier Gregoire
<LineBreak/> Olivier Soldano
<LineBreak/> Patrick Keroulas
<LineBreak/> Philippe Gorley
<LineBreak/> Romain Bertozzi
<LineBreak/> Seva Ivanov
<LineBreak/> Simon Désaulniers
<LineBreak/> Stepan Salenikovich
<LineBreak/> Simon Zeni
<LineBreak/> Thibault Wittemberg
</TextBlock>
<TextBlock Text="Artwork by:"
Margin="0,0,0,0"
TextWrapping="Wrap"
TextAlignment="Center"
FontWeight="Bold"
FontSize="12"
HorizontalAlignment="Center"/>
<TextBlock Margin="0,0,0,0"
TextWrapping="Wrap"
TextAlignment="Center"
FontSize="12"
HorizontalAlignment="Center">
Marianne Forget
<LineBreak/>
<LineBreak/> Based on the SFLPhone project
</TextBlock>
</StackPanel>
</ScrollViewer>
</Grid>
</StackPanel>
</Grid>
</Page>
/**************************************************************************
* Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jger Nicolas <nicolas.jager@savoirfairelinux.com> *
* Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#include "pch.h"
#include "AboutPage.xaml.h"
using namespace RingClientUWP;
using namespace RingClientUWP::Views;
using namespace Windows::UI::ViewManagement;
using namespace Windows::UI::Core;
using namespace Windows::UI::Xaml::Controls;
AboutPage::AboutPage()
{
InitializeComponent();
};
void RingClientUWP::Views::AboutPage::_aboutBasicButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
_aboutNavGrid_->SetRow(_aboutScrollViewer_, 1);
_aboutNavGrid_->SetRow(_creditsScrollViewer_, 0);
}
void RingClientUWP::Views::AboutPage::_aboutCreditsButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
_aboutNavGrid_->SetRow(_aboutScrollViewer_, 0);
_aboutNavGrid_->SetRow(_creditsScrollViewer_, 1);
}
void RingClientUWP::Views::AboutPage::_aboutCloseButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
auto rootFrame = dynamic_cast<Windows::UI::Xaml::Controls::Frame^>(Window::Current->Content);
rootFrame->Navigate(Windows::UI::Xaml::Interop::TypeName(MainPage::typeid), true);
}
/**************************************************************************
* Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jger Nicolas <nicolas.jager@savoirfairelinux.com> *
* Author: Traczyk Andreas <andreas.traczyk@savoirfairelinux.com> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/
#pragma once
#include "AboutPage.g.h"
namespace RingClientUWP
{
namespace Views
{
public ref class AboutPage sealed
{
public:
AboutPage();
private:
void _aboutBasicButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void _aboutCreditsButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
void _aboutCloseButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
};
}
}
\ No newline at end of file
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "VideoPage.xaml.h" #include "VideoPage.xaml.h"
#include "PreviewPage.xaml.h" #include "PreviewPage.xaml.h"
#include "WelcomePage.xaml.h" #include "WelcomePage.xaml.h"
#include "AboutPage.xaml.h"
#include "MainPage.xaml.h" #include "MainPage.xaml.h"
...@@ -74,6 +75,7 @@ MainPage::MainPage() ...@@ -74,6 +75,7 @@ MainPage::MainPage()
smartPanel->summonPreviewPage += ref new RingClientUWP::SummonPreviewPage(this, &RingClientUWP::MainPage::OnsummonPreviewPage); smartPanel->summonPreviewPage += ref new RingClientUWP::SummonPreviewPage(this, &RingClientUWP::MainPage::OnsummonPreviewPage);
smartPanel->hidePreviewPage += ref new RingClientUWP::HidePreviewPage(this, &RingClientUWP::MainPage::OnhidePreviewPage); smartPanel->hidePreviewPage += ref new RingClientUWP::HidePreviewPage(this, &RingClientUWP::MainPage::OnhidePreviewPage);
smartPanel->summonVideoPage += ref new RingClientUWP::SummonVideoPage(this, &RingClientUWP::MainPage::OnsummonVideoPage); smartPanel->summonVideoPage += ref new RingClientUWP::SummonVideoPage(this, &RingClientUWP::MainPage::OnsummonVideoPage);
auto videoPage = dynamic_cast<VideoPage^>(_videoFrame_->Content); auto videoPage = dynamic_cast<VideoPage^>(_videoFrame_->Content);
videoPage->pressHangUpCall += ref new RingClientUWP::PressHangUpCall(this, &RingClientUWP::MainPage::OnpressHangUpCall); videoPage->pressHangUpCall += ref new RingClientUWP::PressHangUpCall(this, &RingClientUWP::MainPage::OnpressHangUpCall);
auto messageTextFrame = dynamic_cast<MessageTextPage^>(_messageTextFrame_->Content); auto messageTextFrame = dynamic_cast<MessageTextPage^>(_messageTextFrame_->Content);
...@@ -143,25 +145,12 @@ RingClientUWP::MainPage::showFrame(Windows::UI::Xaml::Controls::Frame^ frame) ...@@ -143,25 +145,12 @@ RingClientUWP::MainPage::showFrame(Windows::UI::Xaml::Controls::Frame^ frame)
void void
RingClientUWP::MainPage::OnNavigatedTo(NavigationEventArgs ^ e) RingClientUWP::MainPage::OnNavigatedTo(NavigationEventArgs ^ e)
{ {
auto iter = BackgroundTaskRegistration::AllTasks->First(); bool fromAboutPage = (e->Parameter != nullptr) ? safe_cast<bool>(e->Parameter) : false;
auto hascur = iter->HasCurrent; if (!fromAboutPage) {
while (hascur)
{
auto cur = iter->Current->Value;
cur->Unregister(true);
hascur = iter->MoveNext();
}
BackgroundExecutionManager::RequestAccessAsync();
BackgroundTaskBuilder^ builder = ref new BackgroundTaskBuilder();
builder->Name = "CallRefusalBackgroundTask";
//builder->TaskEntryPoint = "RingClientUWP.BackgroundActivity";
builder->SetTrigger(ref new ToastNotificationActionTrigger());
BackgroundTaskRegistration^ registration = builder->Register();
RingD::instance->init(); RingD::instance->init();
showLoadingOverlay(true, false); showLoadingOverlay(true, false);
} }
}
void void
RingClientUWP::MainPage::showLoadingOverlay(bool load, bool modal) RingClientUWP::MainPage::showLoadingOverlay(bool load, bool modal)
......
...@@ -50,6 +50,14 @@ ...@@ -50,6 +50,14 @@
FontSize="12" FontSize="12"
FontWeight="Bold" FontWeight="Bold"
HorizontalAlignment="Center"/> HorizontalAlignment="Center"/>
<Button x:Name="_aboutButton_"
Margin="0,48,0,0"
BorderThickness="0"
FontSize="12"
HorizontalAlignment="Center"
Content="About"
Click="_aboutButton__Click"
/>
</StackPanel> </StackPanel>
</Grid> </Grid>
......
...@@ -19,10 +19,15 @@ ...@@ -19,10 +19,15 @@
#include "pch.h" #include "pch.h"
#include "WelcomePage.xaml.h" #include "WelcomePage.xaml.h"
#include "AboutPage.xaml.h"
using namespace RingClientUWP; using namespace RingClientUWP;
using namespace RingClientUWP::Views; using namespace RingClientUWP::Views;
using namespace Windows::UI::ViewManagement;
using namespace Windows::UI::Core;
using namespace Windows::UI::Xaml::Controls;
WelcomePage::WelcomePage() WelcomePage::WelcomePage()
{ {
InitializeComponent(); InitializeComponent();
...@@ -46,3 +51,34 @@ WelcomePage::OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeCha ...@@ -46,3 +51,34 @@ WelcomePage::OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeCha
{ {
//PositionImage(); //PositionImage();
} }
void RingClientUWP::Views::WelcomePage::_aboutButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
// new window?
/*auto currentAV = ApplicationView::GetForCurrentView();
auto newAV = CoreApplication::CreateNewView();
newAV->Dispatcher->RunAsync(CoreDispatcherPriority::Normal,
ref new DispatchedHandler([=]()
{
auto newWindow = Window::Current;
auto newAppView = ApplicationView::GetForCurrentView();
newAppView->Title = "About";
auto frame = ref new Windows::UI::Xaml::Controls::Frame();
frame->Navigate(Windows::UI::Xaml::Interop::TypeName(Views::AboutPage::typeid));
newWindow->Content = frame;
newWindow->Activate();
ApplicationViewSwitcher::TryShowAsStandaloneAsync(
newAppView->Id,
ViewSizePreference::UseMinimum,
currentAV->Id,
ViewSizePreference::UseMinimum);
RingD::instance->isInAbout = true;
newAppView->TryResizeView(Size(200, 200));
}));*/
auto rootFrame = dynamic_cast<Windows::UI::Xaml::Controls::Frame^>(Window::Current->Content);
rootFrame->Navigate(Windows::UI::Xaml::Interop::TypeName(Views::AboutPage::typeid));
}
...@@ -22,6 +22,9 @@ ...@@ -22,6 +22,9 @@
namespace RingClientUWP namespace RingClientUWP
{ {
delegate void SummonAboutPage();
namespace Views namespace Views
{ {
public ref class WelcomePage sealed public ref class WelcomePage sealed
...@@ -31,6 +34,10 @@ public: ...@@ -31,6 +34,10 @@ public:
protected: protected:
void PositionImage(); void PositionImage();
void OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e); void OnResize(Platform::Object^ sender, Windows::UI::Core::WindowSizeChangedEventArgs^ e);
private:
void _aboutButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
internal:
event SummonAboutPage^ summonAboutPage;
}; };
} }
} }
\ No newline at end of file
...@@ -168,6 +168,9 @@ ...@@ -168,6 +168,9 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="AboutPage.xaml.h">
<DependentUpon>AboutPage.xaml</DependentUpon>
</ClInclude>
<ClInclude Include="Account.h" /> <ClInclude Include="Account.h" />
<ClInclude Include="AccountListItem.h" /> <ClInclude Include="AccountListItem.h" />
<ClInclude Include="AccountListItemsViewModel.h" /> <ClInclude Include="AccountListItemsViewModel.h" />
...@@ -231,6 +234,7 @@ ...@@ -231,6 +234,7 @@
<ApplicationDefinition Include="App.xaml"> <ApplicationDefinition Include="App.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
</ApplicationDefinition> </ApplicationDefinition>
<Page Include="AboutPage.xaml" />
<Page Include="LoadingPage.xaml" /> <Page Include="LoadingPage.xaml" />
<Page Include="MainPage.xaml"> <Page Include="MainPage.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
...@@ -299,6 +303,9 @@ ...@@ -299,6 +303,9 @@
<Image Include="Assets\Wide310x150Logo.scale-200.png" /> <Image Include="Assets\Wide310x150Logo.scale-200.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="AboutPage.xaml.cpp">
<DependentUpon>AboutPage.xaml</DependentUpon>
</ClCompile>
<ClCompile Include="Account.cpp" /> <ClCompile Include="Account.cpp" />
<ClCompile Include="AccountListItem.cpp" /> <ClCompile Include="AccountListItem.cpp" />
<ClCompile Include="AccountListItemsViewModel.cpp" /> <ClCompile Include="AccountListItemsViewModel.cpp" />
......
...@@ -277,6 +277,9 @@ ...@@ -277,6 +277,9 @@
<Page Include="PreviewPage.xaml"> <Page Include="PreviewPage.xaml">
<Filter>Views</Filter> <Filter>Views</Filter>
</Page> </Page>
<Page Include="AboutPage.xaml">
<Filter>Views</Filter>
</Page>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Filter Include="Assets"> <Filter Include="Assets">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment