public static void ClearDataSource(this NSComboBox comboBox) { comboBox.UsesDataSource = true; comboBox.StringValue = string.Empty; comboBox.DataSource = CocoaTool.GenerateComboBoxDataSourceFromEnum <EmptyEnum>(); comboBox.ReloadData(); }
public static void Async <T> (Func <T> func, Action <T> result = null) { try { Tools.Lambda.ActionAsAsyncronous(() => { T value = default(T); value = func(); if (result != null) { result(value); } }).Invoke(); } catch (Exception error) { CocoaTool.ReportError(error); } }