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


C# UIActionSheet.ShowInView方法代码示例

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


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

示例1: HandleBtnSimpleActionSheetTouchUpInside

		void HandleBtnSimpleActionSheetTouchUpInside (object sender, EventArgs e)
		{
			// create an action sheet using the qualified constructor
			actionSheet = new UIActionSheet ("simple action sheet", null, "cancel", "delete", null);
			actionSheet.Clicked += OnClicked;
			actionSheet.ShowInView (View);
		}
开发者ID:ARMoir,项目名称:mobile-samples,代码行数:7,代码来源:ActionSheets_iPhone.xib.cs

示例2: HandleBtActionClicked

		void HandleBtActionClicked (object sender, EventArgs e)
		{
			var actionSheet = new UIActionSheet("") {"Del på facebook", "Send link på e-post", Utils.Translate("cancel")};
			actionSheet.Title = "Del denne siden";
			//actionSheet.DestructiveButtonIndex = 0;
			actionSheet.CancelButtonIndex = 2;
			actionSheet.ShowInView(this.View);
			
			actionSheet.Clicked += delegate(object s, UIButtonEventArgs evt) 
			{
				switch (evt.ButtonIndex)
				{
				case 0:
					//Del på facebook
					
					break;
				case 1:
					//Send link på e-post
					var url = webView.Request.MainDocumentURL;
					var htmlstr ="<a href='"+url+"'>"+url+"</a>";
					var reportScreen = new ReportJakt(htmlstr);
					this.NavigationController.PushViewController(reportScreen, true);
					break;
				/*case 2:
					//Del på face
					MessageBox.Show("Ennå ikke implementert...", "");
					break;
				*/default:
					//Avbryt
					
					break;
				}
			};
		}
开发者ID:darkwood,项目名称:Jaktloggen,代码行数:34,代码来源:WebScreen.cs

示例3: CreateTilesPopUp

        public void CreateTilesPopUp()
        {
            UIActionSheet actionsheet = new UIActionSheet("Selecteer een categorie"){ "Map", "Road", "Shop", "Annuleer" };

            actionsheet.Clicked += (sender, e) =>
            {
                switch (e.ButtonIndex)
                {
                    case 0:
                        GlobalSupport.MessageIdentifier = 800;
                            NavigateToDetails();
                        break;
                    case 1:
                        GlobalSupport.MessageIdentifier = 801;
                            NavigateToDetails();
                        break;
                    case 2:
                        GlobalSupport.MessageIdentifier = 802;
                            NavigateToDetails();
                        break;
                }
            };

            actionsheet.ShowInView(this.View);
        }
开发者ID:ZuydUniversity,项目名称:ProgramADroid,代码行数:25,代码来源:VCHelpMenu.cs

示例4: LoadView

		public override void LoadView ()
		{

			NavigationItem.RightBarButtonItem= new UIBarButtonItem(UIBarButtonSystemItem.Compose,
				delegate {
					var actionSheet = new UIActionSheet ("Email", null, "Cancel", "PNG", "PDF"){
						Style = UIActionSheetStyle.Default
					};

					actionSheet.Clicked += delegate (object sender, UIButtonEventArgs args){

						if(args.ButtonIndex > 1)
							return;

						Email(args.ButtonIndex == 0 ? "png" : "pdf");
					};

					actionSheet.ShowInView (View);
				});


			View = new UIView(plotFrame);
			image_plotted_by_OxyPlot = new GraphView(plotModel);
			image_plotted_by_OxyPlot.Frame = plotFrame;
			View.AddSubview(image_plotted_by_OxyPlot);
			image_plotted_by_OxyPlot.SetAllowPinchScaling(true);

		}
开发者ID:jgodinez,项目名称:OxyPlot.2DGraphLib.MonoTouch,代码行数:28,代码来源:GraphViewController.cs

示例5: LoadView

		public override void LoadView ()
		{
			NavigationItem.RightBarButtonItem= new UIBarButtonItem(UIBarButtonSystemItem.Compose,
				delegate {
					var actionSheet = new UIActionSheet ("Email", null, "Cancel", "PNG", "PDF"){
						Style = UIActionSheetStyle.Default
					};

					actionSheet.Clicked += delegate (object sender, UIButtonEventArgs args){

						if(args.ButtonIndex > 1)
							return;

						Email(args.ButtonIndex == 0 ? "png" : "pdf");
					};

					actionSheet.ShowInView (View);
				});

			var scrollView = new GraphScrollView(exampleInfo,
			                 new RectangleF(new PointF(0, 0),
			               new SizeF(UIScreen.MainScreen.ApplicationFrame.Size.Width,
			          UIScreen.MainScreen.ApplicationFrame.Height -
			          UIScreen.MainScreen.ApplicationFrame.Top - 10)));
			View = scrollView;
		}
