Example #1
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var item = dataSource.DisplayItems[indexPath.Row];

            if (item is Contacts)
            {
                PopupContactCell cell = tableView.DequeueReusableCell("TableCell") as PopupContactCell;
                if (cell == null)
                {
                    cell = new PopupContactCell();
                }
                cell.UpdateValue(item);
                return(cell);
            }
            return(new UITableViewCell());
        }
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);

            if (cell == null)
            {
                cell = new UITableViewCell(UITableViewCellStyle.Default, cellIdentifier);
            }

            CRCloudMetaData data = _metaData[indexPath.Row];

            cell.TextLabel.Text  = data.Name;
            cell.ImageView.Image = helper.GetImage(data);

            return(cell);
        }
Example #3
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            DayCell cell = tableView.DequeueReusableCell(cellId) as DayCell;

            if (cell == null)
            {
                cell = new DayCell(days[indexPath.Row].ToString("dddd"), days[indexPath.Row], cellId);
            }
            else
            {
                cell.UpdateCell(days[indexPath.Row].ToString("dddd"), days[indexPath.Row]);
            }

            cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
            return(cell);
        }
Example #4
0
        /// <summary>
        /// Rows the selected.
        /// </summary>
        /// <param name="tableView">Table view.</param>
        /// <param name="indexPath">Index path.</param>
        public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.CellAt(indexPath);

            if (_pickerCell.MaxSelectedNumber == 1)
            {
                RowSelectedSingle(cell, indexPath.Row);
                DoPickToClose();
            }
            else
            {
                RowSelectedMulti(cell, indexPath.Row);
            }

            tableView.DeselectRow(indexPath, true);
        }
Example #5
0
        public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var item = Datasource[indexPath.Row];
            var path = new NSString(CurrentPath).AppendPathComponent(new NSString(item)).ToString();

            var result = FileManager.GetFileStat(path);

            if (result.IsFolder)
            {
                FolderSelectAction(item);
            }
            else
            {
                FileSelectAction(item);
            }
        }
Example #6
0
        public async Task DeleteUserAccess(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            // todo [email protected]: localize string. also, we can use error codes instead of strings

/*
 *                      await Task.Delay(TimeSpan.FromMilliseconds(1));
 *
 *                      var userID = KeychainAccess.ValueForKey("userID");
 *                      //Create the data package to send for the post request
 *                      //Key value pair for post variable check
 *                      var data = new System.Collections.Specialized.NameValueCollection();
 *                      data.Add("deleteUserAccess","true");
 *                      data.Add("userID", userID);
 *                      data.Add("accessID", tableItems[indexPath.Row].id.ToString());
 *                      try{
 *                              //// initiate the post request and get the request result in a byte array
 *                              byte[] result = webServices.UploadValues(deleteUserUrl,data);
 *
 *                              ////get the string conversion for the byte array
 *                              var textResponse = Encoding.UTF8.GetString(result);
 *                              Console.WriteLine(textResponse);
 *                              ////parse the text string into a json object to be deserialized
 *                              JObject response = JObject.Parse(textResponse);
 *                              var success = response.GetValue("success");
 *
 *                              var window = UIApplication.SharedApplication.KeyWindow;
 *                      var rootVC = window.RootViewController as IONPrimaryScreenController;
 *                              var responseMessage = response.GetValue("message");
 *
 *                              if(success.ToString() == "false"){
 *                                      var alert = UIAlertController.Create ("Delete User", responseMessage.ToString(), UIAlertControllerStyle.Alert);
 *                                      alert.AddAction (UIAlertAction.Create ("Ok", UIAlertActionStyle.Cancel, null));
 *                                      rootVC.PresentViewController (alert, animated: true, completionHandler: null);
 *                                      tableItems.Add(new ConnectionData(){displayName = tableItems[indexPath.Row].displayName, id = tableItems[indexPath.Row].id});
 *                                      tableView.ReloadData();
 *                              }
 *                      } catch (Exception exception){
 *                              Console.WriteLine("Exception: " + exception);
 *                              var window = UIApplication.SharedApplication.KeyWindow;
 *              var rootVC = window.RootViewController as IONPrimaryScreenController;
 *
 *                              var alert = UIAlertController.Create ("Remove Access", "There was no response. Please try again.", UIAlertControllerStyle.Alert);
 *                              alert.AddAction (UIAlertAction.Create ("Ok", UIAlertActionStyle.Cancel, null));
 *                              rootVC.PresentViewController (alert, animated: true, completionHandler: null);
 *                      }
 */
        }
