Esempio n. 1
0
 /// <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 = "";
     });
 }
Esempio n. 2
0
 public static void Bind(Property <string> property, NSTextField label)
 {
     property.PropertyChanged += (sender, e) => {
         label.InvokeOnMainThread(() => label.StringValue = e);
     };
     label.StringValue = property.Value;
 }
Esempio n. 3
0
 /// <summary>
 /// Updates the UI countdown label from a background thread
 /// </summary>
 private void UpdateCountdownLabel()
 {
     countdownLabel.InvokeOnMainThread(() => {
         countdownLabel.StringValue = time.ToString();
     });
 }