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


C# AlertDialog.Builder.SetInverseBackgroundForced方法代码示例

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


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

示例1: showConfirmDialog

		public void showConfirmDialog(string title, string content, string possitiveTitle, string negativeTitle){
			var confirmDeferView = LayoutInflater.Inflate (Resource.Layout.popup_confirm_layout, null);
			var tvTitle = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_title_confirm_popup);
			var tvConfirm = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_info_popup);
			var btnConfirmTalknow = confirmDeferView.FindViewById<Button> (Resource.Id.btn_confirm_tv_popup);
			var btnDecline = confirmDeferView.FindViewById<Button> (Resource.Id.btn_decline_tv_popup);

			tvTitle.Text = title;
			tvConfirm.Text = content;
			btnDecline.Text = negativeTitle;
			btnConfirmTalknow.Text = possitiveTitle;
			btnConfirmTalknow.Click += (sender, e) => {
				dialog.Dismiss ();
				actionConfirmDelegate.onOkConfirmClick ();
			};

			btnDecline.Click += (sender, e) => {
				dialog.Dismiss ();
			};

			builder = new AlertDialog.Builder (_activity);
			builder.SetInverseBackgroundForced (true);
			builder.SetView (confirmDeferView);
			dialog = builder.Create ();
			dialog.SetCanceledOnTouchOutside (false);
			try {
				dialog.Show ();
			} catch(Exception e){
				Console.WriteLine (e.Message);
			}
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:31,代码来源:PopUpConfirm.cs

示例2: showEmailDialog

		public void showEmailDialog(Guid specId){
			var enterEmailView = LayoutInflater.Inflate (Resource.Layout.popup_enter_email, null);

			var edEnterEmail = enterEmailView.FindViewById<EditText> (Resource.Id.edit_enter_email);
			var edMyEmail = enterEmailView.FindViewById<EditText> (Resource.Id.edit_my_email);
			var edMessEmail = enterEmailView.FindViewById<EditText> (Resource.Id.edit_enter_message);
			var btnSend = enterEmailView.FindViewById<Button> (Resource.Id.btnSendEmail);
			var btnCancel = enterEmailView.FindViewById<Button> (Resource.Id.btnCancelSendEmail);

			builder = new AlertDialog.Builder (_activity);
			builder.SetInverseBackgroundForced (true);
			builder.SetView (enterEmailView);
			dialogEquiry = builder.Create ();
			dialogEquiry.SetCanceledOnTouchOutside(false);

			btnSend.Enabled = false;
			edMyEmail.Text = MApplication.getInstance ().sEmailAddress;
			edEnterEmail.TextChanged += (sender, e) => {
				if(edEnterEmail.Text.Count() > 0) {
					btnSend.Enabled = true;
				} else {
					btnSend.Enabled = false;
				}
			};

			btnSend.Click += (sender, e) => {
				if(edMyEmail.Text.Trim().Count() > 0) {
					if(Utils.checkValidateEmail(edMyEmail.Text.Trim())){
						if (edEnterEmail.Text.Trim().Count() <= 0) {
							btnSend.Enabled = false;
							showNoticeEmail(_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.require_email_profile));
						} else {
							emails.Clear();
							emailsInvalid.Clear();

							Utils.getEmailsProfileFromString(edEnterEmail.Text.ToString(), emails, emailsInvalid);
							if(emailsInvalid.Count > 0) {
								showNoticeEmail(_activity.GetString(Resource.String.invalid_email_title), getEmailInvalidFromList(emailsInvalid));
							} else {
								dialogEquiry.Dismiss();
								actionDelegate.onSending();
								sendEmailProfileRequest(specId, edMyEmail.Text.Trim(), edMessEmail.Text.Trim());
							}
						}
					} else{
						showNoticeEmail(_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.invalid_email_reset));	
					}
				} else {
					showNoticeEmail(_activity.GetString(Resource.String.title_notice), _activity.GetString(Resource.String.email_sender_require));
				}
			};

			btnCancel.Click += (sender, e) => {
				dialogEquiry.Dismiss();
			};

			dialogEquiry.Show ();
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:58,代码来源:SendEmailUI.cs

