protected override void OnClosing(CancelEventArgs e) { base.OnClosing(e); // For Action Center of Windows 10 NotificationActivator.UnregisterComType(); }
public static void Uninstall(bool uninstallShortcut) { if (uninstallShortcut) { UninstallShortcut(); } UninstallServer(); NotificationActivator.Disable(); }
protected override void OnSourceInitialized(EventArgs e) { base.OnSourceInitialized(e); // For Action Center of Windows 10 NotificationActivator.RegisterComType(typeof(NotificationActivator), OnActivated); NotificationHelper.RegisterComServer(typeof(NotificationActivator), Assembly.GetExecutingAssembly().Location); //NotificationHelper.UnregisterComServer(typeof(NotificationActivator)); }
public static void Install() { if (Publication.IsPortable) { //We require a special start menu shortcut for toasts to work. //https://docs.microsoft.com/en-us/windows/win32/shell/enable-desktop-toast-with-appusermodelid InstallShortcut(); } InstallServer(); NotificationActivator.Enable(); }