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


C# ProgressDialog.SetProgressStyle方法代码示例

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


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

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

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

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

示例4: OnClick

        public void OnClick(View V)
        {
            ProgressDialog progress = new ProgressDialog(this);
            try
            {
                switch(V.Id)
                {
                case Resource.Id.bSignIn :
                    {
                        isLogin=false;
                        Boolean blnValidate=  FieldValidation();
                        if (blnValidate==true)
                        {
                            progress.Indeterminate = true;
                            progress.SetProgressStyle(ProgressDialogStyle.Spinner);
                            progress.SetMessage("Contacting server. Please wait...");
                            progress.SetCancelable(true);
                            progress.Show();

                            var progressDialog = ProgressDialog.Show(this, "Please wait...", "Checking Login info...", true);

                            new Thread(new ThreadStart(delegate
                            {

                                RunOnUiThread(() => ValidateSqluserpwd(etUsername.Text.ToString() , etpwd.Text.ToString()));
                                if (isLogin== true){
                                    RunOnUiThread(() => Toast.MakeText(this, "Login detail found in system...", ToastLength.Short).Show());
                                }
                                RunOnUiThread(() => progressDialog.Hide());
                            })).Start();
                        }
                        break;
                    }
                case Resource.Id.tvforget :
                    {
                        var toast = Toast.MakeText(this,"Forget link clicked",ToastLength.Short);
                        toast.Show();
                        break;
                    }
                case Resource.Id.tvregister :
                    {
                        var myIntent = new Intent (this, typeof(MainActivity));
                        StartActivityForResult (myIntent, 0);
                        break;
                    }
                }
            }
            catch (NullReferenceException ex) {
                var toast = Toast.MakeText (this, ex.Message ,ToastLength.Short);
                toast.Show ();
            }
            finally
            {
                // Now hide the progress dialog
                progress.Dismiss();
            }
        }
开发者ID:ngoswami1978,项目名称:Login-and-Registration-in-Xamarin,代码行数:57,代码来源:LoginScreen.cs

示例5: OnPreExecute

 protected override void OnPreExecute()
 {
     base.OnPreExecute();
     progDialog = new ProgressDialog(activity);
     progDialog.SetMessage("Logging Out...");
     progDialog.Indeterminate=false;
     progDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
     progDialog.SetCancelable(true);
     progDialog.Show();
 }
开发者ID:ryanerdmann,项目名称:angora,代码行数:10,代码来源:SettingsActivity.cs

示例6: ShowLoadingDialog

        public static ProgressDialog ShowLoadingDialog(Context context)
        {
            var loadingDialog = new ProgressDialog(context);
            loadingDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
            loadingDialog.Show();
            return loadingDialog;

            // Alt
            //ProgressDialog.Show(this, "Retrieving Nearby Places", "Please wait...", true);
        }
开发者ID:America4Animals,项目名称:AFA,代码行数:10,代码来源:LoadingDialogManager.cs

示例7: DownloadFileHelper

 public DownloadFileHelper(Activity parent)
 {
     CallingActivity = parent;
     progress = new ProgressDialog(CallingActivity);
     progress.Indeterminate = false;
     progress.SetProgressStyle(ProgressDialogStyle.Horizontal);
     progress.SetMessage("Downloading. Please wait...");
     progress.SetCancelable(false);
     progress.Max = 100;
     //OnFinishDownloadHandle += new OnFinishDownload (FinishDownload);
 }
开发者ID:mokth,项目名称:merpV3,代码行数:11,代码来源:DownloadFileHelper.cs

示例8: ShowProgressDialog

 public static ProgressDialog ShowProgressDialog(Activity activity, int messageResId, /*int titleResId,*/ bool allowCancel, ProgressDialogStyle style=ProgressDialogStyle.Spinner)
 {
     ProgressDialog dialog = new ProgressDialog(activity);
     dialog.SetProgressStyle(style);
     //dialog.SetTitle(titleResId);
     dialog.SetMessage(activity.Resources.GetString(messageResId));
     dialog.SetCancelable(allowCancel);
     dialog.SetCanceledOnTouchOutside(allowCancel);
     dialog.Show();
     return dialog;
 }
开发者ID:Luminoth,项目名称:BackpackPlanner,代码行数:11,代码来源:DialogUtil.cs

