Пример #1
0
        private void PopulateListView()
        {
            //Get number of pages in document
            PdfDocument document  = PdfDocument.Load(filePath);
            int         pageCount = document.PageCount;

            document.Dispose();

            for (int i = 0; i < pageCount; i++)
            {
                SinglePageEditor pageEditor = new SinglePageEditor();
                pageEditor.PageIndex        = i;
                pageEditor.Image            = GetPageAsImage(filePath, i);
                pageEditor.PageDoubleClick += PageEditor_PageDoubleClick;
                pageEditor.Remove          += PageEditor_Remove;
                pageEditor.RotateCCW       += PageEditor_RotateCCW;
                pageEditor.RotateCW        += PageEditor_RotateCW;

                flowLayoutPanel1.Controls.Add(pageEditor);
                changes.Add(pageEditor, PageChanges.None);
            }
        }
Пример #2
0
 private void PageEditor_RotateCW(SinglePageEditor sender)
 {
     changes[sender] = IncrementPageRotation(changes[sender]);
 }
Пример #3
0
        private void PageEditor_Remove(SinglePageEditor sender)
        {
            flowLayoutPanel1.Controls.Remove(sender);

            changes[sender] = PageChanges.Remove;
        }