Ejemplo n.º 1
0
        protected void OnToastChanged(object sender, ToastChangedEventArgs args)
        {
            var changed = this.ToastChanged;

            if (changed != null)
            {
                Thread t = null;
                t = new Thread(() =>
                {
                    changed(sender, args);
                    _threads.Remove(t);// not safe, but good enough
                });
                t.Name = "OnToastChanged";
                _threads.Add(t);

                t.Start();
            }
        }
Ejemplo n.º 2
0
 private void ToastCollection_ToastRemoved(object sender, ToastChangedEventArgs e)
 {
     rchTextWatch.AppendText($"Toast with ID {e.Toast.Guid} has been destroyed\r\n");
     rchTextWatch.ScrollToCaret();
 }