2017-11-17 23:16:12 +00:00
|
|
|
|
using Ooui;
|
|
|
|
|
using System;
|
2017-11-17 05:29:35 +00:00
|
|
|
|
|
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
using Xamarin.Forms.Xaml;
|
|
|
|
|
|
|
|
|
|
namespace Samples
|
|
|
|
|
{
|
|
|
|
|
[XamlCompilation(XamlCompilationOptions.Compile)]
|
2017-11-19 18:49:17 +00:00
|
|
|
|
public partial class DisplayAlertPage : ContentPage
|
2017-11-17 05:29:35 +00:00
|
|
|
|
{
|
2017-11-19 18:49:17 +00:00
|
|
|
|
public DisplayAlertPage ()
|
2017-11-17 05:29:35 +00:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent ();
|
|
|
|
|
}
|
|
|
|
|
|
2018-03-23 19:40:51 +00:00
|
|
|
|
protected override void OnAppearing ()
|
|
|
|
|
{
|
|
|
|
|
base.OnAppearing ();
|
|
|
|
|
|
|
|
|
|
status.Text = "Page appeared";
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-15 23:55:04 +00:00
|
|
|
|
protected override void OnDisappearing ()
|
|
|
|
|
{
|
|
|
|
|
base.OnDisappearing ();
|
|
|
|
|
|
|
|
|
|
Console.WriteLine ("Disappear was called");
|
|
|
|
|
}
|
|
|
|
|
|
2017-11-17 05:29:35 +00:00
|
|
|
|
public async void OnButtonClicked(object sender, EventArgs args)
|
|
|
|
|
{
|
2017-11-26 17:28:26 +00:00
|
|
|
|
activity.IsRunning = true;
|
2017-11-26 17:43:52 +00:00
|
|
|
|
progress.Progress = 0.5;
|
2017-11-26 18:32:55 +00:00
|
|
|
|
var result = await DisplayAlert($"Alert @ {datePicker.Date}", "This is a test of the dialog. Is it working?", "YES", "NO");
|
2017-11-17 22:39:11 +00:00
|
|
|
|
await DisplayAlert("Alert Response", $"You selected value: {result}", "OK");
|
2017-11-26 17:28:26 +00:00
|
|
|
|
activity.IsRunning = false;
|
2017-11-26 17:43:52 +00:00
|
|
|
|
progress.Progress = 1.0;
|
2017-11-17 05:29:35 +00:00
|
|
|
|
}
|
2017-11-19 18:49:17 +00:00
|
|
|
|
}
|
2017-11-17 05:29:35 +00:00
|
|
|
|
}
|