• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# App.ProgressDialog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ProgressDialog类属于Android.App命名空间,在下文中一共展示了ProgressDialog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Busy

 public void Busy()
 {
     this.busyDlg = new ProgressDialog (this);
     this.busyDlg.SetMessage (Resources.GetString (Resource.String.busy_msg));
     this.busyDlg.SetCancelable (false);
     this.busyDlg.Show ();
 }
开发者ID:JohanOtto,项目名称:ModernHttpClient,代码行数:7,代码来源:MainActivity.cs


示例2: 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


示例3: ProgressDialogHelper

		public ProgressDialogHelper(Context context) {
			this.progress = new ProgressDialog(context);
			progress.SetProgressStyle(ProgressDialogStyle.Spinner);
			progress.Indeterminate = false;
			progress.Progress = 99;
			progress.SetCanceledOnTouchOutside(false);
		}
开发者ID:MarcinSzyszka,项目名称:MobileSecondHand,代码行数:7,代码来源:ProgressDialogHelper.cs


示例4: ShowStatus

 public static ProgressDialog ShowStatus(Context cxt, string msg)
 {
     ProgressDialog status = new ProgressDialog(cxt);
     status.SetMessage(msg);
     status.Show();
     return status;
 }
开发者ID:Tomic-Tech,项目名称:JM.QingQi,代码行数:7,代码来源:DialogManager.cs


示例5: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            _contentView = inflater.Inflate(Resource.Layout.device_detail, null);
            _contentView.FindViewById<Button>(Resource.Id.btn_connect).Click += (sender, args) =>
                {
                    var config = new WifiP2pConfig
                        {
                            DeviceAddress = _device.DeviceAddress, 
                            Wps =
                                {
                                    Setup = WpsInfo.Pbc
                                }
                        };
                    if (_progressDialog != null && _progressDialog.IsShowing)
                        _progressDialog.Dismiss();

                    _progressDialog = ProgressDialog.Show(Activity, "Press back to cancel",
                                                          "Connecting to: " + _device.DeviceAddress, true, true);

                    ((IDeviceActionListener)Activity).Connect(config);
                };

            _contentView.FindViewById<Button>(Resource.Id.btn_disconnect).Click += (sender, args) => 
                ((IDeviceActionListener)Activity).Disconnect();

            _contentView.FindViewById<Button>(Resource.Id.btn_start_client).Click += (sender, args) =>
                {
                    var intent = new Intent(Intent.ActionGetContent);
                    intent.SetType("image/*");
                    StartActivityForResult(intent, ChooseFileResultCode);
                };

            return _contentView;
        }
开发者ID:pacificIT,项目名称:WiFiDirectSample,代码行数:34,代码来源:DeviceDetailFragment.cs


示例6: OnCreate

        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);

            Button start = FindViewById<Button>(Resource.Id.startButton);
            Button stop = FindViewById<Button>(Resource.Id.stopButton);

            ProgressDialog pd = new ProgressDialog(this)
            {
                Indeterminate = true,
            };

            pd.SetMessage("Waiting");

            pd.SetButton("cancel", (s, e) => Stop(pd));
            pd.SetIcon(Resource.Drawable.Icon);

            //pd.SetCancelable(false);

            Drawable myIcon = Resources.GetDrawable(Resource.Animation.progress_dialog_icon_drawable_animation);
            pd.SetIndeterminateDrawable(myIcon);

            start.Click += delegate { Start(pd); };
            stop.Click += delegate { Stop(pd); };
        }
开发者ID:adbk,项目名称:spikes,代码行数:26,代码来源:Activity1.cs


示例7: 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


示例8: CloseProgressDialog

    public static void CloseProgressDialog(Activity context) {
        if (!context.IsFinishing && _mProgressDialog != null)
        {
    		_mProgressDialog.Dismiss();
    	}
    	_mProgressDialog = null;
	}
开发者ID:Xushlin,项目名称:Xamarin-For-Android,代码行数:7,代码来源:DialogUitls.cs


示例9: 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


示例10: OnViewModelSet

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

			// show a progress box if there is some work
			var events = ViewModel as EventsViewModel;
			if (events != null)
			{
				ProgressDialog progress = null;
				events.PropertyChanged += (sender, e) =>
				{
					if (e.PropertyName == "IsWorking")
					{
						if (events.IsWorking)
						{
							if (progress == null)
							{
								progress = new ProgressDialog(this);
								progress.SetProgressStyle(ProgressDialogStyle.Spinner);
								progress.SetMessage("Doing absolutely nothing in the background...");
								progress.Show();
							}
						}
						else
						{
							if (progress != null)
							{
								progress.Dismiss();
								progress = null;
							}
						}
					}
				};
			}
		}
开发者ID:Mazooma-Interactive-Games,项目名称:Flurry.Analytics,代码行数:35,代码来源:EventsView.cs