示例3: showPopupDefer

		public void showPopupDefer(BookingInfo bookingInfo, DeferInfo deferInfo){
			var confirmDeferView = LayoutInflater.Inflate (Resource.Layout.popup_confirm_layout, null);
			var tvTitle = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_title_confirm_popup);
			var tvConfirm = confirmDeferView.FindViewById<TextView> (Resource.Id.tv_info_popup);
			var btnConfirmDefer = confirmDeferView.FindViewById<Button> (Resource.Id.btn_confirm_tv_popup);
			var btnDecline = confirmDeferView.FindViewById<Button> (Resource.Id.btn_decline_tv_popup);

			tvConfirm.Gravity = global::Android.Views.GravityFlags.Left;
			tvTitle.SetText (Android.Resource.String.delayed_title);
			btnConfirmDefer.Text = "Accept";
			btnDecline.Text = "Decline";
			if (deferInfo.IsDefer) {
				string strMinute = ((double)bookingInfo.Deferral).ToString ("C0", new CultureInfo ("en-us")).Substring (1) + " minutes.";
				tvConfirm.TextFormatted = Html.FromHtml (String.Format (_activity.GetString (Resource.String.delay_minute_info), bookingInfo.SpecialistName, strMinute));
			} else {
				int iHours = (int)(bookingInfo.Deferral / 60);
				tvConfirm.TextFormatted = Html.FromHtml (String.Format (_activity.GetString (Resource.String.delay_day_info), bookingInfo.SpecialistName, iHours));
			}

			OnTimerSendCancelDefer (bookingInfo.Id, deferInfo, 0);

			btnConfirmDefer.Click += (sender, e) => {
				dialog.Dismiss();
				sendDeferTalkNow(bookingInfo, deferInfo);
				if(timer != null) {
					timer.Stop();
					timer = null;
				}
			};

			btnDecline.Click += (sender, e) => {
				dialog.Dismiss();
				sendCancelDeferTalkNow(bookingInfo.Id, deferInfo);
				if(timer != null) {
					timer.Stop();
					timer = null;
				}
			};

			builder = new AlertDialog.Builder (_activity);
			builder.SetInverseBackgroundForced (true);
			builder.SetView (confirmDeferView);
			dialog = builder.Create ();
			dialog.SetCanceledOnTouchOutside(false);
			dialog.Show ();
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:46,代码来源:DeferTalkNowUI.cs

示例4: CheckFirstRun

		public void CheckFirstRun() {
			bool isFirstRun = GetSharedPreferences("PREFERENCE", FileCreationMode.Private).GetBoolean("isFirstRun", true);
			if (isFirstRun){
				View view = (ScrollView)LayoutInflater.Inflate (Resource.Layout.ReportLayout, null);
				//read locate
				string loc=Java.Util.Locale.Default.Language;
				string fileName = "report.txt";
				string fileReport = "";
				if (loc == "ru") {
					fileName=fileName.Insert(6,"_ru");
				} 
				using (StreamReader sr = new StreamReader (Assets.Open (fileName),System.Text.Encoding.UTF8))
				{
					fileReport = sr.ReadToEnd ();
				}
				// Place your dialog code here to display the dialog
				AlertDialog.Builder builder = new AlertDialog.Builder(this);
				builder.SetInverseBackgroundForced (true);
				AlertDialog alertdialog = builder.Create();
				alertdialog.SetTitle(Resources.GetString(Resource.String.whatsNew));
				alertdialog.SetMessage(fileReport//"1.0.2\n" +
				//	"- "+Resources.GetString(Resource.String.fixBug)+"\n"+
				//	"- "+Resources.GetString(Resource.String.animationUpdating)+"\n"
				);
				alertdialog.SetCancelable(false);
				//alertdialog.Window.SetBackgroundDrawable(
				//alertdialog.SetView (view);
				alertdialog.SetButton(Resources.GetString(Resource.String.ok), (s,e)=> { 
				});
				alertdialog.Show();
				GetSharedPreferences("PREFERENCE", FileCreationMode.Private)
					.Edit()
					.PutBoolean("isFirstRun", false)
					.Apply();
			}
		}
开发者ID:mexaniksay,项目名称:GamePro02,代码行数:36,代码来源:MainActivity.cs

示例5: ShowDialog

        //new AuthWS.AuthSvc().GetAuthToken(username, password);
        public static void ShowDialog(String title, String message, Context context)
        {
            AlertDialog.Builder builder = new AlertDialog.Builder(context);
            builder.SetCancelable(true);
            builder.SetTitle(title);
            builder.SetInverseBackgroundForced(true);
            builder.SetMessage(message);
            builder.SetPositiveButton("OK", delegate {

            });
            AlertDialog alert = builder.Create();
            alert.Show();
        }
开发者ID:mmfraser,项目名称:dissertation,代码行数:14,代码来源:App.cs

示例6: HandleException

        public static void HandleException(Exception e, Context context, Boolean showDialog = true)
        {
            if (showDialog) {
                AlertDialog.Builder builder = new AlertDialog.Builder(context);
                builder.SetCancelable(true);
                builder.SetTitle("Error Logged");
                builder.SetInverseBackgroundForced(true);
                builder.SetMessage(e.Message);
                builder.SetPositiveButton("OK", delegate {
                });
                AlertDialog alert = builder.Create();
                alert.Show();
            }

            Log.Error(e.Source, e.Message + " \n   " + e.InnerException);
        }
开发者ID:mmfraser,项目名称:dissertation,代码行数:16,代码来源:App.cs

