当前位置: 首页>>代码示例>>C#>>正文


C# UITableView.CellAt方法代码示例

本文整理汇总了C#中UITableView.CellAt方法的典型用法代码示例。如果您正苦于以下问题:C# UITableView.CellAt方法的具体用法?C# UITableView.CellAt怎么用?C# UITableView.CellAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UITableView的用法示例。


在下文中一共展示了UITableView.CellAt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RowSelected

 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     tableView.CellAt (NSIndexPath.FromRowSection (selected, 0)).Accessory = UITableViewCellAccessory.None;
     selected = indexPath.Row;
     tableView.CellAt (indexPath).Accessory = UITableViewCellAccessory.Checkmark;
     tableView.DeselectRow (indexPath, true);
 }
开发者ID:CVertex,项目名称:monotouch-samples,代码行数:7,代码来源:TableViewRocks.cs

示例2: RowSelected

		public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
		{
			TCStatusCell oldCell = (TCStatusCell)tableView.CellAt (this.parentViewController.tempIndexPath);
			if (oldCell != null)
				oldCell.unCheck ();

			TCStatusCell selectedCell = (TCStatusCell)tableView.CellAt (indexPath);
			selectedCell.check ();
			tableView.DeselectRow(indexPath, false);
			if (this.parentViewController != null) {
				this.parentViewController.setTempIndex (indexPath);
			}
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:13,代码来源:TCStatusTableViewSource.cs

示例3: Selected

        public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath indexPath)
        {
            RootElement root = (RootElement) Parent.Parent;
            if (RadioIdx != root.RadioSelected){
                var cell = tableView.CellAt (root.PathForRadio (root.RadioSelected));
                if (cell != null)
                    cell.Accessory = UITableViewCellAccessory.None;
                cell = tableView.CellAt (indexPath);
                if (cell != null)
                    cell.Accessory = UITableViewCellAccessory.Checkmark;
                root.RadioSelected = RadioIdx;
            }
			
            base.Selected (dvc, tableView, indexPath);
        }
开发者ID:GSerjo,项目名称:MvvmCross,代码行数:15,代码来源:RadioElement.cs

示例4: RowSelected

		public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
		{
			if (this.favoriteVC != null) {
				this.favoriteVC.PerformSegue ("TCFavoriteToSpecialistProfileViewController", tableView.CellAt (indexPath));
				tableView.DeselectRow (indexPath, true);
			}
		}
开发者ID:borain89vn,项目名称:demo2,代码行数:7,代码来源:TCFavoriteTableViewSource.cs

示例5: TogglePicker

		private void TogglePicker(DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			var sectionAndIndex = GetMySectionAndIndex(dvc);
			if(sectionAndIndex.Key != null)
			{
				Section section = sectionAndIndex.Key;
				int index = sectionAndIndex.Value;

				var cell = tableView.CellAt(path);

				if(isPickerPresent)
				{
					// Remove the picker.
					cell.DetailTextLabel.TextColor = UIColor.Gray;
					section.Remove(datePickerContainer);
					isPickerPresent = false;
				} 
				else
				{
					// Show the picker.
					cell.DetailTextLabel.TextColor = UIColor.Red;
					datePickerContainer = new UIViewElement(string.Empty, datePicker, false);
					section.Insert(index + 1, UITableViewRowAnimation.Bottom, datePickerContainer);
					isPickerPresent = true;
				}
			}
		}
开发者ID:ClusterReplyBUS,项目名称:MonoTouch.Dialog,代码行数:27,代码来源:TaggedDateElement.cs

示例6: RowSelected

        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;

            for (int i = 0; i < _questions[indexPath.Section].PossibleAnswers.Count; i++) {
                if (i == indexPath.Row) {
                    _questions[indexPath.Section].PossibleAnswers[i].IsSelected = true;
                }
                else {
                    _questions[indexPath.Section].PossibleAnswers[i].IsSelected = false;
                    var currentCell = tableView.CellAt(NSIndexPath.FromRowSection(i, indexPath.Section));
                    if (currentCell != null)
                        currentCell.Accessory = UITableViewCellAccessory.None;
                }
            }
        }
开发者ID:rebelok,项目名称:MNEnterpriseMobile,代码行数:16,代码来源:QuestionTableViewSource.cs

示例7: RowSelected

        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            UITableViewCell cell = tableView.CellAt(indexPath);
            if (cell == null)
                return;

            bool searchResult = (tableView == ParentController.SearchDisplayController.SearchResultsTableView);

            cell.Selected = false;

            bool selected = (cell.Accessory == UITableViewCellAccessory.Checkmark);
            CharacterFriend selectedFriend = (searchResult ? FilteredFriendsList[indexPath.Row] : FriendsList[indexPath.Row]);

            if (ParentController.Mode == FriendPickerViewController.SelectionMode.Multiple)
            {
                cell.Accessory = (selected ? UITableViewCellAccessory.None : UITableViewCellAccessory.Checkmark);
                if (selected)
                    SelectedItems.Remove(selectedFriend);
                else
                    SelectedItems.Add(selectedFriend);
            }
            else
            {
                SelectedItems.Clear();
                SelectedItems.Add(selectedFriend);
                if (ParentController.FriendSelected != null)
                {
                    ParentController.FriendSelected(ParentController, selectedFriend);
                }
                ParentController.NavigationController.PopViewController(true);
            }

        }
