Bloom.Publish.PublishModel.SaveAsEpub C# (CSharp) Method

SaveAsEpub() private method

private SaveAsEpub ( ) : void
return void
        internal void SaveAsEpub()
        {
            using (var dlg = new SaveFileDialog())
            {
                if (!string.IsNullOrEmpty(_lastDirectory) && Directory.Exists(_lastDirectory))
                    dlg.InitialDirectory = _lastDirectory;

                string suggestedName = string.Format("{0}-{1}.epub", Path.GetFileName(BookSelection.CurrentSelection.FolderPath),
                                                     _collectionSettings.GetLanguage1Name("en"));
                dlg.FileName = suggestedName;
                dlg.Filter = "EPUB|*.epub";
                if (DialogResult.OK == dlg.ShowDialog())
                {
                    _lastDirectory = Path.GetDirectoryName(dlg.FileName);
                    _epubMaker.FinishEpub(dlg.FileName);
                    ReportAnalytics("Save ePUB");
                }
            }
        }