// When the app closes, dispose of the talker object protected override void OnClosed(EventArgs e){ if(talker!=null){ // remove our notification handler talker.Notifications -= new Talker.NotificationCallback(HandleTalkerNotifications);
talker.Dispose(); } base.OnClosed(e); }
// Handle notifications from the talker object private void HandleTalkerNotifications( Talker.Notification notify, Object data){ switch(notify){ case Talker.Notification.Initialized: break; // Respond to status changes case Talker.Notification.StatusChange: Talker.Status status = (Talker.Status)data; statusText.Text = String.Format("Status: {0}", status); if(status == Talker.Status.Connected){