Exemple #1
0
        private void AddAboutInformation(EPubFileV3 epubFile)
        {
            Assembly asm     = Assembly.GetAssembly(GetType());
            string   version = "???";

            if (asm != null)
            {
                version = asm.GetName().Version.ToString();
            }
            epubFile.CreatorSoftwareString = string.Format(@"Fb2epub v{0} [http://www.fb2epub.net]", version);

            if (!Settings.ConversionSettings.SkipAboutPage)
            {
                var aboutPage = new AboutPageFileV3()
                {
                    FlatStructure = Settings.CommonSettings.FlatStructure,
                    EmbedStyles   = Settings.CommonSettings.EmbedStyles,
                    AboutLinks    = new List <string>(),
                    AboutTexts    = new List <string>()
                };
                aboutPage.AboutTexts.Add(
                    string.Format("This file was generated by Lord KiRon's FB2EPUB converter version {0}.",
                                  version));
                aboutPage.AboutTexts.Add("(This book might contain copyrighted material, author of the converter bears no responsibility for it's usage)");
                aboutPage.AboutTexts.Add(
                    string.Format("Этот файл создан при помощи конвертера FB2EPUB версии {0} написанного Lord KiRon.",
                                  version));
                aboutPage.AboutTexts.Add("(Эта книга может содержать материал который защищен авторским правом, автор конвертера не несет ответственности за его использование)");
                aboutPage.AboutLinks.Add(@"http://www.fb2epub.net");
                aboutPage.AboutLinks.Add(@"https://code.google.com/p/fb2epub/");
                StructureManager.AddAboutPage(aboutPage);
                StructureManager.AddAboutPage(CreateLicenseFile());
            }
        }
        private void AddAboutInformation(EPubFileV3 epubFile)
        {
            Assembly asm = Assembly.GetAssembly(GetType());
            string version = "???";
            if (asm != null)
            {
                version = asm.GetName().Version.ToString();
            }
            epubFile.CreatorSoftwareString = string.Format(@"Fb2epub v{0} [http://www.fb2epub.net]", version);

            if (!Settings.ConversionSettings.SkipAboutPage)
            {
                var aboutPage = new AboutPageFileV3()
                {
                    FlatStructure = Settings.CommonSettings.FlatStructure,
                    EmbedStyles = Settings.CommonSettings.EmbedStyles,
                    AboutLinks = new List<string>(),
                    AboutTexts = new List<string>()
                };
                aboutPage.AboutTexts.Add(
                    string.Format("This file was generated by Lord KiRon's FB2EPUB converter version {0}.",
                                  version));
                aboutPage.AboutTexts.Add("(This book might contain copyrighted material, author of the converter bears no responsibility for it's usage)");
                aboutPage.AboutTexts.Add(
                    string.Format("Этот файл создан при помощи конвертера FB2EPUB версии {0} написанного Lord KiRon.",
                        version));
                aboutPage.AboutTexts.Add("(Эта книга может содержать материал который защищен авторским правом, автор конвертера не несет ответственности за его использование)");
                aboutPage.AboutLinks.Add(@"http://www.fb2epub.net");
                aboutPage.AboutLinks.Add(@"https://code.google.com/p/fb2epub/");
                StructureManager.AddAboutPage(aboutPage);
                StructureManager.AddAboutPage(CreateLicenseFile());
            }
        }