Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 1 | /**************************************************************************
|
| 2 | * Copyright (C) 2016 by Savoir-faire Linux *
|
| 3 | * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
|
| 4 | * *
|
| 5 | * This program is free software; you can redistribute it and/or modify *
|
| 6 | * it under the terms of the GNU General Public License as published by *
|
| 7 | * the Free Software Foundation; either version 3 of the License, or *
|
| 8 | * (at your option) any later version. *
|
| 9 | * *
|
| 10 | * This program is distributed in the hope that it will be useful, *
|
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
| 13 | * GNU General Public License for more details. *
|
| 14 | * *
|
| 15 | * You should have received a copy of the GNU General Public License *
|
| 16 | * along with this program. If not, see <http://www.gnu.org/licenses/>. *
|
| 17 | **************************************************************************/
|
| 18 | #include "pch.h"
|
| 19 |
|
atraczyk | 61b2842 | 2016-08-24 09:25:59 -0400 | [diff] [blame] | 20 | #include "LoadingPage.xaml.h"
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 21 | #include "MainPage.xaml.h"
|
| 22 |
|
| 23 | using namespace Windows::ApplicationModel::Core;
|
| 24 | using namespace Windows::Foundation;
|
| 25 | using namespace Windows::Graphics::Display;
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 26 | using namespace Windows::UI;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 27 | using namespace Windows::UI::Xaml;
|
| 28 | using namespace Windows::UI::Xaml::Controls;
|
| 29 | using namespace Windows::UI::Xaml::Interop;
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 30 | using namespace Windows::UI::Xaml::Media;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 31 | using namespace Windows::UI::ViewManagement;
|
| 32 |
|
| 33 | using namespace RingClientUWP;
|
| 34 |
|
| 35 | App::App()
|
| 36 | {
|
| 37 | InitializeComponent(); // summon partial class, form generated files trough App.xaml
|
| 38 | }
|
| 39 |
|
| 40 | void
|
| 41 | App::OnLaunched(LaunchActivatedEventArgs^ e)
|
| 42 | {
|
| 43 | rootFrame = dynamic_cast<Frame^>(Window::Current->Content);
|
| 44 |
|
| 45 | if (rootFrame == nullptr) {
|
| 46 | rootFrame = ref new Frame();
|
| 47 |
|
| 48 | if (rootFrame->Content == nullptr)
|
atraczyk | 61b2842 | 2016-08-24 09:25:59 -0400 | [diff] [blame] | 49 | rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 50 |
|
| 51 | Window::Current->Content = rootFrame;
|
| 52 | Window::Current->Activate();
|
| 53 | } else
|
atraczyk | 61b2842 | 2016-08-24 09:25:59 -0400 | [diff] [blame] | 54 | rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 55 |
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 56 | ApplicationView::GetForCurrentView()->TitleBar->ButtonBackgroundColor = Colors::LightBlue;
|
atraczyk | 0cf42d7 | 2016-09-06 11:16:37 -0400 | [diff] [blame] | 57 | ApplicationView::GetForCurrentView()->TitleBar->InactiveBackgroundColor = Colors::LightBlue;
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 58 | ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue;
|
atraczyk | 0cf42d7 | 2016-09-06 11:16:37 -0400 | [diff] [blame] | 59 | ApplicationView::GetForCurrentView()->TitleBar->BackgroundColor = Colors::LightBlue;
|
Nicolas Jager | 1586120 | 2016-08-12 11:13:05 -0400 | [diff] [blame] | 60 | ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = Colors::White;
|
| 61 | ApplicationView::GetForCurrentView()->TitleBar->ButtonForegroundColor = Colors::White;
|
Nicolas Jager | 998fbd7 | 2016-08-08 11:41:28 -0400 | [diff] [blame] | 62 | } |