JudoPayiOSXamarinSampleApp.MainMenuSource.GetTableHeight C# (CSharp) Метод

GetTableHeight() публичный Метод

public GetTableHeight ( ) : float
Результат float
		public float GetTableHeight ()
		{
			float height = 0f;
			foreach (UITableViewCell cell in TableCells) {
				height += (float)cell.Frame.Height;
			}
			return height;
		}

Usage Example

Пример #1
0
		void SetUpTableView ()
		{
			Dictionary<string, Action> buttonDictionary = new Dictionary<string, Action> ();
			SuccessCallback successCallback = SuccessPayment;
			FailureCallback failureCallback = FailurePayment;

			var tokenPayment = new TokenPaymentViewModel {
				Amount = 3.5m,
				ConsumerReference = consumerRef,
				PaymentReference = paymentReference,
				CV2 = cv2
			};

			buttonDictionary.Add ("Make a Payment", () => {
				JudoSDKManager.Payment (GetCardViewModel (), successCallback, failureCallback, this.NavigationController);
			});

			buttonDictionary.Add ("PreAuthorise", delegate {
				JudoSDKManager.PreAuth (GetCardViewModel (), successCallback, failureCallback, this.NavigationController);
			});

			buttonDictionary.Add ("Token Payment", delegate {
				tokenPayment.Token = cardToken;
				tokenPayment.ConsumerToken = consumerToken;
				tokenPayment.LastFour = lastFour;
				tokenPayment.CardType = cardType;

				JudoSDKManager.TokenPayment (tokenPayment, successCallback, failureCallback, this.NavigationController);
			});

			buttonDictionary.Add ("Token PreAuthorise", delegate {
				tokenPayment.Token = cardToken;
				tokenPayment.ConsumerToken = consumerToken;
				tokenPayment.LastFour = lastFour;
				tokenPayment.CardType = cardType;

				JudoSDKManager.TokenPreAuth (tokenPayment, successCallback, failureCallback, this.NavigationController);
			});

			buttonDictionary.Add ("Register a Card", delegate {
				JudoSDKManager.RegisterCard (GetCardViewModel (), successCallback, failureCallback, this.NavigationController);
			});

			MainMenuSource menuSource = new MainMenuSource (buttonDictionary);
			ButtonTable.Source = menuSource;
			TableHeightConstrant.Constant = menuSource.GetTableHeight () + 60f;
		}
All Usage Examples Of JudoPayiOSXamarinSampleApp.MainMenuSource::GetTableHeight