Example #7
0
        public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            //send data to ProfilesSplitViewController
            var SelectedItemName = this.tableItems[indexPath.Section];

            if (ProfileRowToController != null)
            {
                ProfileRowToController(SelectedItemName);
            }
            //tableView.DeselectRow(indexPath, true);

            //Show/Hide Table Method call to ProfilessSplitViewController
            if (TableHidden && ProfileRowToController != null)
            {
                HideTable(TableHidden);
            }
        }
Example #8
0
        public override nfloat GetHeightForRow(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var h = this.original.GetHeightForRow(tableView, indexPath);

            if (this._MinRowHeight == -1)
            {
                return(h);
            }
            else
            {
                if (h < this._MinRowHeight)
                {
                    return(this._MinRowHeight);
                }
                return(h);
            }
        }
Example #9
0
 public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
 {
     if (isShowInformation)
     {
         var current         = Reservaciones[indexPath.Row];
         var currentPostCell = (ReservacionesSalaCell)tableView.DequeueReusableCell(IdentificadorCeldaPost, indexPath);
         currentPostCell.UpdateCell(current, this.SeccionSeleccionada);
         return(currentPostCell);
     }
     else
     {
         BTProgressHUD.Dismiss();
         var noPostCell = (NoInfoReservacionesCell)tableView.DequeueReusableCell(IdentificadorCeldaNoInfo, indexPath);
         noPostCell.UpdateCell(this.existeConeccion);
         return(noPostCell);
     }
 }
Example #10
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell("LeagueChooserCell", indexPath);

            cell.TextLabel.Text = Leagues[indexPath.Row].Name;

            var switchView = new UISwitch();

            switchView.SetState(Leagues[indexPath.Row].Value, true);
            switchView.Tag = indexPath.Row;

            switchView.ValueChanged += SwitchValueChanged;

            cell.AccessoryView = switchView;

            return(cell);
        }
Example #11
0
        public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var selectedItem = GetItem(indexPath.Row);

            tableView.DeselectRow(indexPath, true);

            // create the view controller for your initial view - using storyboard, code, etc
            ItemDetailsViewController itemDetailsViewController = _owner.Storyboard.InstantiateViewController(controllerName) as ItemDetailsViewController;

            if (itemDetailsViewController != null)
            {
                //Here you pass the data from the registerViewController to the secondViewController
                itemDetailsViewController.SetSelectedItem(selectedItem);
                //itemDetailsViewController.SetSelectedItem(menuCat);
                _owner.NavigationController.PushViewController(itemDetailsViewController, true);
            }
        }
Example #12
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            if (isShowInformation)
            {
                var current = tableItems[indexPath.Row];

                var currentOptionCell = (MenuContenidoCell)tableView.DequeueReusableCell(IdentificadorCeldaPost, indexPath);
                currentOptionCell.UpdateCell(current.Label);
                return(currentOptionCell);
            }
            else
            {
                var noPostCell = (NoInfoMenuCell)tableView.DequeueReusableCell(IdentificadorCeldaNoInfo, indexPath);
                noPostCell.UpdateCell(this.existeConeccion);
                return(noPostCell);
            }
        }
Example #13
0
 public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
 {
     if (isShowInformation)
     {
         var current     = Usuarios[indexPath.Row];
         var currentUser = (ComunidadTableViewCell)tableView.DequeueReusableCell(IdentificadorCeldaUsuarios, indexPath);
         currentUser.EventosComunidadCellDelegate = this;
         currentUser.UpdateCell(current);
         return(currentUser);
     }
     else
     {
         var noPostCell = (NoInfoCellUsuarios)tableView.DequeueReusableCell(IdentificadorCeldaNoInfo, indexPath);
         noPostCell.UpdateCell(this.existeConeccion);
         return(noPostCell);
     }
 }
 public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
 {
     // change the defualt result to "N/A"
     if (this.checkListItems [indexPath.Row].itemType == ItemType.GuidedPicture)
     {
         this.checkListItems [indexPath.Row].Result = ResultType.NA;
         return(GetGuidedPictureCell(tableView, indexPath));
     }
     else if (this.checkListItems [indexPath.Row].itemType == ItemType.PunchList)
     {
         return(GetFinalPunchListCell(tableView, indexPath));
     }
     else
     {
         return(GetItemCell(tableView, indexPath));
     }
 }
Example #15
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell(cellIdentifier, indexPath) as LogTableCell;

            if (indexPath.Row < DataManager.packets.Count)
            {
                var item = DataManager.packets[indexPath.Row];

                cell.Time = item.time.ToString("dd.MM.yyyy  HH:mm:ss");

                cell.AckTime = "";
                if (item.ackTime != DateTime.MinValue)
                {
                    cell.AckTime = item.ackTime.ToString("dd.MM.yyyy  HH:mm:ss");
                }

                cell.PacketHeader      = item.header;
                cell.PacketDescription = item.description;

                if (item.directionToNode == false)
                {
                    cell.SeqNumber       = item.nodeSeqNumber.ToString();
                    cell.BackgroundColor = UIColor.White;
                }
                else
                {
                    cell.SeqNumber = "";

                    if (item.inProcess == false)
                    {
                        cell.BackgroundColor = UIColor.Yellow;
                    }
                    else
                    {
                        cell.BackgroundColor = UIColor.FromRGB(255, 255, 224);
                        cell.SeqNumber       = item.ack.ToString();
                    }
                }



                cell.UserInteractionEnabled = true;
            }

            return(cell);
        }
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            try
            {
                var cellIdentifier = new NSString("suggestion");
                var cell           = tableView.DequeueReusableCell(cellIdentifier) as NoRecentSearchesViewCell ?? new NoRecentSearchesViewCell(cellIdentifier);

                var text     = results[indexPath.Row];
                var hitStart = text.IndexOf("[");
                var hitEnd   = text.LastIndexOf("]");

                var hitColor  = "646265".ToUIColor();
                var textColor = "989898".ToUIColor();

                var defaultAttributes = new UIStringAttributes {
                    ForegroundColor = textColor,
                    Font            = UIFont.FromName("Avenir", 18)
                };

                var hitAttributes = new UIStringAttributes {
                    ForegroundColor = hitColor,
                    Font            = UIFont.FromName("Avenir-Medium", 18)
                };

                text = text.Remove(hitEnd, 1);
                text = text.Remove(hitStart, 1);

                var attributedString = new NSMutableAttributedString(text);
                attributedString.SetAttributes(defaultAttributes.Dictionary, new NSRange(0, text.Length));
                attributedString.SetAttributes(hitAttributes.Dictionary, new NSRange(0, hitEnd - 1));

                cell.TextLabel.AttributedText = attributedString;

                //cell.TextLabel.Text = text;
                //cell.TextLabel.Font = UIFont.FromName("Avenir-Book", 14);
                return(cell);
            }
            catch (Exception ex)
            {
                Xamarin.Insights.Report(ex);
                var cell = new UITableViewCell();
                cell.TextLabel.Text = results[indexPath.Row];
                cell.TextLabel.Font = UIFont.FromName("Avenir-Book", 14);
                return(cell);
            }
        }
Example #17
0
        /*public override string[] SectionIndexTitles(UITableView tableView)
         * {
         *      return Sections.ToArray();
         * }*/

        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell      = this.TableView.DequeueReusableCell("TodayCell");
            var shipEvent = All[indexPath.Row];

            cell.TextLabel.Font  = UIFont.FromName("Courier New", 14);
            cell.TextLabel.Lines = 2;
            cell.TextLabel.AdjustsFontSizeToFitWidth      = true;
            cell.TextLabel.AdjustsLetterSpacingToFitWidth = true;
            cell.TextLabel.MinimumFontSize = 8;

            //DataAccess.GetTodayInNavyHistoryByYear(Sections.ElementAt((int)indexPath.Section)).ElementAt(indexPath.Row);
            cell.TextLabel.Text = shipEvent.preview;
            //cell.TextLabel.SizeToFit();

            cell.DetailTextLabel.AttributedText = GetShipEventDetailText(shipEvent);
            return(cell);
        }
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            // in a Storyboard, Dequeue will ALWAYS return a cell,
            UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier);

            cell.TextLabel.Text = tableItems[indexPath.Row].Name;

            if (tableItems[indexPath.Row].Done)
            {
                cell.Accessory = UITableViewCellAccessory.Checkmark;
            }
            else
            {
                cell.Accessory = UITableViewCellAccessory.None;
            }

            return(cell);
        }
Example #19
0
 public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
 {
     if (isShowInformation)
     {
         var currentProduct     = PreordenProductos[indexPath.Row];
         var currentProductCell = (CeldaDetalleVenta_Temp)tableView.DequeueReusableCell(IdentificadorCeldaBody, indexPath);
         currentProductCell.UpdateCell(currentProduct);
         this.WillDisplay(indexPath.Row);
         return(currentProductCell);
     }
     else
     {
         BTProgressHUD.Dismiss();
         var noPostCell = (CeldaNoDetalleVenta_Temp)tableView.DequeueReusableCell(IdentificadorCeldaNoInfo, indexPath);
         noPostCell.UpdateCell(this.existeConeccion);
         return(noPostCell);
     }
 }
Example #20
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell(_cellIdentifier, indexPath) as CustomCellDetailSeekiosView;

            if (cell == null)
            {
                cell = (CustomCellDetailSeekiosView) new UITableViewCell(UITableViewCellStyle.Default, _cellIdentifier);
            }
            cell.SelectionStyle = UITableViewCellSelectionStyle.None;

            if (indexPath.Section == 0) // Map View
            {
                SetCell(cell, -1);
                cell.titleNameLabel.Text = Application.LocalizedString("Map");
                cell.detailLabel.Text    = Application.LocalizedString("UpdateSeekiosPosition");
                cell.pictureView         = UIImage.FromBundle("MapDetail2");
            }
            else if (indexPath.Section == 1) // Refresh Credit
            {
                SetCell(cell, -1);
                cell.titleNameLabel.Text = Application.LocalizedString("RefillCredits");
                cell.detailLabel.Text    = string.Format(Application.LocalizedString("CreditsWithCreditsOffered")
                                                         , SeekiosApp.Helper.CreditHelper.TotalCredits
                                                         , SeekiosApp.Helper.CreditHelper.CreditsOffered);
                cell.pictureView = UIImage.FromBundle("IconAddCredits");
            }
            else if (indexPath.Section == 2)              // Mode or Parameter Selection
            {
                if (_controller._firstInitialise == true) // Parameter
                {
                    SetParameterRow(cell, indexPath);
                }
                else
                {  // Mode
                    SetModeRow(cell, indexPath);
                }
            }
            else if (indexPath.Section == 3) // Parameter
            {
                SetParameterRow(cell, indexPath);
            }
            return(cell);
        }
Example #21
0
            public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
            {
                int index = indexPath.Row + parent.TabBar.Items.Length - 1;

                if (CurrentTab != index)
                {
                    CurrentTab = PaneManager.Instance.CurrentTab = index;
                }

                var tab = parent.TabItems.ElementAt(index);

                if (tab != null)
                {
                    if (!tab.RaiseEvent("Selected", EventArgs.Empty))
                    {
                        iApp.Navigate(tab.NavigationLink, parent as ITabView);
                    }
                }
            }
