Ejemplo n.º 1
0
 private void btnFromBook_Click(object sender, EventArgs e)
 {
     source = CoverDocument.SourceOfCover.FromBook;
     ChangeImage();
     GetAspecRatioValue(cbAspectRatio.SelectedIndex);
     ResizeImage();
 }
Ejemplo n.º 2
0
        private void FromFolderSource()
        {
            source = CoverDocument.SourceOfCover.FromFolder;
            string CoverFromFolder = string.Empty;

            string[] PossibleNames = { "cover.jpg", "cover.jpeg" };
            foreach (var item in PossibleNames)
            {
                string url = Path.Combine(Path.GetDirectoryName(Variables.Filename), item);
                if (File.Exists(url))
                {
                    CoverFromFolder = url;
                    break;
                }
            }

            if (!string.IsNullOrEmpty(CoverFromFolder))
            {
                ChangeImage(CoverFromFolder);
                BackupCover = new Bitmap(Cover);
                GetAspecRatioValue(cbAspectRatio.SelectedIndex);
                ResizeImage();
                SourceMessage = " Using File cover.jpg in folder " + Path.GetDirectoryName(Variables.Filename);
            }
        }
Ejemplo n.º 3
0
        private void FromFolderSource()
        {
            source = CoverDocument.SourceOfCover.FromFolder;
            string CoverFromFolder = string.Empty;
            string[] PossibleNames = { "cover.jpg", "cover.jpeg" };
            foreach (var item in PossibleNames)
            {
                string url = Path.Combine(Path.GetDirectoryName(Variables.Filename), item);
                if (File.Exists(url))
                {
                    CoverFromFolder = url;
                    break;
                }
            }

            if (!string.IsNullOrEmpty(CoverFromFolder))
            {
                ChangeImage(CoverFromFolder);
                BackupCover = new Bitmap(Cover);
                GetAspecRatioValue(cbAspectRatio.SelectedIndex);
                ResizeImage();
                SourceMessage = " Using File cover.jpg in folder " + Path.GetDirectoryName(Variables.Filename);
            }
        }