mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-05-01 08:26:32 +02:00
Version 3.0.381
This commit is contained in:
parent
f963c0a219
commit
3a363acf3a
1525 changed files with 60589 additions and 125098 deletions
25
SharedGui/View/BarLevelInputView.xaml
Normal file
25
SharedGui/View/BarLevelInputView.xaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.BarLevelInputView">
|
||||
<ContentView.Content>
|
||||
<StackLayout>
|
||||
<Label
|
||||
Text="{x:Static resources:AppResources.MarkingDriveBatteryTitel}"
|
||||
TextType="Html"
|
||||
HorizontalOptions="CenterAndExpand"/>
|
||||
<sharedGui:BarLevelView
|
||||
x:Name="BarLevelElement"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Current="{Binding CurrentText, Mode=TwoWay}"
|
||||
Maximum="{Binding MaximumText}"/>
|
||||
<Stepper
|
||||
x:Name="BarLevelStepper"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Value ="{Binding CurrentText, Mode=TwoWay}"
|
||||
Maximum="{Binding MaximumText}"/>
|
||||
</StackLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
110
SharedGui/View/BarLevelInputView.xaml.cs
Normal file
110
SharedGui/View/BarLevelInputView.xaml.cs
Normal file
|
@ -0,0 +1,110 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SharedGui.ViewModel;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class BarLevelInputView : ContentView
|
||||
{
|
||||
private BarLevelInputViewModel _LocalViewModel;
|
||||
|
||||
public BarLevelInputView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
_LocalViewModel = new BarLevelInputViewModel();
|
||||
|
||||
_LocalViewModel.PropertyChanged += (sender, args) =>
|
||||
{
|
||||
// Update Current property from view model on user input.
|
||||
if (args.PropertyName != nameof(BarLevelInputViewModel.Current))
|
||||
return;
|
||||
|
||||
var viewModel = sender as BarLevelInputViewModel;
|
||||
Current = viewModel?.Current != null
|
||||
? viewModel.Current.Value.ToString()
|
||||
: String.Empty;
|
||||
};
|
||||
|
||||
// Do not bind entire control to local view model. Doing this would break binding of BatteryView control.
|
||||
this.BarLevelElement.BindingContext = _LocalViewModel;
|
||||
this.BarLevelStepper.BindingContext = _LocalViewModel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create bindable property to to allow "Maximum"- proptery to act as a valid target for data binding.
|
||||
/// </summary>
|
||||
public static readonly BindableProperty MaximumProperty = BindableProperty.Create(
|
||||
"Maximum",
|
||||
typeof(string),
|
||||
typeof(BarLevelInputView),
|
||||
"7",
|
||||
propertyChanged: OnMaximumChanged);
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count of bars wich represent charing level full.
|
||||
/// </summary>
|
||||
public string Maximum
|
||||
{
|
||||
get => (string)GetValue(MaximumProperty);
|
||||
set => SetValue(MaximumProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notifies when value changes. Is required to make binding work.
|
||||
/// </summary>
|
||||
static void OnMaximumChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
if (newValue != oldValue)
|
||||
{
|
||||
var batteryView = bindable as BarLevelInputView;
|
||||
batteryView?.SetMaximum(int.TryParse(newValue.ToString(), out int maximum) ? (int?)maximum : null);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMaximum(int? maximum) => _LocalViewModel.Maximum = maximum;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create bindable property to to allow "Current"- proptery to act as a valid target for data binding.
|
||||
/// </summary>
|
||||
public static readonly BindableProperty CurrentProperty = BindableProperty.Create(
|
||||
"Current",
|
||||
typeof(string),
|
||||
typeof(BarLevelInputView),
|
||||
"7",
|
||||
BindingMode.TwoWay,
|
||||
propertyChanged: OnCurrentChanged);
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count of bars wich represent the current charing level.
|
||||
/// </summary>
|
||||
public string Current
|
||||
{
|
||||
get => (string)GetValue(CurrentProperty);
|
||||
set => SetValue(CurrentProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notifies when value changes. Is required to make binding work.
|
||||
/// </summary>
|
||||
static void OnCurrentChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
if (newValue != oldValue)
|
||||
{
|
||||
var batteryView = bindable as BarLevelInputView;
|
||||
int current;
|
||||
batteryView?.SetCurrent(int.TryParse(newValue.ToString(), out current) ? (int?)current : null);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCurrent(int? current) => _LocalViewModel.Current = current;
|
||||
|
||||
}
|
||||
}
|
24
SharedGui/View/BarLevelView.xaml
Normal file
24
SharedGui/View/BarLevelView.xaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SharedGui.View.BarLevelView">
|
||||
<ContentView.Content>
|
||||
<StackLayout>
|
||||
<!-- Nice battery images symbolizing filling level for batteries with 5 bars -->
|
||||
<Image
|
||||
x:Name="BarLevelImage"
|
||||
WidthRequest="60"
|
||||
HeightRequest="36"
|
||||
Aspect="AspectFit"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
IsVisible="{Binding IsBatteryChargeLevelImageVisible}"
|
||||
Source="{Binding BatteryChargeLevelImageSourceString}"/>
|
||||
<!-- Text describing filling level batteries with 1...4 and 6..N bars -->
|
||||
<Label
|
||||
x:Name="BarLevelLabel"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
Text="{Binding BatteryChargeLevelBarsText}"
|
||||
IsVisible="{Binding IsBatteryChargeLevelLabelVisible}"/>
|
||||
</StackLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
89
SharedGui/View/BarLevelView.xaml.cs
Normal file
89
SharedGui/View/BarLevelView.xaml.cs
Normal file
|
@ -0,0 +1,89 @@
|
|||
using SharedGui.ViewModel;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class BarLevelView : ContentView
|
||||
{
|
||||
private BarLevelViewModel _LocalViewModel = new BarLevelViewModel();
|
||||
|
||||
public BarLevelView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// Do not bind entire control to local view model. Doing this would break binding of BatteryView control.
|
||||
this.BarLevelLabel.BindingContext = _LocalViewModel;
|
||||
this.BarLevelImage.BindingContext = _LocalViewModel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create bindable property to allow "Maximum"- property to act as a valid target for data binding.
|
||||
/// </summary>
|
||||
public static readonly BindableProperty MaximumProperty = BindableProperty.Create(
|
||||
"Maximum",
|
||||
typeof(string),
|
||||
typeof(BarLevelView),
|
||||
"", // Default value must match default value of view model object. Otherwise there might be an update issue.
|
||||
propertyChanged: OnMaximumChanged);
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count of bars which represent charing level full.
|
||||
/// </summary>
|
||||
public string Maximum
|
||||
{
|
||||
get => (string)GetValue(MaximumProperty);
|
||||
set => SetValue(MaximumProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notifies when value changes. Is required to make binding work.
|
||||
/// </summary>
|
||||
static void OnMaximumChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
if (newValue != oldValue)
|
||||
{
|
||||
var batteryView = bindable as BarLevelView;
|
||||
batteryView?.SetMaximum(int.TryParse(newValue.ToString(), out int maximum) ? (int?)maximum : null);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetMaximum(int? maximum) => _LocalViewModel.Maximum = maximum;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create bindable property to allow "Current"- property to act as a valid target for data binding.
|
||||
/// </summary>
|
||||
public static readonly BindableProperty CurrentProperty = BindableProperty.Create(
|
||||
"Current",
|
||||
typeof(string),
|
||||
typeof(BarLevelView),
|
||||
"", // Default value must match default value of view model object. Otherwise there might be an update issue.
|
||||
propertyChanged: OnCurrentChanged);
|
||||
|
||||
/// <summary>
|
||||
/// Holds the count of bars which represent the current charing level.
|
||||
/// </summary>
|
||||
public string Current
|
||||
{
|
||||
get => (string)GetValue(CurrentProperty);
|
||||
set => SetValue(CurrentProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Notifies when value changes. Is required to make binding work.
|
||||
/// </summary>
|
||||
static void OnCurrentChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
if (newValue != oldValue)
|
||||
{
|
||||
var batteryView = bindable as BarLevelView;
|
||||
int current;
|
||||
batteryView?.SetCurrent(int.TryParse(newValue.ToString(), out current) ? (int?)current : null);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCurrent(int? current) => _LocalViewModel.Current = current;
|
||||
}
|
||||
}
|
184
SharedGui/View/Bike/RentalProcess/RentalProcess1StepBar.xaml
Normal file
184
SharedGui/View/Bike/RentalProcess/RentalProcess1StepBar.xaml
Normal file
|
@ -0,0 +1,184 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcess1StepBar">
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="check"></x:String>
|
||||
<x:String x:Key="xmark"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<Grid>
|
||||
|
||||
<!-- Progress bar finished-->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<sharedGui:RentalProcessStepBarFinished/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- 1 Step Progress bar -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
IsVisible="True"
|
||||
RowDefinitions="50,Auto,10"
|
||||
RowSpacing="0"
|
||||
ColumnDefinitions="*">
|
||||
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<!--1st step-->
|
||||
<Frame
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="{DynamicResource process-step-upcoming}"
|
||||
Padding="14,2,10,2"
|
||||
HasShadow="False">
|
||||
<Frame.Triggers>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
</Frame.Triggers>
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
RowDefinitions="Auto"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
Text="{x:Static resources:AppResources.MarkingRentalProcessOpenLockFirstStep}"
|
||||
FontSize="17"
|
||||
FontAttributes="Bold"
|
||||
LineBreakMode="WordWrap"
|
||||
MaxLines="2"
|
||||
TextColor="White">
|
||||
<Label.Triggers>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessOpenLockFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
<Image.Triggers>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="1">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource xmark}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Polygon
|
||||
Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Points="0,0 20,0 10,10"
|
||||
IsVisible="False"
|
||||
HorizontalOptions="Center">
|
||||
<Polygon.Triggers>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.None}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Polygon.Triggers>
|
||||
</Polygon>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcess1StepBar : ContentView
|
||||
{
|
||||
public RentalProcess1StepBar ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
460
SharedGui/View/Bike/RentalProcess/RentalProcess2StepsBar.xaml
Normal file
460
SharedGui/View/Bike/RentalProcess/RentalProcess2StepsBar.xaml
Normal file
|
@ -0,0 +1,460 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcess2StepsBar">
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="check"></x:String>
|
||||
<x:String x:Key="xmark"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<Grid>
|
||||
|
||||
<!-- Progress bar finished-->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<sharedGui:RentalProcessStepBarFinished/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- 2 Steps Progress bar -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
IsVisible="True"
|
||||
RowDefinitions="50,Auto,10"
|
||||
RowSpacing="0"
|
||||
ColumnDefinitions="*,*">
|
||||
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<!--1st step-->
|
||||
<Frame
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="{DynamicResource process-step-upcoming}"
|
||||
Padding="14,2,10,2"
|
||||
HasShadow="False">
|
||||
<Frame.Triggers>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
</Frame.Triggers>
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
RowDefinitions="Auto"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
FontSize="17"
|
||||
FontAttributes="Bold"
|
||||
LineBreakMode="WordWrap"
|
||||
MaxLines="2"
|
||||
TextColor="White">
|
||||
<Label.Triggers>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeFirstStep}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStep}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLockAndCancelReservation}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStep}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLockAndCancelReservation}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLockAndCancelReservation}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseDisposableLock}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStep}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseDisposableLock}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseDisposableLock}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
<Image.Triggers>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="1">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="2">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource xmark}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Polygon
|
||||
Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Points="0,0 20,0 10,10"
|
||||
IsVisible="False"
|
||||
HorizontalOptions="Center">
|
||||
<Polygon.Triggers>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.None}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Polygon.Triggers>
|
||||
</Polygon>
|
||||
|
||||
<!--2nd step-->
|
||||
<Frame
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="{DynamicResource process-step-upcoming}"
|
||||
Padding="14,2,10,2"
|
||||
HasShadow="False">
|
||||
<Frame.Triggers>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-upcoming}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
</Frame.Triggers>
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
RowDefinitions="Auto"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
FontSize="17"
|
||||
FontAttributes="Bold"
|
||||
LineBreakMode="WordWrap"
|
||||
MaxLines="2"
|
||||
TextColor="White">
|
||||
<Label.Triggers>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStep}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepReserve}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepReserve}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}"/>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepRent}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepRent}"/>
|
||||
</MultiTrigger>
|
||||
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockSecondStep}"/>
|
||||
</MultiTrigger>
|
||||
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLockAndCancelReservation}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockSecondStepCancelReservation}"/>
|
||||
</MultiTrigger>
|
||||
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseDisposableLock}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockSecondStepDisconnect}"/>
|
||||
</MultiTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
<Image.Triggers>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="2">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource xmark}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Polygon
|
||||
Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Points="0,0 20,0 10,10"
|
||||
IsVisible="False"
|
||||
HorizontalOptions="Center">
|
||||
<Polygon.Triggers>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.None}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Polygon.Triggers>
|
||||
</Polygon>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcess2StepsBar : ContentView
|
||||
{
|
||||
public RentalProcess2StepsBar ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
542
SharedGui/View/Bike/RentalProcess/RentalProcess3StepsBar.xaml
Normal file
542
SharedGui/View/Bike/RentalProcess/RentalProcess3StepsBar.xaml
Normal file
|
@ -0,0 +1,542 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcess3StepsBar">
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="check"></x:String>
|
||||
<x:String x:Key="xmark"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<Grid>
|
||||
|
||||
<!-- Progress bar finished-->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<sharedGui:RentalProcessStepBarFinished/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- 3 Steps Progress bar -->
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
IsVisible="True"
|
||||
RowDefinitions="50,Auto,10"
|
||||
RowSpacing="0"
|
||||
ColumnDefinitions="*,*,*">
|
||||
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<!--1st step-->
|
||||
<Frame
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="{DynamicResource process-step-upcoming}"
|
||||
HasShadow="False"
|
||||
Padding="14,2,10,2">
|
||||
<Frame.Triggers>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
</Frame.Triggers>
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
RowDefinitions="Auto"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
Text="{x:Static resources:AppResources.MarkingRentalProcessEndRentalFirstStep}"
|
||||
FontSize="17"
|
||||
FontAttributes="Bold"
|
||||
LineBreakMode="WordWrap"
|
||||
MaxLines="2"
|
||||
TextColor="White">
|
||||
<Label.Triggers>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessEndRentalFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessEndRentalFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessEndRentalFirstStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
<Image.Triggers>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="1">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="2">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="3">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource xmark}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Polygon
|
||||
Grid.Column="0"
|
||||
Grid.Row="2"
|
||||
Points="0,0 20,0 10,10"
|
||||
IsVisible="False"
|
||||
HorizontalOptions="Center">
|
||||
<Polygon.Triggers>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.None}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Polygon.Triggers>
|
||||
</Polygon>
|
||||
|
||||
<!--2nd step-->
|
||||
<Frame
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="{DynamicResource process-step-upcoming}"
|
||||
HasShadow="False"
|
||||
Padding="14,2,10,2">
|
||||
<Frame.Triggers>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-upcoming}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
</Frame.Triggers>
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
RowDefinitions="Auto"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
Text="{x:Static resources:AppResources.MarkingRentalProcessEndRentalSecondStep}"
|
||||
FontSize="17"
|
||||
FontAttributes="Bold"
|
||||
LineBreakMode="WordWrap"
|
||||
MaxLines="2"
|
||||
TextColor="White">
|
||||
<Label.Triggers>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessEndRentalSecondStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.MarkingRentalProcessEndRentalSecondStepFinished}"/>
|
||||
</MultiTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
<Image.Triggers>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="2">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="3">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource xmark}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Polygon
|
||||
Grid.Column="1"
|
||||
Grid.Row="2"
|
||||
Points="0,0 20,0 10,10"
|
||||
IsVisible="False"
|
||||
HorizontalOptions="Center">
|
||||
<Polygon.Triggers>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.None}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Polygon.Triggers>
|
||||
</Polygon>
|
||||
|
||||
<!--3rd step-->
|
||||
<Frame
|
||||
Grid.Column="2"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
BackgroundColor="{DynamicResource process-step-upcoming}"
|
||||
HasShadow="False"
|
||||
Padding="14,2,10,2">
|
||||
<Frame.Triggers>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-upcoming}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-upcoming}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-succeeded}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Frame">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
</Frame.Triggers>
|
||||
<Grid
|
||||
ColumnDefinitions="*,Auto"
|
||||
RowDefinitions="Auto"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
VerticalOptions="CenterAndExpand">
|
||||
<Label
|
||||
Grid.Column="0"
|
||||
Text="{x:Static resources:AppResources.MarkingRentalProcessEndRentalThirdStep}"
|
||||
FontSize="17"
|
||||
FontAttributes="Bold"
|
||||
LineBreakMode="WordWrap"
|
||||
MaxLines="2"
|
||||
TextColor="White"/>
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
IsVisible="False">
|
||||
<Image.Triggers>
|
||||
<DataTrigger TargetType="Image" Binding="{Binding RentalProcess.StepIndex}" Value="3">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource xmark}"
|
||||
FontFamily="FA-S"
|
||||
Size="Default"
|
||||
Color="White"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Polygon
|
||||
Grid.Column="2"
|
||||
Grid.Row="2"
|
||||
Points="0,0 20,0 10,10"
|
||||
IsVisible="False"
|
||||
HorizontalOptions="Center">
|
||||
<Polygon.Triggers>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.None}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-active}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Failed}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
<Setter Property="Fill" Value="{DynamicResource process-step-failed}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Polygon">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
</MultiTrigger>
|
||||
</Polygon.Triggers>
|
||||
</Polygon>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcess3StepsBar : ContentView
|
||||
{
|
||||
public RentalProcess3StepsBar ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
63
SharedGui/View/Bike/RentalProcess/RentalProcessBikeInfo.xaml
Normal file
63
SharedGui/View/Bike/RentalProcess/RentalProcessBikeInfo.xaml
Normal file
|
@ -0,0 +1,63 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcessBikeInfo">
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<!--Bike info-->
|
||||
<Frame
|
||||
Padding="20"
|
||||
Margin="0,5,0,5"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
BackgroundColor="White"
|
||||
HasShadow="False">
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="Auto,*"
|
||||
RowDefinitions="Auto,Auto"
|
||||
RowSpacing="0">
|
||||
|
||||
<!-- Icon of the bike -->
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Source="{Binding BikeInRentalProcess.DisplayedBikeImageSourceString}"
|
||||
HeightRequest="60"
|
||||
Aspect="AspectFit"
|
||||
HorizontalOptions="Start"
|
||||
VerticalOptions="End"/>
|
||||
|
||||
<!-- Name of the bike -->
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
FontAttributes="Bold"
|
||||
FontSize="Large"
|
||||
HorizontalTextAlignment="Right"
|
||||
IsVisible="{Binding BikeInRentalProcess.DisplayName, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
Text="{Binding BikeInRentalProcess.DisplayName}"/>
|
||||
|
||||
<!-- Id of the bike -->
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
Grid.Row="1"
|
||||
FontAttributes="Bold"
|
||||
HorizontalTextAlignment="Right"
|
||||
VerticalTextAlignment="Start"
|
||||
IsVisible="{Binding BikeInRentalProcess.DisplayId, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
Text="{Binding BikeInRentalProcess.DisplayId}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcessBikeInfo : ContentView
|
||||
{
|
||||
public RentalProcessBikeInfo ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,221 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcessBookedClosedEndRental"
|
||||
IsVisible="False">
|
||||
|
||||
<ContentView.Triggers>
|
||||
<DataTrigger TargetType="ContentView"
|
||||
Binding="{Binding RentalProcess.State}"
|
||||
Value="{x:Static rental_process:CurrentRentalProcess.EndRental}">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="ContentView"
|
||||
Binding="{Binding RentalProcess.State}"
|
||||
Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</DataTrigger>
|
||||
</ContentView.Triggers>
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="Triangle"></x:String>
|
||||
<x:String x:Key="LocationServiceSymbol"></x:String>
|
||||
<x:String x:Key="Upload"></x:String>
|
||||
<x:String x:Key="WriteFeedback"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="White"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
|
||||
<Grid RowDefinitions="60,Auto,Auto,1*"
|
||||
RowSpacing="0">
|
||||
|
||||
<!-- Title of rental process-->
|
||||
<Frame Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="{DynamicResource primary-back-title-color}"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
<Label
|
||||
Text="{x:Static resources:AppResources.ActionEndRental}"
|
||||
FontSize="Large"
|
||||
TextColor="White"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"/>
|
||||
</Frame>
|
||||
|
||||
<!--Bike info-->
|
||||
<sharedGui:RentalProcessBikeInfo Grid.Row="1"/>
|
||||
|
||||
<!-- Progress bar -->
|
||||
<sharedGui:RentalProcess3StepsBar Grid.Row="2"/>
|
||||
|
||||
<!--EndRental Content-->
|
||||
<Grid Grid.Row="3"
|
||||
RowSpacing="10"
|
||||
RowDefinitions="Auto,1*,Auto"
|
||||
Margin="0,40,0,20">
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<!--Step icon and Step text-->
|
||||
<Grid Grid.Row="0"
|
||||
Padding="30,0,0,0"
|
||||
ColumnDefinitions="20,Auto,1*,20"
|
||||
ColumnSpacing="10"
|
||||
HorizontalOptions="CenterAndExpand">
|
||||
|
||||
<!--Step icon-->
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End">
|
||||
<Image.Triggers>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource LocationServiceSymbol}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="3" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
|
||||
<!--Step text-->
|
||||
<Label
|
||||
Grid.Column="2"
|
||||
TextType="Html"
|
||||
Text="{Binding RentalProcess.StepInfoText}"
|
||||
FontSize="Large"
|
||||
HorizontalOptions="StartAndExpand"
|
||||
VerticalOptions="Center"
|
||||
TextColor="Black"
|
||||
Padding="0">
|
||||
</Label>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Spinner & Info text-->
|
||||
<Grid Grid.Row="1"
|
||||
Margin="30,30,30,0"
|
||||
RowDefinitions="Auto,1*"
|
||||
RowSpacing="30"
|
||||
IsVisible="True">
|
||||
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator Grid.Row="0"
|
||||
IsRunning="{Binding IsProcessWithRunningProcessView}"
|
||||
Scale="2"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="StartAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label Grid.Row="1"
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Medium"
|
||||
TextColor="DimGray"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
HorizontalTextAlignment="Center"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Attention: Important info-->
|
||||
<Frame Grid.Row="2"
|
||||
Margin="0,20,0,20"
|
||||
Padding="10"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
HasShadow="False"
|
||||
IsVisible="{Binding RentalProcess.ImportantStepInfoText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
BackgroundColor="{DynamicResource important-text-color}">
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="20,*,Auto,20"
|
||||
RowDefinitions="Auto">
|
||||
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End"
|
||||
IsVisible="True"
|
||||
TextColor="White"
|
||||
FontSize="Large"
|
||||
|
||||
Text="{Binding RentalProcess.ImportantStepInfoText}"
|
||||
FontAttributes="Bold">
|
||||
</Label>
|
||||
|
||||
<Image
|
||||
Grid.Column="2"
|
||||
HorizontalOptions="Start">
|
||||
<Image.Source>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Triangle}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="White"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,21 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
#if !NOXCT
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcessBookedClosedEndRental : ContentView
|
||||
{
|
||||
public RentalProcessBookedClosedEndRental()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
||||
# endif
|
|
@ -0,0 +1,207 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcessBookedClosedOpenLock"
|
||||
IsVisible="False">
|
||||
|
||||
<ContentView.Triggers>
|
||||
<DataTrigger TargetType="ContentView"
|
||||
Binding="{Binding RentalProcess.State}"
|
||||
Value="{x:Static rental_process:CurrentRentalProcess.OpenLock}">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
</ContentView.Triggers>
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="Glasses"></x:String>
|
||||
<x:String x:Key="Bluetooth"></x:String>
|
||||
<x:String x:Key="Upload"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="White"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
|
||||
<Grid RowDefinitions="60,Auto,Auto,1*"
|
||||
RowSpacing="0">
|
||||
|
||||
<!-- Title of rental process -->
|
||||
<Frame Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="{DynamicResource primary-back-title-color}"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
<Label
|
||||
Text="{x:Static resources:AppResources.ActionOpenLock}"
|
||||
FontSize="Large"
|
||||
TextColor="White"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"/>
|
||||
</Frame>
|
||||
|
||||
<!--Bike info-->
|
||||
<sharedGui:RentalProcessBikeInfo Grid.Row="1"/>
|
||||
|
||||
<!-- Progress bar -->
|
||||
<sharedGui:RentalProcess1StepBar Grid.Row="2"/>
|
||||
|
||||
<!--OpenLock Content-->
|
||||
<Grid Grid.Row="3"
|
||||
RowSpacing="10"
|
||||
RowDefinitions="Auto,1*,Auto"
|
||||
Margin="0,40,0,20">
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="1" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<!--Step-->
|
||||
<Grid Grid.Row="0"
|
||||
Padding="30,0,0,0"
|
||||
ColumnDefinitions="20,Auto,1*,20"
|
||||
ColumnSpacing="10"
|
||||
HorizontalOptions="CenterAndExpand">
|
||||
|
||||
<!--Step icon-->
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End">
|
||||
<Image.Triggers>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessOpenLockStepOpenLock}"/>
|
||||
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Bluetooth}"
|
||||
FontFamily="FA-B"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessOpenLockStepUpload}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
|
||||
<!--Step text-->
|
||||
<Label
|
||||
Grid.Column="2"
|
||||
TextType="Html"
|
||||
Text="{Binding RentalProcess.StepInfoText}"
|
||||
FontSize="Large"
|
||||
HorizontalOptions="Start"
|
||||
VerticalOptions="Center"
|
||||
TextColor="Black"
|
||||
Padding="0">
|
||||
</Label>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Spinner & Info text-->
|
||||
<Grid Grid.Row="1"
|
||||
Margin="30,30,30,0"
|
||||
RowDefinitions="Auto,1*"
|
||||
RowSpacing="30"
|
||||
IsVisible="True">
|
||||
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator Grid.Row="0"
|
||||
IsRunning="{Binding IsProcessWithRunningProcessView}"
|
||||
Scale="2"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="StartAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label Grid.Row="1"
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Medium"
|
||||
TextColor="DimGray"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
HorizontalTextAlignment="Center"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Attention: Important info-->
|
||||
<Frame Grid.Row="2"
|
||||
Margin="0,20,0,20"
|
||||
Padding="10"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
HasShadow="False"
|
||||
IsVisible="{Binding RentalProcess.ImportantStepInfoText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
BackgroundColor="{DynamicResource important-text-color}">
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="20,*,Auto,20"
|
||||
RowDefinitions="Auto">
|
||||
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End"
|
||||
IsVisible="True"
|
||||
TextColor="White"
|
||||
FontSize="Large"
|
||||
Text="{Binding RentalProcess.ImportantStepInfoText}"
|
||||
FontAttributes="Bold">
|
||||
</Label>
|
||||
|
||||
<Image
|
||||
Grid.Column="2"
|
||||
HorizontalOptions="Start">
|
||||
<Image.Source>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Glasses}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="White"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcessBookedClosedOpenLock : ContentView
|
||||
{
|
||||
public RentalProcessBookedClosedOpenLock()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,246 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcessBookedOpenCloseLock"
|
||||
IsVisible="False">
|
||||
|
||||
<ContentView.Triggers>
|
||||
<DataTrigger TargetType="ContentView"
|
||||
Binding="{Binding RentalProcess.State}"
|
||||
Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="ContentView"
|
||||
Binding="{Binding RentalProcess.State}"
|
||||
Value="{x:Static rental_process:CurrentRentalProcess.CloseLockAndCancelReservation}">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="ContentView"
|
||||
Binding="{Binding RentalProcess.State}"
|
||||
Value="{x:Static rental_process:CurrentRentalProcess.EndRental}">
|
||||
<Setter Property="IsVisible" Value="False" />
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</DataTrigger>
|
||||
</ContentView.Triggers>
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="Glasses"></x:String>
|
||||
<x:String x:Key="Bluetooth"></x:String>
|
||||
<x:String x:Key="Upload"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="White"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
|
||||
<Grid RowDefinitions="60,Auto,Auto,1*"
|
||||
RowSpacing="0">
|
||||
|
||||
<!-- Title of rental process -->
|
||||
<Frame Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="{DynamicResource primary-back-title-color}"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
<Label
|
||||
Text="{x:Static resources:AppResources.ActionCloseLock}"
|
||||
FontSize="Large"
|
||||
TextColor="White"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"/>
|
||||
</Frame>
|
||||
|
||||
<!--Bike info-->
|
||||
<sharedGui:RentalProcessBikeInfo Grid.Row="1"/>
|
||||
|
||||
<!-- Progress bar -->
|
||||
<sharedGui:RentalProcess2StepsBar Grid.Row="2"/>
|
||||
|
||||
<!--CloseLock Content-->
|
||||
<Grid Grid.Row="3"
|
||||
RowSpacing="10"
|
||||
RowDefinitions="Auto,1*,Auto"
|
||||
Margin="0,40,0,20">
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<!--Step-->
|
||||
<Grid Grid.Row="0"
|
||||
Padding="30,0,0,0"
|
||||
ColumnDefinitions="20,Auto,1*,20"
|
||||
ColumnSpacing="10"
|
||||
HorizontalOptions="CenterAndExpand">
|
||||
|
||||
<!--Step icon-->
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End">
|
||||
<Image.Triggers>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockStepCloseLock}"/>
|
||||
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Bluetooth}"
|
||||
FontFamily="FA-B"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockStepUpload}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockSecondStepCancelReservation}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessCloseLockSecondStepDisconnect}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Bluetooth}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
|
||||
<!--Step text-->
|
||||
<Label
|
||||
Grid.Column="2"
|
||||
TextType="Html"
|
||||
Text="{Binding RentalProcess.StepInfoText}"
|
||||
FontSize="Large"
|
||||
HorizontalOptions="Start"
|
||||
VerticalOptions="Center"
|
||||
TextColor="Black"
|
||||
Padding="0">
|
||||
</Label>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Spinner & Info text-->
|
||||
<Grid Grid.Row="1"
|
||||
Margin="30,30,30,0"
|
||||
RowDefinitions="Auto,1*"
|
||||
RowSpacing="30"
|
||||
IsVisible="True">
|
||||
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator Grid.Row="0"
|
||||
IsRunning="{Binding IsProcessWithRunningProcessView}"
|
||||
Scale="2"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="StartAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label Grid.Row="1"
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Medium"
|
||||
TextColor="DimGray"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
HorizontalTextAlignment="Center"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Attention: Important info-->
|
||||
<Frame Grid.Row="2"
|
||||
Margin="0,20,0,20"
|
||||
Padding="10"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
HasShadow="False"
|
||||
IsVisible="{Binding RentalProcess.ImportantStepInfoText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
BackgroundColor="{DynamicResource important-text-color}">
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="20,*,Auto,20"
|
||||
RowDefinitions="Auto">
|
||||
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End"
|
||||
IsVisible="True"
|
||||
TextColor="White"
|
||||
FontSize="Large"
|
||||
Text="{Binding RentalProcess.ImportantStepInfoText}"
|
||||
FontAttributes="Bold">
|
||||
</Label>
|
||||
|
||||
<Image
|
||||
Grid.Column="2"
|
||||
HorizontalOptions="Start">
|
||||
<Image.Source>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Glasses}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="White"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,17 @@
|
|||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
#if !NOXCT
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcessBookedOpenCloseLock : ContentView
|
||||
{
|
||||
|
||||
public RentalProcessBookedOpenCloseLock()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,278 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:sharedGui="clr-namespace:SharedGui.View.Bike.RentalProcess"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcessStartReservationOrRental"
|
||||
IsVisible="False">
|
||||
|
||||
<ContentView.Triggers>
|
||||
<DataTrigger TargetType="ContentView"
|
||||
Binding="{Binding RentalProcess.State}"
|
||||
Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}">
|
||||
<Setter Property="IsVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
</ContentView.Triggers>
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="Bluetooth"></x:String>
|
||||
<x:String x:Key="Upload"></x:String>
|
||||
<x:String x:Key="Triangle"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="White"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
|
||||
<Grid RowDefinitions="60,Auto,Auto,1*"
|
||||
RowSpacing="0">
|
||||
|
||||
<!-- Title of rental process -->
|
||||
<Frame Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="{DynamicResource primary-back-title-color}"
|
||||
Padding="0"
|
||||
Margin="0">
|
||||
<Label
|
||||
Text="{x:Static resources:AppResources.ActionRequestBike}"
|
||||
FontSize="Large"
|
||||
TextColor="White"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"/>
|
||||
</Frame>
|
||||
|
||||
<!--Bike info-->
|
||||
<sharedGui:RentalProcessBikeInfo Grid.Row="1"/>
|
||||
|
||||
<!-- Progress bar -->
|
||||
<sharedGui:RentalProcess2StepsBar Grid.Row="2"/>
|
||||
|
||||
<!--Request Bike Content-->
|
||||
<Grid Grid.Row="3"
|
||||
RowSpacing="10"
|
||||
RowDefinitions="Auto,1*,Auto"
|
||||
Margin="0,40,0,20">
|
||||
<Grid.Triggers>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepReserve}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepRent}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Grid">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepIndex}" Value="2" />
|
||||
<BindingCondition Binding="{Binding RentalProcess.Result}" Value="{x:Static rental_process:CurrentStepStatus.Succeeded}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="IsVisible" Value="False"/>
|
||||
<Setter Property="HeightRequest" Value="0"/>
|
||||
</MultiTrigger>
|
||||
</Grid.Triggers>
|
||||
|
||||
<!--Step icon and Step text-->
|
||||
<Grid Grid.Row="0"
|
||||
Padding="30,0,0,0"
|
||||
ColumnDefinitions="20,Auto,1*,20"
|
||||
ColumnSpacing="10"
|
||||
HorizontalOptions="CenterAndExpand">
|
||||
|
||||
<!--Step icon-->
|
||||
<Image
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End">
|
||||
<Image.Triggers>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeFirstStepRequest}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeFirstStepAuthenticateInfo}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeFirstStepConnect}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Bluetooth}"
|
||||
FontFamily="FA-B"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepRent}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepReserve}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Image">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.StepInfoText}" Value="{x:Static resources:AppResources.MarkingRentalProcessRequestBikeSecondStepStartRental}"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Upload}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="Black"/>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</MultiTrigger>
|
||||
</Image.Triggers>
|
||||
</Image>
|
||||
|
||||
<!--Step text-->
|
||||
<Label
|
||||
Grid.Column="2"
|
||||
TextType="Html"
|
||||
Text="{Binding RentalProcess.StepInfoText}"
|
||||
FontSize="Large"
|
||||
HorizontalOptions="StartAndExpand"
|
||||
VerticalOptions="Center"
|
||||
TextColor="Black"
|
||||
Padding="0">
|
||||
</Label>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Spinner & Info text-->
|
||||
<Grid Grid.Row="1"
|
||||
Margin="30,30,30,0"
|
||||
RowDefinitions="Auto,1*"
|
||||
RowSpacing="30"
|
||||
IsVisible="True">
|
||||
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator Grid.Row="0"
|
||||
IsRunning="{Binding IsProcessWithRunningProcessView}"
|
||||
Scale="2"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="StartAndExpand"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label Grid.Row="1"
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Medium"
|
||||
TextColor="DimGray"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
HorizontalTextAlignment="Center"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Attention: Important info-->
|
||||
<Frame Grid.Row="2"
|
||||
Margin="0,20,0,20"
|
||||
Padding="10"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
HasShadow="False"
|
||||
IsVisible="{Binding RentalProcess.ImportantStepInfoText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
|
||||
BackgroundColor="{DynamicResource important-text-color}">
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="20,*,Auto,20"
|
||||
RowDefinitions="Auto">
|
||||
|
||||
<Label
|
||||
Grid.Column="1"
|
||||
HorizontalOptions="End"
|
||||
IsVisible="True"
|
||||
TextColor="White"
|
||||
FontSize="Large"
|
||||
Text="{Binding RentalProcess.ImportantStepInfoText}"
|
||||
FontAttributes="Bold">
|
||||
</Label>
|
||||
|
||||
<Image
|
||||
Grid.Column="2"
|
||||
HorizontalOptions="Start">
|
||||
<Image.Source>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource Triangle}"
|
||||
FontFamily="FA-S"
|
||||
Size="40"
|
||||
Color="White"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Frame>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,17 @@
|
|||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
#if !NOXCT
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcessStartReservationOrRental : ContentView
|
||||
{
|
||||
|
||||
public RentalProcessStartReservationOrRental ()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:conv="clr-namespace:ShareeBike.View;assembly=SharedBusinessLogic"
|
||||
xmlns:rental_process="clr-namespace:ShareeBike.ViewModel.Bikes;assembly=SharedBusinessLogic"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.Bike.RentalProcess.RentalProcessStepBarFinished">
|
||||
|
||||
<ContentView.Resources>
|
||||
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
|
||||
<x:String x:Key="check"></x:String>
|
||||
<x:String x:Key="xmark"></x:String>
|
||||
</ContentView.Resources>
|
||||
|
||||
<ContentView.Content>
|
||||
|
||||
<!-- Progress bar -->
|
||||
<Grid
|
||||
ColumnDefinitions="1*,80,40"
|
||||
RowDefinitions="15,50,15"
|
||||
RowSpacing="0">
|
||||
|
||||
<Frame
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
Grid.Row="1"
|
||||
BackgroundColor="{DynamicResource process-step-succeeded}"
|
||||
Padding="0">
|
||||
|
||||
<Label
|
||||
Padding="40,0,0,0"
|
||||
VerticalOptions="Center"
|
||||
TextColor="White"
|
||||
FontAttributes="Bold"
|
||||
Text="">
|
||||
<Label.Triggers>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.StartReservationOrRental}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.StatusTextReserved}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.OpenLock}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.StatusTextLockOpened}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.CloseLock}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.StatusTextLockClosed}" />
|
||||
</MultiTrigger>
|
||||
<MultiTrigger TargetType="Label">
|
||||
<MultiTrigger.Conditions>
|
||||
<BindingCondition Binding="{Binding RentalProcess.State}" Value="{x:Static rental_process:CurrentRentalProcess.EndRental}" />
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Text" Value="{x:Static resources:AppResources.StatusTextRentalEnded}" />
|
||||
</MultiTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
|
||||
</Frame>
|
||||
|
||||
<Frame
|
||||
Grid.Column="1"
|
||||
Grid.Row="0"
|
||||
Grid.RowSpan="3"
|
||||
BackgroundColor="{DynamicResource process-step-succeeded}"
|
||||
BorderColor="White"
|
||||
CornerRadius="40">
|
||||
<Image>
|
||||
<Image.Source>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource check}"
|
||||
FontFamily="FA-S"
|
||||
Size="22"
|
||||
Color="White"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
|
||||
</ContentView.Content>
|
||||
|
||||
</ContentView>
|
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View.Bike.RentalProcess
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RentalProcessStepBarFinished : ContentView
|
||||
{
|
||||
public RentalProcessStepBarFinished ()
|
||||
{
|
||||
InitializeComponent ();
|
||||
}
|
||||
}
|
||||
}
|
41
SharedGui/View/HintForRefreshingPageView.xaml
Normal file
41
SharedGui/View/HintForRefreshingPageView.xaml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.HintForRefreshingPageView">
|
||||
|
||||
<StackLayout
|
||||
Orientation="Horizontal"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
IsVisible="{Binding IsBikesDataOutdatedLabelVisible}"
|
||||
Padding="0"
|
||||
Spacing="0"
|
||||
Margin="0">
|
||||
|
||||
<StackLayout.Triggers>
|
||||
<DataTrigger TargetType="StackLayout"
|
||||
Binding="{Binding IsBikesDataOutdatedLabelVisible}"
|
||||
Value="false">
|
||||
<Setter Property="HeightRequest" Value="0" />
|
||||
</DataTrigger>
|
||||
</StackLayout.Triggers>
|
||||
|
||||
<Image>
|
||||
<Image.Source>
|
||||
<FontImageSource
|
||||
Glyph="{StaticResource ArrowDown}"
|
||||
Color="DimGray"
|
||||
FontFamily="FA-S"
|
||||
Size="Small"/>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
|
||||
<Label
|
||||
TextColor="DimGray"
|
||||
FontSize="Small"
|
||||
Padding="5"
|
||||
Text="{x:Static resources:AppResources.MarkingDataIsFromCache}"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</ContentView>
|
23
SharedGui/View/HintForRefreshingPageView.xaml.cs
Normal file
23
SharedGui/View/HintForRefreshingPageView.xaml.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SharedGui.ViewModel;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class HintForRefreshingPageView : ContentView
|
||||
{
|
||||
public HintForRefreshingPageView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.BindingContext = new NotConnectedToNetViewModel();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
31
SharedGui/View/NotConnectedToNetView.xaml
Normal file
31
SharedGui/View/NotConnectedToNetView.xaml
Normal file
|
@ -0,0 +1,31 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
x:Class="SharedGui.View.NotConnectedToNetView">
|
||||
|
||||
<StackLayout
|
||||
BackgroundColor="{x:DynamicResource attention-color}"
|
||||
IsVisible="{Binding IsNotConnectedToNet}"
|
||||
Padding="0"
|
||||
Spacing="0"
|
||||
Margin="0">
|
||||
|
||||
<StackLayout.Triggers>
|
||||
<DataTrigger TargetType="StackLayout"
|
||||
Binding="{Binding IsNotConnectedToNet}"
|
||||
Value="false">
|
||||
<Setter Property="HeightRequest" Value="0" />
|
||||
</DataTrigger>
|
||||
</StackLayout.Triggers>
|
||||
|
||||
<Label Text="{x:Static resources:AppResources.MarkingNoWeb}"
|
||||
TextColor="White"
|
||||
FontSize="Small"
|
||||
Padding="5"
|
||||
HorizontalTextAlignment="Center"
|
||||
HorizontalOptions="CenterAndExpand"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</ContentView>
|
25
SharedGui/View/NotConnectedToNetView.xaml.cs
Normal file
25
SharedGui/View/NotConnectedToNetView.xaml.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using SharedGui.ViewModel;
|
||||
using Xamarin.Essentials;
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class NotConnectedToNetView : ContentView, INotifyPropertyChanged
|
||||
{
|
||||
public NotConnectedToNetView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.BindingContext = new NotConnectedToNetViewModel();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
62
SharedGui/View/RunningProcessView.xaml
Normal file
62
SharedGui/View/RunningProcessView.xaml
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView
|
||||
xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SharedGui.View.RunningProcessView">
|
||||
|
||||
<ContentView.Content>
|
||||
<!--Grid for different Opacity values-->
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Background White, half transparent-->
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
HorizontalOptions="FillAndExpand"
|
||||
VerticalOptions="FillAndExpand"
|
||||
BackgroundColor="Gray"
|
||||
Opacity=".80"
|
||||
HasShadow="False"
|
||||
CornerRadius="0"/>
|
||||
|
||||
<!--Show spinner and info text-->
|
||||
<!--Background White-->
|
||||
<Frame
|
||||
Grid.Row="0"
|
||||
Style="{StaticResource RunningProcessFrame}"
|
||||
WidthRequest="240"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"
|
||||
BackgroundColor="White"
|
||||
Padding="10">
|
||||
|
||||
<StackLayout Orientation="Vertical">
|
||||
|
||||
<!--Spinner-->
|
||||
<ActivityIndicator
|
||||
IsRunning="{Binding IsProcessWithRunningProcessView}"
|
||||
Scale="2"
|
||||
VerticalOptions="Center"
|
||||
HorizontalOptions="Center"
|
||||
Margin="20"
|
||||
Color="{x:DynamicResource primary-back-title-color}"/>
|
||||
|
||||
<!--Info text-->
|
||||
<Label
|
||||
TextType="Html"
|
||||
Text="{Binding StatusInfoText}"
|
||||
FontSize="Small"
|
||||
WidthRequest="200"
|
||||
HorizontalOptions="CenterAndExpand"
|
||||
HorizontalTextAlignment="Center"
|
||||
Padding="0"/>
|
||||
|
||||
</StackLayout>
|
||||
|
||||
</Frame>
|
||||
|
||||
</Grid>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
20
SharedGui/View/RunningProcessView.xaml.cs
Normal file
20
SharedGui/View/RunningProcessView.xaml.cs
Normal file
|
@ -0,0 +1,20 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class RunningProcessView : ContentView
|
||||
{
|
||||
public RunningProcessView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
45
SharedGui/View/TogglePasswordEntry.xaml
Normal file
45
SharedGui/View/TogglePasswordEntry.xaml
Normal file
|
@ -0,0 +1,45 @@
|
|||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SharedGui.View.TogglePasswordEntry"
|
||||
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
|
||||
x:Name="root">
|
||||
<ContentView.Content>
|
||||
<Grid BindingContext="{x:Reference root}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="20"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Entry Placeholder="{Binding Placeholder}"
|
||||
IsPassword="{Binding HidePassword}"
|
||||
Text="{Binding Text}"/>
|
||||
<ImageButton Clicked="OnImageButtonClicked"
|
||||
BackgroundColor="Transparent"
|
||||
Grid.Column="1">
|
||||
<ImageButton.Triggers>
|
||||
<DataTrigger TargetType="ImageButton"
|
||||
Binding="{Binding HidePassword}"
|
||||
Value="True">
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource Glyph="{StaticResource EyeOpen}"
|
||||
Color="{Binding HidePasswordColor}"
|
||||
FontFamily="FA-S" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
<DataTrigger TargetType="ImageButton"
|
||||
Binding="{Binding HidePassword}"
|
||||
Value="False">
|
||||
<Setter Property="Source">
|
||||
<Setter.Value>
|
||||
<FontImageSource Glyph="{StaticResource EyeClose}"
|
||||
Color="{Binding HidePasswordColor}"
|
||||
FontFamily="FA-S" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</DataTrigger>
|
||||
</ImageButton.Triggers>
|
||||
</ImageButton>
|
||||
</Grid>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
65
SharedGui/View/TogglePasswordEntry.xaml.cs
Normal file
65
SharedGui/View/TogglePasswordEntry.xaml.cs
Normal file
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class TogglePasswordEntry : ContentView
|
||||
{
|
||||
|
||||
public static readonly BindableProperty PlaceholderProperty =
|
||||
BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(TogglePasswordEntry));
|
||||
|
||||
public static readonly BindableProperty TextProperty =
|
||||
BindableProperty.Create(nameof(Text), typeof(string), typeof(TogglePasswordEntry),
|
||||
defaultBindingMode: BindingMode.TwoWay);
|
||||
|
||||
public static readonly BindableProperty HidePasswordProperty =
|
||||
BindableProperty.Create(nameof(HidePassword), typeof(bool), typeof(TogglePasswordEntry),
|
||||
defaultValue: true);
|
||||
|
||||
public static readonly BindableProperty HidePasswordColorProperty =
|
||||
BindableProperty.Create(nameof(HidePasswordColor), typeof(Color), typeof(TogglePasswordEntry),
|
||||
defaultValue: Color.DimGray);
|
||||
|
||||
public string Placeholder
|
||||
{
|
||||
get => (string)GetValue(PlaceholderProperty);
|
||||
set => SetValue(PlaceholderProperty, value);
|
||||
}
|
||||
|
||||
public string Text
|
||||
{
|
||||
get => (string)GetValue(TextProperty);
|
||||
set => SetValue(TextProperty, value);
|
||||
}
|
||||
|
||||
public bool HidePassword
|
||||
{
|
||||
get => (bool)GetValue(HidePasswordProperty);
|
||||
set => SetValue(HidePasswordProperty, value);
|
||||
}
|
||||
|
||||
public Color HidePasswordColor
|
||||
{
|
||||
get => (Color)GetValue(HidePasswordColorProperty);
|
||||
set => SetValue(HidePasswordColorProperty, value);
|
||||
}
|
||||
|
||||
public TogglePasswordEntry()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void OnImageButtonClicked(object sender, EventArgs e)
|
||||
{
|
||||
HidePassword = !HidePassword;
|
||||
}
|
||||
}
|
||||
}
|
21
SharedGui/View/VersionNumberView.xaml
Normal file
21
SharedGui/View/VersionNumberView.xaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SharedGui.View.VersionNumberView">
|
||||
<ContentView.Content>
|
||||
<StackLayout HorizontalOptions="Center"
|
||||
Orientation="Horizontal"
|
||||
Padding="0,0,0,10">
|
||||
<Label
|
||||
HorizontalOptions="End"
|
||||
FontSize="12"
|
||||
TextColor="DimGray"
|
||||
Text="App Version"/>
|
||||
<Label
|
||||
HorizontalOptions="Start"
|
||||
FontSize="12"
|
||||
TextColor="DimGray"
|
||||
x:Name="CurrentAppVersionNumber"/>
|
||||
</StackLayout>
|
||||
</ContentView.Content>
|
||||
</ContentView>
|
23
SharedGui/View/VersionNumberView.xaml.cs
Normal file
23
SharedGui/View/VersionNumberView.xaml.cs
Normal file
|
@ -0,0 +1,23 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Xamarin.Forms;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace SharedGui.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class VersionNumberView : ContentView
|
||||
{
|
||||
public VersionNumberView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
CurrentAppVersionNumber.Text = ShareeBike.Model.CurrentAppInfos.CurrentAppVersion;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue