当前位置: 首页>>代码示例>>C#>>正文


C# ProgressDialog.Dismiss方法代码示例

本文整理汇总了C#中Android.App.ProgressDialog.Dismiss方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressDialog.Dismiss方法的具体用法?C# ProgressDialog.Dismiss怎么用?C# ProgressDialog.Dismiss使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Android.App.ProgressDialog的用法示例。


在下文中一共展示了ProgressDialog.Dismiss方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            var groupName = Intent.GetStringExtra("name");
            Title = groupName;
            GroupName = groupName;

            _contactRepo = new ContactRepository(this);

            _progressDialog = new ProgressDialog(this);
            _progressDialog.SetMessage("Loading Contacts.  Please wait...");
            _progressDialog.Show();

            Task.Factory
                .StartNew(() =>
                    _contactRepo.GetAllMobile())
                .ContinueWith(task =>
                    RunOnUiThread(() =>
                    {
                        if (task.Result != null)
                            DisplayContacts(task.Result);
                        _progressDialog.Dismiss ();
                    }));
        }
开发者ID:jheerman,项目名称:Prattle,代码行数:25,代码来源:NewSmsGroupActivity.cs

示例2: fnGetProfileInfoFromGoogle

		async Task<bool> fnGetProfileInfoFromGoogle()
		{ 
			progress =  ProgressDialog.Show (this,"","Please wait..."); 
			bool isValid=false;
			//Google API REST request
			string userInfo = await fnDownloadString (string.Format(googUesrInfoAccessleUrl, access_token ));  
			if ( userInfo != "Exception" )
			{ 
				googleInfo = JsonConvert.DeserializeObject<GoogleInfo> ( userInfo );   
				isValid = true;
			}
			else
			{ 
				if ( progress != null )
				{
					progress.Dismiss ();
					progress = null;
				}   
				isValid = false;
				Toast.MakeText ( this , "Connection failed! Please try again" , ToastLength.Short ).Show (); 
			}
			if ( progress != null )
			{
				progress.Dismiss ();
				progress = null;
			}  
			return isValid;
		}
开发者ID:suchithm,项目名称:LoginByGoogle_Xamarin,代码行数:28,代码来源:MainActivity.cs

示例3: OnCreate

        protected async override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // shows a spinner while it gets polls from database
            var progressDialog = new ProgressDialog(this);
            progressDialog.Show();
            {
                try
                {
                    // gets all the polls from the database
                    polls = await VotingService.MobileService.GetTable<Poll>().ToListAsync();
                }
                catch (Exception exc)
                {
                    // error dialog that shows if something goes wrong
                    var errorDialog = new AlertDialog.Builder(this).SetTitle("Oops!").SetMessage("Something went wrong " + exc.ToString()).SetPositiveButton("Okay", (sender1, e1) =>
                    {

                    }).Create();
                    errorDialog.Show();
                }
            };
            // ends spinner on completion
            progressDialog.Dismiss();

            // created table for polls
            ListAdapter = new ArrayAdapter<Poll>(this, Android.Resource.Layout.SimpleListItem1, polls);
        }
开发者ID:nickpeppers,项目名称:VotingPoll,代码行数:29,代码来源:ViewPollsActivity.cs

示例4: OnCreateView

        public override Android.Views.View OnCreateView(Android.Views.LayoutInflater inflater, Android.Views.ViewGroup container, Android.OS.Bundle savedInstanceState)
        {
            //			Console.WriteLine("[{0}] OnCreateView Called: {1}", TAG, DateTime.Now.ToLongTimeString());
            View v = inflater.Inflate(Resource.Layout.fragment_photo, container, false);

            mImageView = v.FindViewById<ImageView>(Resource.Id.photoView);

            photoUrl = Activity.Intent.GetStringExtra(PhotoGalleryFragment.PHOTO_URL_EXTRA);

            photoUrl = photoUrl.Substring(0, photoUrl.Length-6) + ".jpg";
            photoFilename = new FlickrFetchr().GetFilenameFromUrl(photoUrl);

            ProgressDialog pg = new ProgressDialog(Activity);
            pg.SetMessage(Resources.GetString(Resource.String.loading_photo_message));
            pg.SetTitle(Resources.GetString(Resource.String.loading_photo_title));
            pg.SetCancelable(false);
            pg.Show();

            Task.Run(async () => {
                Bitmap image = await new FlickrFetchr().GetImageBitmapAsync(photoUrl, 0, new CancellationTokenSource().Token, photoFilename).ConfigureAwait(false);
                Activity.RunOnUiThread(() => {
                    mImageView.SetImageBitmap(image);
                    //Console.WriteLine("[{0}] File created: {1}", TAG, photoUrl);
                    pg.Dismiss();
                });
            });

            return v;
        }
开发者ID:yingfangdu,项目名称:BNR,代码行数:29,代码来源:PhotoFragment.cs