开发者ID:aleksanderkobylak,项目名称:oxyplot,代码行数:26,代码来源:GraphViewController.cs

示例6: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            this.txt.ShouldReturn += (textField) => {
                textField.ResignFirstResponder();
                return true;
            };

            this.btn.TouchUpInside += (o,s) => {
                var actionSheet = new UIActionSheet ("Send Post?", null, "Cancel", null, "Send"){
                    Style = UIActionSheetStyle.Default
                };
                actionSheet.Clicked += ( sender,  args) => {
                    Console.WriteLine ("Clicked on item {0}  text: {1}", args.ButtonIndex, this.txt.Text);
                    if (args.ButtonIndex == 0)
                    {
                        MakePost(this.txt.Text);
                    }
                };

                actionSheet.ShowInView (View);
            };

            // Perform any additional setup after loading the view, typically from a nib.
        }
开发者ID:eiu165,项目名称:Parse,代码行数:26,代码来源:ParseViewController.cs

示例7: HandleBtnSimpleActionSheetTouchUpInside

		protected void HandleBtnSimpleActionSheetTouchUpInside (object sender, EventArgs e)
		{
			// create an action sheet using the qualified constructor
			actionSheet = new UIActionSheet ("simple action sheet", null, "cancel", "delete", null);
			actionSheet.Clicked += delegate(object a, UIButtonEventArgs b) { Console.WriteLine ("Button " + b.ButtonIndex.ToString () + " clicked"); };
			actionSheet.ShowInView (View);
		}
开发者ID:Adameg,项目名称:mobile-samples,代码行数:7,代码来源:ActionSheets_iPad.xib.cs

示例8: ShareLink

 public void ShareLink(string title, string status, string link)
 {
     var buttonTitle = string.Empty;
     var actionSheet = new UIActionSheet("Partilhar");
     actionSheet.AddButton("Facebook");
     actionSheet.AddButton("Twitter");
     actionSheet.Clicked += delegate(object a, UIKit.UIButtonEventArgs b)
     {
         if(b.ButtonIndex != -1)
         {
             buttonTitle = actionSheet.ButtonTitle(b.ButtonIndex);
         }
     };
     actionSheet.Dismissed += (sender, e) =>
     {
         if (buttonTitle.Equals("Facebook"))
         {
             ShareOnService(SLServiceKind.Facebook, title, status, link);
         }
         else if (buttonTitle.Equals("Twitter"))
         {
             ShareOnService(SLServiceKind.Twitter, title, status, link);
         }
     };
     actionSheet.ShowInView(UIApplication.SharedApplication.KeyWindow.RootViewController.View);
 }
开发者ID:amolkhot,项目名称:XamarinWorkshop,代码行数:26,代码来源:ShareService.cs

示例9: LoadView

        public override void LoadView ()
        {
            NavigationItem.RightBarButtonItem= new UIBarButtonItem(UIBarButtonSystemItem.Compose,
                delegate {
                    var actionSheet = new UIActionSheet ("Email", null, "Cancel", "PNG", "PDF"){
                        Style = UIActionSheetStyle.Default
                    };

                    actionSheet.Clicked += delegate (object sender, UIButtonEventArgs args){

                        if(args.ButtonIndex > 1)
                            return;

                        Email(args.ButtonIndex == 0 ? "png" : "pdf");
                    };

                    actionSheet.ShowInView (View);
                });

            // Only for iOS 7 and later?
            this.EdgesForExtendedLayout = UIRectEdge.None;

            this.View = this.plotView;

        }
开发者ID:Celderon,项目名称:oxyplot,代码行数:25,代码来源:GraphViewController.cs

