Ejemplo n.º 1
0
        /// <summary>
        ///  Execute the merge command.
        /// </summary>
        /// <param name="parameter">The command parameter (ignored).</param>
        private async Task MergeExecute(object parameter)
        {
            OutputPath = BrowseFile.Save(
                Resources.MainWindowStrings.SetOutput,
                Resources.MainWindowStrings.FileFilter,
                Application.Current.MainWindow);

            if (string.IsNullOrWhiteSpace(OutputPath))
            {
                return;
            }

            if (merger.CanMerge)
            {
                IsProcessing = true;
                await merger.MergeAsync().ConfigureAwait(false);

                IsProcessing = false;
                OpenPdfFromShell();
            }
            else
            {
                MessageBox.Show(Resources.MainWindowStrings.CouldNotMerge);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        ///  Save the state of the window.
        /// </summary>
        public void Save()
        {
            var path = BrowseFile.Save(
                Resources.MainWindowStrings.Save,
                Resources.MainWindowStrings.ProjectFilter,
                Application.Current.MainWindow);

            if (!string.IsNullOrWhiteSpace(path))
            {
                SaveStateToFile(path);
            }
        }