Example #22
0
 public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
 {
     if (isShowInformation)
     {
         var currentProduct = PreordenProductos[indexPath.Row];
         //membresias.AddRange(controller.GetProductosMembresias(currentProduct.Tipo, currentProduct.Id, currentProduct.Cantidad, currentProduct.Meses, currentProduct.FechaInicio, currentProduct.ListaPrecioId, currentProduct.MonedaId, currentProduct.ImpuestoId, currentProduct.DescuentoId));
         var currentProductCell = (CeldaVentaDetalle)tableView.DequeueReusableCell(IdentificadorCeldaBody, indexPath);
         currentProductCell.UpdateCell(currentProduct);
         this.WillDisplay(indexPath.Row);
         return(currentProductCell);
     }
     else
     {
         BTProgressHUD.Dismiss();
         var noPostCell = (CeldaNoDetalleVenta)tableView.DequeueReusableCell(IdentificadorCeldaNoInfo, indexPath);
         noPostCell.UpdateCell(this.existeConeccion);
         return(noPostCell);
     }
 }
Example #23
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell(cellIdentifier);

            if (cell == null)
            {
                cell = new UITableViewCell(UITableViewCellStyle.Default, cellIdentifier);
            }

            cell.TextLabel.Text = Items[indexPath.Row].Title;

            // If lesson is finished then add check mark
//            if (true) // Place holder!!
//            {
//                cell.Accessory = UITableViewCellAccessory.Checkmark;
//            }

            return(cell);
        }
Example #24
0
        public UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            UITableViewCell cell;
            var             cellIdentifier = kDefaultAutoCompleteCellIdentifier;

            if (String.IsNullOrEmpty(this.ReuseIdentifier))
            {
                cell = tableView.DequeueReusableCell(cellIdentifier);
                if (cell == null)
                {
                    cell = autoCompleteTableViewCellWithReuseIdentifier(cellIdentifier);
                }
            }
            else
            {
                cell = tableView.DequeueReusableCell(this.ReuseIdentifier);
            }
            if (cell == null)
            {
                Debug.WriteLine("Unable to create cell for autocomplete table");
            }

            var    autoCompleteObject = this.AutoCompleteSuggestions [indexPath.Row];
            string suggestedString    = string.Empty;

            if (autoCompleteObject is string)
            {
                suggestedString = (string)autoCompleteObject;
            }
            else if (autoCompleteObject is MLPAutoCompletionObject)
            {
                suggestedString = ((MLPAutoCompletionObject)autoCompleteObject).AutocompleteString;
            }
            else
            {
                Debug.WriteLine("Unable to create cell for autocomplete table");
            }

            this.configureCell(cell, indexPath, suggestedString);

            return(cell);
        }
        public void RowSelected(UIKit.UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            if (this.AutoCompleteTableAppearsAsKeyboardAccessory)
            {
                this.closeAutoCompleteTableView();
            }

            var    cell = tableView.CellAt(indexPath);
            string autoCompleteString = cell.TextLabel.Text;

            this.Text = autoCompleteString;

            var autoCompleteObject = this.AutoCompleteSuggestions[indexPath.Row];

            if (autoCompleteObject != null && autoCompleteObject is MLPAutoCompletionObject)
            {
                this.autoCompleteDelegate.AutoCompleteTextField(this, autoCompleteString, (MLPAutoCompletionObject)autoCompleteObject, indexPath);
            }
            this.finishedSearching();
        }
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            UITableViewCell cell;

            if (indexPath.Row == 0)
            {
                cell = new UITableViewCell(UITableViewCellStyle.Value1, "cell1");
                cell.TextLabel.Text       = "From";
                cell.DetailTextLabel.Text = _dvc.SelectedPeriod.DateFrom.ToShortDateString();
                cell.SelectionStyle       = UITableViewCellSelectionStyle.Blue;
            }
            else
            {
                cell = new UITableViewCell(UITableViewCellStyle.Value1, "cell2");
                cell.TextLabel.Text       = "To";
                cell.DetailTextLabel.Text = _dvc.SelectedPeriod.DateTo.ToShortDateString();
                cell.SelectionStyle       = UITableViewCellSelectionStyle.Blue;
            }
            return(cell);
        }
