From 36d1edb4f9cc4fbd9c134d3b387bcfec05424537 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Sun, 8 Jul 2018 17:55:46 +0300 Subject: Doing some work on PPC + Mirta integration. --- .../PPC/Tango.PPC.UI/MainWindow.xaml.cs | 2 +- .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 13 ++++++++++++- .../PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs | 17 +++++++++++++++++ .../PPC/Tango.PPC.UI/Views/LayoutView.xaml | 2 +- .../PPC/Tango.PPC.UI/Views/LoginView.xaml | 21 ++++++++++++++++----- 5 files changed, 47 insertions(+), 8 deletions(-) (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs index ca26b7761..181c05145 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -37,7 +37,7 @@ namespace Tango.PPC.UI WindowStyle = WindowStyle.None; ResizeMode = ResizeMode.NoResize; WindowStartupLocation = WindowStartupLocation.Manual; - Topmost = true; // sure? + Topmost = false; // sure? var screens = System.Windows.Forms.Screen.AllScreens; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index eaf53b993..4f6221144 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -316,6 +316,11 @@ DB\Tango.mdf PreserveNewest + + DB\Tango_log.ldf + Always + Tango.mdf + Tango.ColorLib.dll PreserveNewest @@ -375,6 +380,12 @@ RD /S /Q "$(TargetDir)zh-Hant\" RD /S /Q "$(TargetDir)bg\" RD /S /Q "$(TargetDir)bn-BD\" RD /S /Q "$(TargetDir)nb-NO\" -RD /S /Q "$(TargetDir)pt-BR\" +RD /S /Q "$(TargetDir)pt-BR\" + +copy /Y "$(SolutionDir)Referenced Assemblies\mscoree.dll" "$(TargetDir)" +copy /Y "$(SolutionDir)Referenced Assemblies\msvcp140d.dll" "$(TargetDir)" +copy /Y "$(SolutionDir)Referenced Assemblies\ucrtbased.dll" "$(TargetDir)" +copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140.dll" "$(TargetDir)" +copy /Y "$(SolutionDir)Referenced Assemblies\vcruntime140d.dll" "$(TargetDir)" \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs index 293435d0b..dd54873ce 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs @@ -8,6 +8,7 @@ using Tango.PPC.Common; using Tango.PPC.Common.Navigation; using SimpleValidator.Extensions; using System.ComponentModel.DataAnnotations; +using Tango.SharedUI.Helpers; namespace Tango.PPC.UI.ViewModels { @@ -32,6 +33,17 @@ namespace Tango.PPC.UI.ViewModels set { _password = value; RaisePropertyChangedAuto(); } } + private bool _isLoading; + /// + /// Gets or sets a value indicating whether the application is busy with loading modules. + /// + public bool IsLoading + { + get { return _isLoading; } + set { _isLoading = value; RaisePropertyChangedAuto(); } + } + + public LoginViewVM() { LoginCommand = new RelayCommand(Login); @@ -49,10 +61,14 @@ namespace Tango.PPC.UI.ViewModels { if (Validate()) { + IsLoading = true; + UIHelper.DoEvents(); + var user = AuthenticationProvider.Login(Email, Password); if (user == null) { + IsLoading = false; NotificationProvider.ShowWarning("Email or password are incorrect."); } @@ -60,6 +76,7 @@ namespace Tango.PPC.UI.ViewModels { await Task.Delay(500); await NavigationManager.NavigateTo(NavigationView.HomeModule); + IsLoading = false; }; } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml index 7d170d04f..621bfabdb 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml @@ -129,7 +129,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml index 6fbf713e9..74bb85e7d 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml @@ -5,6 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:vm="clr-namespace:Tango.PPC.UI.ViewModels" xmlns:global="clr-namespace:Tango.PPC.UI" + xmlns:controls="clr-namespace:Tango.PPC.Common.Controls;assembly=Tango.PPC.Common" xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch" xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch" xmlns:local="clr-namespace:Tango.PPC.UI.Views" @@ -16,14 +17,24 @@ Login to your account - - + + + - Keep me logged in. + Keep me logged in. - LOGIN + LOGIN - Forgot password? + Forgot password? + + + + + + Logging in... + + + -- cgit v1.3.1