private void buildActionMenu (bool viewInvoice, bool uploadFile, bool talkReplay, bool transcript, bool waiveFee)
		{
			UIActionSheet actionSheet = new UIActionSheet (TCLocalizabled.getText ("TitleActionChooseAction"));

			int numButton = 0;

			if (viewInvoice) {
				actionSheet.AddButton (TCLocalizabled.getText ("ActionViewInvoice"));
				numButton++;
			}

			if (uploadFile) {
				actionSheet.AddButton (TCLocalizabled.getText ("ActionUploadFile"));
				numButton++;
			}

			if (talkReplay) {
				actionSheet.AddButton (TCLocalizabled.getText ("ActionTalkReplay"));
				numButton++;
			}

			if (transcript) {
				actionSheet.AddButton (TCLocalizabled.getText ("ActionOrderTranscript"));
				numButton++;
			}

			if (waiveFee) {
				actionSheet.AddButton (TCLocalizabled.getText ("ActionWaiveFee"));
				numButton++;
			}

			actionSheet.AddButton (TCLocalizabled.getText ("CancelTitle"));
			actionSheet.CancelButtonIndex = numButton;

			actionSheet.Clicked += delegate(object a, UIButtonEventArgs b) {
				UIActionSheet _actionSheet = (UIActionSheet)a;

				#if DEBUG
				Console.WriteLine ("Button \"" + _actionSheet.ButtonTitle (b.ButtonIndex) + "\" clicked");
				#endif
				string buttonTitle = _actionSheet.ButtonTitle (b.ButtonIndex);

				if (buttonTitle.Equals (TCLocalizabled.getText ("ActionViewInvoice"))) {
					getInvoiceURL (this.bookingInfo.Id);
				} else if (buttonTitle.Equals (TCLocalizabled.getText ("ActionUploadFile"))) {
					TCImageSource imageSource = new TCImageSource (this);
					imageSource.pDelegate = this;
					imageSource.open ();
				} else if (buttonTitle.Equals (TCLocalizabled.getText ("ActionTalkReplay"))) {
					displayReplay ();
				} else if (buttonTitle.Equals (TCLocalizabled.getText ("ActionOrderTranscript"))) {
					requestOrderTranscript ();
				} else if (buttonTitle.Equals (TCLocalizabled.getText ("ActionWaiveFee"))) {
					waiveFeeClicked ();
				}
			};

			actionSheet.ShowInView (this.View);

		}
		partial void addFileClicked (NSObject sender)
		{
			if (checkIsExpired ()) {
				rejectBookingExpired ();
			} else {
				TCImageSource imageSource = new TCImageSource (this);
				imageSource.pDelegate = this;
				imageSource.open ();
			}
		}
Exemple #3
0
		public MImagePickerControllerDelegate(TCImageSource pSource)
		{
			this.pSource = pSource;
		}