Praeclarum.UI.DocumentsViewController.HandleLongPress C# (CSharp) Method

HandleLongPress() private method

private HandleLongPress ( UILongPressGestureRecognizer gestureRecognizer ) : void
gestureRecognizer UILongPressGestureRecognizer
return void
		void HandleLongPress (UILongPressGestureRecognizer gestureRecognizer)
		{
			if (IsSyncing)
				return;

			if (gestureRecognizer.State == UIGestureRecognizerState.Began) {

				var p = gestureRecognizer.LocationInView ((UIView)docsView);

				var item = docsView.GetItemAtPoint (Praeclarum.Graphics.RectangleEx.ToPointF (p));

				if (item == null)
					return;

				if (!Editing && !selecting) {
					SetEditing (true, true);
				}

				docsView.SelectedDocuments.Add (item.Reference.File.Path);
			}
//
//			CGPoint p = [gestureRecognizer locationInView:self.collectionView];
//
//			NSIndexPath *indexPath = [self.collectionView indexPathForItemAtPoint:p];
//			if (indexPath == nil){
//				NSLog(@"				couldn't find index path");            
//			} else {
//				// get the cell at indexPath (the one you long pressed)
//				UICollectionViewCell* cell =
//					[self.collectionView cellForItemAtIndexPath:indexPath];
//				// do stuff with the cell
//			}
		}