Example #27
0
        public override UITableViewCell GetCell(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var cell = tableView.DequeueReusableCell("allowingCell") as AllowingUserCell;

            if (cell == null)
            {
                cell = new UITableViewCell(UITableViewCellStyle.Default, "allowingCell") as AllowingUserCell;
            }
            cell.Layer.BorderWidth = 1f;
            if (tableView.Bounds.Width < 330)
            {
                cell.makeCellData(tableItems [indexPath.Row], cellHeight, true);
            }
            else
            {
                cell.makeCellData(tableItems [indexPath.Row], cellHeight);
            }

            return(cell);
        }
        public override void DidSelectItemAtIndexPath(TelerikUI.TKListView listView, Foundation.NSIndexPath indexPath)
        {
            owner.alert.CustomFrame                = new CGRect(0, 0, listView.Superview.Frame.Size.Width, 160);
            owner.alert.Title                      = owner.titles.GetItem <NSString> ((uint)indexPath.Row);
            owner.alert.Message                    = owner.messages.GetItem <NSString> ((uint)indexPath.Row);
            owner.alert.ContentView.Fill           = new TKSolidFill(owner.colors.GetItem <UIColor> ((uint)indexPath.Row));
            owner.alert.HeaderView.Fill            = new TKSolidFill(owner.colors.GetItem <UIColor> ((uint)indexPath.Row));
            owner.alert.AlertView.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;

            if (indexPath.Row > 0)
            {
                owner.alert.DismissTimeout = 3.2;
            }
            else
            {
                owner.alert.DismissTimeout = 0;
            }

            owner.alert.Show(true);
        }
        public override nfloat GetHeightForRow(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var perfList = this.PerformanceGroupedList [indexPath.Row];

            if (perfList == null || perfList.Count == 0)
            {
                return(25);
            }

            var rows = (perfList.Count / 5);

            if (perfList.Count % 5 > 0)
            {
                rows++;
            }

            return(30 + (rows * 46));

            //return 225;
        }
Example #30
0
        public override nfloat GetHeightForRow(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            var film = this.Films [indexPath.Row];

            if (film == null || film.Performances.Count == 0)
            {
                return(80);
            }

            var rows = (film.Performances.Count / 5);

            if (film.Performances.Count % 5 > 0)
            {
                rows++;
            }

            var height = 85 + (rows * 46);

            return(height);
        }
		private void closeDatePicker(UITableView tv, Foundation.NSIndexPath ip)
		{
			tv.BeginUpdates ();
			Foundation.NSIndexPath[] ips = new Foundation.NSIndexPath[]{ Foundation.NSIndexPath.FromRowSection (ip.Row + 1, 0) };
			var cellPath = NSIndexPath.FromRowSection (ip.Row + 1, 0);

			var cellToAnimate = tv.CellAt (cellPath);
			var point = cellToAnimate.Center;
			Console.WriteLine (cellToAnimate.Center);
			Console.WriteLine (cellToAnimate.Frame);
			Console.WriteLine (tv.Center);
			Console.WriteLine (tv.Frame);
			Console.WriteLine (cellToAnimate.Center.Y - 176);
			UIView.Animate(6, 0, UIViewAnimationOptions.CurveEaseInOut,
				()=> {
					cellToAnimate.Center =
						new CoreGraphics.CGPoint(cellToAnimate.Center.X, cellToAnimate.Center.Y + 176);},
				()=> {
					cellToAnimate.Center = point;}
			);
			showDatePicker = false;
			
			numRows--;
			tv.DeleteRows (ips, UITableViewRowAnimation.None);
			tv.DeselectRow (ip, true);
			tv.EndUpdates ();

//			tv.BeginUpdates ();
//			showDatePicker = false;
//			Foundation.NSIndexPath[] ips = new Foundation.NSIndexPath[]{ Foundation.NSIndexPath.FromRowSection (ip.Row + 1, 0) };
//			numRows--;
//			tv.DeleteRows (ips, UITableViewRowAnimation.Top);
//			tv.DeselectRow (ip, true);
//			tv.EndUpdates ();
		}