Exemple #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Create the Table Data Source and populate it
            var dataSource = new ThemePickerDataSource();
            var del        = new ThemePickerDelegate(dataSource);

            tableView.DataSource = dataSource;
            tableView.Delegate   = del;

            del.onThemeChosen = theme => {
                var winCon = NSApplication.SharedApplication.KeyWindow.WindowController as WindowController;
                winCon.closePopOver();

                AppDelegate.switchTheme(theme);
            };
        }
Exemple #2
0
 public ThemePickerDelegate(ThemePickerDataSource dataSource)
 {
     this.dataSource = dataSource;
 }