示例5: OnResume

		protected async override void OnResume ()
		{
			try
			{
				base.OnResume ();

				ProgressDialogLogin = ProgressDialog.Show(this, "", "Loading...");

				await GetWorkshops();

				if (ProgressDialogLogin != null)
				{
					ProgressDialogLogin.Dismiss();
					ProgressDialogLogin = null;
				}
			}
			catch (Exception e) 
			{
				ErrorHandling.LogError (e, this);
			}
			finally 
			{
				if (ProgressDialogLogin != null)
				{
					ProgressDialogLogin.Dismiss();
					ProgressDialogLogin = null;
				}
			}
		}
开发者ID:rohan12111,项目名称:SDPHELPSAPP,代码行数:29,代码来源:MakeBookingListActivity.cs

示例6: OnResume

		protected override void OnResume ()
		{
			base.OnResume ();

			Log.Debug (logTag, "ActivityBase.OnCreate.");

			if (!App.Current.IsInitialized){
			Log.Debug(logTag, "ActivityBase.App is NOT initialized");
				// show the loading overlay on the UI thread
				progress = ProgressDialog.Show(this, "Loading", "Please Wait...", true); 

				// when the app has initialized, hide the progress bar and call Finished Initialzing
				initializedEventHandler = (s, e) => {
					// call finished initializing so that any derived activities have a chance to do work
					RunOnUiThread( () => {
						this.FinishedInitializing();
						// hide the progress bar
						if (progress != null)
							progress.Dismiss();
					});
				};
				App.Current.Initialized += initializedEventHandler;

			} else {
				Log.Debug(logTag, "ActivityBase.App is initialized");
			}
		}
开发者ID:BratislavDimitrov,项目名称:monodroid-samples,代码行数:27,代码来源:ActivityBase.cs

示例7: CancelDelete

 protected void CancelDelete()
 {
     progress = ProgressDialog.Show(this, "Обработка...", "Пожалуйста, подождите.", true);
     if (doctor.ID != 0) {
         DoctorManager.DeleteDoctor(doctor.ID);
     }
     progress.Dismiss();
     Finish();
 }
开发者ID:pafik13,项目名称:PresenterPlanner,代码行数:9,代码来源:DoctorDetails.cs

示例8: CancelDelete

 protected void CancelDelete()
 {
     progress = ProgressDialog.Show(this, "Обработка...", "Пожалуйста, подождите.", true);
     if (hospital.ID != 0) {
         HospitalManager.DeleteHospital(hospital.ID);
     }
     progress.Dismiss();
     Finish();
 }
开发者ID:pafik13,项目名称:PresenterPlanner,代码行数:9,代码来源:HospitalDetails.cs

示例9: OnOptionsItemSelected

        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                OnBackPressed();
                break;
            case Resource.Id.save_image:
                progress = new ProgressDialog (this);
                progress.SetMessage ("Загрузка...");
                progress.Show();
                Task.Factory.StartNew (async () => {
                    try{

                        await WebClient.CreateRealFileAsync(_fileUrl);
                        RunOnUiThread(()=>{
                            progress.Dismiss();
                        });
                    }
                    catch (Exception ex)
                    {
                        RunOnUiThread(()=>{
                            progress.Dismiss();
                            Toast.MakeText(Application.Context,"Ошибка сохранения",ToastLength.Short).Show();
                        });
                    }
                });
                break;
            case Resource.Id.copy_link:
                ClipboardManager clipManager = (ClipboardManager)GetSystemService (ClipboardService);
                ClipData clip = ClipData.NewPlainText ("url", _fileUrl);
                clipManager.PrimaryClip = clip;
                break;
            default:
                return base.OnOptionsItemSelected(item);
            }
            return true;
        }
开发者ID:takigava,项目名称:pikabu,代码行数:38,代码来源:GifViewer.cs

示例10: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            SetContentView(Resource.Layout.ProgressDialog);
            
            progress = ProgressDialog.Show(this, "Loading...", "Please Wait (about 4 seconds)", true); 

             new Thread(new ThreadStart(() => {
                 Thread.Sleep(4 * 1000);
                 this.RunOnUiThread ( () => {
                    FindViewById<TextView>(Resource.Id.Text1).Text = "...and we're done!";
                    progress.Dismiss();
                 });
             })).Start();
        }
开发者ID:ARMoir,项目名称:mobile-samples,代码行数:16,代码来源:ProgressDialogScreen.cs

