Example #1
0
        /// <summary>The on startup.</summary>
        /// <param name="e">The e.</param>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            this.InitializeErrorHandler();
            NotificationView.Initialize();
            var result = new QueueHandler(e.Args).Process();

            string message = null;
            if (result == Status.Success)
            {
                message = Literals.ShellExtension_Subtitles_downloaded_successfully;
            }
            else if (result == Status.Fatal)
            {
                message = Literals.ShellExtension_Failed_process_request;
            }

            if (string.IsNullOrEmpty(message))
            {
                NotificationView.AttachEndHandler((sender, args) => this.Dispatcher.InvokeShutdown());
            }
            else
            {
                NotificationView.Show(message, (sender, args) => this.Dispatcher.InvokeShutdown());
            }
        }
Example #2
0
        /// <summary>The on startup.</summary>
        /// <param name="e">The e.</param>
        protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);
            this.InitializeErrorHandler();
            NotificationView.Initialize();
            var result = new QueueHandler(e.Args).Process();

            string message = null;

            if (result == Status.Success)
            {
                message = Literals.ShellExtension_Subtitles_downloaded_successfully;
            }
            else if (result == Status.Fatal)
            {
                message = Literals.ShellExtension_Failed_process_request;
            }

            if (string.IsNullOrEmpty(message))
            {
                NotificationView.AttachEndHandler((sender, args) => this.Dispatcher.InvokeShutdown());
            }
            else
            {
                NotificationView.Show(message, (sender, args) => this.Dispatcher.InvokeShutdown());
            }
        }