示例11: SaveButton_Click

    private async void SaveButton_Click(object sender, EventArgs ea)
    {
      var dialog = new ProgressDialog(this);
      dialog.SetMessage(Resources.GetString(Resource.String.Saving));
      dialog.SetCancelable(false);
      dialog.Show();

      try
      {
        Bindings.UpdateSourceForLastView();
        this.Model.ApplyEdit();
        var returnModel = await this.Model.SaveAsync();
        InitializeBindings(returnModel);
      }
      catch (Exception ex)
      {
        var alert = new AlertDialog.Builder(this);
        alert.SetMessage(string.Format(Resources.GetString(Resource.String.Error), ex.Message));
        alert.Show();
      }
      finally
      {
        dialog.Hide();
      }
    }
开发者ID:RodrigoGT,项目名称:csla,代码行数:25,代码来源:MainActivity.cs


示例12: 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


示例13: ConnectToRelay

		private async Task ConnectToRelay()
		{
			bool connected = false;

			var waitIndicator = new ProgressDialog(this) { Indeterminate = true };
			waitIndicator.SetCancelable(false);
			waitIndicator.SetMessage("Connecting...");
			waitIndicator.Show();

			try
			{
				var prefs = PreferenceManager.GetDefaultSharedPreferences(this);

				connected = await _remote.Connect(prefs.GetString("RelayServerUrl", ""), 
				                                  prefs.GetString("RemoteGroup", ""), 
				                                  prefs.GetString("HubName", ""));
			}
			catch (Exception)
			{
			}
			finally
			{
				waitIndicator.Hide();
			}

			Toast.MakeText(this, connected ? "Connected!" : "Unable to connect", ToastLength.Short).Show();
		}
开发者ID:JonathanTLH,项目名称:PanTiltZoomSystem,代码行数:27,代码来源:RemoteActivity.cs


示例14: 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


示例15: 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


示例16: OnCreateView

        public override Android.Views.View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.SignLayout, container, false);

            Button clearButton = view.FindViewById<Button> (Resource.Id.clearButton);
            Button sendButton = view.FindViewById<Button> (Resource.Id.sendButton);

            EditText remarks = view.FindViewById<EditText> (Resource.Id.txtRemarks);
            ToggleButton notification = view.FindViewById<ToggleButton> (Resource.Id.toggleNotifications);

            SignView signView = view.FindViewById<SignView> (Resource.Id.signView);

            mDialog = new ProgressDialog(this.Activity);
            mDialog.SetMessage("Sending...");
            mDialog.SetCancelable(false);

            clearButton.Click += delegate {
                signView.ClearCanvas();
            };

            sendButton.Click += delegate {
                using (MemoryStream stream = new MemoryStream())
                {
                    if (signView.CanvasBitmap().Compress(Bitmap.CompressFormat.Png, 100, stream))
                    {
                        byte[] image = stream.ToArray();
                        string base64signature = Convert.ToBase64String(image);
                        Backend.Current.send(base64signature, remarks.Text, notification.Activated, OnSendSuccess, OnSendFail);
                        mDialog.Show();
                    }
                }
            };

            return view;
        }
开发者ID:bertouttier,项目名称:ExpenseApp-Mono,代码行数:35,代码来源:SignFragment.cs


示例17: CreateProgressDialog

 public static ProgressDialog CreateProgressDialog(string message, Activity activity)
 {
     var mProgressDialog = new ProgressDialog(activity, Resource.Style.LightDialog);
     mProgressDialog.SetMessage(message);
     mProgressDialog.SetCancelable(false);
     mProgressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
     return mProgressDialog;
 }
开发者ID:paul-pagnan,项目名称:helps,代码行数:8,代码来源:DialogHelper.cs


示例18: ChangeStatusPopup

		public ChangeStatusPopup (Activity _activity) : base (_activity)
		{
			this._activity = _activity;
			progress = ProgressDialog.Show (_activity, "", "", true);
			progress.SetContentView(new ProgressBar(_activity));
			progress.Hide ();
			popupNotice = new PopupNoticeInfomation (_activity);
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:8,代码来源:ChangeStatusPopup.cs


示例19: StartPositioning

        private void StartPositioning(object sender, EventArgs e)
        {
            progressDialog = ProgressDialog.Show(this, "Wyznaczanie pozycji...", "");
            stopwatch = new Stopwatch();
            stopwatch.Start();

            locationService.GetLocation();
        }
开发者ID:pgrzmil,项目名称:XamarinResearch,代码行数:8,代码来源:LocationTestActivity.cs


示例20: StartDownloading

        private void StartDownloading(object sender, EventArgs e)
        {
            progressDialog = ProgressDialog.Show(this, "Pobieranie...", "");
            stopwatch = new Stopwatch();
            stopwatch.Start();

            new Thread(new Runnable(() => { networkService.DownloadImage(addressField.Text); })).Start();
        }
开发者ID:pgrzmil,项目名称:XamarinResearch,代码行数:8,代码来源:NetworkTestActivity.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Content.ContentValues类代码示例发布时间:2022-05-24
下一篇:
C# AlertDialog.Builder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap