diff --git a/App.xaml.cpp b/App.xaml.cpp index bf593b4ec862a8fb62bead7c3bd82a64204e3a05..76f081e1b0a1d8e5cadbf34cd5373e7c12812fa5 100644 --- a/App.xaml.cpp +++ b/App.xaml.cpp @@ -63,7 +63,10 @@ App::OnLaunched(LaunchActivatedEventArgs^ e) Window::Current->Content = rootFrame; } - ApplicationView::GetForCurrentView()->SetPreferredMinSize(Size(500, 500)); + Windows::UI::ViewManagement::ApplicationView::PreferredLaunchViewSize = Size(800, 700); + Windows::UI::ViewManagement::ApplicationView::PreferredLaunchWindowingMode + = Windows::UI::ViewManagement::ApplicationViewWindowingMode::PreferredLaunchViewSize; + Window::Current->Activate(); auto color = Windows::UI::ColorHelper::FromArgb(255, 59, 193, 211); @@ -78,7 +81,6 @@ App::OnLaunched(LaunchActivatedEventArgs^ e) void App::OnsummonWizard() { - ApplicationView::GetForCurrentView()->TryResizeView(Size(400, 600)); rootFrame->Navigate(Windows::UI::Xaml::Interop::TypeName(Views::Wizard::typeid)); } diff --git a/Assets/LockScreenLogo.scale-200.png b/Assets/LockScreenLogo.scale-200.png index c707b5ec47ac27d619483e7f68794234eebed6df..64c004413562ffdcd3ac7358977900f0e3b9f7a0 100644 Binary files a/Assets/LockScreenLogo.scale-200.png and b/Assets/LockScreenLogo.scale-200.png differ diff --git a/Assets/SplashScreen.scale-200.png b/Assets/SplashScreen.scale-200.png index 00bb824b343eb6bdb7ed8c02ea68b6f2c1577ec2..7c8f3778f7bb6126220ddb63ec4a14b3e7b7b6cf 100644 Binary files a/Assets/SplashScreen.scale-200.png and b/Assets/SplashScreen.scale-200.png differ diff --git a/Assets/Square150x150Logo.scale-200.png b/Assets/Square150x150Logo.scale-200.png index 949517259e0738fe5cc765040c10c110c171db42..52cf2012c22f44c8250947e904e7e55a464a5063 100644 Binary files a/Assets/Square150x150Logo.scale-200.png and b/Assets/Square150x150Logo.scale-200.png differ diff --git a/Assets/Square44x44Logo.scale-200.png b/Assets/Square44x44Logo.scale-200.png index f7504ee56593560aa61980ff30432e66f7406df5..9acb67bcc80a8f65497b3c85c13bb5b223cfc50c 100644 Binary files a/Assets/Square44x44Logo.scale-200.png and b/Assets/Square44x44Logo.scale-200.png differ diff --git a/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Assets/Square44x44Logo.targetsize-24_altform-unplated.png index cbc1129e33b97ad23ea9a884cdbfc559fec10319..c6fdefa4e8b1c07816efbdfaf19173c1df3bd923 100644 Binary files a/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and b/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/Assets/StoreLogo.png b/Assets/StoreLogo.png index f24aacc3785f74de225b4802b9bb55d46034e0b1..2d6dbb8dba91536e6611154e7ee10e028210b5a7 100644 Binary files a/Assets/StoreLogo.png and b/Assets/StoreLogo.png differ diff --git a/Assets/Wide310x150Logo.scale-200.png b/Assets/Wide310x150Logo.scale-200.png index c5123a296b827eccd7c1c2c799b21b9ed540309e..0bf95e7a8bbf463dbb33a6587f44c8828159e645 100644 Binary files a/Assets/Wide310x150Logo.scale-200.png and b/Assets/Wide310x150Logo.scale-200.png differ diff --git a/MainPage.xaml.cpp b/MainPage.xaml.cpp index 75e953559ccffc328dbb6590d5fca43a65989f3a..db86d424538a0114d87be81206130737817d49a0 100644 --- a/MainPage.xaml.cpp +++ b/MainPage.xaml.cpp @@ -55,8 +55,6 @@ MainPage::MainPage() { InitializeComponent(); - ApplicationView::GetForCurrentView()->TryResizeView(Size(1024, 768)); - UserModel::instance->getUserData(); Window::Current->SizeChanged += ref new WindowSizeChangedEventHandler(this, &MainPage::OnResize); diff --git a/Styles.xaml b/Styles.xaml index 994bb37a78bf6fc106485282e181da10a76ec79c..c502dc2a6df6c774ba5042bbc370384e4b1188e6 100644 --- a/Styles.xaml +++ b/Styles.xaml @@ -91,6 +91,11 @@ <Setter Property="Foreground" Value="Black"/> </Style> + <Style x:Key="TextStyle7" + TargetType="TextBlock"> + <Setter Property="Foreground" + Value="White"/> + </Style> <Style x:Key="TextSegoeStyle1" TargetType="TextBlock"> <Setter Property="FontFamily" @@ -285,6 +290,17 @@ <Setter Property="BorderThickness" Value="0"/> </Style> + <Style x:Key="ButtonStyle8" + TargetType="Button"> + <Setter Property="Foreground" + Value="White"/> + <Setter Property="Background" + Value="#3bc1d3"/> + <Setter Property="BorderThickness" + Value="0"/> + <Setter Property="FontSize" + Value="30"/> + </Style> <Style x:Key="ToggleButtonStyle1" TargetType="ToggleButton"> <Setter Property="Width" diff --git a/Wizard.xaml b/Wizard.xaml index 4e5cf06919f6e43eacee38c40c9c3a8292ef2dfc..a9cae8bf0e58a0e86ed368095cd0455de40e3506 100644 --- a/Wizard.xaml +++ b/Wizard.xaml @@ -12,14 +12,20 @@ <Grid> <StackPanel Width="400"> <Rectangle Height="50"/> + <Image x:Name="_welcomeImage_" + Source="Assets\Wide310x150Logo.scale-200.png" + Width="310" + HorizontalAlignment="Center" + Margin="0 10 0 30" + Height="150"/> <StackPanel Height="auto" Background="#3bc1d3" Grid.Column="0"> <Button x:Name="_showCreateAccountMenuTitle_" Content="Create New Account" Foreground="White" - FontSize="30" Click="collapseMenus" + Style="{StaticResource ButtonStyle8}" Visibility="Collapsed" HorizontalAlignment="Center"/> <Button x:Name="_showCreateAccountMenuBtn_" @@ -190,7 +196,7 @@ Content="Add Existing Account" Foreground="White" Visibility="Collapsed" - FontSize="30" + Style="{StaticResource ButtonStyle8}" Click="collapseMenus" HorizontalAlignment="Center"/> <Button x:Name="_showAddAccountMenuBtn_" @@ -210,10 +216,14 @@ <StackPanel Orientation="Horizontal" Grid.Row="0"> <Button x:Name="_step1button_" + Style="{StaticResource ButtonStyle4}" Content="Step 1" Click="_step1button__Click"/> - <TextBlock Text=">"/> + <TextBlock Text=">" + VerticalAlignment="Center" + Style="{StaticResource TextStyle7}"/> <Button x:Name="_step2button_" + Style="{StaticResource ButtonStyle4}" Click="_step2button__Click" Content="Step 2"/> </StackPanel> @@ -237,9 +247,11 @@ <TextBox x:Name="_PINTextBox_" Margin="10" GotFocus="_PINTextBox__GotFocus" + KeyUp="_PINTextBox__KeyUp" PlaceholderText="Enter PIN"/> <PasswordBox x:Name="_ArchivePassword_" Margin="10" + KeyUp="_ArchivePassword__KeyUp" PlaceholderText="Enter your password"/> <TextBlock x:Name="_response_" Foreground="Red" @@ -263,6 +275,7 @@ Visibility="Collapsed" Content="" Click="_addAccountYes__Click" + IsEnabled="False" Style="{StaticResource ButtonStyle2}"/> </StackPanel> </Grid> diff --git a/Wizard.xaml.cpp b/Wizard.xaml.cpp index e896c8ea9516c435d44555292f12093de7ca43af..b7af70c28ae2e292e0b24dbcdcd8f223a821a68e 100644 --- a/Wizard.xaml.cpp +++ b/Wizard.xaml.cpp @@ -100,7 +100,7 @@ Wizard::_avatarWebcamCaptureBtn__Click(Platform::Object^ sender, Windows::UI::Xa std::string profilePath = RingD::instance->getLocalFolder() + ".profile"; _mkdir(profilePath.c_str()); std::ofstream file((profilePath + "\\profile_image.png"), - std::ios::out | std::ios::trunc | std::ios::binary); + std::ios::out | std::ios::trunc | std::ios::binary); if (file.is_open()) { file << fileBuffer; file.close(); @@ -118,6 +118,11 @@ Wizard::_avatarWebcamCaptureBtn__Click(Platform::Object^ sender, Windows::UI::Xa void RingClientUWP::Views::Wizard::_addAccountYes__Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e) { + if (_PINTextBox_->Text->IsEmpty() || _ArchivePassword_->Password->IsEmpty()) { + _addAccountYes_->IsEnabled = false; + return; + } + RingD::instance->_startingStatus = StartingStatus::REGISTERING_THIS_DEVICE; this->Dispatcher->RunAsync(Windows::UI::Core::CoreDispatcherPriority::Normal, ref new Windows::UI::Core::DispatchedHandler([this]() { @@ -302,6 +307,7 @@ void RingClientUWP::Views::Wizard::OnregisteredNameFound(LookupStatus status, co void RingClientUWP::Views::Wizard::OnregistrationStateErrorGeneric(const std::string &accountId) { _response_->Text = "Credentials error or PIN expired."; + _addAccountYes_->IsEnabled = false; } @@ -309,3 +315,21 @@ void RingClientUWP::Views::Wizard::_PINTextBox__GotFocus(Platform::Object^ sende { _response_->Text = ""; } + + +void RingClientUWP::Views::Wizard::_ArchivePassword__KeyUp(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) +{ + if (_PINTextBox_->Text->IsEmpty() || _ArchivePassword_->Password->IsEmpty()) + _addAccountYes_->IsEnabled = false; + else + _addAccountYes_->IsEnabled = true; +} + + +void RingClientUWP::Views::Wizard::_PINTextBox__KeyUp(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e) +{ + if (_PINTextBox_->Text->IsEmpty() || _ArchivePassword_->Password->IsEmpty()) + _addAccountYes_->IsEnabled = false; + else + _addAccountYes_->IsEnabled = true; +} diff --git a/Wizard.xaml.h b/Wizard.xaml.h index 2c97f7e2664596abb4f8b2576bcc6a898248eb8d..7e8ebedf8bccbd015d39dcdbaaae90b9c3f89348 100644 --- a/Wizard.xaml.h +++ b/Wizard.xaml.h @@ -40,6 +40,8 @@ private: bool isFullNameValid; void OnregistrationStateErrorGeneric(const std::string &accountId); void _PINTextBox__GotFocus(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e); + void _ArchivePassword__KeyUp(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e); + void _PINTextBox__KeyUp(Platform::Object^ sender, Windows::UI::Xaml::Input::KeyRoutedEventArgs^ e); }; }