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 @@
**************************************************************************/
#include "pch.h"
#include "LoadingPage.xaml.h"
#include "MainPage.xaml.h"
using namespace Windows::ApplicationModel::Core;
......@@ -45,20 +46,16 @@ App::OnLaunched(LaunchActivatedEventArgs^ e)
rootFrame = ref new Frame();
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->Activate();
} else
rootFrame->Navigate(TypeName(MainPage::typeid), e->Arguments);
rootFrame->Navigate(TypeName(Views::LoadingPage::typeid), e->Arguments);
CoreApplication::GetCurrentView()->TitleBar->ExtendViewIntoTitleBar = true;
ApplicationView::GetForCurrentView()->TitleBar->ButtonBackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->ButtonInactiveBackgroundColor = Colors::LightBlue;
ApplicationView::GetForCurrentView()->TitleBar->ForegroundColor = 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)
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:
MainPage();
protected:
virtual void OnNavigatedTo(Windows::UI::Xaml::Navigation::NavigationEventArgs^ e) override;
virtual void OnKeyDown(KeyRoutedEventArgs^ e) override;
private:
void _toggleSmartBoxButton__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e);
......
<?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">
<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" />
<Properties>
<DisplayName>ring-client-uwp</DisplayName>
......
/**************************************************************************
* 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 "pch.h"
#include "RingConsolePanel.xaml.h"
using namespace RingClientUWP;
using namespace RingClientUWP::Views;
using namespace Windows::ApplicationModel::Core;
using namespace Windows::UI::Core;
using namespace Windows::UI::Xaml::Documents;
RingConsolePanel::RingConsolePanel()
{
InitializeComponent();
RingDebug::instance->messageToScreen += ref new debugMessageToScreen([this](Platform::String^ message) {
output(message);
});
}
void
RingConsolePanel::output(Platform::String^ message)
{
try {
Run^ inlineText = ref new Run();
inlineText->Text = message;
Paragraph^ paragraph = ref new Paragraph();
paragraph->Inlines->Append(inlineText);
_debugWindowOutput_->Blocks->Append(paragraph);
_scrollView_->UpdateLayout();
_scrollView_->ScrollToVerticalOffset(_scrollView_->ScrollableHeight);
}
catch (Platform::Exception^ e) {
return;
}
}
void RingConsolePanel::_btnSendDbgCmd__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
sendCommand();
}
void RingConsolePanel::_sendDbgCmd__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
{
if (e->Key == Windows::System::VirtualKey::Enter && _tBoxDbg_->Text != "") {
sendCommand();
}
else if (e->Key == Windows::System::VirtualKey::PageUp) {
if (historyLevel < 1)
return;
if (historyLevel == historyCmds.Size)
currentCmd = _tBoxDbg_->Text;
historyLevel--;
_tBoxDbg_->Text = historyCmds.GetAt(historyLevel);
}
else if (e->Key == Windows::System::VirtualKey::PageDown) {
if (historyLevel < historyCmds.Size) {
_tBoxDbg_->Text = historyCmds.GetAt(historyLevel);
historyLevel++;
}
else {
_tBoxDbg_->Text = currentCmd;
}
return;
}
}
/*\ ADD EACH NEW COMMAND TO THE HELP LIST \*/
void RingConsolePanel::sendCommand()
{
auto cmdInput = _tBoxDbg_->Text;
addCommandToHistory();
historyLevel++;
_tBoxDbg_->Text = "";
currentCmd = "";
historyLevel = historyCmds.Size;
if (cmdInput == "") {
return;
}
else if (cmdInput == "help") {
MSG_(">> Help :");
MSG_("use PgUp/PgDown for crawling commands history.");
return;
}
std::wstring wStr(cmdInput->Begin());
std::string result(wStr.begin(), wStr.end());
MSG_(">> error, command \'" + result + "\' not found");
}
void RingConsolePanel::addCommandToHistory()
{
historyCmds.Append(_tBoxDbg_->Text);
/**************************************************************************
* 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 "pch.h"
#include "RingConsolePanel.xaml.h"
using namespace RingClientUWP;
using namespace RingClientUWP::Views;
using namespace Windows::ApplicationModel::Core;
using namespace Windows::UI::Core;
using namespace Windows::UI::Xaml::Documents;
RingConsolePanel::RingConsolePanel()
{
InitializeComponent();
RingDebug::instance->messageToScreen += ref new debugMessageToScreen([this](Platform::String^ message) {
output(message);
});
}
void
RingConsolePanel::output(Platform::String^ message)
{
try {
Run^ inlineText = ref new Run();
inlineText->Text = message;
Paragraph^ paragraph = ref new Paragraph();
paragraph->Inlines->Append(inlineText);
_debugWindowOutput_->Blocks->Append(paragraph);
_scrollView_->UpdateLayout();
_scrollView_->ScrollToVerticalOffset(_scrollView_->ScrollableHeight);
}
catch (Platform::Exception^ e) {
return;
}
}
void RingConsolePanel::_btnSendDbgCmd__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
sendCommand();
}
void RingConsolePanel::_sendDbgCmd__KeyDown(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e)
{
if (e->Key == Windows::System::VirtualKey::Enter && _tBoxDbg_->Text != "") {
sendCommand();
}
else if (e->Key == Windows::System::VirtualKey::PageUp) {
if (historyLevel < 1)
return;
if (historyLevel == historyCmds.Size)
currentCmd = _tBoxDbg_->Text;
historyLevel--;
_tBoxDbg_->Text = historyCmds.GetAt(historyLevel);
}
else if (e->Key == Windows::System::VirtualKey::PageDown) {
if (historyLevel < historyCmds.Size) {
_tBoxDbg_->Text = historyCmds.GetAt(historyLevel);
historyLevel++;
}
else {
_tBoxDbg_->Text = currentCmd;
}
return;
}
}
/*\ ADD EACH NEW COMMAND TO THE HELP LIST \*/
void RingConsolePanel::sendCommand()
{
auto cmdInput = _tBoxDbg_->Text;
addCommandToHistory();
historyLevel++;
_tBoxDbg_->Text = "";
currentCmd = "";
historyLevel = historyCmds.Size;
if (cmdInput == "") {
return;
}
else if (cmdInput == "help") {
MSG_(">> Help :");
MSG_("use PgUp/PgDown for crawling commands history.");
return;
}
std::wstring wStr(cmdInput->Begin());
std::string result(wStr.begin(), wStr.end());
MSG_(">> error, command \'" + result + "\' not found");
}
void RingConsolePanel::addCommandToHistory()
{
historyCmds.Append(_tBoxDbg_->Text);
}
......@@ -33,9 +33,6 @@ using namespace Windows::UI::Core;
using namespace RingClientUWP;
CoreDispatcher^ g_dispatcher;
bool has_config;
void
DebugOutputWrapper(const std::string& str)
{
......@@ -45,101 +42,88 @@ DebugOutputWrapper(const std::string& str)
void
RingClientUWP::RingD::startDaemon()
{
g_dispatcher = CoreApplication::MainView->CoreWindow->Dispatcher;
Utils::fileExists(ApplicationData::Current->LocalFolder, ".config\\dring.yml")
.then([this](bool config_exists)
create_task([&]()
{
if (!config_exists) {
has_config = false;
}
else {
has_config = true;
}
})
.then([this]() {
create_task([&]()
{
using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
using namespace std::placeholders;
std::map<std::string, SharedCallback> callHandlers = {
// 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,
const std::string& callId,
const std::string& from)
{
MSG_("<IncomingCall>");
MSG_("accountId = " + accountId);
MSG_("callId = " + callId);
MSG_("from = " + from);
}),
DRing::exportable_callback<DRing::CallSignal::StateChange>([this](
const std::string& callId,
const std::string& state,
int code)
{
MSG_("<StateChange>");
MSG_("callId = " + callId);
MSG_("state = " + state);
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);
using SharedCallback = std::shared_ptr<DRing::CallbackWrapperBase>;
using namespace std::placeholders;
std::map<std::string, SharedCallback> callHandlers = {
// 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,
const std::string& callId,
const std::string& from)
{
MSG_("<IncomingCall>");
MSG_("accountId = " + accountId);
MSG_("callId = " + callId);
MSG_("from = " + from);
}),
DRing::exportable_callback<DRing::CallSignal::StateChange>([this](
const std::string& callId,
const std::string& state,
int code)
{
MSG_("<StateChange>");
MSG_("callId = " + callId);
MSG_("state = " + state);
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) {
MSG_("payload = " + i.second);
auto payload = Utils::toPlatformString(i.second);
}
})
};
for (auto i : payloads) {
MSG_("payload = " + i.second);
auto payload = Utils::toPlatformString(i.second);
}
})
};
registerCallHandlers(callHandlers);
registerCallHandlers(callHandlers);
std::map<std::string, SharedCallback> dringDebugOutHandler;
dringDebugOutHandler.insert(DRing::exportable_callback<DRing::Debug::MessageSend>
(std::bind(&DebugOutputWrapper, _1)));
registerCallHandlers(dringDebugOutHandler);
std::map<std::string, SharedCallback> dringDebugOutHandler;
dringDebugOutHandler.insert(DRing::exportable_callback<DRing::Debug::MessageSend>
(std::bind(&DebugOutputWrapper, _1)));
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>
([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;
std::map<std::string, std::string> test_details;
test_details.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_ALIAS, accountName));
test_details.insert(std::make_pair(ring::Conf::CONFIG_ACCOUNT_TYPE,"RING"));
DRing::addAccount(test_details);
}
else {
// if there is no config, create a default RING account
if (!has_config) {
std::map<std::string, std::string> test_details;
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();
// if there is no config, create a default RING account
while (true) {
DRing::pollEvents();
Sleep(1000);
}
});
DRing::fini();
}
});
}
......
......@@ -45,15 +45,17 @@ public:
/* properties */
/* functions */
internal:
void startDaemon();
void stopDaemon();
bool hasConfig;
std::string accountName;
private:
RingD(); // singleton
std::string localFolder_;
bool daemonRunning_ = false;
};
}
\ No newline at end of file
<!-- **********************************************************************
* 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 *
......@@ -82,7 +83,7 @@
<Style x:Key="ButtonStyle2"
TargetType="Button">
<Setter Property="Width"
Value="50"/>
Value="400"/>
<Setter Property="Height"
Value="30"/>
<Setter Property="FontFamily"
......@@ -107,6 +108,13 @@
<Setter Property="FontSize"
Value="70"/>
</Style>
<Style x:Key="ButtonStyle4"
TargetType="Button">
<Setter Property="Foreground"
Value="White"/>
<Setter Property="Background"
Value="LightBlue"/>
</Style>
<Style x:Key="ToggleButtonStyle1"
TargetType="ToggleButton">
<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_"
Margin="10"
PlaceholderText="Enter your username"/>
<PasswordBox Margin="10"
PlaceholderText="Enter your password"/>
<PasswordBox Margin="10,10,10,20"
PlaceholderText="Repeat your Password"/>
</StackPanel>
<!-- SIP account. -->
<StackPanel x:Name="_sipAccountCreationStack_"
Visibility="Collapsed">
<TextBox Margin="10"
PlaceholderText="Enter hostname"/>
<TextBox Margin="10"
PlaceholderText="Enter your username"/>
<PasswordBox Margin="10"
PlaceholderText="Enter your password"/>
<PasswordBox Margin="10"
PlaceholderText="Repeat your Password"/>
</StackPanel>
</StackPanel>
<!-- buttons yes/no to create the new account. -->
<Grid Grid.Row="1">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<Button x:Name="_createAccountYes_"
Grid.Row="1"
VerticalAlignment="Center"