Merge
continuous-integration/drone/push Build was killed
Details
continuous-integration/drone/push Build was killed
Details
commit
bc1129c003
Binary file not shown.
@ -0,0 +1,15 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
|
||||||
|
x:Class="Stim.ConfirmationPopup"
|
||||||
|
CanBeDismissedByTappingOutsideOfPopup="False">
|
||||||
|
|
||||||
|
<Grid RowDefinitions="*, *" ColumnDefinitions="*, *">
|
||||||
|
<Label Grid.ColumnSpan="2" x:Name="placeholder" Style="{StaticResource popupLabel}"/>
|
||||||
|
<Button Grid.Row="2" Style="{StaticResource popupButton}" Text="Non" Clicked="No"/>
|
||||||
|
<Button Grid.Row="2" Grid.Column="2" Style="{StaticResource popupButton}" Text="Oui" Clicked="Yes"/>
|
||||||
|
</Grid>
|
||||||
|
</toolkit:Popup>
|
||||||
|
|
||||||
|
|
@ -0,0 +1,17 @@
|
|||||||
|
using CommunityToolkit.Maui.Views;
|
||||||
|
|
||||||
|
namespace Stim;
|
||||||
|
|
||||||
|
public partial class ConfirmationPopup : Popup
|
||||||
|
{
|
||||||
|
public ConfirmationPopup(string message)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
placeholder.Text = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Yes(object sender, EventArgs e)
|
||||||
|
=> Close(true);
|
||||||
|
public void No(object sender, EventArgs e)
|
||||||
|
=> Close(false);
|
||||||
|
}
|
After Width: | Height: | Size: 7.1 KiB |
After Width: | Height: | Size: 7.7 KiB |
After Width: | Height: | Size: 8.0 KiB |
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
xmlns:conv="clr-namespace:Stim.Converter"
|
||||||
|
x:Class="Stim.StarsContainer"
|
||||||
|
x:Name="StarsContainerView">
|
||||||
|
|
||||||
|
<ContentView.Resources>
|
||||||
|
<conv:DoubleToStar x:Key="DoubleToStar" EtoilePleine="etoile_pleine.png" EtoileMiPleine="etoile_mi_pleine.png" EtoileVide="etoile_vide.png"/>
|
||||||
|
</ContentView.Resources>
|
||||||
|
|
||||||
|
<HorizontalStackLayout Grid.Column="1" HorizontalOptions="End" BindingContext="{x:Reference StarsContainerView}">
|
||||||
|
<Label Text="{Binding Rate, FallbackValue='0', StringFormat='{0}/5'}" FontSize="20"/>
|
||||||
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='1'}"/>
|
||||||
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='2'}"/>
|
||||||
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='3'}"/>
|
||||||
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='4'}"/>
|
||||||
|
<Image Style="{StaticResource star}" Source="{Binding Rate, FallbackValue='0', Converter={StaticResource DoubleToStar}, ConverterParameter='5'}"/>
|
||||||
|
</HorizontalStackLayout>
|
||||||
|
</ContentView>
|
@ -0,0 +1,18 @@
|
|||||||
|
namespace Stim;
|
||||||
|
|
||||||
|
public partial class StarsContainer : ContentView
|
||||||
|
{
|
||||||
|
public static readonly BindableProperty RateProperty =
|
||||||
|
BindableProperty.Create(nameof(Rate), typeof(double), typeof(StarsContainer), double.NaN);
|
||||||
|
|
||||||
|
public double Rate
|
||||||
|
{
|
||||||
|
get => (double)GetValue(StarsContainer.RateProperty);
|
||||||
|
set => SetValue(StarsContainer.RateProperty, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public StarsContainer()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue