/// <summary> /// If the thread naturally finished, update the display with a "done" message /// and clear the countdown label. /// Will be called from background thread. /// </summary> void ShowDoneMessage() { infoLabel.InvokeOnMainThread(() => { infoLabel.StringValue = "Tea is ready!"; countdownLabel.StringValue = ""; }); }
public static void Bind(Property <string> property, NSTextField label) { property.PropertyChanged += (sender, e) => { label.InvokeOnMainThread(() => label.StringValue = e); }; label.StringValue = property.Value; }
/// <summary> /// Updates the UI countdown label from a background thread /// </summary> private void UpdateCountdownLabel() { countdownLabel.InvokeOnMainThread(() => { countdownLabel.StringValue = time.ToString(); }); }