示例9: CreateProgressDialog

 private ProgressDialog CreateProgressDialog()
 {
     var progress = new ProgressDialog(this)
     {
         Indeterminate = true
     };
     progress.SetCancelable(false);
     progress.SetProgressStyle(ProgressDialogStyle.Spinner);
     progress.SetMessage("Contacting server. Please wait...");
     return progress;
 }
开发者ID:teamtam,项目名称:xamarin-timesheet,代码行数:11,代码来源:OutstandingTimesheetsActivity.cs

示例10: ShowProgressDialog

	public static void ShowProgressDialog(Activity context, string msg="Loading",  string title="",bool isCancle=false) {
		if(_mProgressDialog != null)	return;
		
		_mProgressDialog = new ProgressDialog(context);
		_mProgressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
		_mProgressDialog.SetTitle(title);
        _mProgressDialog.SetMessage(msg);
        _mProgressDialog.SetCancelable(isCancle);
	    if (!context.IsFinishing)
	    {
	        _mProgressDialog.Show();
	    }
	}
开发者ID:Xushlin,项目名称:Xamarin-For-Android,代码行数:13,代码来源:DialogUitls.cs

示例11: ShowProgressDialog

 private void ShowProgressDialog(ProgressDialog progressDialog, string message, bool show)
 {
     if (show)
     {
         progressDialog.Indeterminate = true;
         progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
         progressDialog.SetMessage(message);
         progressDialog.SetCancelable(false);
         progressDialog.Show();
     }
     else
         progressDialog.Hide();
 }
开发者ID:HamzaTariq95,项目名称:HELPSProject,代码行数:13,代码来源:MainActivity.cs

示例12: OnCreateView

        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            // Use this to return your custom view for this Fragment
            // return inflater.Inflate(Resource.Layout.YourFragment, container, false);

            base.OnCreateView (inflater, container, savedInstanceState);

            dates = SyncQueueManager.GetAvailableDates ();

            View view = inflater.Inflate (Resource.Layout.SyncFragment, container, false);

            SavedInflater = inflater;

            spnDates = view.FindViewById<Spinner> (Resource.Id.sfSelectedDateSpinner);
            spnDates.Adapter = new ArrayAdapter (Activity, Android.Resource.Layout.SimpleSpinnerItem, SyncQueueManager.DatesToString(dates));
            spnDates.ItemSelected += (object sender, AdapterView.ItemSelectedEventArgs e) => {
            //				TextView tv = (TextView) e.View;
                selectedDate = dates[e.Position];
                Toast.MakeText(Activity, selectedDate.ToString(@"d"), ToastLength.Short).Show();
                queue = (List<SyncQueue>) SyncQueueManager.GetSyncQueue(dates[e.Position]);

                RefreshContent();
            };

            llSyncItems = view.FindViewById<LinearLayout> (Resource.Id.sfList);
            ivSync = view.FindViewById<ImageView> (Resource.Id.sfSyncImage);

            ivSync.Click += (object sender, EventArgs e) => {
                progressDialog = ProgressDialog.Show(Activity, "", "Loading rooms...", true);
                progressDialog.SetProgressStyle(ProgressDialogStyle.Spinner);
                new Thread(new ThreadStart(delegate
                    {
                        //LOAD METHOD TO GET ACCOUNT INFO
                        Activity.RunOnUiThread(() => progressDialog.SetMessage(@"Начало загрузки информации о посещениях"));

                        UpLoadAttendances();
                        UpLoadAttendanceResults();
                        UpLoadAttendancePhotos();

                        //HIDE PROGRESS DIALOG
                        Activity.RunOnUiThread(() => { progressDialog.SetMessage(@"Обновление данных"); RefreshContent(); progressDialog.Dismiss(); }); //progressBar.Visibility = ViewStates.Gone);
                    })).Start();
            };

            Activity.Window.AddFlags (WindowManagerFlags.KeepScreenOn);

            return view;
        }
开发者ID:pafik13,项目名称:pharm-merch-tablet,代码行数:48,代码来源:SyncFragment.cs

