コード例 #1
0
		public void ShowDetail (CustomCell cell) {
			this.itemTitle.Text = cell.Title;
			
			UIImage image = cell.Checked ? 
				UIImage.FromFile ("images/checked.png") : UIImage.FromFile ("images/unchecked.png");
			
			this.checkedImage.Image = image;
		}
コード例 #2
0
        public void ShowDetail(CustomCell cell)
        {
            this.itemTitle.Text = cell.Title;

            UIImage image = cell.Checked ?
                            UIImage.FromFile("images/checked.png") : UIImage.FromFile("images/unchecked.png");

            this.checkedImage.Image = image;
        }
コード例 #3
0
        public override void AccessoryButtonTapped(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
        {
            CustomCell cell = tableView.CellAt(indexPath) as CustomCell;

            if (cell != null)
            {
                AppDelegate ad = (AppDelegate)UIApplication.SharedApplication.Delegate;
                ad.ShowDetail(cell);
            }
        }
コード例 #4
0
        public override void RowSelected(MonoTouch.UIKit.UITableView tableView, MonoTouch.Foundation.NSIndexPath indexPath)
        {
            CustomCell cell = tableView.CellAt(indexPath) as CustomCell;

            if (cell != null)
            {
                cell.CheckButtonTouchDown(null, null);
            }

            tableView.DeselectRow(indexPath, true);
        }
コード例 #5
0
		public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
		{
			string customCellID = "MyCellID" + indexPath.Section + indexPath.Row;

			CustomCell cell = (CustomCell)tableView.DequeueReusableCell (customCellID);

			if (cell == null) {
				cell = new CustomCell (UITableViewCellStyle.Default, customCellID);

				Item item = this.Data [indexPath.Row];
				cell.Title = item.Title;
				cell.Checked = item.Checked;
			}

			return cell;
		}
コード例 #6
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            string customCellID = "MyCellID" + indexPath.Section + indexPath.Row;

            CustomCell cell = (CustomCell)tableView.DequeueReusableCell(customCellID);

            if (cell == null)
            {
                cell = new CustomCell(UITableViewCellStyle.Default, customCellID);

                Item item = this.Data[indexPath.Row];
                cell.Title   = item.Title;
                cell.Checked = item.Checked;
            }

            return(cell);
        }
コード例 #7
0
		public void ShowDetail (CustomCell cell)
		{
			this.detailViewController.ShowDetail (cell);
			this.navigationController.PushViewController (
				this.detailViewController, true);
		}
コード例 #8
0
ファイル: Main.cs プロジェクト: natarius/monotouch-samples
 public void ShowDetail(CustomCell cell)
 {
     this.detailViewController.ShowDetail(cell);
     this.navigationController.PushViewController(
         this.detailViewController, true);
 }