aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-07-08 18:58:38 +0300
committerShlomo Hecht <shlomo@twine-s.com>2018-07-08 18:58:38 +0300
commitca27cc7c2eb5d7f47b11054ffd26866cbbc1497e (patch)
tree3db5ebe089922a733b8d19c47d3858e9c8a16149 /Software/Visual_Studio/PPC/Tango.PPC.UI
parent01313ef571f4ca7376c8579db38d83a892360e0a (diff)
parent36d1edb4f9cc4fbd9c134d3b387bcfec05424537 (diff)
downloadTango-ca27cc7c2eb5d7f47b11054ffd26866cbbc1497e.tar.gz
Tango-ca27cc7c2eb5d7f47b11054ffd26866cbbc1497e.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj13
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs17
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LayoutView.xaml2
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Views/LoginView.xaml21
5 files changed, 47 insertions, 8 deletions
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 @@
<Link>DB\Tango.mdf</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <Content Include="..\..\..\DB\PPC\Tango_log.ldf">
+ <Link>DB\Tango_log.ldf</Link>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ <DependentUpon>Tango.mdf</DependentUpon>
+ </Content>
<Content Include="..\..\Build\Debug\Tango.ColorLib.dll">
<Link>Tango.ColorLib.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -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\"</PostBuildEvent>
+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)"</PostBuildEvent>
</PropertyGroup>
</Project> \ 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;
+ /// <summary>
+ /// Gets or sets a value indicating whether the application is busy with loading modules.
+ /// </summary>
+ 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 @@
</commonControls:AsyncAdornerControl.Style>
<Grid>
<StackPanel Orientation="Horizontal">
- <touch:TouchBusyIndicator Width="50" Height="50" IsIndeterminate="True" />
+ <touch:TouchBusyIndicator Width="50" Height="50" IsIndeterminate="{Binding NotificationProvider.IsInGlobalBusyState}" />
<TextBlock VerticalAlignment="Center" Margin="10 0 0 0" FontSize="20" Text="{Binding NotificationProvider.GlobalBusyMessage}"></TextBlock>
</StackPanel>
</Grid>
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 @@
<TextBlock Margin="0 10 0 0" HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Login to your account</TextBlock>
<StackPanel Margin="0 60 0 0">
- <touch:TouchTextBox Text="{Binding Email,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" Watermark="Email" KeyboardMode="Email" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
- <touch:TouchTextBox Text="{Binding Password,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" IsPassword="True" Margin="0 40 0 0" Watermark="Password" KeyboardMode="AlphaNumeric" KeyboardAction="Go" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
+ <StackPanel Visibility="{Binding IsLoading,Converter={StaticResource BooleanToVisibilityInverseConverter}}">
+ <touch:TouchTextBox Text="{Binding Email,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" Watermark="Email" KeyboardMode="Email" KeyboardAction="Next" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
+ <touch:TouchTextBox Text="{Binding Password,UpdateSourceTrigger=PropertyChanged,ValidatesOnDataErrors=True,ValidatesOnNotifyDataErrors=True}" IsPassword="True" Margin="0 40 0 0" Watermark="Password" KeyboardMode="AlphaNumeric" KeyboardAction="Go" KeyboardContainer="{Binding ElementName=keyboardContainer}" />
- <touch:TouchCheckBox Margin="0 30 0 0">Keep me logged in.</touch:TouchCheckBox>
+ <touch:TouchCheckBox Margin="0 30 0 0">Keep me logged in.</touch:TouchCheckBox>
- <touch:TouchButton Height="60" Margin="0 30 0 0" CornerRadius="3" IsDefault="True" DelayCommand="{Binding LoginCommand}" DelayCommandDuration="00:00:0.2">LOGIN</touch:TouchButton>
+ <touch:TouchButton Height="60" Margin="0 30 0 0" CornerRadius="3" IsDefault="True" DelayCommand="{Binding LoginCommand}" DelayCommandDuration="00:00:0.4">LOGIN</touch:TouchButton>
- <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Forgot password?</TextBlock>
+ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0">Forgot password?</TextBlock>
+ </StackPanel>
+ <StackPanel>
+ <controls:AsyncAdornerControl Height="130" Visibility="{Binding IsLoading,Converter={StaticResource BooleanToVisibilityConverter}}">
+ <StackPanel>
+ <touch:TouchBusyIndicator IsIndeterminate="{Binding IsLoading}" Width="80" Height="80" />
+ <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoTitleFontSize}">Logging in...</TextBlock>
+ </StackPanel>
+ </controls:AsyncAdornerControl>
+ </StackPanel>
</StackPanel>
</StackPanel>
</Grid>