using System.Threading.Tasks; using ShareeBike.Model.Bikes.BikeInfoNS.DriveNS.BatteryNS; namespace ShareeBike.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); /// Shows a page. /// Route of the page to show. #if USCSHARP9 public Task ShowPage(string route); #else Task ShowPage(string route); #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. /// User feedback. Task DisplayUserFeedbackPopup( IBatteryMutable battery = 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 charging level of the battery in bars, null if unknown. /// 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 }