blob: 62fd9c44e86c27006c3f32638eb93ac19f12934b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
<UserControl x:Class="Tango.FSE.UI.Views.LoginView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:global="clr-namespace:Tango.FSE.UI"
xmlns:vm="clr-namespace:Tango.FSE.UI.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:animations="clr-namespace:Tango.SharedUI.Animations;assembly=Tango.SharedUI"
xmlns:helpers="clr-namespace:Tango.SharedUI.Helpers;assembly=Tango.SharedUI"
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:local="clr-namespace:Tango.FSE.UI.Views"
mc:Ignorable="d"
d:DesignHeight="720" d:DesignWidth="1280" d:DataContext="{d:DesignInstance Type=vm:LoginViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.LoginViewVM}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition MaxWidth="700">
<ColumnDefinition.Style>
<Style TargetType="ColumnDefinition">
<Setter Property="Width" Value="317*"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsFree}" Value="False">
<DataTrigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<animations:GridLengthAnimation Storyboard.TargetProperty="Width" Duration="00:00:05" From="317*" To="200*" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<animations:GridLengthAnimation Storyboard.TargetProperty="Width" Duration="00:00:0.2" From="200*" To="317*" />
</Storyboard>
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</ColumnDefinition.Style>
</ColumnDefinition>
<ColumnDefinition Width="483*"/>
</Grid.ColumnDefinitions>
<Grid ClipToBounds="True">
<Image Source="/Images/Abstracts/abstract1.png" Stretch="UniformToFill" Opacity="0.8" HorizontalAlignment="Right" Width="{Binding RelativeSource={RelativeSource AncestorType=Grid},Path=ActualWidth,Converter={StaticResource MathOperatorConverter},ConverterParameter='*1.5'}"/>
<StackPanel>
<TextBlock HorizontalAlignment="Center" Margin="0 30 0 0" FontSize="40" TextAlignment="Center" TextWrapping="Wrap" Foreground="{StaticResource FSE_PrimaryForegroundBrush}">Welcome</TextBlock>
</StackPanel>
<Image Source="{StaticResource FSE_Machine_Full}" VerticalAlignment="Bottom" RenderOptions.BitmapScalingMode="Fant" Margin="0 0 0 150" MaxWidth="300" MinWidth="100" />
<Rectangle HorizontalAlignment="Right" StrokeThickness="1" Stroke="{StaticResource FSE_BorderBrush}" StrokeDashArray="5" />
</Grid>
<Grid Grid.Column="1">
<Image Width="400" VerticalAlignment="Top" Margin="0 20 0 0" Canvas.Left="230" Source="{StaticResource FSE_Twine_Logo}"></Image>
<controls:NavigationControl TransitionDuration="00:00:0.2" TransitionAlwaysFades="True" TransitionType="Fade" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 130 0 0" SelectedObject="{Binding SelectedView}">
<StackPanel Width="300" TextElement.FontSize="16" controls:NavigationControl.NavigationName="Login">
<Image Source="/Images/login.png" Height="100" />
<TextBox Margin="0 20 0 0" Text="{Binding Email,UpdateSourceTrigger=PropertyChanged}" material:HintAssist.Hint="Email" material:HintAssist.IsFloating="True"></TextBox>
<PasswordBox Margin="0 20 0 0" helpers:PasswordHelper.Attach="True" helpers:PasswordHelper.Password="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" material:HintAssist.Hint="Password" material:HintAssist.IsFloating="True"></PasswordBox>
<ComboBox Margin="0 20 0 0" material:HintAssist.Hint="Environment" material:HintAssist.IsFloating="True" ItemsSource="{Binding GatewayService.Environments}" SelectedItem="{Binding SelectedEnvironment}" DisplayMemberPath="Description"></ComboBox>
<CheckBox Margin="0 10 0 0" IsChecked="{Binding RememberMe}">Remember my password</CheckBox>
<Button IsDefault="True" Margin="0 40 0 0" Height="50" material:ButtonAssist.CornerRadius="24" Command="{Binding LoginCommand}">LOGIN</Button>
</StackPanel>
<StackPanel controls:NavigationControl.NavigationName="Logging">
<ProgressBar Width="200" Height="200" HorizontalAlignment="Center" VerticalAlignment="Center" IsIndeterminate="{Binding IsBusy}" Style="{StaticResource MaterialDesignCircularProgressBar}" Value="0" />
<TextBlock HorizontalAlignment="Center" Margin="0 40 0 0" FontSize="18">Logging you in, please wait...</TextBlock>
<TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" Text="{Binding Status}" Foreground="{StaticResource FSE_GrayBrush}"></TextBlock>
</StackPanel>
</controls:NavigationControl>
</Grid>
</Grid>
</UserControl>
|