protected override void OnCreate(Bundle bundle) { base.OnCreate(bundle); SetContentView(Resource.Layout.Main); var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); SetupTabControl(); SetupAvatarEdit(); Init(); progressDialog = new ProgressDialogForm(this); }
/// <inheritdoc/> public async Task RunModalTaskAsync(Func <NefsProgress, Task> task) { // Create a progress dialog var progressForm = new ProgressDialogForm(this.UiService); // Show the progress dialog. Don't await this call. Need to allow dialog to show // modally, but want to continue execution. var progressFormTask = progressForm.ShowDialogAsync(); // Run the task try { await task(progressForm.ProgressInfo); } catch (Exception ex) { Log.LogError(ex.Message); } // Close the progress dialog progressForm.Close(); }
private void ButtonProgressDialog_Click(object sender, EventArgs e) { using (var f = new ProgressDialogForm()) f.ShowDialog(); }