Ejemplo n.º 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);
            };
        }
Ejemplo n.º 2
0
 public ThemePickerDelegate(ThemePickerDataSource dataSource)
 {
     this.dataSource = dataSource;
 }