示例7: OnCreateDialog

		protected override Dialog OnCreateDialog (int id, Bundle args)
		{
			AlertDialog.Builder builder;
			builder = new AlertDialog.Builder (this);
			builder.SetInverseBackgroundForced (true);
			switch (id) {
			case 1:
				{
					builder.SetTitle (GetString(Resource.String.gps_request));
					builder.SetPositiveButton (GetString(Resource.String.gps_enable), EnableClicked);
					builder.SetNegativeButton (GetString(Resource.String.gps_cancel), CancelClicked);
					dialog = builder.Create ();
					break;
				}
			}

			if (dialog != null) {
				dialog.SetCanceledOnTouchOutside (false);
				dialog.SetCancelable (false);
			}
			return dialog;
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:22,代码来源:HomeActivity.cs

示例8: showNoticeEmail

		private void showNoticeEmail(string title, string content){
			var emailInvalidlView = LayoutInflater.Inflate (Resource.Layout.popup_notice_layout, null);

			builder = new AlertDialog.Builder (_activity);
			builder.SetInverseBackgroundForced (true);
			builder.SetView (emailInvalidlView);

			var tvTitle = emailInvalidlView.FindViewById<TextView> (Resource.Id.tv_title_notice_popup);
			var tvInfo = emailInvalidlView.FindViewById<TextView> (Resource.Id.tv_info_popup_notice);
			var btnOk = emailInvalidlView.FindViewById<Button> (Resource.Id.btn_ok_popup_notice);

			tvTitle.Text = title;
			tvInfo.Text = content;

			btnOk.Click += (sender, e) => {
				dialogNotice.Dismiss();
			};

			dialogNotice = builder.Create ();
			dialogNotice.SetCanceledOnTouchOutside(false);

			try {
				dialogNotice.Show ();
			} catch(Exception e){
				Console.WriteLine (e.Message);
			}
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:27,代码来源:SendEmailUI.cs

示例9: showRatingFeedback

		public void showRatingFeedback(){
			var ratingFeebackView = LayoutInflater.Inflate (Resource.Layout.popup_rating_feedback, null);

			edFeeback = ratingFeebackView.FindViewById<EditText> (Resource.Id.edit_feedback);

			var btnSend = ratingFeebackView.FindViewById<Button> (Resource.Id.btnSendFeedback);
			var btnCancel = ratingFeebackView.FindViewById<Button> (Resource.Id.btnCancelFeeback);
			var tvError = ratingFeebackView.FindViewById<TextView> (Resource.Id.tv_error_feedback);
			var imgStar1 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar1);
			var imgStar2 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar2);
			var imgStar3 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar3);
			var imgStar4 = ratingFeebackView.FindViewById<ImageView> (Resource.Id.imgStar4);

			tvError.SetText (Resource.String.feeback_error);
			iNumStar = 0;

			imgStar1.Click += (sender, e) => {
				tvError.Visibility = ViewStates.Gone;
				iNumStar = 1;
				imgStar1.SetImageResource(Resource.Drawable.ic_star);
				imgStar2.SetImageResource(Resource.Drawable.ic_star_disable);
				imgStar3.SetImageResource(Resource.Drawable.ic_star_disable);
				imgStar4.SetImageResource(Resource.Drawable.ic_star_disable);
			};

			imgStar2.Click += (sender, e) => {
				tvError.Visibility = ViewStates.Gone;
				iNumStar = 2;
				imgStar1.SetImageResource(Resource.Drawable.ic_star);
				imgStar2.SetImageResource(Resource.Drawable.ic_star);
				imgStar3.SetImageResource(Resource.Drawable.ic_star_disable);
				imgStar4.SetImageResource(Resource.Drawable.ic_star_disable);
			};

			imgStar3.Click += (sender, e) => {
				tvError.Visibility = ViewStates.Gone;
				iNumStar = 3;
				imgStar1.SetImageResource(Resource.Drawable.ic_star);
				imgStar2.SetImageResource(Resource.Drawable.ic_star);
				imgStar3.SetImageResource(Resource.Drawable.ic_star);
				imgStar4.SetImageResource(Resource.Drawable.ic_star_disable);
			};

			imgStar4.Click += (sender, e) => {
				tvError.Visibility = ViewStates.Gone;
				iNumStar = 4;
				imgStar1.SetImageResource(Resource.Drawable.ic_star);
				imgStar2.SetImageResource(Resource.Drawable.ic_star);
				imgStar3.SetImageResource(Resource.Drawable.ic_star);
				imgStar4.SetImageResource(Resource.Drawable.ic_star);
			};

			btnSend.Click += (sender, e) => {
				if(iNumStar == 0) {
					tvError.Visibility = ViewStates.Visible;
				} else {
					dialog.Dismiss();
					actionRatingDelegate.onSendingRating();
					sendFeedback();
				}
			};

			btnCancel.Click += (sender, e) => {
				dialog.Dismiss();
			};

			builder = new AlertDialog.Builder (_activity);
			builder.SetInverseBackgroundForced (true);
			builder.SetView (ratingFeebackView);
			dialog = builder.Create ();
			dialog.SetCanceledOnTouchOutside (false);
			dialog.Show ();
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:73,代码来源:RatingFeedbackUI.cs


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