Esempio n. 1
0
 private void App_OnExit(object sender, ExitEventArgs e)
 {
     if (_isFirstInstance)
     {
         PipeServerManager.GetInstance().Dispose();
         TrayIconManager.GetInstance().Dispose();
         BackgroundListener.GetInstance().Dispose();
     }
 }
Esempio n. 2
0
        private void App_OnExit(object sender, ExitEventArgs e)
        {
            if (_isFirstInstance)
            {
                _isRunning.ReleaseMutex();

                PipeServerManager.GetInstance().Dispose();
                TrayIconManager.GetInstance().Dispose();
                BackgroundListener.GetInstance().Dispose();
                ViewWindowManager.GetInstance().Dispose();
            }
        }
Esempio n. 3
0
        private void RunListener(StartupEventArgs e)
        {
            TrayIconManager.GetInstance();
            if (!e.Args.Contains("/autorun") && !IsUWP)
            {
                TrayIconManager.ShowNotification("", TranslationHelper.GetString("APP_START"));
            }
            if (e.Args.Contains("/first"))
            {
                AutoStartupHelper.CreateAutorunShortcut();
            }

            NativeMethods.QuickLook.Init();

            PluginManager.GetInstance();
            ViewWindowManager.GetInstance();
            BackgroundListener.GetInstance();
            PipeServerManager.GetInstance();
        }
Esempio n. 4
0
        private void RunListener(StartupEventArgs e)
        {
            TrayIconManager.GetInstance();
            if (!e.Args.Contains("/autorun"))
            {
                TrayIconManager.GetInstance().ShowNotification("", "QuickLook is running in the background.");
            }
            if (e.Args.Contains("/first"))
            {
                AutoStartupHelper.CreateAutorunShortcut();
            }

            NativeMethods.QuickLook.Init();

            PluginManager.GetInstance();
            BackgroundListener.GetInstance();
            PipeServerManager.GetInstance().MessageReceived +=
                (msg, ea) => Dispatcher.BeginInvoke(
                    new Action(() => ViewWindowManager.GetInstance().InvokeViewer(msg as string, closeIfSame: true)),
                    DispatcherPriority.ApplicationIdle);
        }
 internal static BackgroundListener GetInstance()
 {
     return(_instance ?? (_instance = new BackgroundListener()));
 }
Esempio n. 6
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            PluginManager.GetInstance();

            BackgroundListener.GetInstance();
        }