Saxonite 1.2.11.3. Sandtrap.
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
using Sarand.Net.Standard.Base.Core;
|
||||
using Sarand.Net.Standard.Base.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Sarand.Net.Mobile.Xamarin.Forms.Pages
|
||||
{
|
||||
//=======================================================================
|
||||
public abstract class SaxContentPage : ContentPage
|
||||
{
|
||||
//-------------------------------------------------------------------
|
||||
// Definitions.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Data members.
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Construction.
|
||||
protected SaxContentPage ()
|
||||
{
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// Properties.
|
||||
public abstract String MessageTitleDefault { get; }
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P o p u p M e s s a g e s
|
||||
//-------------------------------------------------------------------
|
||||
public enum AlertMode
|
||||
{
|
||||
OK,
|
||||
Close,
|
||||
}
|
||||
public Task DisplayAlert (String message, AlertMode alertMode = AlertMode.OK)
|
||||
{
|
||||
String title = StringUtil.OnEmpty(Title, MessageTitleDefault);
|
||||
String cancel = "OK";
|
||||
if (alertMode == AlertMode.Close)
|
||||
cancel = "Close";
|
||||
return DisplayAlert(title, message, cancel);
|
||||
}
|
||||
public enum ConfirmMode
|
||||
{
|
||||
YesNo,
|
||||
OkCancel
|
||||
}
|
||||
public async Task<bool> DisplayConfirm (String message, ConfirmMode confirmMode = ConfirmMode.OkCancel)
|
||||
{
|
||||
String title = StringUtil.OnEmpty(Title, MessageTitleDefault);
|
||||
String accept = "Yes";
|
||||
String cancel = "No";
|
||||
if (confirmMode == ConfirmMode.OkCancel)
|
||||
{
|
||||
accept = "OK";
|
||||
cancel = "Cancel";
|
||||
}
|
||||
return await DisplayAlert(title, message, accept, cancel);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
// P a g e E v e n t s
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnParentSet ()
|
||||
{
|
||||
base.OnParentSet();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnPropertyChanged ([CallerMemberName] string propertyName = null)
|
||||
{
|
||||
base.OnPropertyChanged(propertyName);
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnAppearing ()
|
||||
{
|
||||
base.OnAppearing();
|
||||
}
|
||||
//-------------------------------------------------------------------
|
||||
protected override void OnDisappearing ()
|
||||
{
|
||||
base.OnDisappearing();
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
}
|
||||
//=======================================================================
|
||||
}
|
||||
Reference in New Issue
Block a user