Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BookmarkAssistant.cs - github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 199174fffa249b9ec0aa20e71a3284fec96b3bd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using System;
using System.Collections.Generic;
using System.Linq;
using Foundation;
using AppKit;

namespace macdoc
{
	public partial class BookmarkAssistant : AppKit.NSView
	{
		public event Action<int> BookmarkDeleted;
		
		public BookmarkAssistant (IntPtr handle) : base (handle)
		{
		}

		partial void DeleteButtonClicked (NSButton sender)
		{
			if (bookmarkTableView.SelectedRowCount != 1)
				return;
			
			var index = bookmarkTableView.SelectedRow;
			if (index < 0 || index > bookmarkTableView.RowCount)
				return;
			var temp = BookmarkDeleted;
			if (temp != null)
				temp ((int)index);
		}
		
		public NSTableView TableView {
			get {
				return bookmarkTableView;
			}
		}
	}
}