Exemplo n.º 1
0
        private string GetCoverFile()
        {
            MyOPFDoc = new OpfDocument();
            string coverRef = MyOPFDoc.GetCoverRef();

            //If it does not exist get first page in spine
            if (string.IsNullOrEmpty(coverRef) || !Utils.VerifyFileExists(coverRef))
            {
                coverRef = MyOPFDoc.GetSpineRefAtIndex(0);
            }
            else
            {
                IsGuideEmpty = false;
            }

            return(coverRef);
        }
Exemplo n.º 2
0
        private void CheckPositionOfCover()
        {
            string FirstRef = MyOPFDoc.GetSpineRefAtIndex(0);

            if (FirstRef != CoverFile)
            {
                System.Windows.Forms.MessageBox.Show("The Cover File is not the first File\n" +
                                                     "Please use the Reading Order editor to modify it (id=" + Utils.GetId(CoverFile) + ")", "Cover is Not the First File", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
            }

            XAttribute linearValue = MyOPFDoc.SpineElements[0].Attribute("linear");

            if (linearValue != null && linearValue.Value == "no")
            {
                System.Windows.Forms.MessageBox.Show("The Cover File has a linear value of \"no\". This could lead to the Cover being shown at the End of the book.\n\n" +
                                                     "Please use the Reading Order editor to modify it (Just Save it and it will remove any linear value) ", "Linear Value of Cover is \"no\"", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Information);
            }
        }
Exemplo n.º 3
0
        private string GetCoverFile()
        {
            MyOPFDoc = new OpfDocument();
            string coverRef = MyOPFDoc.GetCoverRef();

            //If it does not exist get first page in spine
            if (string.IsNullOrEmpty(coverRef) || !Utils.VerifyFileExists(coverRef))
                coverRef = MyOPFDoc.GetSpineRefAtIndex(0);
            else
                IsGuideEmpty = false;

            return coverRef;
        }