Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        /// <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();
        }
Esempio n. 3
0
 private void ButtonProgressDialog_Click(object sender, EventArgs e)
 {
     using (var f = new ProgressDialogForm())
         f.ShowDialog();
 }