示例11: OnCreate

		protected override async  void OnCreate (Bundle bundle)
		{
			base.OnCreate (bundle);

			SetContentView (Resource.Layout.Legend);

			CheckBox closestFilterCheckbox = FindViewById<CheckBox>(Resource.Id.chooseClosest);
			Boolean filterClosest = UserPreferencesHelper.getClosestSpotsFilter ();
			closestFilterCheckbox.Checked = filterClosest;

			closestFilterCheckbox.Click += (sender, args) => {

				if (closestFilterCheckbox.Checked) {
					UserPreferencesHelper.setClosestSpotsFilter (true);
				} else {
					UserPreferencesHelper.setClosestSpotsFilter (false);
				}
			};


			_loadingDialog = LoadingDialogManager.ShowLoadingDialog (this);

			_crueltySpotCategoriesList = FindViewById<ListView> (Resource.Id.Legend);

			var crueltySpotCategoriesService = new CrueltySpotCategoriesService ();
			_crueltySpotCategories = await crueltySpotCategoriesService.GetAllAsync ();

			RunOnUiThread (() => {
				_loadingDialog.Dismiss ();
				_crueltySpotCategoriesList.Adapter = new LegendAdapter (this, _crueltySpotCategories);
				

			});               


			List<String> categories = UserPreferencesHelper.GetFilterCategories ();
			if (categories.Count () == 0) {
				foreach (CrueltySpotCategory category in _crueltySpotCategories) {
					categories.Add (category.ObjectId);
				}
				UserPreferencesHelper.SaveFilterCategories (categories);
			}



		}
开发者ID:America4Animals,项目名称:AFA,代码行数:46,代码来源:LegendActivity.cs

示例12: OnOptionsItemSelected

 public override bool OnOptionsItemSelected(IMenuItem item)
 {
     switch (item.ItemId) {
         case global::Android.Resource.Id.Home:
             var intent = new Intent(this, typeof(MainActivity));
             intent.PutExtra ("defaultTab", 1);
             intent.AddFlags (ActivityFlags.ClearTop);
             StartActivity (intent);
             break;
         case Resource.Id.menuSaveGroup:
             _progressDialog = new ProgressDialog(this);
             _progressDialog.SetMessage("Saving SMS Group.  Please wait...");
             _progressDialog.Show();
             Task.Factory
                 .StartNew(SaveGroup)
                 .ContinueWith(task =>
                     RunOnUiThread(() =>
                             {
                                 _progressDialog.Dismiss ();
                                 var homeIntent = new Intent();
                                 homeIntent.PutExtra ("defaultTab", 1);
                                 homeIntent.AddFlags (ActivityFlags.ClearTop);
                                 homeIntent.SetClass (this, typeof(MainActivity));
                                 StartActivity(homeIntent);
                             }));
             break;
         case Resource.Id.menuCancelEdit:
             new AlertDialog.Builder(this)
                 .SetTitle ("Cancel")
                 .SetMessage ("Are you sure you want to cancel your changes for this SMS Group?")
                 .SetPositiveButton ("Yes", (o, e) => {
                         var homeIntent = new Intent();
                         homeIntent.PutExtra ("defaultTab", 1);
                         homeIntent.AddFlags (ActivityFlags.ClearTop);
                         homeIntent.SetClass (this, typeof(MainActivity));
                         StartActivity(homeIntent);
                     })
                 .SetNegativeButton ("No", (o, e) => { })
                 .Show ();
             break;
     }
     return true;
 }
开发者ID:jheerman,项目名称:Prattle,代码行数:43,代码来源:SmsGroupListActivity.cs

示例13: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            var groupId = Intent.GetIntExtra ("groupId", -1);
            GroupId = groupId;

            _progressDialog = new ProgressDialog(this);
            _progressDialog.SetMessage("Loading Contacts.  Please wait...");
            _progressDialog.Show();

            Task.Factory
                .StartNew(() =>
                    GetContacts(groupId))
                .ContinueWith(task =>
                    RunOnUiThread(() => {
                        DisplayContacts(task.Result);
                        _progressDialog.Dismiss ();
                    }));
        }
开发者ID:kimsama,项目名称:Prattle,代码行数:20,代码来源:EditSmsGroupActivity.cs

示例14: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate (bundle);

            _pd =	ProgressDialog.Show (this, "Please wait...", "Querying Azure!");

            ThreadPool.QueueUserWorkItem (delegate {

                var root = BuildRoot (kGetAllUrl);

                RunOnUiThread (delegate {
                    var da = new DialogAdapter(this, root);
                    var lv = new ListView(this) {Adapter = da};

                    SetContentView(lv);
                    _pd.Dismiss ();
                    _pd.Dispose ();
                });

            });
        }
开发者ID:BerndtHamboeck,项目名称:AndroidAzure,代码行数:21,代码来源:Activity1.cs

示例15: RunAppInitializedEventHandler

		private void RunAppInitializedEventHandler()
		{
			if (!App.Current.IsInitialized)
			{
				// show the loading overlay on the UI thread
				progress = ProgressDialog.Show(this, "Loading", "Please Wait...", true);

				// when the app has initialized, hide the progress bar and call Finished Initialzing
				initializedEventHandler = (s, e) =>
				{
					// call finished initializing so that any derived activities have a chance to do work
					RunOnUiThread(() =>
					{
						this.FinishedInitializing();
						// hide the progress bar
						if (progress != null)
							progress.Dismiss();
					});
				};
				App.Current.Initialized += initializedEventHandler;

			}
		}
开发者ID:Ferencz8,项目名称:RepeatApp,代码行数:23,代码来源:ActivityBase.cs


注:本文中的Android.App.ProgressDialog.Dismiss方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。