コード例 #1
0
		private void RightBarButtonClicked(object sender, EventArgs args)
		{
			var actionSheet = new UIActionSheet("") {Utils.Translate("email.sendbymail"), Utils.Translate("cancel")};
			actionSheet.Title = Utils.Translate("actionsheet.reportheader");
			//actionSheet.DestructiveButtonIndex = 0;
			actionSheet.CancelButtonIndex = 2;
			actionSheet.ShowFromTabBar(JaktLoggApp.instance.TabBarController.TabBar);
			
			actionSheet.Clicked += delegate(object s, UIButtonEventArgs e) 
			{
				switch (e.ButtonIndex)
				{
				case 0:
					//Enkel rapport
					var reportScreen = new ReportJakt(jakt);
					this.NavigationController.PushViewController(reportScreen, true);
					break;
				/*case 1:
					//Jaktbok
					var uploadScreen = new UploadScreen(jakt);
					this.NavigationController.PushViewController(uploadScreen, true);
					break;
				case 2:
					//Del på face
					MessageBox.Show("Ennå ikke implementert...", "");
					break;
				*/default:
					//Avbryt
					
					break;
				}
			};
			
		}
コード例 #2
0
ファイル: WebScreen.cs プロジェクト: darkwood/Jaktloggen
		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;
				}
			};
		}
コード例 #3
0
		private void RightBarButtonClicked(object sender, EventArgs args)
		{
			var actionSheet = new UIActionSheet("") {"Send på e-post", "Avbryt"};
			actionSheet.Title = "Lag rapporter fra jakta";
			//actionSheet.DestructiveButtonIndex = 0;
			actionSheet.CancelButtonIndex = 2;
			actionSheet.ShowFromTabBar(JaktLoggApp.instance.TabBarController.TabBar);
			
			actionSheet.Clicked += delegate(object s, UIButtonEventArgs e) 
			{
				switch (e.ButtonIndex)
				{
				case 0:
					//Enkel rapport
					var reportScreen = new ReportJakt(jakt);
					this.NavigationController.PushViewController(reportScreen, true);
					break;
				/*case 1:
					//Jaktbok
					var uploadScreen = new UploadScreen(jakt);
					this.NavigationController.PushViewController(uploadScreen, true);
					break;
				case 2:
					//Del på face
					MessageBox.Show("Ennå ikke implementert...", "");
					break;
				*/default:
					//Avbryt
					
					break;
				}
			};
			
			//var reportScreen = new ReportJakt(jakt);
			
			
			//reportScreen.ModalTransitionStyle = UIModalTransitionStyle.CoverVertical;
			
		}