public void onSegmentedControlChanged(AppKit.NSSegmentedControl sender) { Console.WriteLine("changed: " + sender.GetLabel(sender.SelectedSegment)); (tableView.DataSource as TableViewDataSource).setShowDrafts(sender.GetLabel(sender.SelectedSegment) == "Drafts"); tableView.ReloadData(); }
partial void powerStateChanged(AppKit.NSSegmentedControl sender) { NSError error; CurrentInterface.SetPower(powerState.SelectedSegment == 0, out error); if (error != null) { Console.WriteLine("Error occurred while changing interface power state: {0}", error.LocalizedDescription); } }