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


C# UIStoryboardSegue.IntendedDestinationViewController方法代码示例

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


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

示例1: PrepareForSegue

		// Provide the zone to `AddRoomViewController`.
		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);
			if (segue.Identifier == AddRoomsSegue) {
				var addViewController = (AddRoomViewController)segue.IntendedDestinationViewController ();
				addViewController.HomeZone = HomeZone;
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:9,代码来源:ZoneViewController.cs

示例2: PrepareForSegue

		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);
			if (segue.Identifier == SelectCharacteristicSegue) {

				var destinationVC = segue.IntendedDestinationViewController () as CharacteristicSelectionViewController;
				if (destinationVC != null) {
					destinationVC.EventTrigger = EventTrigger;
					destinationVC.TriggerCreator = CharacteristicTriggerCreator;
				}
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:12,代码来源:CharacteristicTriggerViewController.cs

示例3: PrepareForSegue

		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			if (segue.Identifier == ShowServicesSegue) {
				var senderCell = (UITableViewCell)sender;
				var servicesVC = (ServicesViewController)segue.IntendedDestinationViewController ();
				var cellIndex = TableView.IndexPathForCell (senderCell).Row;
				servicesVC.AllowsAllWrites = true;
				servicesVC.OnlyShowsControlServices = true;
				servicesVC.Accessory = accessories [cellIndex];
				servicesVC.CellDelegate = TriggerCreator;
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:12,代码来源:CharacteristicSelectionViewController.cs

示例4: PrepareForSegue

		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);
			if (segue.Identifier == ShowServiceSegue) {
				var indexPath = TableView.IndexPathForCell ((UITableViewCell)sender);
				if (indexPath != null) {
					var characteristicsViewController = (CharacteristicsViewController)segue.IntendedDestinationViewController ();
					var selectedService = tableViewDataSource.ServiceForIndexPath (indexPath);
					if (selectedService != null)
						characteristicsViewController.Service = selectedService;

					characteristicsViewController.CellDelegate = cellController;
				}
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:15,代码来源:ControlsViewController.cs

示例5: PrepareForSegue

		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);

			var vc = segue.IntendedDestinationViewController ();

			var timeVC = vc as TimeConditionViewController;
			if (timeVC != null) {
				timeVC.TriggerCreator = EventTriggerCreator;
				return;
			}

			var characteristicEventVC = vc as CharacteristicSelectionViewController;
			if (characteristicEventVC != null) {
				characteristicEventVC.TriggerCreator = (EventTriggerCreator)TriggerCreator;
				return;
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:18,代码来源:EventTriggerViewController.cs

示例6: PrepareForSegue

		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);

			if (segue.Identifier == showServiceSegue) {
				var servicesViewController = (ServicesViewController)segue.IntendedDestinationViewController ();
				servicesViewController.OnlyShowsControlServices = true;
				servicesViewController.CellDelegate = ActionSetCreator;

				var index = TableView.IndexPathForCell ((UITableViewCell)sender).Row;
				servicesViewController.Accessory = displayedAccessories [index];
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:13,代码来源:ActionSetViewController.cs

示例7: PrepareForSegue

		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);
			if (segue.Identifier == AddServicesSegue) {
				var addServicesVC = (AddServicesViewController)segue.IntendedDestinationViewController ();
				addServicesVC.ServiceGroup = ServiceGroup;
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:8,代码来源:ServiceGroupViewController.cs

示例8: PrepareForSegue

		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);

			if (segue.Identifier == selectLocationSegue) {
				var destinationVC = segue.IntendedDestinationViewController () as MapViewController;
				if (destinationVC == null)
					return;

				// Give the map the previous target region (if exists).
				destinationVC.TargetRegion = LocationTriggerCreator.TargetRegion;
				destinationVC.Delegate = LocationTriggerCreator;
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:14,代码来源:LocationTriggerViewController.cs

示例9: PrepareForSegue

		// Sets the accessory and home of the modifyAccessoryViewController that will be presented.
		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			base.PrepareForSegue (segue, sender);
			var indexPath = TableView.IndexPathForCell ((UITableViewCell)sender);
			if (segue.Identifier == ModifyAccessorySegue) {
				var modifyViewController = (ModifyAccessoryViewController)segue.IntendedDestinationViewController ();
				modifyViewController.Accessory = Room.Accessories [indexPath.Row];
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:10,代码来源:RoomViewController.cs

示例10: PrepareForSegue

		// Determines the destination of the segue and passes the correct
		// HomeKit object onto the next view controller.
		public override void PrepareForSegue (UIStoryboardSegue segue, NSObject sender)
		{
			var cell = sender as UITableViewCell;
			if (cell == null)
				return;

			var indexPath = TableView.IndexPathForCell (cell);
			if (indexPath == null)
				return;

			var destination = segue.IntendedDestinationViewController ();
			var row = indexPath.Row;

			switch (segue.Identifier) {
			case ShowRoomSegue:
				var roomVC = (RoomViewController)destination;
				roomVC.Room = ObjectCollection.Rooms [row];
				break;

			case ShowZoneSegue:
				var zoneViewController = (ZoneViewController)destination;
				zoneViewController.HomeZone = ObjectCollection.Zones [row];
				break;

			case ShowActionSetSegue:
				var actionSetVC = (ActionSetViewController)destination;
				actionSetVC.ActionSet = ObjectCollection.ActionSets [row];
				break;

			case ShowServiceGroupSegue:
				var serviceGroupVC = (ServiceGroupViewController)destination;
				serviceGroupVC.ServiceGroup = ObjectCollection.ServiceGroups [row];
				break;

			case ShowAccessorySegue:
				var detailVC = (ServicesViewController)destination;
				// The services view controller is generic, we need to provide 
				// `showsFavorites` to display the stars next to characteristics.
				detailVC.Accessory = ObjectCollection.Accessories [row];
				detailVC.ShowsFavorites = true;
				detailVC.CellDelegate = new AccessoryUpdateController ();

				break;

			case ModifyAccessorySegue:
				var addAccessoryVC = (ModifyAccessoryViewController)destination;
				addAccessoryVC.Accessory = ObjectCollection.Accessories [row];
				break;

			case ShowTimerTriggerSegue:
				var triggerVC = (TimerTriggerViewController)destination;
				triggerVC.Trigger = ObjectCollection.Triggers [row];
				break;

			case ShowLocationTriggerSegue:
				var locationTriggerVC = (LocationTriggerViewController)destination;
				locationTriggerVC.Trigger = ObjectCollection.Triggers [row];
				break;

			case ShowCharacteristicTriggerSegue:
				var characteristicTriggerVC = (CharacteristicTriggerViewController)destination;
				characteristicTriggerVC.Trigger = ObjectCollection.Triggers [row];
				break;

			default:
				throw new InvalidOperationException (string.Format ("Received unknown segue identifier: {0}", segue.Identifier));
			}
		}
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:70,代码来源:HomeViewController.cs

示例11: PrepareForSegue

        // Passes the `CharacteristicsViewController` the service from the cell and configures the view controller.
        public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
        {
            base.PrepareForSegue (segue, sender);
            if (segue.Identifier != ShowServiceSegue)
                return;

            var indexPath = TableView.IndexPathForCell ((UITableViewCell)sender);
            if (indexPath == null)
                return;

            var selectedService = displayedServices [indexPath.Row];
            var characteristicsViewController = (CharacteristicsViewController)segue.IntendedDestinationViewController ();
            characteristicsViewController.ShowsFavorites = ShowsFavorites;
            characteristicsViewController.AllowsAllWrites = AllowsAllWrites;
            characteristicsViewController.Service = selectedService;
            characteristicsViewController.CellDelegate = CellDelegate;
        }
开发者ID:CBrauer,项目名称:monotouch-samples,代码行数:18,代码来源:ServicesViewController.cs


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