示例10: ViewDidLoad

 public override void ViewDidLoad ()
 {
     base.ViewDidLoad ();
     
     _picker = new UIImagePickerController ();
     _pickerDel = new PickerDelegate (this);
     _picker.Delegate = _pickerDel;
     
     _actionSheet = new UIActionSheet ();
     _actionSheet.AddButton ("Library");
     _actionSheet.AddButton ("Camera");
     _actionSheet.AddButton ("Cancel");
     _actionSheet.CancelButtonIndex = 2;
     _actionSheet.Delegate = new ActionSheetDelegate (this);
     
     showPicker.TouchUpInside += delegate { _actionSheet.ShowInView (this.View); };
     
     playMovie.Hidden = true;
     
     playMovie.TouchUpInside += delegate {
         if (_mp != null) {
             View.AddSubview (_mp.View);
             _mp.SetFullscreen (true, true);
             _mp.Play ();
         }
     };
 }
开发者ID:enricos,项目名称:learning_monotouch_code,代码行数:27,代码来源:CameraDemoController.xib.cs

示例11: PickRegisterOption

		private void PickRegisterOption()
		{
			try {
				UIActionSheet actionSheet;
				actionSheet = new UIActionSheet();

				actionSheet.AddButton("Phone");
				actionSheet.AddButton("Email");		

				actionSheet.Clicked += delegate(object a, UIButtonEventArgs b) {
					if (b.ButtonIndex == (0)) {
						EmailRegisterView.Hidden = true;
						PhoneRegisterView.Hidden = false;
						SetEditing(false, true);
						this.registerMode = this.appDelegate.MODE_REGISTER_PHONE;
					} else {
						EmailRegisterView.Hidden = false;
						PhoneRegisterView.Hidden = true;
						this.registerMode = this.appDelegate.MODE_REGISTER_EMAIL;
						SetEditing(false, true);
					} 
				};
				actionSheet.ShowInView(View);
			} catch (Exception ex) {
				Console.Write(ex.Message);
			}
		}
开发者ID:Securecom,项目名称:Securecom-Messaging-iOS,代码行数:27,代码来源:RegistrationView.cs

示例12: OnAddAnimalsClick

 partial void OnAddAnimalsClick(MonoTouch.Foundation.NSObject sender)
 {
     var sheet = new UIActionSheet("Add Animals");
     sheet.AddButton("Add Dog");
     sheet.AddButton("Add Kitten");
     sheet.Clicked += HandleAddAnimalClicked;
     sheet.ShowInView(this.View);
 }
开发者ID:Dexyon,项目名称:MvvmCross-Samples,代码行数:8,代码来源:PetShopView.cs

示例13: HandleBtnSimpleActionSheetTouchUpInside

		void HandleBtnSimpleActionSheetTouchUpInside (object sender, EventArgs e)
		{
			// create an action sheet using the qualified constructor
			actionSheet = new UIActionSheet ("simple action sheet", null, "cancel", "delete", null);
			actionSheet.Clicked += (object a, UIButtonEventArgs b) => {
				Console.WriteLine (string.Format("Button {0} clicked", b.ButtonIndex));
			};
			actionSheet.ShowInView (View);
		}
开发者ID:ARMoir,项目名称:mobile-samples,代码行数:9,代码来源:ActionSheets_iPad.xib.cs

示例14: HandleBtnActionSheetWithOtherButtonsTouchUpInside

		protected void HandleBtnActionSheetWithOtherButtonsTouchUpInside (object sender, EventArgs e)
		{
			actionSheet = new UIActionSheet ("action sheet with other buttons");
			actionSheet.AddButton ("delete");
			actionSheet.AddButton ("a different option!");
			actionSheet.AddButton ("another option");
			actionSheet.DestructiveButtonIndex = 0;
			actionSheet.Clicked += delegate(object a, UIButtonEventArgs b) { Console.WriteLine ("Button " + b.ButtonIndex.ToString () + " clicked"); };
			actionSheet.ShowInView (View);
		}
开发者ID:Adameg,项目名称:mobile-samples,代码行数:10,代码来源:ActionSheets_iPad.xib.cs

示例15: ViewDidLoad

 public override void ViewDidLoad()
 {
     base.ViewDidLoad ();
     this.textView.Text = "";
     this.btnReset.TouchUpInside += (sender, e) => {
         var actionSheet = new UIActionSheet("Are you sure you want to reset ?", null, "Cancel", "Reset", "?");
         actionSheet.Clicked += HandleActionSheetClicked;;
         actionSheet.ShowInView(View);
     };
 }
开发者ID:dineshkummarc,项目名称:Multi,代码行数:10,代码来源:ActionSheetScreen.cs


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