Example #1
0
        public MainWindow()
        {
            InitializeComponent();
            RegisterAppForNotificationSupport();

            NotificationActivator.Initialize();
            ShowToastButton.Click += ShowToastButton_Click;
            this.Closing          += CloseMainWindow;
        }
Example #2
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     NotificationActivator.Initialize(APP_ID);
     try
     {
         Application.Run(new DesktopToastsApp());
     }
     finally
     {
         NotificationActivator.Uninitialize();
     }
 }
Example #3
0
 private void CloseMainWindow(object sender, CancelEventArgs e)
 {
     NotificationActivator.Uninitialize();
 }