protected override void OnStartup(StartupEventArgs e) { // FIXME this is a workaround to get the squirrel-generated CLSID. // The squirrel-generated AUMID (appUserModelID) also derives a CLSID // used during COM-activation. This needs to be updated in the attribute on MyNotificationActivator. var aumid = "com.squirrel.DesktopToastsApp.DesktopToastsApp"; var assembly = System.Reflection.Assembly.GetAssembly(typeof(Squirrel.UpdateManager)); var type = assembly.GetType("Squirrel.Utility"); var method = type.GetMethod("CreateGuidFromHash", new[] { typeof(string) }); var clsid = (Guid)method.Invoke(null, new object[] { aumid }); // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>(aumid); DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); // If launched from a toast // This launch arg was specified in our WiX installer where we register the LocalServer32 exe path. if (e.Args.Contains(DesktopNotificationManagerCompat.TOAST_ACTIVATED_LAUNCH_ARG)) { // Our NotificationActivator code will run after this completes, // and will show a window if necessary. } else { // Show the window // In App.xaml, be sure to remove the StartupUri so that a window doesn't // get created by default, since we're creating windows ourselves (and sometimes we // don't want to create a window if handling a background activation). new MainWindow().Show(); } base.OnStartup(e); }
private async void OnStartup(object sender, StartupEventArgs e) { // Read more about sending local toast notifications from desktop C# apps // https://docs.microsoft.com/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop // // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <ToastNotificationActivator>("BasicApp"); DesktopNotificationManagerCompat.RegisterActivator <ToastNotificationActivator>(); // TODO: Register arguments you want to use on App initialization var activationArgs = new Dictionary <string, string> { { ToastNotificationActivationHandler.ActivationArguments, string.Empty }, }; var appLocation = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); // For more information about .NET generic host see https://docs.microsoft.com/aspnet/core/fundamentals/host/generic-host?view=aspnetcore-3.0 _host = Host.CreateDefaultBuilder(e.Args) .ConfigureAppConfiguration(c => { c.SetBasePath(appLocation); c.AddInMemoryCollection(activationArgs); }) .ConfigureServices(ConfigureServices) .Build(); if (e.Args.Contains(DesktopNotificationManagerCompat.ToastActivatedLaunchArg)) { // ToastNotificationActivator code will run after this completes and will show a window if necessary. return; } await _host.StartAsync(); }
protected override void OnStartup(StartupEventArgs e) { string shortcutPath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.Programs), "NotificationTest.lnk"); var execPath = Process.GetCurrentProcess().MainModule?.FileName; if (!File.Exists(shortcutPath)) { CreateShortcut(shortcutPath, execPath, Storage.AppUserModelId, Storage.ToastActivatorId); } // Register AUMID and COM server (for MSIX/sparse package apps, this no-ops) DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>(Storage.AppUserModelId); // Register COM server and activator type DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); base.OnStartup(e); var window = new MainWindow(); window.Show(); }
protected override void OnStartup(StartupEventArgs e) { // Register AUMID and COM server (for Desktop Bridge apps, this no-ops) DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("WPFAndUWPSample.WPFAndUWPSample"); // Register COM server and activator type DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); // If launched from a toast if (e.Args.Contains("-ToastActivated")) { // Our NotificationActivator code will run after this completes, // and will show a window if necessary. } else { // Show the window // In App.xaml, be sure to remove the StartupUri so that a window doesn't // get created by default, since we're creating windows ourselves (and sometimes we // don't want to create a window if handling a background activation). //new MainWindow().Show(); } base.OnStartup(e); }
protected override void OnStartup(StartupEventArgs e) { DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("JacobHofer.SpotifyMuter"); DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); base.OnStartup(e); }
/// <summary> /// Main method. /// </summary> /// <param name="args">Arguments for the notification.</param> static void Main(string[] args) { //Initialize application type. TODO: Replace this with dependency injection. Globals.ApplicationType = ApplicationTypes.UwpConsole; // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <NotifierActivator>("AppVNextNotifier"); DesktopNotificationManagerCompat.RegisterActivator <NotifierActivator>(); // If launched from a toast notification if (args.Contains(DesktopNotificationManagerCompat.TOAST_ACTIVATED_LAUNCH_ARG)) { //TODO: Handle if launched from a toast notification } else { var arguments = ArgumentManager.ProcessArguments(args); if (arguments == null) { WriteLine($"{Globals.HelpForNullMessage}{Globals.HelpForErrors}"); ArgumentManager.DisplayHelp(); } else { if (arguments.NotificationsCheck) { WriteLine(RegistryHelper.AreNotificationsEnabled(arguments.NotificationCheckAppId)); } if (arguments.PushNotificationCheck) { WriteLine(RegistryHelper.ArePushNotificationsEnabled()); } if (arguments.VersionInformation) { WriteLine(Globals.GetVersionInformation()); } if (arguments.ClearNotifications) { DesktopNotificationManagerCompat.History.Clear(); } if (string.IsNullOrEmpty(arguments.Errors) && !string.IsNullOrEmpty(arguments.Message)) { SendNotification(arguments); while (arguments.Wait) { System.Threading.Thread.Sleep(500); } } else { WriteLine($"{(arguments.Errors ?? string.Empty)}"); } } } }
protected override async void OnInitialized() { // Read more about sending local toast notifications from desktop C# apps // https://docs.microsoft.com/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop // // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <ToastNotificationActivator>("PrismApp"); DesktopNotificationManagerCompat.RegisterActivator <ToastNotificationActivator>(); var persistAndRestoreService = Container.Resolve <IPersistAndRestoreService>(); persistAndRestoreService.RestoreData(); var themeSelectorService = Container.Resolve <IThemeSelectorService>(); themeSelectorService.SetTheme(); var toastNotificationsService = Container.Resolve <IToastNotificationsService>(); toastNotificationsService.ShowToastNotificationSample(); if (_startUpArgs.Contains(DesktopNotificationManagerCompat.ToastActivatedLaunchArg)) { // ToastNotificationActivator code will run after this completes and will show a window if necessary. return; } await Task.CompletedTask; base.OnInitialized(); }
protected override void OnStartup(StartupEventArgs e) { // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("WindowsNotifications.DesktopToasts"); DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); // If launched from a toast // This launch arg was specified in our WiX installer where we register the LocalServer32 exe path. if (e.Args.Contains(DesktopNotificationManagerCompat.TOAST_ACTIVATED_LAUNCH_ARG)) { // Our NotificationActivator code will run after this completes, // and will show a window if necessary. } else { // Show the window // In App.xaml, be sure to remove the StartupUri so that a window doesn't // get created by default, since we're creating windows ourselves (and sometimes we // don't want to create a window if handling a background activation). new MainWindow().Show(); } base.OnStartup(e); }
NotificationService NotificationService.setup() { DesktopNotificationManagerCompat.RegisterAumidAndComServer <TActivator>(AumID); DesktopNotificationManagerCompat.RegisterActivator <TActivator>(); history = DesktopNotificationManagerCompat.History; return(this); }
static void Main(string[] args) { DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotification>(AppConfiguration.APP_ID); DesktopNotificationManagerCompat.RegisterActivator <MyNotification>(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Main(args)); }
private void Main_Load(object sender, EventArgs e) { _controller.AttachOnExitEventHandler(); DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotification>(APP_ID); DesktopNotificationManagerCompat.RegisterActivator <MyNotification>(); TryCreateShortcut(); }
public UwpToastNotifier() { Instance = this; CreateShortcut <MyNotificationActivator>(AppId, _appName, true); DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>(AppId); DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); _toastNotifier = DesktopNotificationManagerCompat.CreateToastNotifier(); DesktopNotificationManagerCompat.History.Clear(); }
public MainWindow() { InitializeComponent(); mw = this; // AUMIDを登録 DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("MyCompany.ToastJikken"); // COMサーバーを登録 DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); }
public ToastHandler(IConfig config, IRpApiHandler apiHandler, ILog log) { _config = config; _apiHandler = apiHandler; _log = log; // Register AUMID and COM server (for Desktop Bridge apps, this no-ops) DesktopNotificationManagerCompat.RegisterAumidAndComServer <ToastActivator>(appId); // Register COM server and activator type DesktopNotificationManagerCompat.RegisterActivator <ToastActivator>(); WriteIconToDisk(); }
public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, ThemeManager themeManager) { _settingsVM = settingsVM ?? throw new ArgumentNullException(nameof(settingsVM)); _mainVM = mainVM ?? throw new ArgumentNullException(nameof(mainVM)); _themeManager = themeManager ?? throw new ArgumentNullException(nameof(themeManager)); _themeManager.ThemeChanged += OnThemeChanged; WebRequest.RegisterPrefix("data", new DataWebRequestFactory()); DesktopNotificationManagerCompat.RegisterActivator <LauncherNotificationActivator>(); DesktopNotificationManagerCompat.RegisterAumidAndComServer <LauncherNotificationActivator>("PowerToysRun"); }
static void Main() { // Register AUMID and COM server (for Desktop Bridge apps, this no-ops) DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("com.thewired.cwticketninja"); // Register COM server and activator type DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Settings()); }
protected override void OnStartup(StartupEventArgs e) { // Setup logging Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .Enrich.WithEnvironmentUserName() .Enrich.WithProcessId() .Enrich.WithExceptionDetails() #if DEBUG .WriteTo.Debug() .WriteTo.File(@"logs\nuc.txt", restrictedToMinimumLevel: LogEventLevel.Verbose) .WriteTo.Seq("http://*****:*****@"logs\nuc.txt", restrictedToMinimumLevel: LogEventLevel.Warning) #endif .CreateLogger(); Log.Information("Start ChocoUpdateNotifier with Args: {Args}", e.Args); // Log unhandled exceptions AppDomain.CurrentDomain.UnhandledException += (_, e) => Log.Fatal(e.ExceptionObject as Exception, "Unhandled Exception"); Application.Current.DispatcherUnhandledException += (_, e) => Log.Fatal(e.Exception, "Unhandled Dispatcher Exception"); TaskScheduler.UnobservedTaskException += (_, e) => Log.Fatal(e.Exception, "Unobserved Task Exception"); // Ensure Logs are saved AppDomain.CurrentDomain.ProcessExit += (s, e) => Log.CloseAndFlush(); // Register AUMID and COM server (for MSIX/sparse package apps, this no-ops) DesktopNotificationManagerCompat.RegisterAumidAndComServer <CunNotificationActivator>(AppId); // Register COM server and activator type DesktopNotificationManagerCompat.RegisterActivator <CunNotificationActivator>(); // Clear all toasts try { DesktopNotificationManagerCompat.History.Clear(); } catch (Exception) { // Ignore errors (when notification service is not available) } // Parse parameters Parser.Default.ParseArguments <CheckOptions, ListOptions>(e.Args) .WithParsed <CheckOptions>(Run) .WithParsed <ListOptions>(Run); if (_exit) { Log.Warning("No valid verb found!"); Environment.Exit(1); } }
protected override void OnStartup(StartupEventArgs e) { const string appName = "KakaoStroy Notification"; _mutex = new Mutex(true, appName, out bool createdNew); try { DesktopNotificationManagerCompat.RegisterAumidAndComServer <KSPNotificationActivator>(KSP_WPF.MainWindow.APP_ID); DesktopNotificationManagerCompat.RegisterActivator <KSPNotificationActivator>(); } catch (Exception) {} if (Environment.OSVersion.Version.Major != 10) { if (KSP_WPF.Properties.Settings.Default.W10Warn == false) { KSP_WPF.Properties.Settings.Default.Upgrade(); KSP_WPF.Properties.Settings.Default.W10Warn = true; KSP_WPF.Properties.Settings.Default.Save(); MessageBox.Show("현재 버전은 윈도우 7,8 호환모드로 작동하고있습니다.\n윈도우 10을 사용중이시라면 마이크로소프트 스토어에 KakaoStory Manager를 검색하여 스토어 버전을 받아주세요.", "경고"); } } else { if (KSP_WPF.Properties.Settings.Default.Upgraded == false) { KSP_WPF.Properties.Settings.Default.Upgrade(); KSP_WPF.Properties.Settings.Default.Upgraded = true; KSP_WPF.Properties.Settings.Default.Save(); if (MessageBox.Show("프로그램이 업데이트되었습니다.\n변경 내역을 확인하시겠습니까?", "안내", MessageBoxButton.YesNo) == MessageBoxResult.Yes) { System.Diagnostics.Process.Start("https://kagamine-rin.com/?p=186"); } } } if (!createdNew) { if (!KSP_WPF.Properties.Settings.Default.Disable_Message) { GlobalHelper.ShowNotification("안내", "프로그램이 이미 실행중이므로 자동 종료되었습니다.", null); } Current.Shutdown(); } else { new MainWindow().Show(); } base.OnStartup(e); }
public PublicAPIInstance(SettingWindowViewModel settingsVM, MainViewModel mainVM, ThemeManager themeManager) { _settingsVM = settingsVM ?? throw new ArgumentNullException(nameof(settingsVM)); _mainVM = mainVM ?? throw new ArgumentNullException(nameof(mainVM)); _themeManager = themeManager ?? throw new ArgumentNullException(nameof(themeManager)); _themeManager.ThemeChanged += OnThemeChanged; WebRequest.RegisterPrefix("data", new DataWebRequestFactory()); DesktopNotificationManagerCompat.RegisterActivator <LauncherNotificationActivator>(); try { DesktopNotificationManagerCompat.RegisterAumidAndComServer <LauncherNotificationActivator>("PowerToysRun"); } catch (System.UnauthorizedAccessException ex) { Log.Exception("Exception calling RegisterAumidAndComServer. Notifications not available.", ex, MethodBase.GetCurrentMethod().DeclaringType); } }
private async void OnStartup(object sender, StartupEventArgs e) { // Read more about sending local toast notifications from desktop C# apps // https://docs.microsoft.com/windows/uwp/design/shell/tiles-and-notifications/send-local-toast-desktop // // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <ToastNotificationActivator>("LightApp"); DesktopNotificationManagerCompat.RegisterActivator <ToastNotificationActivator>(); AddConfiguration(e.Args); _host = SimpleIoc.Default.GetInstance <IApplicationHostService>(); if (e.Args.Contains(DesktopNotificationManagerCompat.ToastActivatedLaunchArg)) { // ToastNotificationActivator code will run after this completes and will show a window if necessary. return; } await _host.StartAsync(); }
static void Main() { // Register AUMID and COM server (for Desktop Bridge apps, this no-ops) DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("Tomighty"); // Register COM server and activator type DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); AppDomain.CurrentDomain.UnhandledException += (sender, args) => HandleUnhandledException(args.ExceptionObject as Exception); Application.ThreadException += (sender, args) => HandleUnhandledException(args.Exception); try { Application.Run(new TomightyApplication()); } catch (Exception e) { Application.Run(new ErrorReportWindow(e)); } }
protected override async void OnStartup(StartupEventArgs e) { // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <AppNotificationActivator>("Schuetze.AssignmentBloodhound"); DesktopNotificationManagerCompat.RegisterActivator <AppNotificationActivator>(); // If launched from a toast if (e.Args.Contains("-ToastActivated")) { // AppNotificationActivator code will run after this completes, // and will show a window if necessary. } else { // Show the window new MainWindow().Show(); } base.OnStartup(e); }
private void OnTimedEvent(Object source, ElapsedEventArgs e) { client.Send(notCityName); string[] data; string recivedString; recivedString = client.Read(); data = recivedString.Split('|'); String notString = String.Format("Pogoda dla {0}, temp {1}°C, ciśn {2} hPa, wilg {3}%, wiatr {4} km/h", notCityName, data[2], data[3], data[4], data[5]); DesktopNotificationManagerCompat.RegisterAumidAndComServer <NotificationHandler>("Twoja Pogodynka"); DesktopNotificationManagerCompat.RegisterActivator <NotificationHandler>(); ToastContent toastContent = new ToastContentBuilder() .AddToastActivationInfo("", ToastActivationType.Background) .AddText(notString) .GetToastContent(); // And create the toast notification var toast = new ToastNotification(toastContent.GetXml()); // And then show it DesktopNotificationManagerCompat.CreateToastNotifier().Show(toast); }
/// <summary> /// On app start /// </summary> /// <param name="e">Startup EventArgs</param> protected override void OnStartup(StartupEventArgs e) { DesktopNotificationManagerCompat.RegisterAumidAndComServer <BetterExplorerNotificationActivator>("Gainedge.ORG.BetterExplorer"); DesktopNotificationManagerCompat.RegisterActivator <BetterExplorerNotificationActivator>(); Settings.BESettings.LoadSettings(); Process process = Process.GetCurrentProcess(); process.PriorityClass = ProcessPriorityClass.Normal; // Set the current thread to run at 'Highest' Priority Thread thread = Thread.CurrentThread; thread.Priority = ThreadPriority.Highest; Boolean dmi = true; System.Windows.Forms.Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Current.DispatcherUnhandledException += this.Current_DispatcherUnhandledException; AppDomain.CurrentDomain.UnhandledException += this.CurrentDomain_UnhandledException; System.Windows.Forms.Application.ThreadException += this.Application_ThreadException; if (!File.Exists(Path.Combine(KnownFolders.RoamingAppData.ParsingName, @"BExplorer\Settings.sqlite"))) { var beAppDataPath = Path.Combine(KnownFolders.RoamingAppData.ParsingName, @"BExplorer"); if (!Directory.Exists(beAppDataPath)) { Directory.CreateDirectory(beAppDataPath); } File.Copy(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Settings.sqlite"), Path.Combine(KnownFolders.RoamingAppData.ParsingName, @"BExplorer\Settings.sqlite")); } //// loads current Ribbon color theme try { switch (Settings.BESettings.CurrentTheme) { case "Dark": ThemeManager.ChangeAppTheme(this, "BaseDark"); UxTheme.AllowDarkModeForApp(true); break; default: ThemeManager.ChangeAppTheme(this, "BaseLight"); UxTheme.AllowDarkModeForApp(false); break; } } catch (Exception ex) { // MessageBox.Show(String.Format("An error occurred while trying to load the theme data from the Registry. \n\r \n\r{0}\n\r \n\rPlease let us know of this issue at http://bugtracker.better-explorer.com/", ex.Message), "RibbonTheme Error - " + ex.ToString()); MessageBox.Show( $"An error occurred while trying to load the theme data from the Registry. \n\r \n\rRibbonTheme Error - {ex}\n\r \n\rPlease let us know of this issue at http://bugtracker.better-explorer.com/", ex.Message); } if (e.Args.Any()) { dmi = e.Args.Length >= 1; IsStartWithStartupTab = e.Args.Contains("/norestore"); if (e.Args[0] != "-minimized") { this.Properties["cmd"] = e.Args[0]; } else { IsStartMinimized = true; } } if (!ApplicationInstanceManager.CreateSingleInstance(Assembly.GetExecutingAssembly().GetName().Name, this.SingleInstanceCallback) && dmi) { return; // exit, if same app. is running } base.OnStartup(e); try { this.SelectCulture(Settings.BESettings.Locale); } catch { // MessageBox.Show(String.Format("A problem occurred while loading the locale from the Registry. This was the value in the Registry: \r\n \r\n {0}\r\n \r\nPlease report this issue at http://bugtracker.better-explorer.com/.", Locale)); MessageBox.Show($"A problem occurred while loading the locale from the Registry. This was the value in the Registry: \r\n \r\n {Settings.BESettings.Locale}\r\n \r\nPlease report this issue at http://bugtracker.better-explorer.com/."); this.Shutdown(); } }
public static void RegisterNotificationActivator() { /*Register at Com*/ DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("EasyCrawling.EasyCrawling"); DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); }
public App() { AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; Dispatcher.UnhandledException += Dispatcher_UnhandledException; // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <UserSchedulerNotificationActivator>("Onevinn.UserScheduler"); DesktopNotificationManagerCompat.RegisterActivator <UserSchedulerNotificationActivator>(); if (Globals.Args.Exist("ToastApp")) { SendAppToast(); Globals.Log.Information("Closing after sending application toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastIpu")) { SendIpuToast(); Globals.Log.Information("Closing after sending IPUApplication toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastSup")) { SendSupToast(); Globals.Log.Information("Closing after sending sup toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastReboot")) { SendRebootToast(); Globals.Log.Information("Closing after sending restart toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastNotifyComingInstallation")) { SendNotifyComingInstallation(); Globals.Log.Information("Closing after sending reminder toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastServiceRestartNotification")) { SendServiceRestartNotification(); Globals.Log.Information("Closing after sending service restart toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastServiceInitNotification")) { SendServiceInitNotification(); Globals.Log.Information("Closing after sending service init toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastServiceRunningNotification")) { SendServiceRunningNotification(); Globals.Log.Information("Closing after sending service init toast."); Environment.Exit(0); } if (Globals.Args.Exist("ToastServiceEndNotification")) { SendServiceEndNotification(); Globals.Log.Information("Closing after sending service end toast."); Environment.Exit(0); } _mutex = new Mutex(true, "ThereCanOnlyBeOneUserScheduler", out var isnew); var otherWindow = Globals.Args.Exist("ShowConfirmWindow") || Globals.Args.Exist("ShowRestartWindow") || Globals.Args.Exist("ShowIpuDialog1") || Globals.Args.Exist("ShowIpuDialog2"); if (!isnew && !otherWindow) { NativeMethods.PostMessage( (IntPtr)NativeMethods.HWND_BROADCAST, NativeMethods.WM_SHOWMENOW, IntPtr.Zero, IntPtr.Zero); Environment.Exit(0); } Globals.Settings = SettingsUtils.Settings; }
public static void PrepareNotificationManager() { // Register AUMID and COM server (for Desktop Bridge apps, this no-ops) DesktopNotificationManagerCompat.RegisterAumidAndComServer <MyNotificationActivator>("Manomama7.KTU-AIS_Scraper"); DesktopNotificationManagerCompat.RegisterActivator <MyNotificationActivator>(); }
public ToastHelper() { DesktopNotificationManagerCompat.RegisterAumidAndComServer <ToastNotificationActivator>(DFAssistPlugin.AppId); DesktopNotificationManagerCompat.RegisterActivator <ToastNotificationActivator>(); }
public void setup() { DesktopNotificationManagerCompat.RegisterAumidAndComServer <DesktopNotificationActivator>("iterate.Cyberduck"); DesktopNotificationManagerCompat.RegisterActivator <DesktopNotificationActivator>(); }
/// <summary> /// Initialize toast notification. /// </summary> public static void InitializeNotification() { // Register AUMID, COM server, and activator DesktopNotificationManagerCompat.RegisterAumidAndComServer <IkasNotificationActivator>(IkasNotificationActivator.AppId); DesktopNotificationManagerCompat.RegisterActivator <IkasNotificationActivator>(); }