开发者ID:pavlob0910,项目名称:my-start-stable,代码行数:33,代码来源:FriendPickerViewController.cs

示例8: Selected

		public override void Selected (DialogViewController dvc, UITableView tableView, NSIndexPath path)
		{
			Value = !Value;
			var cell = tableView.CellAt (path);
			ConfigCell (cell);
			base.Selected (dvc, tableView, path);
		}
开发者ID:henrikweimenhog,项目名称:MonoTouch.Dialog,代码行数:7,代码来源:CheckboxElement.cs

示例9: RowSelected

 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {   
     new UIAlertView("Linha Selecionada", tableItems[indexPath.Row], null, "OK", null).Show();
     var cell = tableView.CellAt(indexPath);
     cell.Accessory = UITableViewCellAccessory.Checkmark;
     tableView.DeselectRow(indexPath, true); // Convenção do iOS para remover a seleção
 }
开发者ID:rogeriofabricio,项目名称:XamarinCursoCross,代码行数:7,代码来源:TableSource.cs

示例10: RowSelected

        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            System.Diagnostics.Debug.WriteLine("DeviceViewController RowSelected");
            System.Diagnostics.Debug.WriteLine(tableView.CellAt(indexPath));

            switch (indexPath.Section)
            {
                case 0:
                    {
                        switch (indexPath.Row)
                        {
                            case 0: // sms
                                _modeChangeRequested = true;
                                Vm.SetModeSmsCommand.Execute(null);
                                break;
                            case 1: // pano
                                _modeChangeRequested = true;
                                Vm.SetModePanoCommand.Execute(null);
                                break;
                            case 2: // astro
                                _modeChangeRequested = true;
                                Vm.SetModeAstroCommand.Execute(null);
                                break;
                        }
                    }
                    break;
            }

            tableView.DeselectRow(indexPath, true);
        }
开发者ID:milindur,项目名称:MdkControlApp,代码行数:30,代码来源:DeviceViewController.cs

示例11: RowSelected

 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     var newIsCompleted = !tasks [indexPath.Row].IsCompleted;
     tasks [indexPath.Row].IsCompleted = newIsCompleted;
     var cell = tableView.CellAt (indexPath);
     cell.Accessory = newIsCompleted ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None;
     cell.TextLabel.TextColor = newIsCompleted ? UIColor.Green : UIColor.Black;
 }
开发者ID:pensacola1989,项目名称:TIG-CrossPlatformMobile,代码行数:8,代码来源:TasksTableViewSource.cs

示例12: RowSelected

 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     TodoItem todoItem = _taskManager.TodoItems[indexPath.Row];
     _taskManager.ToggleItemCompletion(todoItem);
     var cell = tableView.CellAt (indexPath);
     cell.Accessory = todoItem.IsCompleted ? UITableViewCellAccessory.Checkmark : UITableViewCellAccessory.None;
     cell.TextLabel.TextColor = todoItem.IsCompleted ? UIColor.Green : UIColor.Black;
 }
开发者ID:phamthangnd,项目名称:TIG-CrossPlatformMobile,代码行数:8,代码来源:TasksTableViewSource.cs

示例13: RowSelected

        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            // Uncheck the previous row
            if (_previousRow != null)
                tableView.CellAt(_previousRow).Accessory = UITableViewCellAccessory.None;

            // Do something with the row
            var row = indexPath.Row;
            Settings.SelectedIndex = row;
            tableView.CellAt(indexPath).Accessory = UITableViewCellAccessory.Checkmark;

            Console.WriteLine("{0} selected",_controller.Items[row]);

            _previousRow = indexPath;

            // This is what the Settings does under Settings>Mail>Show on an iPhone
            tableView.DeselectRow(indexPath,false);
        }
开发者ID:yetanotherchris,项目名称:Monotouch-Samples,代码行数:18,代码来源:CheckmarkDemoTableDelegate.cs

示例14: RowSelected

        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            if(check)
                (tableView.CellAt (indexPath) as ProfielenTableViewCell).toggleCheckbox ();
            else
                _appController.ProfileSelected (Profielen[indexPath.Row].name);

            tableView.DeselectRow (indexPath,true);
        }
开发者ID:FrederickEskens,项目名称:Totem,代码行数:9,代码来源:ProfielenTableViewSource.cs

示例15: RowSelected

        // Called when a row is touched
        public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
        {
            //When you select a row, that row will be highlighted in blue. Set true to deselect the row
            tableView.DeselectRow (indexPath, true);

            //remove the checkmark on previous selection after first selection
            if (this.previous != null) {
                UITableViewCell prevCell = tableView.CellAt (this.previous);
                prevCell.Accessory = UITableViewCellAccessory.None;
            }

            //Select only one row
            UITableViewCell cell = tableView.CellAt (indexPath);
            cell.Accessory = UITableViewCellAccessory.Checkmark;

            //Replace current select to become next selection's previous select
            previous = indexPath;
        }
开发者ID:The-Learning-Track,项目名称:learningtrack-app,代码行数:19,代码来源:TableSource.cs


注:本文中的UITableView.CellAt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。