mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-19 11:37:28 +02:00
Version 3.0.255
This commit is contained in:
parent
db9c288584
commit
5a26bf273b
1495 changed files with 159465 additions and 5060 deletions
58
LastenradBayern/TINK/View/FeedbackPopup.xaml.cs
Normal file
58
LastenradBayern/TINK/View/FeedbackPopup.xaml.cs
Normal file
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Xamarin.CommunityToolkit.UI.Views;
|
||||
using Xamarin.Forms.Xaml;
|
||||
|
||||
namespace TINK.View
|
||||
{
|
||||
[XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
public partial class FeedbackPopup : Popup<FeedbackPopup.Result>
|
||||
{
|
||||
public FeedbackPopup()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override FeedbackPopup.Result GetLightDismissResult()
|
||||
{
|
||||
return new Result
|
||||
{
|
||||
Message = feedbackMessage.Text,
|
||||
IsBikeBroken = brockenCheckBox.IsChecked
|
||||
};
|
||||
}
|
||||
|
||||
private void OnOkClicked(object sender, EventArgs eventArgs)
|
||||
{
|
||||
var result = new Result
|
||||
{
|
||||
Message = feedbackMessage.Text,
|
||||
IsBikeBroken = brockenCheckBox.IsChecked
|
||||
};
|
||||
|
||||
Dismiss(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Feedback given by user when returning bike.
|
||||
/// </summary>
|
||||
#if USCSHARP9
|
||||
public class Result : IViewService.IUserFeedback
|
||||
#else
|
||||
public new class Result : IUserFeedback
|
||||
#endif
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds whether bike is broken or not.
|
||||
/// </summary>
|
||||
public bool IsBikeBroken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Holds either
|
||||
/// - general feedback
|
||||
/// - error description of broken bike
|
||||
/// or both.
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue