using System.Threading.Tasks;
using TINK.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS;
namespace TINK.View
{
public interface IViewService
{
/// Displays alert message.
/// Title of message.
/// Message to display.
/// Text of button.
Task DisplayAlert(
string title,
string message,
string cancel);
/// Displays alert message.
/// Title of message.
/// Message to display.
/// Detailed error description.
/// Text of button.
Task DisplayAdvancedAlert(
string title,
string message,
string details,
string cancel);
/// Displays alert message.
/// Title of message.
/// Message to display.
/// Text of accept button.
/// Text of button.
/// True if user pressed accept.
Task DisplayAlert(string title, string message, string accept, string cancel);
/// Displays alert message.
/// Title of message.
/// Message to display.
/// Detailed error description.
/// Text of accept button.
/// Text of button.
/// True if user pressed accept.
Task DisplayAdvancedAlert(string title, string message, string details, string accept, string cancel);
/// Displays an action sheet.
/// Title of message.
/// Message to display.
/// Text of button.
///
/// Buttons holding options to select.
/// T
Task DisplayActionSheet(string title, string cancel, string destruction, params string[] buttons);
#if USEFLYOUT
/// Shows a page.
/// Type of page to show.
/// Title of page to show.
void ShowPage(ViewTypes type, string title = null);
#else
/// Shows a page.
/// Route of the page to show.
#if USCSHARP9
public Task ShowPage(string route);
#else
Task ShowPage(string route);
#endif
#endif
/// Pushes a page onto the stack.
/// Page to display.
Task PushAsync(ViewTypes typeOfPage);
/// Pushes a page onto the modal stack.
/// Page to display.
Task PushModalAsync(ViewTypes typeOfPage);
/// Pushes a page onto the modal stack.
Task PopModalAsync();
/// Displays user feedback popup.
/// Object holding info about battery. For some batteries charging level might need to be updated by user.
/// Co2 saving information.
/// User feedback.
Task DisplayUserFeedbackPopup(
IBattery battery = null,
string co2Saving = null);
#if USCSHARP9
///
/// Feedback given by user when returning bike.
///
public interface IUserFeedback
{
///
/// Holds whether bike is broken or not.
///
bool IsBikeBroken { get; set; }
///
/// Holds either
/// - general feedback
/// - error description of broken bike
/// or both.
///
string Message { get; set; }
}
#endif
}
#if !USCSHARP9
///
/// Feedback given by user when returning bike.
///
public interface IUserFeedback
{
///
/// Holds the current chargeing level of the battery in bars, null if unkonwn.
///
int? CurrentChargeBars { get; set; }
///
/// Holds whether bike is broken or not.
///
bool IsBikeBroken { get; set; }
///
/// Holds either
/// - general feedback
/// - error description of broken bike
/// or both.
///
string Message { get; set; }
}
#endif
}