Ejemplo n.º 1
0
        static Toaster()
        {
            ToasterThread = new Thread(() => {
                Manager = new ToastsManager();
                Manager.Show();

                Manager.Closed += (sender2, e2) => Manager.Dispatcher.InvokeShutdown();

                Images.Load(); //load to this dispatcher

                Default = new Toast()
                {
                    Title           = null,
                    Image           = Images.SuccessThumbs,
                    Message         = null,
                    TextColor       = Colors.White,
                    SubTitle        = "-",
                    BackgroundColor = Colors.Black
                };

                _sync.Set();
                System.Windows.Threading.Dispatcher.Run();
            });
            ToasterThread.Name = "ToasterThread";
            ToasterThread.SetApartmentState(ApartmentState.STA);
            ToasterThread.Start();
        }
Ejemplo n.º 2
0
Archivo: Toaster.cs Proyecto: Nucs/nlib
        static Toaster() {
            ToasterThread = new Thread(() => {
                Manager = new ToastsManager();
                Manager.Show();

                Manager.Closed += (sender2, e2) => Manager.Dispatcher.InvokeShutdown();

                Images.Load(); //load to this dispatcher
                Default = new Toast() {
                    Title = null,
                    Image = Images.SuccessThumbs,
                    Message = null,
                    TextColor = Colors.White,
                    SubTitle = "-",
                    BackgroundColor = Colors.Black
                };

                _sync.Set();
                System.Windows.Threading.Dispatcher.Run();
            });
            ToasterThread.Name = "ToasterThread";
            ToasterThread.SetApartmentState(ApartmentState.STA);
            ToasterThread.Start();
        }