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


C# ProgressDialog.SetMessage方法代码示例

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


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

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

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

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

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

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

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

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

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

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

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

示例11: Show

		public void Show(Context context, string content)
		{
			var dialog = new ProgressDialog(context);
			dialog.SetMessage(content);
			dialog.SetCancelable(false);
			dialog.Show();
			System.Threading.Thread.Sleep (2000);
			dialog.Hide ();
		}
开发者ID:kamilkk,项目名称:MyVote,代码行数:9,代码来源:MessageBox.cs

示例12: MakeCall

	    public static void MakeCall(CallEntity callEntity, Activity activity)
	    {
            var category = callEntity.Category;
            var choice = callEntity.Choice ?? "";
            var detail = callEntity.Detail ?? "";

	        new AlertDialog.Builder(activity)
	            .SetTitle(category + " " + choice + " " + detail)
	            .SetMessage(Strings.CallSendMessage)
	            .SetPositiveButton(Strings.CallSend, delegate
	            {
                    ThreadPool.QueueUserWorkItem(o =>
                    {
                        activity.RunOnUiThread(() =>
                        {
                            dialog = new ProgressDialog(activity);
                            dialog.SetMessage(Strings.SpinnerDataSending);
                            dialog.SetCancelable(false);
                            dialog.Show();
                        });

                        try
                        {
                            ICall patientCall = new PatientCall();
                            // Assign the callid with the returned MongoDB id
                            callEntity._id = patientCall.MakeCall(callEntity);

                            activity.RunOnUiThread(() =>
                            {
                                // Call successfull, take the user to myCalls
                                activity.ActionBar.SelectTab(activity.ActionBar.GetTabAt(1));
                                SetNewCalls(callEntity);
                                dialog.Hide();
                            });
                        }
                        catch (Exception ex)
                        {
                            Console.WriteLine("ERROR making call: " + ex.Message);

                            activity.RunOnUiThread(() =>
                            {
                                dialog.Hide();

                                new AlertDialog.Builder(activity).SetTitle(Strings.Error)
                                    .SetMessage(Strings.ErrorSendingCall)
                                    .SetPositiveButton(Strings.OK,
                                        delegate { }).Show();
                            });
                        }
              
                    });
             
	            })
            .SetNegativeButton(Strings.Cancel, delegate {/* Do nothing */ })
            .Show();
	    }
开发者ID:dsb92,项目名称:patientcare,代码行数:56,代码来源:Call.cs

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

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

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


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