Commit 61b28428 authored by atraczyk's avatar atraczyk Committed by Nicolas Jager

integrate wizard menu and add loadpage

Change-Id: I65fe90a2155966a2631c01ed00892070e8fc4456
parent 38ce9e8a
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
**************************************************************************/ **************************************************************************/
#include "pch.h" #include "pch.h"
#include "LoadingPage.xaml.h"
#include "MainPage.xaml.h" #include "MainPage.xaml.h"
using namespace Windows::ApplicationModel::Core; using namespace Windows::ApplicationModel::Core;
...@@ -45,20 +46,16 @@ App::OnLaunched(LaunchActivatedEventArgs^ e) ...@@ -45,20 +46,16 @@ App::OnLaunched(LaunchActivatedEventArgs^ e)
rootFrame = ref new Frame(); rootFrame = ref new Frame();
if (rootFrame->Content == nullptr) if (rootFrame->Content == nullptr)
rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments); rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
Window::Current->Content = rootFrame; Window::Current->Content = rootFrame;
Window::Current->Activate(); Window::Current->Activate();
} else } else
rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments); rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
CoreApplication::GetCurrentView()->TitleBar->ExtendViewIntoTitleBar = true; CoreApplication::GetCurrentView()->TitleBar->ExtendViewIntoTitleBar = true;
ApplicationView::GetForCurrentView()->TitleBar->ButtonBackgroundColor = Colors::LightBlue; ApplicationView::GetForCurrentView()->TitleBar->ButtonBackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue; ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = Colors::White; ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = Colors::White;
ApplicationView::GetForCurrentView()->TitleBar->ButtonForegroundColor = Colors::White; ApplicationView::GetForCurrentView()->TitleBar->ButtonForegroundColor = Colors::White;
/* summon the daemon */
//RingD::instance->startDaemon(); //disabled on purpose
} }
\ No newline at end of file
<!-- **********************************************************************
* Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jäger Nicolas<nicolas.jager@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.LoadingPage"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<TextBlock Text="loading page"/>
</Grid>
</Page>
/**************************************************************************
* Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
* Author: Traczyk Andreas <traczyk.andreas@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 "LoadingPage.xaml.h"
#include "MainPage.xaml.h"
#include "Wizard.xaml.h"
using namespace RingClientUWP;
using namespace RingClientUWP::Views;
using namespace RingClientUWP::ViewModel;
using namespace Platform;
using namespace Windows::ApplicationModel::Core;
using namespace Windows::Foundation;
using namespace Windows::Foundation::Collections;
using namespace Windows::UI::ViewManagement;
using namespace Windows::UI::Xaml;
using namespace Windows::UI::Xaml::Controls;
using namespace Windows::UI::Xaml::Controls::Primitives;
using namespace Windows::UI::Core;
using namespace Windows::UI::Xaml::Data;
using namespace Windows::UI::Xaml::Input;
using namespace Windows::UI::Xaml::Interop;
using namespace Windows::UI::Xaml::Navigation;
using namespace Windows::ApplicationModel::Activation;
using namespace Windows::Graphics::Display;
using namespace Windows::System;
LoadingPage::LoadingPage()
{
InitializeComponent();
Utils::fileExists(ApplicationData::Current->LocalFolder, ".config\\dring.yml")
.then([this](bool config_exists)
{
if (config_exists) {
RingD::instance->hasConfig = true;
this->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([this] () {
this->Frame->Navigate(Windows::UI::Xaml::Interop::TypeName(MainPage::typeid));
}));
}
else {
RingD::instance->hasConfig = false;
this->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([this] () {
this->Frame->Navigate(Windows::UI::Xaml::Interop::TypeName(Wizard::typeid));
}));
}
});
}
#pragma once
/**************************************************************************
* Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jäger Nicolas <nicolas.jager@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 "LoadingPage.g.h"
namespace RingClientUWP
{
namespace Views
{
public ref class LoadingPage sealed
{
public:
LoadingPage();
};
}
}
\ No newline at end of file
...@@ -98,3 +98,9 @@ RingClientUWP::MainPage::showFrame(Windows::UI::Xaml::Controls::Frame^ frame) ...@@ -98,3 +98,9 @@ RingClientUWP::MainPage::showFrame(Windows::UI::Xaml::Controls::Frame^ frame)
dynamic_cast<MessageTextPage^>(_messageTextFrame_->Content)->updatePageContent(); dynamic_cast<MessageTextPage^>(_messageTextFrame_->Content)->updatePageContent();
} }
} }
void
RingClientUWP::MainPage::OnNavigatedTo(NavigationEventArgs ^ e)
{
RingD::instance->startDaemon();
}
\ No newline at end of file
...@@ -31,6 +31,7 @@ public: ...@@ -31,6 +31,7 @@ public:
MainPage(); MainPage();
protected: protected:
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
virtual void OnKeyDown(KeyRoutedEventArgs^ e) override; virtual void OnKeyDown(KeyRoutedEventArgs^ e) override;
private: private:
void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
......
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp"> <Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Name="2385953f-9019-423d-aa82-d1bbacfa258b" Publisher="CN=user" Version="1.0.0.0" /> <Identity Name="00000000-0000-0000-0000-000000000000" Publisher="CN=user" Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="2385953f-9019-423d-aa82-d1bbacfa258b" PhonePublisherId="00000000-0000-0000-0000-000000000000" /> <mp:PhoneIdentity PhoneProductId="2385953f-9019-423d-aa82-d1bbacfa258b" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties> <Properties>
<DisplayName>ring-client-uwp</DisplayName> <DisplayName>ring-client-uwp</DisplayName>
......
/************************************************************************** /**************************************************************************
* Copyright (C) 2016 by Savoir-faire Linux * * Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> * * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> *
* * * *
* This program is free software; you can redistribute it and/or modify * * 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 * * it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 3 of the License, or * * the Free Software Foundation; either version 3 of the License, or *
* (at your option) any later version. * * (at your option) any later version. *
* * * *
* This program is distributed in the hope that it will be useful, * * This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of * * but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. * * GNU General Public License for more details. *
* * * *
* You should have received a copy of the GNU General Public License * * You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. * * along with this program. If not, see <http://www.gnu.org/licenses/>. *
**************************************************************************/ **************************************************************************/
#include "pch.h" #include "pch.h"
#include "RingConsolePanel.xaml.h" #include "RingConsolePanel.xaml.h"
using namespace RingClientUWP; using namespace RingClientUWP;
using namespace RingClientUWP::Views; using namespace RingClientUWP::Views;
using namespace Windows::ApplicationModel::Core; using namespace Windows::ApplicationModel::Core;
using namespace Windows::UI::Core; using namespace Windows::UI::Core;
using namespace Windows::UI::Xaml::Documents; using namespace Windows::UI::Xaml::Documents;
RingConsolePanel::RingConsolePanel() RingConsolePanel::RingConsolePanel()
{ {
InitializeComponent(); InitializeComponent();
RingDebug::instance->messageToScreen += ref new debugMessageToScreen([this](Platform::String^ message) { RingDebug::instance->messageToScreen += ref new debugMessageToScreen([this](Platform::String^ message) {
output(message); output(message);
}); });
} }
void void
RingConsolePanel::output(Platform::String^ message) RingConsolePanel::output(Platform::String^ message)
{ {
try { try {
Run^ inlineText = ref new Run(); Run^ inlineText = ref new Run();
inlineText->Text = message; inlineText->Text = message;
Paragraph^ paragraph = ref new Paragraph(); Paragraph^ paragraph = ref new Paragraph();
paragraph->Inlines->Append(inlineText); paragraph->Inlines->Append(inlineText);
_debugWindowOutput_->Blocks->Append(paragraph); _debugWindowOutput_->Blocks->Append(paragraph);
_scrollView_->UpdateLayout(); _scrollView_->UpdateLayout();
_scrollView_->ScrollToVerticalOffset(_scrollView_->ScrollableHeight); _scrollView_->ScrollToVerticalOffset(_scrollView_->ScrollableHeight);
} }
catch (Platform::Exception^ e) { catch (Platform::Exception^ e) {
return; return;
} }
} }
void RingConsolePanel::_btnSendDbgCmd__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) void RingConsolePanel::_btnSendDbgCmd__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{ {
sendCommand(); sendCommand();
} }
void RingConsolePanel::_sendDbgCmd__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) void RingConsolePanel::_sendDbgCmd__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
{ {
if (e->Key == Windows::System::VirtualKey::Enter && _tBoxDbg_->Text != "") { if (e->Key == Windows::System::VirtualKey::Enter && _tBoxDbg_->Text != "") {
sendCommand(); sendCommand();
} }
else if (e->Key == Windows::System::VirtualKey::PageUp) { else if (e->Key == Windows::System::VirtualKey::PageUp) {
if (historyLevel < 1) if (historyLevel < 1)
return; return;
if (historyLevel == historyCmds.Size) if (historyLevel == historyCmds.Size)
currentCmd = _tBoxDbg_->Text; currentCmd = _tBoxDbg_->Text;
historyLevel--; historyLevel--;
_tBoxDbg_->Text = historyCmds.GetAt(historyLevel); _tBoxDbg_->Text = historyCmds.GetAt(historyLevel);
} }
else if (e->Key == Windows::System::VirtualKey::PageDown) { else if (e->Key == Windows::System::VirtualKey::PageDown) {
if (historyLevel < historyCmds.Size) { if (historyLevel < historyCmds.Size) {
_tBoxDbg_->Text = historyCmds.GetAt(historyLevel); _tBoxDbg_->Text = historyCmds.GetAt(historyLevel);
historyLevel++; historyLevel++;
} }
else { else {
_tBoxDbg_->Text = currentCmd; _tBoxDbg_->Text = currentCmd;
} }
return; return;
} }
} }
/*\ ADD EACH NEW COMMAND TO THE HELP LIST \*/ /*\ ADD EACH NEW COMMAND TO THE HELP LIST \*/
void RingConsolePanel::sendCommand() void RingConsolePanel::sendCommand()
{ {
auto cmdInput = _tBoxDbg_->Text; auto cmdInput = _tBoxDbg_->Text;
addCommandToHistory(); addCommandToHistory();
historyLevel++; historyLevel++;
_tBoxDbg_->Text = ""; _tBoxDbg_->Text = "";
currentCmd = ""; currentCmd = "";
historyLevel = historyCmds.Size; historyLevel = historyCmds.Size;
if (cmdInput == "") { if (cmdInput == "") {
return; return;
} }
else if (cmdInput == "help") { else if (cmdInput == "help") {
MSG_(">> Help :"); MSG_(">> Help :");
MSG_("use PgUp/PgDown for crawling commands history."); MSG_("use PgUp/PgDown for crawling commands history.");
return; return;
} }
std::wstring wStr(cmdInput->Begin()); std::wstring wStr(cmdInput->Begin());
std::string result(wStr.begin(), wStr.end()); std::string result(wStr.begin(), wStr.end());
MSG_(">> error, command \'" + result + "\' not found"); MSG_(">> error, command \'" + result + "\' not found");
} }
void RingConsolePanel::addCommandToHistory() void RingConsolePanel::addCommandToHistory()
{ {
historyCmds.Append(_tBoxDbg_->Text); historyCmds.Append(_tBoxDbg_->Text);
} }
...@@ -33,9 +33,6 @@ using namespace Windows::UI::Core; ...@@ -33,9 +33,6 @@ using namespace Windows::UI::Core;
using namespace RingClientUWP; using namespace RingClientUWP;
CoreDispatcher^ g_dispatcher;
bool has_config;
void void
DebugOutputWrapper(const std::string& str) DebugOutputWrapper(const std::string& str)
{ {
...@@ -45,101 +42,88 @@ DebugOutputWrapper(const std::string& str) ...@@ -45,101 +42,88 @@ DebugOutputWrapper(const std::string& str)
void void
RingClientUWP::RingD::startDaemon() RingClientUWP::RingD::startDaemon()
{ {
g_dispatcher = CoreApplication::MainView->CoreWindow->Dispatcher; create_task([&]()
Utils::fileExists(ApplicationData::Current->LocalFolder, ".config\\dring.yml")
.then([this](bool config_exists)
{ {
if (!config_exists) { using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
has_config = false; using namespace std::placeholders;
}
else { std::map<std::string, SharedCallback> callHandlers = {
has_config = true; // use IncomingCall only to register the call client sided, use StateChange to determine the impact on the UI
} DRing::exportable_callback<DRing::CallSignal::IncomingCall>([this](
}) const std::string& accountId,
.then([this]() { const std::string& callId,
create_task([&]() const std::string& from)
{ {
using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>; MSG_("<IncomingCall>");
using namespace std::placeholders; MSG_("accountId = " + accountId);
MSG_("callId = " + callId);
std::map<std::string, SharedCallback> callHandlers = { MSG_("from = " + from);
// use IncomingCall only to register the call client sided, use StateChange to determine the impact on the UI }),
DRing::exportable_callback<DRing::CallSignal::IncomingCall>([this]( DRing::exportable_callback<DRing::CallSignal::StateChange>([this](
const std::string& accountId, const std::string& callId,
const std::string& callId, const std::string& state,
const std::string& from) int code)
{ {
MSG_("<IncomingCall>"); MSG_("<StateChange>");
MSG_("accountId = " + accountId); MSG_("callId = " + callId);
MSG_("callId = " + callId); MSG_("state = " + state);
MSG_("from = " + from); MSG_("code = " + std::to_string(code));
}), }),
DRing::exportable_callback<DRing::CallSignal::StateChange>([this]( DRing::exportable_callback<DRing::ConfigurationSignal::IncomingAccountMessage>([this](
const std::string& callId, const std::string& accountId,
const std::string& state, const std::string& from,
int code) const std::map<std::string, std::string>& payloads)
{ {
MSG_("<StateChange>"); MSG_("<IncomingAccountMessage>");
MSG_("callId = " + callId); MSG_("accountId = " + accountId);
MSG_("state = " + state); MSG_("from = " + from);
MSG_("code = " + std::to_string(code));
}),
DRing::exportable_callback<DRing::ConfigurationSignal::IncomingAccountMessage>([this](
const std::string& accountId,
const std::string& from,
const std::map<std::string, std::string>& payloads)
{
MSG_("<IncomingAccountMessage>");
MSG_("accountId = " + accountId);
MSG_("from = " + from);
for (auto i : payloads) { for (auto i : payloads) {
MSG_("payload = " + i.second); MSG_("payload = " + i.second);
auto payload = Utils::toPlatformString(i.second); auto payload = Utils::toPlatformString(i.second);
} }
}) })
}; };
registerCallHandlers(callHandlers); registerCallHandlers(callHandlers);
std::map<std::string, SharedCallback> dringDebugOutHandler; std::map<std::string, SharedCallback> dringDebugOutHandler;
dringDebugOutHandler.insert(DRing::exportable_callback<DRing::Debug::MessageSend> dringDebugOutHandler.insert(DRing::exportable_callback<DRing::Debug::MessageSend>
(std::bind(&DebugOutputWrapper, _1))); (std::bind(&DebugOutputWrapper, _1)));
registerCallHandlers(dringDebugOutHandler); registerCallHandlers(dringDebugOutHandler);
std::map<std::string, SharedCallback> getAppPathHandler = std::map<std::string, SharedCallback> getAppPathHandler =
{
DRing::exportable_callback<DRing::ConfigurationSignal::GetAppDataPath>
([this](std::vector<std::string>* paths){
paths->emplace_back(localFolder_);
})
};
registerCallHandlers(getAppPathHandler);
DRing::init(static_cast<DRing::InitFlag>(DRing::DRING_FLAG_CONSOLE_LOG |
DRing::DRING_FLAG_DEBUG |
DRing::DRING_FLAG_AUTOANSWER));
if (!DRing::start()) {
ERR_("\ndaemon didn't start.\n");
return;
}
else {
if (!hasConfig)
{ {
DRing::exportable_callback<DRing::ConfigurationSignal::GetAppDataPath> std::map<std::string, std::string> test_details;
([this](std::vector<std::string>* paths) { test_details.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_ALIAS, accountName));
paths->emplace_back(localFolder_); test_details.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_TYPE,"RING"));
}) DRing::addAccount(test_details);
};
registerCallHandlers(getAppPathHandler);
DRing::init(static_cast<DRing::InitFlag>(DRing::DRING_FLAG_CONSOLE_LOG |
DRing::DRING_FLAG_DEBUG |
DRing::DRING_FLAG_AUTOANSWER));
if (!DRing::start()) {
ERR_("\ndaemon didn't start.\n");
return;
} }
else { // if there is no config, create a default RING account
// if there is no config, create a default RING account while (true) {
if (!has_config) { DRing::pollEvents();
std::map<std::string, std::string> test_details; Sleep(1000);
test_details.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_ALIAS, "default"));
test_details.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_TYPE, "RING"));
DRing::addAccount(test_details);
}
while (true) {
DRing::pollEvents();
Sleep(1000);
}
DRing::fini();
} }
}); DRing::fini();
}
}); });
} }
......
...@@ -45,15 +45,17 @@ public: ...@@ -45,15 +45,17 @@ public:
/* properties */ /* properties */
/* functions */ /* functions */
internal: internal:
void startDaemon(); void startDaemon();
void stopDaemon(); bool hasConfig;
std::string accountName;
private: private:
RingD(); // singleton RingD(); // singleton
std::string localFolder_; std::string localFolder_;
bool daemonRunning_ = false; bool daemonRunning_ = false;
}; };
} }
\ No newline at end of file
<!-- ********************************************************************** <!-- **********************************************************************
* Copyright (C) 2016 by Savoir-faire Linux * * Copyright (C) 2016 by Savoir-faire Linux *
* Author: Jäger Nicolas<nicolas.jager@savoirfairelinux.com> * * 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 * * 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 * * it under the terms of the GNU General Public License as published by *
...@@ -82,7 +83,7 @@ ...@@ -82,7 +83,7 @@
<Style x:Key="ButtonStyle2" <Style x:Key="ButtonStyle2"
TargetType="Button"> TargetType="Button">
<Setter Property="Width" <Setter Property="Width"
Value="50"/> Value="400"/>
<Setter Property="Height" <Setter Property="Height"
Value="30"/> Value="30"/>
<Setter Property="FontFamily" <Setter Property="FontFamily"
...@@ -107,6 +108,13 @@ ...@@ -107,6 +108,13 @@
<Setter Property="FontSize" <Setter Property="FontSize"
Value="70"/> Value="70"/>
</Style> </Style>
<Style x:Key="ButtonStyle4"
TargetType="Button">
<Setter Property="Foreground"
Value="White"/>
<Setter Property="Background"
Value="LightBlue"/>
</Style>
<Style x:Key="ToggleButtonStyle1" <Style x:Key="ToggleButtonStyle1"
TargetType="ToggleButton"> TargetType="ToggleButton">
<Setter Property="Width" <Setter Property="Width"
......
<Page
x:Class="RingClientUWP.Views.Wizard"
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"
mc:Ignorable="d">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Rectangle Fill="LightBlue"
Grid.Row="0"/>
<StackPanel Grid.Row="1" Width="400">
<Rectangle Height="50"/>
<StackPanel Height="auto"
Background="LightBlue"
Grid.Column="0">
<TextBlock x:Name="_showCreateAccountMenuTitle_"
Text="Create New Account"
Foreground="White"
FontSize="30"
HorizontalAlignment="Center"/>
<Button x:Name="_showCreateAccountMenuBtn_"
Content="Create New Account"
Visibility="Collapsed"
HorizontalAlignment="Center"
Style="{StaticResource ButtonStyle4}"
Click="_showCreateAccountMenuBtn__Click"/>
<Grid x:Name="_accountCreationMenuGrid_"
Background="LightBlue"
Visibility="Visible">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Vertical"
Grid.Row="0"
Background="#FFE4F1F9">
<Button x:Name="_avatarWebcamCaptureBtn_"
Margin="0,10,0,0"
VerticalAlignment="Center"
Content="&#xE8B8;"
Style="{StaticResource ButtonStyle3}"
HorizontalAlignment="Center"/>
<!-- RING account. -->
<StackPanel x:Name="_ringAccountCreationStack_"
Visibility="Visible">
<TextBox x:Name="_aliasTextBox_"