示例13: OnCreate

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

			// Set our view from the "main" layout resource
			SetContentView (Resource.Layout.MyShop_ProductDetails);

			product_id = Intent.GetIntExtra("product_id",0);
			//setup background worker for data loading
			worker = new BackgroundWorker ();
			worker.DoWork += worker_DoWork;
			worker.WorkerSupportsCancellation = true;
			worker.RunWorkerCompleted += worker_RunWorkerCompleted;
			worker.RunWorkerAsync ();

			progress = new ProgressDialog(this);
			progress.Indeterminate = true;
			progress.SetProgressStyle(ProgressDialogStyle.Spinner);
			progress.SetMessage("Memuatkan data..");
			progress.SetCancelable(false);
			progress.Show();


			productImage = FindViewById<MultiImageView>(Resource.Id.productImage);
			tv_price = FindViewById <TextView> (Resource.Id.tv_price);
			tv_prodTitle = FindViewById <TextView> (Resource.Id.tv_prodTitle);
			wv_prodDesc = FindViewById <WebView> (Resource.Id.wv_prodDesc);
//			btn_addToCart = FindViewById <Button> (Resource.Id.btn_addToCart);
			btn_sellerInfo = FindViewById <Button> (Resource.Id.btn_sellerInfo);

     		var toolbar = FindViewById<V7Toolbar>(Resource.Id.toolbar);
			SetSupportActionBar (toolbar);
			toolbar.SetBackgroundColor (Color.ParseColor ("#9C27B0"));

			SupportActionBar.SetDisplayHomeAsUpEnabled (true);
			SupportActionBar.SetDisplayShowHomeEnabled (true);


			//call addToCart method
//			btn_addToCart.Click += (sender, e) => {
//				addToCart();
//			};

			btn_sellerInfo.Click += btnSellerInfo_click;

		}	
开发者ID:kktanpiya,项目名称:pyongPyaa048,代码行数:46,代码来源:Product_Details.cs

示例14: OnCreateView

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

			//setup background worker for data loading
			worker = new BackgroundWorker ();
			worker.DoWork += worker_DoWork;
			worker.WorkerSupportsCancellation = true;
			worker.RunWorkerCompleted += worker_RunWorkerCompleted;
			worker.RunWorkerAsync ();

			progress = new ProgressDialog(Activity);
			progress.Indeterminate = true;
			progress.SetProgressStyle(ProgressDialogStyle.Spinner);
			progress.SetMessage("Memuatkan data..");
			progress.SetCancelable(false);
			progress.Show();


			productImage = view.FindViewById<MultiImageView>(Resource.Id.productImage);
			tv_price = view.FindViewById <TextView> (Resource.Id.tv_price);
			tv_prodTitle = view.FindViewById <TextView> (Resource.Id.tv_prodTitle);
			wv_prodDesc = view.FindViewById <WebView> (Resource.Id.wv_prodDesc);
			//			btn_addToCart = FindViewById <Button> (Resource.Id.btn_addToCart);
			btn_sellerInfo = view.FindViewById <Button> (Resource.Id.btn_sellerInfo);

//			var toolbar = FindViewById<V7Toolbar>(Resource.Id.toolbar);
//			SetSupportActionBar (toolbar);
//			SupportActionBar.SetDisplayHomeAsUpEnabled (true);


			//call addToCart method
			//			btn_addToCart.Click += (sender, e) => {
			//				addToCart();
			//			};

			btn_sellerInfo.Click += btnSellerInfo_click;

			return view;
		}
开发者ID:kktanpiya,项目名称:pyongPyaa048,代码行数:40,代码来源:Product_DetailsFrag.cs

示例15: Show

		public void Show (Android.Content.Context context, string messageToShow)
		{
			try {
				string message;

				if (String.IsNullOrEmpty (messageToShow)) {
					message = "Laden...";
				} else {
					message = messageToShow;
				}
				if (progressDialog != null) {
					progressDialog = null;
				}

				progressDialog = new ProgressDialog (context);
				progressDialog.Indeterminate = true;
				progressDialog.SetProgressStyle (ProgressDialogStyle.Spinner);
				progressDialog.SetMessage (message);
				progressDialog.SetCancelable (false);
				progressDialog.Show ();
			} catch (Exception ex){
				Insights.Report(ex);
			}
		}
开发者ID:MBrekhof,项目名称:pleiobox-clients,代码行数:24,代码来源:CustomProgressDialog.cs


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