Showing preview only (8,685K chars total). Download the full file or copy to clipboard to get everything.
Repository: wmjordan/PDFPatcher
Branch: master
Commit: 95d812267534
Files: 513
Total size: 8.2 MB
Directory structure:
gitextract_ote2ujmh/
├── .gitattributes
├── .github/
│ └── ISSUE_TEMPLATE/
│ ├── 其它问题.md
│ ├── 新功能需求.md
│ └── 缺陷问题报告.md
├── .gitignore
├── .textlintrc
├── App/
│ ├── .editorconfig
│ ├── AppContext.cs
│ ├── Commands.cs
│ ├── Common/
│ │ ├── CommandRegistry.cs
│ │ ├── DualKeyDictionary.cs
│ │ ├── FileHelper.cs
│ │ ├── FilePath.cs
│ │ ├── FontHelper.cs
│ │ ├── FontUtility.cs
│ │ ├── FormHelper.cs
│ │ ├── ImageBox/
│ │ │ ├── DragHandle.cs
│ │ │ ├── DragHandleAnchor.cs
│ │ │ ├── DragHandleCollection.cs
│ │ │ └── ImageBoxEx.cs
│ │ ├── ObjectListViewHelper.cs
│ │ ├── PInvokeHelper.cs
│ │ ├── ShortcutFile.cs
│ │ ├── StringBuilderCache.cs
│ │ ├── StringHelper.cs
│ │ ├── ValueHelper.cs
│ │ ├── XmlHelper.cs
│ │ └── app.manifest
│ ├── Configuration.Designer.cs
│ ├── Configuration.resx
│ ├── ConfigurationSerialization.cs
│ ├── Constants.cs
│ ├── Functions/
│ │ ├── AboutControl.Designer.cs
│ │ ├── AboutControl.cs
│ │ ├── AboutControl.resx
│ │ ├── AboutPage.html
│ │ ├── AppOptionForm.Designer.cs
│ │ ├── AppOptionForm.cs
│ │ ├── AppOptionForm.resx
│ │ ├── AutoBookmark/
│ │ │ ├── EditAdjustmentForm.Designer.cs
│ │ │ ├── EditAdjustmentForm.cs
│ │ │ ├── EditAdjustmentForm.resx
│ │ │ ├── FontFilterForm.Designer.cs
│ │ │ ├── FontFilterForm.cs
│ │ │ ├── FontFilterForm.resx
│ │ │ ├── FontNameConditionEditor.Designer.cs
│ │ │ ├── FontNameConditionEditor.cs
│ │ │ ├── FontNameConditionEditor.resx
│ │ │ ├── PageRangeConditionEditor.Designer.cs
│ │ │ ├── PageRangeConditionEditor.cs
│ │ │ ├── PageRangeConditionEditor.resx
│ │ │ ├── TextConditionEditor.Designer.cs
│ │ │ ├── TextConditionEditor.cs
│ │ │ ├── TextConditionEditor.resx
│ │ │ ├── TextPositionConditionEditor.Designer.cs
│ │ │ ├── TextPositionConditionEditor.cs
│ │ │ ├── TextPositionConditionEditor.resx
│ │ │ ├── TextSizeConditionEditor.Designer.cs
│ │ │ ├── TextSizeConditionEditor.cs
│ │ │ └── TextSizeConditionEditor.resx
│ │ ├── AutoBookmarkControl.Designer.cs
│ │ ├── AutoBookmarkControl.cs
│ │ ├── AutoBookmarkControl.resx
│ │ ├── BookmarkControl.Designer.cs
│ │ ├── BookmarkControl.cs
│ │ ├── BookmarkControl.resx
│ │ ├── CustomButton/
│ │ │ └── GlassButton.cs
│ │ ├── CustomizeToolbarForm.Designer.cs
│ │ ├── CustomizeToolbarForm.cs
│ │ ├── CustomizeToolbarForm.resx
│ │ ├── DocumentInspector/
│ │ │ ├── AddPdfObjectForm.Designer.cs
│ │ │ ├── AddPdfObjectForm.cs
│ │ │ ├── AddPdfObjectForm.resx
│ │ │ ├── ImageViewerForm.Designer.cs
│ │ │ ├── ImageViewerForm.cs
│ │ │ ├── ImageViewerForm.resx
│ │ │ ├── TextViewerForm.Designer.cs
│ │ │ ├── TextViewerForm.cs
│ │ │ └── TextViewerForm.resx
│ │ ├── DocumentInspectorControl.Designer.cs
│ │ ├── DocumentInspectorControl.cs
│ │ ├── DocumentInspectorControl.resx
│ │ ├── DocumentOption/
│ │ │ ├── DocumentFontListForm.Designer.cs
│ │ │ ├── DocumentFontListForm.cs
│ │ │ ├── DocumentFontListForm.resx
│ │ │ ├── DocumentInfoEditor.Designer.cs
│ │ │ ├── DocumentInfoEditor.cs
│ │ │ ├── DocumentInfoEditor.resx
│ │ │ ├── FontCharSubstitutionForm.Designer.cs
│ │ │ ├── FontCharSubstitutionForm.cs
│ │ │ ├── FontCharSubstitutionForm.resx
│ │ │ ├── FontSubstitutionsEditor.Designer.cs
│ │ │ ├── FontSubstitutionsEditor.cs
│ │ │ ├── FontSubstitutionsEditor.resx
│ │ │ ├── PageLabelEditor.Designer.cs
│ │ │ ├── PageLabelEditor.cs
│ │ │ ├── PageLabelEditor.resx
│ │ │ ├── PageSettingsEditor.Designer.cs
│ │ │ ├── PageSettingsEditor.cs
│ │ │ └── PageSettingsEditor.resx
│ │ ├── DraggableForm.cs
│ │ ├── Editor/
│ │ │ ├── ActionEditorForm.Designer.cs
│ │ │ ├── ActionEditorForm.cs
│ │ │ ├── ActionEditorForm.resx
│ │ │ ├── AutoBookmarkForm.Designer.cs
│ │ │ ├── AutoBookmarkForm.cs
│ │ │ ├── AutoBookmarkForm.resx
│ │ │ ├── AutoResizingTextBox.cs
│ │ │ ├── BookmarkEditorView.Designer.cs
│ │ │ ├── BookmarkEditorView.cs
│ │ │ ├── BookmarkEditorView.resx
│ │ │ ├── Commands/
│ │ │ │ ├── BookmarkActionCommand.cs
│ │ │ │ ├── BookmarkLevelCommand.cs
│ │ │ │ ├── BookmarkMarkerCommand.cs
│ │ │ │ ├── BookmarkPageCommand.cs
│ │ │ │ ├── BookmarkSelectionCommand.cs
│ │ │ │ ├── BookmarkStyleCommand.cs
│ │ │ │ ├── CopyBookmarkItemCommand.cs
│ │ │ │ ├── DeleteBookmarkItemCommand.cs
│ │ │ │ ├── DocumentPropertyCommand.cs
│ │ │ │ ├── InsertBookmarkCommand.cs
│ │ │ │ ├── InsertPageLabelCommand.cs
│ │ │ │ ├── LoadDocumentCommand.cs
│ │ │ │ ├── OcrPageCommand.cs
│ │ │ │ ├── PagePropertiesCommand.cs
│ │ │ │ ├── PasteBookmarkItemCommand.cs
│ │ │ │ ├── QuickSelectCommand.cs
│ │ │ │ ├── SaveDocumentCommand.cs
│ │ │ │ ├── SavePageImageCommand.cs
│ │ │ │ ├── SimpleBookmarkCommand.cs
│ │ │ │ ├── ViewerCommand.cs
│ │ │ │ └── ViewerScrollToBookmarkCommand.cs
│ │ │ ├── Controller.cs
│ │ │ ├── CustomPatternForm.Designer.cs
│ │ │ ├── CustomPatternForm.cs
│ │ │ ├── CustomPatternForm.resx
│ │ │ ├── DocumentInfoForm.Designer.cs
│ │ │ ├── DocumentInfoForm.cs
│ │ │ ├── DocumentInfoForm.resx
│ │ │ ├── DoubleClickableRadioButton.cs
│ │ │ ├── EditModel.cs
│ │ │ ├── EditorCommands.cs
│ │ │ ├── IEditView.cs
│ │ │ ├── IEditorCommand.cs
│ │ │ ├── InsertBookmarkForm.Designer.cs
│ │ │ ├── InsertBookmarkForm.cs
│ │ │ ├── InsertBookmarkForm.resx
│ │ │ ├── InsertPageLabelForm.Designer.cs
│ │ │ ├── InsertPageLabelForm.cs
│ │ │ ├── InsertPageLabelForm.resx
│ │ │ ├── NewCoordinateEntryForm.Designer.cs
│ │ │ ├── NewCoordinateEntryForm.cs
│ │ │ ├── NewCoordinateEntryForm.resx
│ │ │ ├── PagePropertyForm.Designer.cs
│ │ │ ├── PagePropertyForm.cs
│ │ │ ├── PagePropertyForm.resx
│ │ │ ├── Parts/
│ │ │ │ ├── BookmarkInViewSynchronizer.cs
│ │ │ │ └── BookmarkTitleEditHandler.cs
│ │ │ ├── SavePdfForm.Designer.cs
│ │ │ ├── SavePdfForm.cs
│ │ │ ├── SavePdfForm.resx
│ │ │ ├── SearchBookmarkForm.Designer.cs
│ │ │ ├── SearchBookmarkForm.cs
│ │ │ ├── SearchBookmarkForm.resx
│ │ │ ├── ShiftPageNumberEntryForm.Designer.cs
│ │ │ ├── ShiftPageNumberEntryForm.cs
│ │ │ ├── ShiftPageNumberEntryForm.resx
│ │ │ ├── ViewerControl.cs
│ │ │ ├── ViewerStructures.cs
│ │ │ ├── ZoomRateEntryForm.Designer.cs
│ │ │ ├── ZoomRateEntryForm.cs
│ │ │ └── ZoomRateEntryForm.resx
│ │ ├── EditorControl.Designer.cs
│ │ ├── EditorControl.cs
│ │ ├── EditorControl.resx
│ │ ├── ExtractImageControl.Designer.cs
│ │ ├── ExtractImageControl.cs
│ │ ├── ExtractImageControl.resx
│ │ ├── ExtractPageControl.Designer.cs
│ │ ├── ExtractPageControl.cs
│ │ ├── ExtractPageControl.resx
│ │ ├── FileListHelper.cs
│ │ ├── FormState.cs
│ │ ├── FrontPage.html
│ │ ├── FrontPageControl.Designer.cs
│ │ ├── FrontPageControl.cs
│ │ ├── FrontPageControl.resx
│ │ ├── FunctionControl.cs
│ │ ├── FunctionTabContainer.cs
│ │ ├── HistoryComboBox.cs
│ │ ├── HtmlPageControl.cs
│ │ ├── IDocumentEditor.cs
│ │ ├── IResettableControl.cs
│ │ ├── ITextInfoFilterEditor.cs
│ │ ├── InfoExchangerControl.Designer.cs
│ │ ├── InfoExchangerControl.cs
│ │ ├── InfoExchangerControl.resx
│ │ ├── InfoFileOptionControl.Designer.cs
│ │ ├── InfoFileOptionControl.cs
│ │ ├── InfoFileOptionControl.resx
│ │ ├── ListViewItemComparer.cs
│ │ ├── MacroMenu.cs
│ │ ├── MergerControl.Designer.cs
│ │ ├── MergerControl.cs
│ │ ├── MergerControl.resx
│ │ ├── MergerOptionForm.Designer.cs
│ │ ├── MergerOptionForm.cs
│ │ ├── MergerOptionForm.resx
│ │ ├── OcrControl.Designer.cs
│ │ ├── OcrControl.cs
│ │ ├── OcrControl.resx
│ │ ├── PasswordEntryForm.Designer.cs
│ │ ├── PasswordEntryForm.cs
│ │ ├── PasswordEntryForm.resx
│ │ ├── PatcherControl.Designer.cs
│ │ ├── PatcherControl.cs
│ │ ├── PatcherControl.resx
│ │ ├── PatcherOptionForm.Designer.cs
│ │ ├── PatcherOptionForm.cs
│ │ ├── PatcherOptionForm.resx
│ │ ├── PatcherOptionsControl.Designer.cs
│ │ ├── PatcherOptionsControl.cs
│ │ ├── PatcherOptionsControl.resx
│ │ ├── RecentFileMenuHelper.cs
│ │ ├── RenameControl.Designer.cs
│ │ ├── RenameControl.cs
│ │ ├── RenameControl.resx
│ │ ├── RenamePreviewForm.Designer.cs
│ │ ├── RenamePreviewForm.cs
│ │ ├── RenamePreviewForm.resx
│ │ ├── RenderImageControl.Designer.cs
│ │ ├── RenderImageControl.cs
│ │ ├── RenderImageControl.resx
│ │ ├── ReportControl.Designer.cs
│ │ ├── ReportControl.cs
│ │ ├── ReportControl.resx
│ │ ├── RichTextBoxEx.cs
│ │ ├── SourceFileControl.Designer.cs
│ │ ├── SourceFileControl.cs
│ │ ├── SourceFileControl.resx
│ │ ├── SourceImageOptionForm.Designer.cs
│ │ ├── SourceImageOptionForm.cs
│ │ ├── SourceImageOptionForm.resx
│ │ ├── SourcePdfOptionForm.Designer.cs
│ │ ├── SourcePdfOptionForm.cs
│ │ ├── SourcePdfOptionForm.resx
│ │ ├── TargetFileControl.Designer.cs
│ │ ├── TargetFileControl.cs
│ │ ├── TargetFileControl.resx
│ │ ├── UpdateForm.Designer.cs
│ │ ├── UpdateForm.cs
│ │ ├── UpdateForm.resx
│ │ ├── ViewerPreferenceEditor.Designer.cs
│ │ ├── ViewerPreferenceEditor.cs
│ │ └── ViewerPreferenceEditor.resx
│ ├── Lib/
│ │ ├── FreeImage.NET.chm
│ │ ├── FreeImage.NET.chw
│ │ ├── FreeImageNET.XML
│ │ ├── PowerJSON.XML
│ │ └── iTextSharp.xml
│ ├── MainForm.Designer.cs
│ ├── MainForm.cs
│ ├── MainForm.resx
│ ├── Model/
│ │ ├── AutoBookmarkCondition.cs
│ │ ├── AutoBookmarkContext.cs
│ │ ├── BookmarkSettings.cs
│ │ ├── BookmarkStatus.cs
│ │ ├── Bound.cs
│ │ ├── ColorSpaces/
│ │ │ ├── CIELab.cs
│ │ │ ├── CIEXYZ.cs
│ │ │ ├── CMYK.cs
│ │ │ ├── ColorSpaceHelper.cs
│ │ │ ├── HSB.cs
│ │ │ ├── HSL.cs
│ │ │ ├── RGB.cs
│ │ │ └── YUV.cs
│ │ ├── CoordinateTranslationSettings.cs
│ │ ├── DistanceInfo.cs
│ │ ├── DocumentObject.cs
│ │ ├── FontInfo.cs
│ │ ├── GeneralInfo.cs
│ │ ├── GraphicsState.cs
│ │ ├── IHierarchicalObject.cs
│ │ ├── ITextRegion.cs
│ │ ├── InsertBookmarkPositionType.cs
│ │ ├── Margins.cs
│ │ ├── MatchPattern.cs
│ │ ├── PDFStructInfo.xml
│ │ ├── PDFStructInfo.xsd
│ │ ├── PageBoxSettings.cs
│ │ ├── PageFilterFlag.cs
│ │ ├── PageLabel.cs
│ │ ├── PageRange.cs
│ │ ├── PageRangeCollection.cs
│ │ ├── PageResizing.cs
│ │ ├── PageSettings.cs
│ │ ├── PaperSize.cs
│ │ ├── PdfDocumentFont.cs
│ │ ├── PdfImageData.cs
│ │ ├── PdfInfoXmlDocument.cs
│ │ ├── PdfModelHelper.cs
│ │ ├── PdfNavigator.cs
│ │ ├── PdfObjectType.cs
│ │ ├── PdfPageCommand.cs
│ │ ├── PdfPath/
│ │ │ ├── Context.cs
│ │ │ ├── IPathAxis.cs
│ │ │ ├── IPathExpression.cs
│ │ │ ├── IPathFunction.cs
│ │ │ ├── IPathPredicate.cs
│ │ │ ├── IPathValue.cs
│ │ │ ├── PathAxes.cs
│ │ │ ├── PathAxisType.cs
│ │ │ ├── PathCompiler.cs
│ │ │ ├── PathValue.cs
│ │ │ ├── PathValueType.cs
│ │ │ └── PredicateOperatorType.cs
│ │ ├── PdfPathDocument.cs
│ │ ├── PdfStructInfo.cs
│ │ ├── ResourceReference.cs
│ │ ├── SourceItem.cs
│ │ ├── TextInfo.cs
│ │ ├── TextLine.cs
│ │ ├── TextRegion.cs
│ │ ├── UnitConverter.cs
│ │ └── WritingDirection.cs
│ ├── Options/
│ │ ├── AutoBookmarkOptions.cs
│ │ ├── DocumentOptions.cs
│ │ ├── EncodingOptions.cs
│ │ ├── ExporterOptions.cs
│ │ ├── ExtractPageOptions.cs
│ │ ├── ImageExtracterOptions.cs
│ │ ├── ImporterOptions.cs
│ │ ├── MergerOptions.cs
│ │ ├── OcrOptions.cs
│ │ ├── PatcherOptions.cs
│ │ ├── ReaderOptions.cs
│ │ ├── ToolbarOptions.cs
│ │ ├── ViewerOptions.cs
│ │ └── WindowStatus.cs
│ ├── PDFPatcher.csproj
│ ├── Processor/
│ │ ├── AutoBookmarkCreator.cs
│ │ ├── AutoBookmarkFilters/
│ │ │ ├── AutoBookmarkFilter.cs
│ │ │ ├── FontNameFilter.cs
│ │ │ ├── MultiConditionFilter.cs
│ │ │ ├── PageRangeFilter.cs
│ │ │ ├── TextFilter.cs
│ │ │ ├── TextPositionFilter.cs
│ │ │ └── TextSizeFilter.cs
│ │ ├── ContentProcessors/
│ │ │ ├── CleanContentStreamProcessor.cs
│ │ │ ├── ColorizeBinaryImageProcessor.cs
│ │ │ ├── CommonProcessor.cs
│ │ │ ├── FixContentProcessor.cs
│ │ │ ├── IDocProcessor.cs
│ │ │ ├── IPageProcessor.cs
│ │ │ ├── ImageDeskewProcessor.cs
│ │ │ ├── ImageRecompressor.cs
│ │ │ ├── ImportOcrResultProcessor.cs
│ │ │ ├── PageDimensionProcessor.cs
│ │ │ ├── RemoveAnnotationProcessor.cs
│ │ │ ├── RemoveBookmarkProcessor.cs
│ │ │ ├── RemoveDictionaryItemProcessor.cs
│ │ │ ├── RemoveEmptyCommandProcessor.cs
│ │ │ ├── RemoveFormProcessor.cs
│ │ │ ├── RemoveTextBlockProcessor.cs
│ │ │ ├── RemoveThumbnailProcessor.cs
│ │ │ ├── RemoveWrappedCommandProcessor.cs
│ │ │ └── ReplaceFontProcessor.cs
│ │ ├── DocInfoExporter.cs
│ │ ├── DocInfoImporter.cs
│ │ ├── DocProcessorContext.cs
│ │ ├── DocumentSink.cs
│ │ ├── IInfoDocProcessor.cs
│ │ ├── IProcessor.cs
│ │ ├── ImageExtractor.cs
│ │ ├── Imaging/
│ │ │ ├── BitmapHelper.cs
│ │ │ ├── FreeImageHelper.cs
│ │ │ ├── ImageDeskew.cs
│ │ │ ├── ImageDisposition.cs
│ │ │ ├── ImageInfo.cs
│ │ │ ├── JBig2Decoder.cs
│ │ │ ├── JBig2Encoder.cs
│ │ │ ├── JBig2Structs.cs
│ │ │ ├── JpgHelper.cs
│ │ │ ├── TiffHelper.cs
│ │ │ ├── WuColorQuantizer.cs
│ │ │ └── WuQuantize.c
│ │ ├── InfoDocProcessor/
│ │ │ ├── CollapseBookmarkProcessor.cs
│ │ │ ├── ConvertUnitProcessor.cs
│ │ │ ├── ForceInternalDestinationProcessor.cs
│ │ │ ├── GotoDestinationProcessor.cs
│ │ │ ├── RemoveZoomRateProcessor.cs
│ │ │ └── ShiftPageProcessor.cs
│ │ ├── InfoXmlProcessors/
│ │ │ ├── BookmarkMatcher.cs
│ │ │ ├── BookmarkOpenStatusProcessor.cs
│ │ │ ├── ChangeCoordinateProcessor.cs
│ │ │ ├── ChangePageCoordinateProcessor.cs
│ │ │ ├── ChangePageNumberProcessor.cs
│ │ │ ├── ChangeZoomRateProcessor.cs
│ │ │ ├── ClearDestinationOffsetProcessor.cs
│ │ │ ├── DestinationGotoTopProcessor.cs
│ │ │ ├── ForceInternalLinkProcessor.cs
│ │ │ ├── IPdfInfoXmlProcessor.cs
│ │ │ ├── LevelDownProcessor.cs
│ │ │ ├── LevelUpProcessor.cs
│ │ │ ├── ReplaceTitleTextProcessor.cs
│ │ │ ├── SetCaseProcessor.cs
│ │ │ ├── SetTextColorProcessor.cs
│ │ │ ├── SetTextStyleProcessor.cs
│ │ │ └── UndoAction.cs
│ │ ├── ModiOcr.cs
│ │ ├── Mupdf/
│ │ │ ├── ImageRendererOptions.cs
│ │ │ ├── MuPDFExtensions.cs
│ │ │ ├── PageLabelCollection.cs
│ │ │ └── RenderResultCache.cs
│ │ ├── NullXmlWriter.cs
│ │ ├── OcrProcessor.cs
│ │ ├── OperatorGroup.cs
│ │ ├── OutlineManager.cs
│ │ ├── OutlineManager.iText.cs
│ │ ├── PageProcessorContext.cs
│ │ ├── PdfActionExporter.cs
│ │ ├── PdfContentExport.cs
│ │ ├── PdfContentStreamParser.cs
│ │ ├── PdfDocumentCreator.cs
│ │ ├── PdfHelper.cs
│ │ ├── PdfPageCommandProcessor.cs
│ │ ├── PdfPageExtractor.cs
│ │ ├── PdfProcessingEngine.cs
│ │ ├── SourceItemSerializer.cs
│ │ └── Worker.cs
│ ├── Program.cs
│ ├── Properties/
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── ShellHelper.cs
│ ├── Toolkit.cs
│ ├── Tracker.cs
│ ├── app.config
│ └── packages.config
├── CODEOWNERS
├── CONTRIBUTING.zh-CN.md
├── JBig2/
│ ├── COPYING
│ ├── JBig2.sln
│ ├── LICENSE
│ ├── README
│ ├── include/
│ │ ├── config_win32.h
│ │ ├── getopt.h
│ │ ├── jbig2.h
│ │ ├── jbig2_arith.h
│ │ ├── jbig2_arith_iaid.h
│ │ ├── jbig2_arith_int.h
│ │ ├── jbig2_generic.h
│ │ ├── jbig2_halftone.h
│ │ ├── jbig2_huffman.h
│ │ ├── jbig2_hufftab.h
│ │ ├── jbig2_image.h
│ │ ├── jbig2_image_rw.h
│ │ ├── jbig2_mmr.h
│ │ ├── jbig2_page.h
│ │ ├── jbig2_priv.h
│ │ ├── jbig2_refinement.h
│ │ ├── jbig2_segment.h
│ │ ├── jbig2_symbol_dict.h
│ │ ├── jbig2_text.h
│ │ ├── jbig2arith.h
│ │ ├── jbig2enc.h
│ │ ├── jbig2enc.lossless.h
│ │ ├── jbig2segments.h
│ │ ├── jbig2structs.h
│ │ ├── jbig2sym.h
│ │ ├── memento.h
│ │ ├── os_types.h
│ │ ├── pix.h
│ │ ├── sha1.h
│ │ ├── stdint.h
│ │ └── unistd.h
│ ├── jbig2.def
│ ├── jbig2.vcxproj
│ ├── jbig2.vcxproj.filters
│ └── src/
│ ├── jbig2.c
│ ├── jbig2.cc
│ ├── jbig2_arith.c
│ ├── jbig2_arith_iaid.c
│ ├── jbig2_arith_int.c
│ ├── jbig2_generic.c
│ ├── jbig2_halftone.c
│ ├── jbig2_huffman.c
│ ├── jbig2_hufftab.c
│ ├── jbig2_image.c
│ ├── jbig2_image_pbm.c
│ ├── jbig2_image_png.c
│ ├── jbig2_mmr.c
│ ├── jbig2_page.c
│ ├── jbig2_refinement.c
│ ├── jbig2_segment.c
│ ├── jbig2_symbol_dict.c
│ ├── jbig2_text.c
│ ├── jbig2arith.cc
│ ├── jbig2dec.c
│ ├── jbig2enc.cc
│ ├── jbig2enc.lossless.cc
│ ├── jbig2sym.cc
│ ├── memcmp.c
│ ├── memento.c
│ ├── pbm2png.c
│ └── sha1.c
├── PDFPatcher.sln
├── README.md
├── doc/
│ ├── example.xml
│ └── 使用手册.md
├── 使用手册.docx
├── 授权协议.txt
└── 更新历史.txt
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
###############################################################################
# Set default behavior to automatically normalize line endings.
###############################################################################
* text=auto
# Make sure that these files always have CRLF line endings in checkout
*.config text eol=crlf
*.cs text eol=crlf
*.csproj text eol=crlf
*.html text eol=crlf
*.js text eol=crlf
*.manifest text eol=crlf
*.resx text eol=crlf
*.sln text eol=crlf
*.targets text eol=crlf
*.txt text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
*.xml text eol=crlf
*.xsd text eol=crlf
# Never perform LF normalization on these files
*.chw binary
*.dll binary
*.docx binary
*.exe binary
*.ico binary
*.png binary
###############################################################################
# Set default behavior for command prompt diff.
#
# This is need for earlier builds of msysgit that does not have it on by
# default for csharp files.
# Note: This is only used by command line
###############################################################################
#*.cs diff=csharp
###############################################################################
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just uncomment the entries below
###############################################################################
#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary
###############################################################################
# diff behavior for common document formats
#
# Convert binary document formats to text before diffing them. This feature
# is only available from the command line. Turn it on by uncommenting the
# entries below.
###############################################################################
#*.doc diff=astextplain
#*.DOC diff=astextplain
#*.docx diff=astextplain
#*.DOCX diff=astextplain
#*.dot diff=astextplain
#*.DOT diff=astextplain
#*.pdf diff=astextplain
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain
================================================
FILE: .github/ISSUE_TEMPLATE/其它问题.md
================================================
---
name: 其它问题
about: 对于其它事项,例如使用方法求助等,建议在 Discussion 中发起讨论
title: ''
labels: 讨论
assignees: ''
---
================================================
FILE: .github/ISSUE_TEMPLATE/新功能需求.md
================================================
---
name: 新功能需求
about: 告诉我们你希望增加的功能
title: ''
labels: 改进
assignees: ''
---
**使用场景**
例如:在什么场合下会用到这个功能
**类似软件**
是否有类似软件或程序能提供相同的功能
================================================
FILE: .github/ISSUE_TEMPLATE/缺陷问题报告.md
================================================
---
name: 缺陷问题报告
about: 告诉我们你遇到的问题
title: ''
labels: 缺陷
assignees: ''
---
**PDF补丁丁的版本**
请写明使用的版本
**请简要描述你遇到的问题**
本来应该是怎样的,但实际上却出现了怎样的情形
**重现问题的步骤**
步骤如下:
1. 使用如下附件 '...'
2. 打开某功能 '....'
3. 选中哪些选项,点击哪些按钮 '....'
4. 出现的问题
================================================
FILE: .gitignore
================================================
*.snk
*.pld
CopyReleasedFiles.js
ILRepack.targets
7za.exe
misc/
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
project.fragment.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
#*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
================================================
FILE: .textlintrc
================================================
{
"filters": {},
"rules": {
"ja-space-between-half-and-full-width": {
"space": "always"
}
}
}
================================================
FILE: App/.editorconfig
================================================
# Remove the line below if you want to inherit .editorconfig settings from higher directories
root = true
# C# files
[*.cs]
#### Core EditorConfig Options ####
# Indentation and spacing
indent_size = 4
indent_style = tab
tab_width = 4
# New line preferences
end_of_line = crlf
insert_final_newline = false
#### .NET Coding Conventions ####
# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
file_header_template = unset
# this. and Me. preferences
dotnet_style_qualification_for_event = false
dotnet_style_qualification_for_field = false
dotnet_style_qualification_for_method = false
dotnet_style_qualification_for_property = false
# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members
# Expression-level preferences
dotnet_style_coalesce_expression = true
dotnet_style_collection_initializer = true
dotnet_style_explicit_tuple_names = true
dotnet_style_namespace_match_folder = true
dotnet_style_null_propagation = true
dotnet_style_object_initializer = true
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true
dotnet_style_prefer_compound_assignment = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_style_prefer_inferred_anonymous_type_member_names = true
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
dotnet_style_prefer_simplified_boolean_expressions = true
dotnet_style_prefer_simplified_interpolation = true
# Field preferences
dotnet_style_readonly_field = true
# Parameter preferences
dotnet_code_quality_unused_parameters = all
# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none
# New line preferences
dotnet_style_allow_multiple_blank_lines_experimental = true
dotnet_style_allow_statement_immediately_after_block_experimental = true
#### C# Coding Conventions ####
# var preferences
csharp_style_var_elsewhere = false:silent
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
# Expression-bodied members
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_switch_expression = true:suggestion
# Null-checking preferences
csharp_style_conditional_delegate_call = true:suggestion
# Modifier preferences
csharp_prefer_static_local_function = true:silent
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
# Code-block preferences
csharp_prefer_braces = true:silent
csharp_prefer_simple_using_statement = true:suggestion
# Expression-level preferences
csharp_prefer_simple_default_expression = true:suggestion
csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_implicit_object_creation_when_type_is_apparent = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true
csharp_style_prefer_index_operator = true:suggestion
csharp_style_prefer_range_operator = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent
# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:silent
# New line preferences
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
#### C# Formatting Rules ####
# New line preferences
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = types
csharp_new_line_between_query_expression_clauses = true
# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true
# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false
# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = true
#### Naming styles ####
# Naming rules
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
# Symbol specifications
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =
# Naming styles
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case
csharp_style_namespace_declarations = file_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_prefer_system_threading_lock = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_utf8_string_literals = true:suggestion
csharp_prefer_static_anonymous_function = true:suggestion
csharp_style_prefer_readonly_struct = true:suggestion
csharp_style_prefer_readonly_struct_member = true:suggestion
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true:silent
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true:silent
csharp_style_prefer_extended_property_pattern = true:suggestion
[*.{cs,vb}]
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_prefer_collection_expression = when_types_loosely_match:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_readonly_field = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:silent
dotnet_style_predefined_type_for_member_access = false:silent
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
dotnet_style_allow_multiple_blank_lines_experimental = true:silent
dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
dotnet_code_quality_unused_parameters = all:suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
dotnet_style_qualification_for_field = false:silent
dotnet_style_qualification_for_property = false:silent
dotnet_style_qualification_for_method = false:silent
dotnet_style_qualification_for_event = false:silent
================================================
FILE: App/AppContext.cs
================================================
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;
using MuPDF;
using PDFPatcher.Common;
using PowerJson;
namespace PDFPatcher
{
internal static class AppContext
{
static readonly string AppConfigFilePath = FileHelper.CombinePath(
Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath),
"AppConfig.json");
static readonly SerializationManager JsonSm = new SerializationManager(new JsonReflectionController(true)) {
UseExtensions = false,
SerializeEmptyCollections = false,
SerializeNullValues = false,
SerializeReadOnlyFields = false,
SerializeReadOnlyProperties = false,
CanSerializePrivateMembers = true
};
internal const int MaxHistoryItemCount = 16;
internal static MainForm MainForm { get; set; }
static AppContext() {
SaveAppSettings = true;
BookmarkFile = String.Empty;
TargetFile = String.Empty;
CheckUpdateDate = DateTime.Now;
CheckUpdateInterval = 14;
Exporter = new ExporterOptions();
Importer = new ImporterOptions();
Merger = new MergerOptions();
Patcher = new PatcherOptions();
Editor = new PatcherOptions();
Reader = new ReaderOptions();
AutoBookmarker = new AutoBookmarkOptions();
Encodings = new EncodingOptions();
ImageExtracter = new ImageExtracterOptions();
ImageRenderer = new ImageRendererOptions();
ExtractPage = new ExtractPageOptions();
Ocr = new OcrOptions();
Toolbar = new ToolbarOptions();
WindowStatus = new WindowStatus();
Recent = new RecentItems();
}
public static bool SaveAppSettings { get; set; }
///<summary>获取或指定是否在加载 PDF 文档时仅加载部分文档。</summary>
public static bool LoadPartialPdfFile { get; set; }
private static string[] _SourceFiles = new string[0];
///<summary>获取或指定要处理的源文件路径列表。</summary>
public static string[] SourceFiles {
get => _SourceFiles;
set => _SourceFiles = value ?? new string[0];
}
///<summary>获取或指定检查更新的日期。</summary>
public static DateTime CheckUpdateDate { get; set; }
///<summary>获取或指定检查更新的日期间隔。</summary>
public static int CheckUpdateInterval { get; set; }
///<summary>获取或指定是否应取消批处理操作。</summary>
public static bool Abort { get; set; }
///<summary>获取或指定书签文件的路径。</summary>
public static string BookmarkFile { get; set; }
///<summary>获取或指定目标文件的路径。</summary>
public static string TargetFile { get; set; }
///<summary>获取导出设置。</summary>
public static ExporterOptions Exporter { get; internal set; }
///<summary>获取导入设置。</summary>
public static ImporterOptions Importer { get; internal set; }
///<summary>获取生成文档的设置。</summary>
public static MergerOptions Merger { get; internal set; }
///<summary>获取生成文档的设置。</summary>
public static PatcherOptions Patcher { get; internal set; }
///<summary>获取文档编辑器的设置。</summary>
public static PatcherOptions Editor { get; internal set; }
///<summary>获取阅读器的设置。</summary>
public static ReaderOptions Reader { get; internal set; }
///<summary>获取自动生成书签的设置。</summary>
public static AutoBookmarkOptions AutoBookmarker { get; internal set; }
///<summary>获取应用程序设置。</summary>
public static EncodingOptions Encodings { get; internal set; }
///<summary>获取导出图像的设置。</summary>
public static ImageExtracterOptions ImageExtracter { get; internal set; }
///<summary>获取转换为图片的设置。</summary>
public static ImageRendererOptions ImageRenderer { get; internal set; }
///<summary>获取提取页面的设置。</summary>
public static ExtractPageOptions ExtractPage { get; internal set; }
///<summary>获取光学字符识别功能的设置。</summary>
public static OcrOptions Ocr { get; internal set; }
///<summary>获取或指定自定义工具栏的项目。</summary>
public static ToolbarOptions Toolbar { get; internal set; }
///<summary>获取或指定窗口状态。</summary>
public static WindowStatus WindowStatus { get; internal set; }
public static RecentItems Recent { get; internal set; }
[JsonSerializable]
public sealed class RecentItems
{
///<summary>获取最近使用的 PDF 文件列表。</summary>
[JsonField("源文件")]
public List<string> SourcePdfFiles { get; } = new List<string>();
///<summary>获取最近使用的 PDF 输出文件列表。</summary>
[JsonField("输出文件")]
public List<string> TargetPdfFiles { get; } = new List<string>();
///<summary>获取最近使用的信息文件列表。</summary>
[JsonField("信息文件")]
public List<string> InfoDocuments { get; } = new List<string>();
///<summary>获取最近使用的文件名模板列表。</summary>
[JsonField("文件名模板")]
public List<string> FileNameTemplates { get; } = new List<string>();
///<summary>获取最近使用的文件夹列表。</summary>
[JsonField("文件夹")]
public List<string> Folders { get; } = new List<string>();
///<summary>获取最近使用的查找字符串列表。</summary>
[JsonField("查找项")]
public List<string> SearchPatterns { get; } = new List<string>();
///<summary>获取最近使用的替换字符串列表。</summary>
[JsonField("替换项")]
public List<string> ReplacePatterns { get; } = new List<string>();
internal static void AddHistoryItem(IList<string> list, string item) {
if (String.IsNullOrEmpty(item)) {
return;
}
var i = -1;
var m = false;
foreach (var li in list) {
i++;
if (String.Equals(li, item, StringComparison.OrdinalIgnoreCase)) {
m = true;
break;
}
}
if (m) {
if (i == 0) {
return;
}
if (i != -1) {
list.RemoveAt(i);
}
}
list.Insert(0, item);
while (list.Count > MaxHistoryItemCount) {
list.RemoveAt(list.Count - 1);
}
}
}
internal static void CleanUpInexistentFiles(List<string> list) {
list.RemoveAll(item => FileHelper.HasFileNameMacro(item) == false && File.Exists(item) == false);
}
internal static void CleanUpInexistentFolders(List<string> list) {
list.RemoveAll(item => FileHelper.HasFileNameMacro(item) == false && Directory.Exists(item) == false);
}
internal static bool Load(string path) {
return LoadJson(path);
}
internal static bool LoadJson(string path) {
if (String.IsNullOrEmpty(path)) {
path = AppConfigFilePath;
}
if (File.Exists(path) == false) {
return false;
}
ConfigurationSerialization conf;
try {
conf = Json.ToObject<ConfigurationSerialization>(File.ReadAllText(path, Encoding.UTF8), JsonSm);
if (conf == null || conf.SaveAppSettings == false) {
SaveAppSettings = false;
return false;
}
}
catch (Exception) {
return false;
}
CheckUpdateDate = conf.CheckUpdateDate;
CheckUpdateInterval = conf.CheckUpdateInterval;
LoadPartialPdfFile = conf.PdfLoadMode == Configuration.OptimalMemoryUsage;
if (conf.Recent != null) {
Recent = conf.Recent;
}
if (conf.ExporterOptions != null) {
Exporter = conf.ExporterOptions;
}
if (conf.ImporterOptions != null) {
Importer = conf.ImporterOptions;
}
if (conf.MergerOptions != null) {
Merger = conf.MergerOptions;
}
if (conf.PatcherOptions != null) {
Patcher = conf.PatcherOptions;
}
if (conf.EditorOptions != null) {
Editor = conf.EditorOptions;
}
if (conf.ReaderOptions != null) {
Reader = conf.ReaderOptions;
}
if (conf.AutoBookmarkOptions != null) {
AutoBookmarker = conf.AutoBookmarkOptions;
}
if (conf.Encodings != null) {
Encodings = conf.Encodings;
}
if (conf.ImageExporterOptions != null) {
ImageExtracter = conf.ImageExporterOptions;
}
if (conf.ImageRendererOptions != null) {
ImageRenderer = conf.ImageRendererOptions;
}
if (conf.OcrOptions != null) {
Ocr = conf.OcrOptions;
}
if (conf.ExtractPageOptions != null) {
ExtractPage = conf.ExtractPageOptions;
}
if (conf.ToolbarOptions != null) {
Toolbar = conf.ToolbarOptions;
}
if (conf.WindowStatus != null) {
WindowStatus = conf.WindowStatus;
}
return true;
}
/// <summary>
/// 保存应用程序配置。
/// </summary>
/// <param name="path">保存路径。路径为空时,保存到默认位置。</param>
/// <param name="saveHistoryFileList">是否保存历史文件列表。</param>
/// <param name="skipReadonly">是否跳过只读文件。</param>
internal static void Save(string path, bool saveHistoryFileList, bool skipReadonly) {
try {
SaveJson(path ?? AppConfigFilePath, saveHistoryFileList, skipReadonly);
}
catch (Exception ex) {
AppContext.MainForm.ErrorBox("保存程序设置时出错", ex);
}
}
static void SaveJson(FilePath path, bool saveHistoryFileList, bool skipReadonly) {
if (skipReadonly && path.ExistsFile && (path.ToFileInfo().Attributes & FileAttributes.ReadOnly) > 0) {
return;
}
var s = SaveAppSettings
? new ConfigurationSerialization {
SaveAppSettings = true,
CheckUpdateDate = CheckUpdateDate,
CheckUpdateInterval = CheckUpdateInterval,
PdfLoadMode = LoadPartialPdfFile ? Configuration.OptimalMemoryUsage : Configuration.OptimalSpeed,
MergerOptions = Merger,
ExporterOptions = Exporter,
ImporterOptions = Importer,
PatcherOptions = Patcher,
EditorOptions = Editor,
ReaderOptions = Reader,
AutoBookmarkOptions = AutoBookmarker,
Encodings = Encodings,
ImageExporterOptions = ImageExtracter,
ImageRendererOptions = ImageRenderer,
ExtractPageOptions = ExtractPage,
OcrOptions = Ocr,
ToolbarOptions = Toolbar,
WindowStatus = new WindowStatus(MainForm),
Recent = saveHistoryFileList ? Recent : null
}
: new ConfigurationSerialization { SaveAppSettings = false };
path.WriteAllText(false, Encoding.UTF8, Json.ToJson(s, JsonSm));
}
private static void WriteRecentFiles(XmlWriter writer, IList<string> list, string name) {
foreach (var item in list) {
writer.WriteStartElement(name);
writer.WriteAttributeString(Configuration.Path, item);
writer.WriteEndElement();
}
}
}
}
================================================
FILE: App/Commands.cs
================================================
using System;
using System.Collections.Generic;
namespace PDFPatcher
{
static class Commands
{
internal const string File = "_File";
#region File menu
internal const string Open = "_Open";
internal const string OpenFile = "OpenFile";
internal const string LoadList = "_LoadList";
internal const string RecentFiles = "_RecentFiles";
internal const string ImportBookmark = "_ImportBookmark";
internal const string Close = "_Close";
internal const string Action = "_Action";
internal const string SaveBookmark = "_SaveBookmark";
internal const string SaveAsInfoFile = "_SaveAsInfoFile";
internal const string DocumentProperties = "_Properties";
internal const string Options = "_Options";
internal const string ResetOptions = "_ResetOptions";
internal const string AppOptions = "_AppOptions";
internal const string RestoreOptions = "_RestoreOptions";
internal const string SaveOptions = "_SaveOptions";
internal const string SaveList = "_SaveList";
internal const string CleanUpInexistentFiles = "_CleanUpInexistentFiles";
internal const string Exit = "_Exit";
#endregion
internal const string Tools = "_ToolBox";
#region Tools menu
internal const string LogWindow = "_LogWindow";
internal const string ShowGeneralToolbar = "_ShowGeneralToolbar";
internal const string FullScreenDisplay = "_FullScreenDisplay";
internal const string CustomizeToolbar = "_CustomizeToolbar";
#endregion
internal const string Selection = "_Select";
#region Selection menu
internal const string Copy = "_Copy";
internal const string Delete = "_Delete";
internal const string Paste = "_Paste";
internal const string SelectAllPdf = "_SelectAllPdfFiles";
internal const string SelectAllImages = "_SelectAllImages";
internal const string SelectAllFolders = "_SelectAllFolders";
internal const string SelectAllItems = "_SelectAll";
internal const string InvertSelection = "_InvertSelection";
internal const string SelectNone = "_SelectNone";
internal const string SelectChildren = "_SelectChildren";
internal const string ItemTypeSeparator = "_ItemTypeSeparator";
internal const string ExpandAll = "_ExpandAll";
internal const string ExpandSelection = "_ExpandSelection";
internal const string CollapseAll = "_CollapseAll";
internal const string CollapseChildren = "_CollapseChildren";
internal const string CollapseSelection = "_CollapseSelection";
#endregion
#region Options menu
internal const string PatcherOptions = "_PatcherOptions";
internal const string MergerOptions = "_MergerOptions";
internal const string InfoFileOptions = "_InfoFileOptions";
#endregion
internal const string Help = "_Help";
#region Help menu
internal const string CreateShortcut = "_CreateShortcut";
internal const string VisitHomePage = "_VisitHomePage";
internal const string CheckUpdate = "_CheckUpdate";
#endregion
#region Editor
internal const string EditorInsertBookmark = "_BookmarkHere";
internal const string EditorSavePdf = "_SavePDF";
internal const string EditorBookmarkLevelUp = "_LevelUp";
internal const string EditorBookmarkLevelDown = "_LevelDown";
internal const string EditorBookmarkDelete = "_DeleteBookmark";
internal const string EditorBookmarkBold = "_BookmarkBoldButton";
internal const string EditorBookmarkItalic = "_BookmarkItalicButton";
internal const string EditorBookmarkPageNumberIncrement = "_IncrementPageNumber";
internal const string EditorBookmarkPageNumberDecrement = "_DecrementPageNumber";
internal const string EditorBookmarkPageNumberShift = "_ShiftMultiPageNumber";
internal const string EditorBookmarkPageNumberShiftTakeFollowing = "_ShiftMultiPageNumberTakeFollowing";
internal const string EditorBookmarkSetCurrentCoordinates = "_SetCurrentCoordinates";
internal const string EditorOcrPage = "_OcrPage";
internal const string EditorPageProperties = "_PageProperties";
internal const string EditorSavePageImage = "_SavePageImage";
internal const string EditorViewerScrollToBookmark = "_ViewerScrollToBookmark";
internal const string EditorInsertPageLabel = "_InsertPageLabel";
#endregion
internal static readonly string[] TopMenuItems = { File, Tools, Selection };
internal static readonly string[] CommonSelectionCommands = { SelectAllItems, SelectNone, InvertSelection };
internal static readonly HashSet<string> DefaultDisabledItems = new HashSet<string>(
new string[] {
SelectAllItems, InvertSelection, SelectNone,
Copy, Delete,
Options
});
internal static readonly HashSet<string> DefaultHiddenItems = new HashSet<string>(
new string[] {
ImportBookmark, SaveBookmark, SaveAsInfoFile, DocumentProperties,
SelectAllPdf, SelectAllImages, SelectAllFolders, ItemTypeSeparator
});
}
}
================================================
FILE: App/Common/CommandRegistry.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;
namespace PDFPatcher.Common
{
/// <summary>
/// 表示在指定上下文下执行的处理命令。
/// </summary>
/// <typeparam name="P">处理命令时的上下文类型。</typeparam>
interface ICommand<P>
{
void Process(P context, params string[] parameters);
}
/// <summary>
/// 不区分字符串大小写匹配的容器集合。用于编辑器命令模式。
/// </summary>
/// <typeparam name="P">命令模式的处理参数类型。</typeparam>
sealed class CommandRegistry<P>
{
readonly Dictionary<string, ICommand<P>> _container = new Dictionary<string, ICommand<P>>(StringComparer.OrdinalIgnoreCase);
/// <summary>
/// 注册执行处理的命令处理器。
/// </summary>
/// <param name="command">执行命令的处理器。</param>
/// <param name="commandIDs">触发该命令的命令标识符。</param>
public void Register(ICommand<P> command, params string[] commandIDs) {
foreach (var cmd in commandIDs) {
_container.Add(cmd, command);
}
}
/// <summary>
/// 执行指定的命令。
/// </summary>
/// <param name="commandID">命令标识符。</param>
/// <param name="context">处理命令时的上下文变量。</param>
/// <param name="parameters">参数。</param>
/// <returns>如找到对应的命令处理,则返回 true,否则返回 false。</returns>
public bool Process(string commandID, P context, params string[] parameters) {
if (_container.TryGetValue(commandID, out ICommand<P> cmd)) {
cmd.Process(context, parameters);
return true;
}
return false;
}
}
}
================================================
FILE: App/Common/DualKeyDictionary.cs
================================================
using System;
using System.Collections.Generic;
namespace PDFPatcher.Common
{
public class DualKeyDictionary<K, V> : IDictionary<K, V>
{
private readonly Dictionary<K, V> _keyDictionary = new Dictionary<K, V>();
private readonly Dictionary<V, K> _reverseDictionary = new Dictionary<V, K>();
public DualKeyDictionary() {
}
public K GetKeyByValue(V value) {
return _reverseDictionary[value];
}
#region IDictionary<K,V> 成员
public void Add(K key, V value) {
_keyDictionary.Add(key, value);
_reverseDictionary.Add(value, key);
}
public bool ContainsKey(K key) {
return _keyDictionary.ContainsKey(key);
}
public bool ContainsValue(V value) {
return _reverseDictionary.ContainsKey(value);
}
public ICollection<K> Keys => _keyDictionary.Keys;
public bool Remove(K key) {
if (_keyDictionary.ContainsKey(key) == false) {
return false;
}
var value = _keyDictionary[key];
_keyDictionary.Remove(key);
_reverseDictionary.Remove(value);
return true;
}
public bool TryGetValue(K key, out V value) {
return TryGetValue(key, out value);
}
public ICollection<V> Values => _reverseDictionary.Keys;
public V this[K key] {
get => _keyDictionary[key];
set {
Remove(key);
Add(key, value);
}
}
#endregion
#region ICollection<KeyValuePair<K,V>> 成员
public void Add(KeyValuePair<K, V> item) {
Add(item.Key, item.Value);
}
public void Clear() {
_keyDictionary.Clear();
_reverseDictionary.Clear();
}
public bool Contains(KeyValuePair<K, V> item) {
return _keyDictionary.ContainsKey(item.Key) && _reverseDictionary.ContainsKey(item.Value);
}
public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) {
((ICollection<KeyValuePair<K, V>>)_keyDictionary).CopyTo(array, arrayIndex);
}
public int Count => _keyDictionary.Count;
public bool IsReadOnly => false;
public bool Remove(KeyValuePair<K, V> item) {
return Remove(item.Key);
}
#endregion
#region IEnumerable<KeyValuePair<K,V>> 成员
public IEnumerator<KeyValuePair<K, V>> GetEnumerator() {
return ((IEnumerable<KeyValuePair<K, V>>)_keyDictionary).GetEnumerator();
}
#endregion
#region IEnumerable 成员
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
return ((System.Collections.IEnumerable)_keyDictionary).GetEnumerator();
}
#endregion
}
}
================================================
FILE: App/Common/FileHelper.cs
================================================
using System;
using System.IO;
namespace PDFPatcher.Common
{
static class FileHelper
{
enum OverwriteType
{
Prompt, Overwrite, Skip
}
static OverwriteType __OverwriteMode;
public static bool HasExtension(FilePath fileName, string extension) {
return fileName.HasExtension(extension);
}
public static bool HasFileNameMacro(string fileName) {
var c = '<';
foreach (var item in fileName) {
if (item == c) {
if (c == '>') {
return true;
}
c = '>';
}
}
return false;
}
public static int NumericAwareComparePath(string path1, string path2) {
const char PathDot = '.';
var l1 = path1?.Length ?? 0;
var l2 = path2?.Length ?? 0;
if (l1 == 0 || l2 == 0) {
return l1 - l2;
}
int n1 = 0, n2 = 0;
for (int i1 = 0, i2 = 0; i1 < l1 && i2 < l2; i1++, i2++) {
var x = path1[i1];
var y = path2[i2];
if (x < '0' || x > '9') {
// 不区分大小写的文字比较
if (x != y) {
x = ToLowerAscii(x);
y = ToLowerAscii(y);
if (x == y) {
continue;
}
return x == PathDot ? -1
: y == PathDot ? 1
: y < '0' || y > '9' ? LocaleInfo.StringComparer(x.ToString(), y.ToString(), System.Globalization.CompareOptions.StringSort)
// path2 为数字,path1 不为数字,path2 排在前面
: 1;
}
}
else if (IsPathSeparator(x)) {
if (IsPathSeparator(y)) {
continue;
}
return -1;
}
else if (IsPathSeparator(y)) {
return 1;
}
else {
// 数字比较
if (y >= '0' && y <= '9') {
// 两组均为数字
do {
if (x > '0' || n1 > 0) {
++n1;
}
} while (++i1 < l1 && (x = path1[i1]) >= '0' && x <= '9');
do {
if (y > '0' || n2 > 0) {
++n2;
}
} while (++i2 < l2 && (y = path2[i2]) >= '0' && y <= '9');
// 数字位数少的在前面
if (n1 != n2) {
return n1 - n2;
}
// 全是 0,继续后面的比较
if (n1 == 0 || n2 == 0) {
--i1;
--i2;
continue;
}
i1 -= n1;
i2 -= n2;
for (int i = 0; i < n1; i++, i1++, i2++) {
x = path1[i1];
y = path2[i2];
if (x != y) {
return x - y;
}
}
// 数值相等,比较下一组
n1 = n2 = 0;
--i1;
--i2;
}
else {
// 仅 x 为数字,y 不为数字
return y == PathDot ? 1 : x - y;
}
}
}
return path1.Length - path2.Length;
}
static char ToLowerAscii(char c) {
return c >= 'A' && c <= 'Z' ? (char)(c + ('a' - 'A')) : c;
}
internal static bool CheckOverwrite(string targetFile) {
if (!File.Exists(targetFile)) {
return true;
}
switch (__OverwriteMode) {
case OverwriteType.Prompt:
var r = Common.FormHelper.YesNoCancelBox(String.Join("\n", [
"是否覆盖目标文件?", targetFile, "\n按住 Shift 键重复此对话框的选择,本次操作不再弹出覆盖文件提示。"
]));
if (r == System.Windows.Forms.DialogResult.No) {
if (FormHelper.IsShiftKeyDown) {
__OverwriteMode = OverwriteType.Skip;
}
goto case OverwriteType.Skip;
}
else if (r == System.Windows.Forms.DialogResult.Cancel) {
throw new OperationCanceledException();
}
if (FormHelper.IsShiftKeyDown) {
__OverwriteMode = OverwriteType.Overwrite;
}
break;
case OverwriteType.Overwrite:
return true;
case OverwriteType.Skip:
Tracker.TraceMessage(Tracker.Category.ImportantMessage, "取消覆盖文件:" + targetFile);
return false;
default:
goto case OverwriteType.Prompt;
}
return true;
}
public static string CombinePath(string path1, string path2) {
if (string.IsNullOrEmpty(path2)) {
return path1 ?? string.Empty;
}
if (string.IsNullOrEmpty(path1)) {
return path2;
}
var l2 = path2.Length;
if (l2 > 0) {
if (IsPathSeparator(path2[0]) || (l2 > 1 && path2[1] == Path.VolumeSeparatorChar)) {
return path2;
}
}
var ch = path1[path1.Length - 1];
if (IsPathSeparator(ch) == false) {
return path1 + Path.DirectorySeparatorChar + path2;
}
return path1 + path2;
}
public static bool ComparePath(FilePath path1, FilePath path2) {
return path1.Equals(path2);
}
public static bool IsPathValid(string filePath) {
return String.IsNullOrEmpty(filePath) == false && filePath.Trim().Length > 0
&& filePath.IndexOfAny(FilePath.InvalidPathChars) == -1;
}
static bool IsPathSeparator(char c) {
return c == Path.DirectorySeparatorChar || c == Path.AltDirectorySeparatorChar;
}
internal static void ResetOverwriteMode() {
__OverwriteMode = OverwriteType.Prompt;
}
internal static string MakePathRootedAndWithExtension(string path, string basePath, string extName, bool forceExt) {
var p = Path.Combine(Path.GetDirectoryName(basePath), path);
return Path.GetExtension(p).Length == 0 || forceExt ? (string)new FilePath(p).EnsureExtension(extName) : p;
}
static FilePath AttachExtensionName(FilePath fileName, string extension) {
return fileName.EnsureExtension(extension);
}
static string GetNewFileName(string fileName, string extName) {
var tmpName = AttachExtensionName(fileName, extName);
var n = 1;
while (tmpName.ExistsFile) {
tmpName = AttachExtensionName(fileName + "[" + (++n) + "]", extName);
}
return tmpName.ToString();
}
public static string GetValidFileName(FilePath fileName) {
return fileName.SubstituteInvalidChars('_').ToString();
}
internal static string GetNewFileNameFromSourceFile(string fileName, string extName) {
var d = Path.GetDirectoryName(fileName);
return GetNewFileName(
d + @"\" + Path.GetFileNameWithoutExtension(fileName),
extName)
.Replace(@"\\", @"\");
}
internal static string GetTempNameFromFileDirectory(string fileName, string extName) {
var f = Path.GetDirectoryName(fileName);
var t = Path.GetTempFileName();
return Path.Combine(f, t + extName);
}
public static string GetEllipticPath(string path, int length) {
if (length < 11) {
length = 11;
}
return path == null ? string.Empty
: path.Length > length ? $"{path.Substring(0, 7)}...{path.Substring(path.Length - (length - 10))}"
: path;
}
public static byte[] DumpBytes(this byte[] source, FilePath path) {
return source.DumpBytes(path, 0, source?.Length ?? 0);
}
public static byte[] DumpBytes(this byte[] source, FilePath path, int offset, int count) {
using (var f = new FileStream(path.ToFullPath(), FileMode.OpenOrCreate, FileAccess.Write)) {
if (source == null) {
return null;
}
f.Write(source, offset, count);
}
return source;
}
public static byte[] DumpHexBinBytes(this byte[] source, FilePath path) {
using (var f = new StreamWriter(path.ToFullPath())) {
if (source == null) {
return null;
}
byte t;
for (int i = 0; i < source.Length; i++) {
if (i > 0) {
if ((i & 0xF) == 0) {
f.WriteLine();
}
if ((i & 0x1) == 0) {
f.Write(' ');
}
}
var b = source[i];
t = (byte)(b >> 4);
f.Write((char)(t + (t > 9 ? ('A' - 10) : 0x30)));
t = (byte)(b & 0x0F);
f.Write((char)(t + (t > 9 ? ('A' - 10) : 0x30)));
}
}
return source;
}
static class LocaleInfo
{
public static readonly Func<string, string, System.Globalization.CompareOptions, int> StringComparer = System.Globalization.CultureInfo.CurrentCulture.CompareInfo.Compare;
}
}
}
================================================
FILE: App/Common/FilePath.cs
================================================
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Text;
using NameList = System.Collections.Generic.List<string>;
using SysDirectory = System.IO.Directory;
namespace PDFPatcher.Common
{
/// <summary>表示文件路径的结构。此结构可隐式转换为字符串、<see cref="FileInfo"/>、<see cref="DirectoryInfo"/> 和 <see cref="Uri"/>。</summary>
public readonly struct FilePath : IEquatable<FilePath>
{
internal static readonly char[] InvalidFileNameChars = Path.GetInvalidFileNameChars();
internal static readonly char[] InvalidPathChars = Path.GetInvalidPathChars();
internal static readonly Func<string, string, bool> __PathComparer = StringComparer.OrdinalIgnoreCase.Equals;
/// <summary>表示匹配任何文件的通配符。</summary>
public const string Wildcard = "*";
/// <summary>表示匹配当前目录、递归子目录和任何文件的通配符。</summary>
public const string RecursiveWildcard = "**";
/// <summary>表示没有任何内容的路径。</summary>
public static readonly FilePath Empty = new FilePath(string.Empty, false);
/// <summary>获取应用程序所在的目录路径。</summary>
public static readonly FilePath AppRoot = ((FilePath)AppDomain.CurrentDomain.BaseDirectory).AppendPathSeparator();
/// <summary>获取应用程序的文件路径(对于 Web 应用程序,返回 <see cref="Empty"/>)。</summary>
public static readonly FilePath AppPath = Assembly.GetEntryAssembly() != null ? (FilePath)Assembly.GetEntryAssembly().Location : Empty;
static readonly char[] __PathSeparators = { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar };
static readonly string __CurrentPath = "." + Path.DirectorySeparatorChar;
readonly string _value;
/// <summary>传入文件路径的字符串形式,创建新的 <see cref="FilePath"/> 实例。在创建实例时,删除传入字符串内所有的前导和尾随空白。</summary>
/// <param name="path">文件路径的字符串形式。</param>
public FilePath(string path) : this(path, true) { }
internal FilePath(string path, bool trim) {
_value = string.IsNullOrEmpty(path)
? string.Empty
: trim ? path.Trim() : path;
}
/// <summary>返回当前路径的目录部分。如目录为相对路径,则先转换为以当前程序所在目录路径为基准的绝对路径。</summary>
/// <returns>当前路径的目录部分。</returns>
public FilePath Directory {
get {
const int None = 0, EndWithSep = 1, EndWithLetter = 2;
var p = AppRoot.Combine(_value)._value;
int s = None;
for (int i = p.Length - 1; i >= 0; i--) {
var c = p[i];
bool d = IsDirectorySeparator(c);
switch (s) {
case None:
if (d) {
s = EndWithSep;
}
else if (Char.IsWhiteSpace(c) == false) {
s = EndWithLetter;
}
continue;
case EndWithSep:
if (d) {
continue;
}
else if (c == Path.VolumeSeparatorChar) {
return Empty;
}
else {
return p.Substring(0, i + 1);
}
case EndWithLetter:
if (d) {
return p.Substring(0, (i == 2 && p[1] == Path.VolumeSeparatorChar || i == 0) ? i + 1 : i);
}
else if (c == Path.VolumeSeparatorChar) {
return p.Substring(0, i + 1) + Path.DirectorySeparatorChar;
}
break;
}
}
return Empty;
}
}
/// <summary>返回当前路径是否以目录分隔符结束。</summary>
public bool EndsWithPathSeparator {
get {
if (String.IsNullOrEmpty(_value)) {
return false;
}
for (int i = _value.Length - 1; i >= 0; i--) {
var c = _value[i];
if (Char.IsWhiteSpace(c)) {
continue;
}
return IsDirectorySeparator(c);
}
return false;
}
}
/// <summary>检查当前路径对应的文件是否存在。</summary>
public bool ExistsFile => File.Exists(ToFullPath()._value);
/// <summary>检查当前路径对应的目录是否存在。</summary>
public bool ExistsDirectory => SysDirectory.Exists(ToFullPath()._value);
/// <summary>获取文件路径的文件名部分。</summary>
public string FileName {
get {
if (IsEmpty) {
return string.Empty;
}
char c;
for (int i = _value.Length - 1; i >= 0; i--) {
c = _value[i];
if (IsDirectorySeparator(c) || c == Path.VolumeSeparatorChar) {
return _value.Substring(++i);
}
}
return _value;
}
}
/// <summary>获取文件路径的文件名(不包含扩展名)部分。</summary>
public string FileNameWithoutExtension {
get {
if (IsEmpty) {
return string.Empty;
}
char c;
var l = _value.Length;
var d = l;
for (int i = d - 1; i >= 0; i--) {
c = _value[i];
if (c == '.') {
if (d == l) {
d = i;
}
}
else if (IsDirectorySeparator(c) || c == Path.VolumeSeparatorChar) {
return d != l ? _value.Substring(++i, d - i) : _value.Substring(++i);
}
}
return d != l ? _value.Substring(0, d) : _value;
}
}
/// <summary>获取文件路径的文件扩展名部分。</summary>
public string FileExtension {
get {
if (IsEmpty) {
return string.Empty;
}
char c;
int i;
for (i = _value.Length - 1; i >= 0; i--) {
c = _value[i];
if (IsDirectorySeparator(c)) {
i = -1;
break;
}
if (c == '.') {
break;
}
}
return i > -1 && i < _value.Length - 1 ? _value.Substring(i) : string.Empty;
}
}
/// <summary>返回当前路径是否为空。</summary>
public bool IsEmpty => String.IsNullOrEmpty(_value);
/// <summary>返回当前文件路径是否有效。</summary>
public bool IsValidPath => _value?.Trim().Length > 0 && _value.IndexOfAny(InvalidPathChars) == -1;
/// <summary>在路径后附加 <see cref="Path.DirectorySeparatorChar"/> 字符。</summary>
/// <returns>附加了“\”字符的路径。</returns>
public FilePath AppendPathSeparator() {
return IsEmpty == false && _value[_value.Length - 1] == Path.DirectorySeparatorChar
? this
: (FilePath)(_value + Path.DirectorySeparatorChar);
}
/// <summary>删除路径尾部的 <see cref="Path.DirectorySeparatorChar"/> 或 <see cref="Path.AltDirectorySeparatorChar"/> 字符。</summary>
/// <returns>删除了尾部“\”字符的路径。</returns>
public FilePath TrimPathSeparator() {
if (_value == null) {
return Empty;
}
string p = _value;
int i;
for (i = p.Length - 1; i >= 0; i--) {
char c = p[i];
if (!Char.IsWhiteSpace(c) && IsDirectorySeparator(c) == false) {
return _value.Substring(0, i + 1);
}
}
return Empty;
}
/// <summary>替换文件路径的扩展名为新的扩展名。</summary>
/// <param name="extension">新的扩展名。</param>
/// <returns>替换扩展名后的路径。</returns>
public FilePath ChangeExtension(string extension) {
if (IsEmpty) {
return Empty;
}
if (extension == null || (extension = extension.TrimEnd()).Length == 0) {
extension = String.Empty;
}
else if (extension[0] != '.') {
extension = "." + extension;
}
int i;
char c;
for (i = _value.Length - 1; i >= 0; i--) {
c = _value[i];
if (IsDirectorySeparator(c)) {
i = -1;
break;
}
if (c == '.') {
break;
}
}
return new FilePath(i >= 0 ? _value.Substring(0, i) + extension : _value + extension, false);
}
/// <inheritdoc cref="Combine(FilePath, bool)"/>
public FilePath Combine(FilePath path) {
return Combine(path, false);
}
/// <summary>合并两个文件路径。如 <paramref name="path"/> 为绝对路径,则返回该路径。</summary>
/// <param name="path">子路径。</param>
/// <param name="rootAsRelative">对于 <paramref name="path"/> 以 <see cref="Path.DirectorySeparatorChar"/> 开头的情况,取值为 <see langword="true"/> 时,视为以当前目录为基础目录;否则将 <paramref name="path"/> 视为从根目录开始,返回 <paramref name="path"/>。</param>
/// <returns>合并后的路径。</returns>
public FilePath Combine(FilePath path, bool rootAsRelative) {
if (path.IsEmpty) {
return _value != null ? this : Empty;
}
if (IsEmpty) {
return path._value != null ? path : Empty;
}
var p2 = path._value;
var ps = p2[0];
bool p2r;
if ((p2r = IsDirectorySeparator(ps)) && rootAsRelative == false // note 不能调转 && 参数的顺序,p2r 在后面有用
|| p2.Length > 1 && (p2[1] == Path.VolumeSeparatorChar || ps == Path.DirectorySeparatorChar && p2[1] == ps)) {
return path;
}
var p1 = _value/*.TrimEnd()*/; // _value 已在创建时 Trim 过,不需再 Trim
if (ps == '.') {
if (p2.Length == 1) {
return p1;
}
if (p2.IndexOfAny(__PathSeparators, 1) < 0) {
return p1 + p2; // 合并扩展名
}
}
return IsDirectorySeparator(p1[p1.Length - 1]) == false && p2r == false
? new FilePath(p1 + Path.DirectorySeparatorChar + p2)
: new FilePath(p1 + p2, false);
}
/// <summary>为当前文件路径创建目录。如文件路径为空,则不创建路径。</summary>
/// <returns>所创建目录的路径。</returns>
public FilePath CreateDirectory() {
if (IsEmpty) {
return Empty;
}
var p = ToFullPath();
if (SysDirectory.Exists(p) == false) {
SysDirectory.CreateDirectory(p);
}
return p;
}
/// <summary>为当前文件路径创建其所属的目录。如文件路径为空,则不创建路径。</summary>
/// <returns>所创建目录的路径。</returns>
public FilePath CreateContainingDirectory() {
if (IsEmpty) {
return Empty;
}
var f = Directory;
if (SysDirectory.Exists(f._value) == false) {
SysDirectory.CreateDirectory(f._value);
}
return f;
}
/// <summary>删除当前文件路径对应的文件。</summary>
public void DeleteFile() {
var p = ToFullPath()._value;
File.Delete(p);
}
/// <summary>删除当前文件路径对应的目录。如路径指向的目录不存在,不执行任何操作。</summary>
/// <param name="recursive">是否递归删除子目录的文件</param>
public void DeleteDirectory(bool recursive) {
var p = ToFullPath()._value;
SysDirectory.Delete(p, recursive);
}
/// <summary>返回附加指定扩展名的实例。如当前路径已包含指定的扩展名,则返回当前路径,否则返回附加扩展名的实例。</summary>
/// <param name="extension">需要附加的文件扩展名。</param>
/// <returns>附加指定扩展名的实例。</returns>
public FilePath EnsureExtension(string extension) {
return HasExtension(extension) ? this : new FilePath(_value + extension);
}
/// <summary>创建以应用程序所在目录为基准的路径。</summary>
/// <param name="path">相对路径。</param>
/// <returns>返回以应用程序所在目录为基准的路径。</returns>
public static FilePath FromRoot(string path) {
return AppRoot.Combine(path);
}
/// <summary>返回与文件关联的版本说明信息。</summary>
/// <returns>文件 <see cref="FileVersionInfo"/> 对应的 <see cref="FileVersionInfo.FileDescription"/></returns>
public string GetDescription() {
return FileVersionInfo.GetVersionInfo(ToFullPath()).FileDescription;
}
/// <summary>获取当前 <see cref="FilePath"/> 下符合匹配模式的文件。在执行匹配前,先将当前实例转换为完整路径。当前用户无权访问的目录将被忽略。</summary>
/// <param name="pattern">匹配文件用的模式。模式中的“\”用于分隔目录,“**”表示当前目录及其包含的所有目录,“*”匹配 0 到多个字符,“?”匹配 1 个字符。模式为空时,返回所有文件。</param>
/// <returns>返回匹配模式的所有文件。</returns>
public FilePath[] GetFiles(string pattern) {
return GetFiles(pattern, null);
}
/// <summary>获取当前 <see cref="FilePath"/> 下符合匹配模式的目录。在执行匹配前,先将当前实例转换为完整路径。当前用户无权访问的目录将被忽略。</summary>
/// <param name="pattern">匹配目录用的模式。模式中的“\”用于分隔目录,“**”表示当前目录及其包含的所有目录,“*”匹配 0 到多个字符,“?”匹配 1 个字符。模式为空时,返回所有一级子目录。</param>
/// <returns>返回匹配模式的所有目录。</returns>
public FilePath[] GetDirectories(string pattern) {
return GetDirectories(pattern, null);
}
/// <summary>获取当前 <see cref="FilePath"/> 下符合匹配模式和筛选条件的文件。在执行匹配前,先将当前实例转换为完整路径。当前用户无权访问的目录将被忽略。</summary>
/// <param name="pattern">匹配文件用的模式。模式中的“\”用于分隔目录,“**”表示当前目录及其包含的所有目录,“*”匹配 0 到多个字符,“?”匹配 1 个字符。</param>
/// <param name="filter">用于筛选文件名的委托。</param>
/// <returns>返回匹配模式的所有文件。</returns>
public FilePath[] GetFiles(string pattern, Predicate<string> filter) {
var f = ToFullPath();
if (String.IsNullOrEmpty(pattern)) {
return SysDirectory.Exists(f._value)
? GetFiles(f._value, Wildcard, filter)
: new FilePath[0];
}
string fp;
bool rp = pattern == RecursiveWildcard;
var p = new FilePath(pattern).GetParts(false);
var pl = p.Length;
var t = GetDirectories(f._value, p, rp ? 1 : pl - 1);
if (rp) {
fp = Wildcard;
}
else {
if (t.Count == 0) {
return new FilePath[0];
}
fp = p[pl - 1];
}
var r = new List<FilePath>();
foreach (var item in t) {
try {
r.AddRange(GetFiles(item, fp, filter));
}
catch (UnauthorizedAccessException) {
// continue;
}
}
return r.ToArray();
}
static FilePath[] GetFiles(string directory, string filePattern, Predicate<string> filter) {
return SysDirectory.Exists(directory) ? Array.ConvertAll(
filter != null ? Array.FindAll(SysDirectory.GetFiles(directory, filePattern), filter) : SysDirectory.GetFiles(directory, filePattern)
, i => (FilePath)i)
: new FilePath[0];
}
/// <summary>获取当前 <see cref="FilePath"/> 下符合匹配模式和筛选条件的目录。在执行匹配前,先将当前实例转换为完整路径。当前用户无权访问的目录将被忽略。</summary>
/// <param name="pattern">匹配目录用的模式。模式中的“\”用于分隔目录,“**”表示当前目录及其包含的所有目录,“*”匹配 0 到多个字符,“?”匹配 1 个字符。</param>
/// <param name="filter">用于筛选目录名的委托。</param>
/// <returns>返回匹配模式的所有目录。</returns>
public FilePath[] GetDirectories(string pattern, Predicate<string> filter) {
var f = ToFullPath();
if (String.IsNullOrEmpty(pattern)) {
return SysDirectory.Exists(f._value)
? GetDirectories(f._value, Wildcard, filter)
: new FilePath[0];
}
string fp;
bool rp = pattern == RecursiveWildcard;
var p = new FilePath(pattern).GetParts(false);
var pl = p.Length;
var t = GetDirectories(f._value, p, rp ? 1 : pl - 1);
if (rp) {
fp = Wildcard;
}
else {
if (t.Count == 0) {
return new FilePath[0];
}
fp = p[p.Length - 1];
}
var r = new List<FilePath>();
foreach (var item in t) {
try {
r.AddRange(GetDirectories(item, fp, filter));
}
catch (UnauthorizedAccessException) {
// continue;
}
}
return r.ToArray();
}
static FilePath[] GetDirectories(string directory, string filePattern, Predicate<string> filter) {
return SysDirectory.Exists(directory)
? Array.ConvertAll(filter != null ? Array.FindAll(SysDirectory.GetDirectories(directory, filePattern), filter) : SysDirectory.GetDirectories(directory, filePattern), i => (FilePath)i)
: new FilePath[0];
}
static NameList GetDirectories(string path, string[] parts, int partCount) {
NameList r;
var t = new NameList(1) { path };
for (int i = 0; i < partCount; i++) {
r = new NameList(10);
var pi = parts[i];
if (pi.Length == 0) {
t = new NameList(1) { Path.GetPathRoot(path) };
continue;
}
else if (pi == "..") {
foreach (var item in t) {
var n = IsDirectorySeparator(item[item.Length - 1])
? Path.GetDirectoryName(item.Substring(0, item.Length - 1))
: Path.GetDirectoryName(item);
if (n != null && r.Contains(n) == false) {
r.Add(n);
}
}
}
else if (pi == RecursiveWildcard) {
foreach (var item in t) {
r.Add(item);
GetDirectoriesRecursively(item, ref r);
}
}
else {
foreach (var item in t) {
try {
r.AddRange(SysDirectory.GetDirectories(item, pi));
}
catch (UnauthorizedAccessException) {
continue;
}
}
}
t = r;
}
return t;
}
static void GetDirectoriesRecursively(string directoryPath, ref NameList results) {
try {
var r = SysDirectory.GetDirectories(directoryPath, "*");
results.AddRange(r);
foreach (var item in r) {
GetDirectoriesRecursively(item, ref results);
}
}
catch (UnauthorizedAccessException) {
return;
}
}
/// <summary>将路径按目录拆分为多个部分,并删除其中的无效部分。</summary>
/// <returns>目录的各个部分。</returns>
public string[] GetParts() {
return GetParts(true);
}
/// <summary>将路径按目录拆分为多个部分。</summary>
/// <param name="removeInvalidParts">是否删除无效的部分。</param>
/// <returns>目录的各个部分。</returns>
public string[] GetParts(bool removeInvalidParts) {
if (IsEmpty) {
return new string[0];
}
var p = _value.Split(__PathSeparators);
string s;
var r = false;
var v = 0;
for (int i = 0; i < p.Length; i++) {
s = p[i].Trim();
if (s.Length == 0) {
// 保留第一个根目录引用
if (i == 0) {
r = true;
++v;
}
else if (i == 1 && r) {
++v;
}
continue;
}
if (s.Length == 1 && s[0] == '.') {
continue;
}
if (s == ".." || (s.StartsWith("..", StringComparison.Ordinal) && s.TrimEnd('.').Length == 0)) {
// 前一级为根目录
if (r && v == 1) {
// 删除根目录级的目录部分
if (p[0].Length > 2) {
p[0] = p[0].Substring(0, 2);
}
continue;
}
// 保留0级或上一级为“..”的目录符
if (v == 0 || p[v - 1] == "..") {
s = "..";
p[v] = s;
++v;
continue;
}
// 删除前一级
--v;
continue;
}
s = s.TrimEnd('.');
if (removeInvalidParts) {
if (i == 0) {
if (s.Length > 1) {
// 根目录
if (s[1] == Path.VolumeSeparatorChar) {
if (Array.IndexOf(InvalidFileNameChars, s[0]) != -1
|| s.IndexOfAny(InvalidFileNameChars, 2) != -1) {
continue;
}
r = true;
}
else if (s.IndexOfAny(InvalidFileNameChars) != -1) {
continue;
}
}
}
else if (s.IndexOfAny(InvalidFileNameChars) != -1) {
continue;
}
}
p[v] = s;
++v;
}
if (v < 1) {
return new string[0];
}
if (v < p.Length) {
Array.Resize(ref p, v);
}
return p;
}
/// <summary>
/// <para>
/// 以当前路径的绝对路径为基准,返回 <paramref name="path"/> 相对于当前路径的相对路径。 如果 <paramref name="path"/>
/// 与当前路径盘符不一致,返回 <paramref name="path"/>。 在计算相对路径前,将把当前路径和 <paramref name="path"/> 使用 <see
/// cref="ToFullPath"/> 方法转换为绝对路径。
/// </para>
/// <note type="note">如当前路径为目录,但不以 <see cref="Path.DirectorySeparatorChar"/> 结束,应先调用 <see
/// cref="AppendPathSeparator"/> 方法将目录结束符附加到路径末尾。</note>
/// </summary>
/// <param name="path">要计算相对路径的路径。</param>
/// <returns><paramref name="path"/> 对于当前路径的相对路径。</returns>
public FilePath GetRelativePath(FilePath path) {
var p1 = ToFullPath()._value;
var p2 = path.ToFullPath()._value;
var p = -1;
var i = 0;
var l1 = p1.Length;
var l2 = p2.Length;
while (i < l1 && i < l2) {
var c1 = p1[i];
var c2 = p2[i];
if (c1 != c2 && Char.ToLowerInvariant(c1) != char.ToLowerInvariant(c2)) {
break;
}
if (c1 == Path.DirectorySeparatorChar) {
p = i;
}
i++;
}
if (i == 0) {
return p2;
}
if (i == l1 && i == l2) {
return string.Empty;
}
var sb = new StringBuilder(32);
while (i < l1) {
if (p1[i] == Path.DirectorySeparatorChar) {
sb.Append("..").Append(Path.DirectorySeparatorChar);
}
i++;
}
if (sb.Length == 0 && l2 - 1 == p) {
return __CurrentPath;
}
sb.Append(p2, p + 1, l2 - p - 1);
return sb.ToString();
}
/// <summary>检查当前路径是否以指定的扩展名结束(不区分大小写)。</summary>
/// <param name="extension">文件扩展名。</param>
public bool HasExtension(string extension) {
return String.IsNullOrEmpty(extension)
|| (IsEmpty == false && _value.EndsWith(extension, StringComparison.OrdinalIgnoreCase)
&& (extension[0] == '.' || _value.Length > extension.Length && _value[_value.Length - extension.Length - 1] == '.')
);
}
/// <summary>返回文件名是否以指定的任意一个扩展名结尾(不区分大小写)。</summary>
/// <param name="extensions">扩展名列表。</param>
public bool HasExtension(params string[] extensions) {
var ext = FileExtension;
if (extensions == null || extensions.Length == 0) {
return true;
}
if (ext.Length == 0) {
return false;
}
foreach (var item in extensions) {
if (string.IsNullOrEmpty(item)) {
continue;
}
if (ext.EndsWith(item, StringComparison.OrdinalIgnoreCase)
&& (item[0] == '.' || ext.Length > item.Length && ext[ext.Length - item.Length - 1] == '.')) {
return true;
}
}
return false;
}
/// <summary>检查当前路径是否属于指定的路径(子目录或其下文件)。</summary>
/// <param name="containingPath">上级目录。</param>
/// <param name="rootAsRelative">是否将当前目录以 <see cref="Path.DirectorySeparatorChar"/> 开头的情况视为相对路径。</param>
public bool IsInDirectory(FilePath containingPath, bool rootAsRelative) {
var p = containingPath.ToFullPath()._value;
var v = ToFullPath()._value;
return v.StartsWith(p, StringComparison.OrdinalIgnoreCase)
&& (IsDirectorySeparator(p[p.Length - 1]) || v.Length > p.Length && IsDirectorySeparator(v[p.Length]) && new FilePath(v.Substring(p.Length)).IsSubPath(rootAsRelative));
}
/// <summary>返回指定的字符是否 <see cref="Path.DirectorySeparatorChar"/> 或 <see cref="Path.AltDirectorySeparatorChar"/>。</summary>
/// <param name="ch">要检查的字符。</param>
static bool IsDirectorySeparator(char ch) {
return ch == Path.DirectorySeparatorChar || ch == Path.AltDirectorySeparatorChar;
}
/// <summary>返回当前路径是否为子路径(不会指向当前目录的上级目录)。</summary>
/// <param name="rootAsRelative">是否将目录以 <see cref="Path.DirectorySeparatorChar"/> 开头的情况视为子路径。</param>
public bool IsSubPath(bool rootAsRelative) {
if (String.IsNullOrEmpty(_value)) {
return true;
}
int i, n;
if (IsDirectorySeparator(_value[i = 0])) {
// rooted
if (rootAsRelative) {
if (_value.Length == 1) {
return true;
}
i = 1;
}
else {
return false;
}
}
if (_value.Length >= 2 && (_value[1] == Path.VolumeSeparatorChar || _value == ".." || _value.Contains("..."))) {
// rooted, or starts with "..", or contains "..."
return false;
}
int d = 0;
while ((n = _value.IndexOfAny(__PathSeparators, i)) >= 0) {
var p = _value.Substring(i, n - i).Trim();
if (p.Length == 0 // treat double separators as rooted
|| p == ".." && --d < 0) { // ".." points to parent folder
return false;
}
else if (p.Length != 1 || p[0] != '.') { // ignore "."
++d;
}
i = n + 1;
}
return n != -1
|| _value.Substring(i).TrimStart() != ".."
|| --d >= 0; // not end with ".."
}
static readonly string __DirectorySeparator = Path.DirectorySeparatorChar.ToString();
/// <summary>将文件路径转换为绝对定位路径,并删除目录名称中的空白。同时将 <see cref="Path.AltDirectorySeparatorChar"/> 转换为 <see cref="Path.DirectorySeparatorChar"/>。</summary>
/// <returns>标准的绝对定位路径。</returns>
public FilePath Normalize() {
if (_value.IsNullOrWhiteSpace()) {
return AppRoot;
}
if (_value.Length == 3 && _value[1] == Path.VolumeSeparatorChar && IsDirectorySeparator(_value[2])) {
return this;
}
var p = GetParts();
// fixes "?:\" (where ? is active directory drive letter) becomes active directory
if (EndsWithPathSeparator && p.Length > 0) {
p[p.Length - 1] += Path.DirectorySeparatorChar;
}
return p.Length == 1 && p[0].Length == 3 && p[0][1] == Path.VolumeSeparatorChar
? new FilePath(p[0] + Path.DirectorySeparatorChar)
: new FilePath(Path.GetFullPath(AppRoot.Combine(string.Join(__DirectorySeparator, p))._value));
}
/// <summary>只读打开文件路径对应的文件,允许读写共享。</summary>
public Stream OpenFileReader() {
return new FileStream(ToFullPath()._value, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
}
/// <summary>打开文件路径对应的文件以准备读写,允许读取共享。</summary>
/// <param name="overwrite">指定如文件存在时是否创建新的文件(源文件将被 0 长度的文件覆盖)。</param>
public Stream OpenFileWriter(bool overwrite) {
return new FileStream(ToFullPath()._value, overwrite ? FileMode.Create : FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
}
/// <summary>返回读写文件的 <see cref="Stream"/>。</summary>
/// <inheritdoc cref="OpenFile(FileMode, FileAccess, FileShare, int)"/>
public Stream OpenFile(FileMode mode, FileAccess access, FileShare share) {
return new FileStream(ToFullPath()._value, mode, access, share);
}
/// <summary>返回读写文件的 <see cref="Stream"/>。</summary>
/// <param name="mode">指定文件访问方式。</param>
/// <param name="access">指定文件读写方式。</param>
/// <param name="share">指定文件访问共享方式。</param>
/// <param name="bufferSize">读写缓冲区的尺寸。</param>
public Stream OpenFile(FileMode mode, FileAccess access, FileShare share, int bufferSize) {
return new FileStream(ToFullPath()._value, mode, access, share, bufferSize);
}
/// <summary>创建以指定编码读取文件的 <see cref="StreamReader"/> 实例。</summary>
/// <param name="encoding">用于读取文件的编码。编码为 null 时采用 UTF-8 编码。</param>
/// <returns>读取文件的 <see cref="StreamReader"/> 实例。</returns>
public StreamReader OpenTextReader(Encoding encoding) {
return new StreamReader(ToFullPath()._value, encoding ?? Encoding.UTF8, true);
}
/// <summary>创建以指定编码写入文件的 <see cref="StreamWriter"/> 实例。</summary>
/// <param name="append">是否追加到文件结尾。</param>
/// <param name="encoding">用于写入文件的编码。编码为 null 时采用 UTF-8 编码。</param>
/// <returns>写入文件的 <see cref="StreamWriter"/> 实例。</returns>
public StreamWriter OpenTextWriter(bool append, Encoding encoding) {
var fp = ToFullPath();
fp.CreateContainingDirectory();
return new StreamWriter(fp._value, append, encoding ?? Encoding.UTF8);
}
/// <summary>打开当前路径对应的文件并读取所有内容为字节数组。如文件不存在,返回 0 长度的字节数组。此方法使用 FileStream 读取文件,打开或读取文件过程中可能返回异常。</summary>
/// <returns>文件的字节数组。</returns>
public byte[] ReadAllBytes() { return ReadAllBytes(-1); }
/// <summary>打开当前路径对应的文件并读取所有内容为字节数组。如文件不存在,返回 0 长度的字节数组。此方法使用 FileStream 读取文件,打开或读取文件过程中可能返回异常。</summary>
/// <param name="maxBytes">允许读取的最大字节数。如此值非正整数,则按读取文件的大小读取最多 <see cref="int.MaxValue"/> 个字节。</param>
/// <returns>文件的字节数组。</returns>
public byte[] ReadAllBytes(int maxBytes) {
if (ExistsFile == false) {
return new byte[0];
}
using (var s = new FileStream(ToFullPath()._value, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) {
if (s.CanRead == false) {
return new byte[0];
}
var l = s.Length;
var r = new byte[maxBytes < 1 || maxBytes > l ? l : maxBytes];
s.Read(r, 0, r.Length);
return r;
}
}
/// <summary>打开当前路径对应的文件,并以指定编码逐行读取所有行。如文件不存在,返回 <see cref="String.Empty"/>。</summary>
/// <param name="encoding">用于读取文件的编码。编码为 <see langword="null"/> 时采用 UTF-8 编码。</param>
/// <returns>包含整个文本文件的字符串。</returns>
/// <exception cref="PathTooLongException">指定的路径、文件名或者两者都超出了系统定义的最大长度。例如,在基于 Windows 的平台上,路径必须小于 248 个字符,文件名必须小于 260 个字符。</exception>
/// <exception cref="UnauthorizedAccessException">调用方没有所要求的权限。</exception>
/// <exception cref="System.Security.SecurityException">调用方没有所要求的权限。</exception>
public string ReadTextFile(Encoding encoding) {
return ExistsFile ? File.ReadAllText(ToFullPath()._value, encoding ?? Encoding.UTF8) : String.Empty;
}
/// <summary>打开当前路径对应的文件,并以指定编码逐行读取所有内容为字符串集合。如文件不存在,返回 0 长度的字符串数组。</summary>
/// <param name="encoding">用于读取文件的编码。编码为 <see langword="null"/> 时采用 UTF-8 编码。</param>
/// <returns>文件中每行对应一个字符串所构成的集合。</returns>
public IEnumerable<string> ReadLines(Encoding encoding) {
return ExistsFile == false
? new string[0]
: File.ReadLines(ToFullPath()._value, encoding ?? Encoding.UTF8);
}
/// <summary>将 <paramref name="bytes"/>写入文件。</summary>
/// <param name="append">是否追加到文件结尾。</param>
/// <param name="bytes">需要写入的字节数组。此参数为空时,不写入文件内容。</param>
public void WriteAllBytes(bool append, byte[] bytes) {
if (bytes == null) {
return;
}
var fp = ToFullPath();
fp.CreateContainingDirectory();
using (var s = new FileStream(fp._value, append ? FileMode.Append : FileMode.Create, FileAccess.Write, FileShare.Read)) {
s.Write(bytes, 0, bytes.Length);
}
}
/// <summary>将 <paramref name="text"/> 以指定编码写入文件。</summary>
/// <param name="append">是否追加到文件结尾。</param>
/// <param name="encoding">用于写入文件的编码。编码为 <see langword="null"/> 时采用 UTF-8 编码。</param>
/// <param name="text">需要写入的文本。此参数为空时,不写入文件内容。</param>
public void WriteAllText(bool append, Encoding encoding, string text) {
if (text == null) {
return;
}
using (var w = OpenTextWriter(append, encoding)) {
w.Write(text);
}
}
/// <summary>将 <paramref name="lines"/> 的每项内容后附加换行,以指定编码写入文件。</summary>
/// <param name="append">是否追加到文件结尾。</param>
/// <param name="encoding">用于写入文件的编码。编码为 <see langword="null"/> 时采用 UTF-8 编码。</param>
/// <param name="lines">需要写入的文本。此参数为 <see langword="null"/> 时,不写入文件内容。此参数的项为 <see langword="null"/> 时,写入对应的空行。</param>
public void WriteAllLines(bool append, Encoding encoding, IEnumerable<string> lines) {
if (lines == null) {
return;
}
using (var w = OpenTextWriter(append, encoding)) {
foreach (var item in lines) {
w.WriteLine(item);
}
}
}
/// <inheritdoc cref="WriteAllLines(bool, Encoding, IEnumerable{string})"/>
public void WriteAllLines(bool append, Encoding encoding, params string[] lines) {
WriteAllLines(append, encoding, (IEnumerable<string>)lines);
}
/// <summary>使用关联的程序打开当前路径对应的文件或目录,返回对应的进程。</summary>
/// <param name="arguments">要传递的额外参数。</param>
/// <returns><see cref="Process"/> 实例。</returns>
public Process StartProcess(string arguments) {
return Process.Start(_value, arguments);
}
/// <summary>使用关联的程序打开当前路径对应的文件或目录,返回对应的进程。</summary>
/// <returns><see cref="Process"/> 实例。</returns>
public Process StartProcess() {
return Process.Start(_value);
}
/// <summary>将路径中的无效字符替换为 <paramref name="substitution"/>。</summary>
/// <param name="substitution">用于替换无效字符的字符。</param>
/// <returns>替换了无效字符的路径。</returns>
public FilePath SubstituteInvalidChars(char substitution) {
if (IsEmpty) {
return Empty;
}
var a = _value.ToCharArray();
var r = false;
for (int i = 0; i < a.Length; i++) {
ref var c = ref a[i];
if (Array.IndexOf(InvalidFileNameChars, c) != -1) {
c = substitution;
r = true;
}
}
if (r) {
return new FilePath(new string(a));
}
return this;
}
/// <summary>将路径转换为绝对定位的路径。路径的基准位置为 <see cref="AppRoot"/>。执行此方法前,必须确保路径中不包含无效字符,否则将抛出异常。</summary>
/// <returns>采用绝对定位路径的实例。</returns>
/// <exception cref="ArgumentException">路径无效。</exception>
public FilePath ToFullPath() {
return Path.GetFullPath(Path.Combine(AppRoot._value, _value));
}
/// <summary>
/// <para>将 <see cref="FilePath"/> 实例转换为完全路径,再隐式转换为 <see cref="FileInfo"/> 实例。路径的基准位置为 <see cref="AppRoot"/>。</para>
/// <note type="note">事实上,<see cref="FilePath"/> 实例可隐式转换为 <see cref="FileInfo"/> 实例。</note>
/// </summary>
/// <returns>将当前路径转换为完全路径后对应的 <see cref="FileInfo"/> 实例。</returns>
[DebuggerStepThrough]
public FileInfo ToFileInfo() {
return this;
}
/// <summary>将 <see cref="FilePath"/> 实例转换为完全路径,再获取其对应的 <see cref="FileVersionInfo"/>。</summary>
/// <returns>与完全路径对应的文件版本信息。</returns>
/// <exception cref="ArgumentException">路径无效。</exception>
/// <exception cref="FileNotFoundException">找不到对应的文件。</exception>
[DebuggerStepThrough]
public FileVersionInfo ToFileVersionInfo() {
return FileVersionInfo.GetVersionInfo(ToFullPath());
}
/// <summary>
/// 将 <see cref="FilePath"/> 实例转换为完全路径,再隐式转换为 <see cref="DirectoryInfo"/> 实例。路径的基准位置为 <see cref="AppRoot"/>。
/// <note type="note">事实上,<see cref="FilePath"/> 实例可隐式转换为 <see cref="DirectoryInfo"/> 实例。</note>
/// </summary>
/// <returns>将当前路径转换为完全路径后对应的 <see cref="DirectoryInfo"/> 实例。</returns>
[DebuggerStepThrough]
public DirectoryInfo ToDirectoryInfo() {
return this;
}
/// <summary>
/// 将 <see cref="FilePath"/> 实例转换为 <see cref="Uri"/> 实例。
/// <note type="note">事实上,<see cref="FilePath"/> 实例可隐式转换为 <see cref="Uri"/> 实例。</note>
/// </summary>
/// <returns>与当前路径对应的 <see cref="Uri"/> 实例。</returns>
[DebuggerStepThrough]
public Uri ToUri() { return this; }
#region 类型映射
/// <summary>将字符串隐式转换为 <see cref="FilePath"/> 实例,删除传入字符串内所有的前导和尾随空白。</summary>
/// <param name="path">需要转换的路径字符串。</param>
/// <returns><see cref="FilePath"/> 实例。</returns>
[DebuggerStepThrough]
public static implicit operator FilePath(string path) {
return new FilePath(path);
}
/// <summary>将 <see cref="FilePath"/> 实例隐式转换为字符串。</summary>
/// <param name="path">需要转换的路径。</param>
/// <returns>以字符串形式表示的实例。</returns>
[DebuggerStepThrough]
public static implicit operator string(FilePath path) {
return path._value;
}
/// <summary>将 <see cref="FileInfo"/> 显式转换为 <see cref="FilePath"/> 实例。</summary>
/// <param name="file">需要转换的路径。</param>
[DebuggerStepThrough]
public static explicit operator FilePath(FileInfo file) {
return file == null ? Empty : new FilePath(file.FullName, false);
}
/// <summary>
/// 将 <see cref="FilePath"/> 实例转换为完全路径,再隐式转换为 <see cref="FileInfo"/> 实例。路径的基准位置为 <see cref="AppRoot"/>。
/// </summary>
/// <param name="path">需要转换的路径。</param>
/// <returns>将当前路径转换为完全路径后对应的 <see cref="FileInfo"/> 实例。</returns>
/// <seealso cref="ToFullPath"/>
[DebuggerStepThrough]
public static implicit operator FileInfo(FilePath path) {
return new FileInfo(path.ToFullPath()._value);
}
/// <summary>将 <see cref="DirectoryInfo"/> 显式转换为 <see cref="FilePath"/> 实例。</summary>
/// <param name="directory">需要转换的路径。</param>
[DebuggerStepThrough]
public static explicit operator FilePath(DirectoryInfo directory) {
return directory == null ? Empty : new FilePath(directory.FullName, false);
}
/// <summary>
/// 将 <see cref="FilePath"/> 实例转换为完全路径,再隐式转换为 <see cref="DirectoryInfo"/> 实例。路径的基准位置为 <see cref="AppRoot"/>。
/// </summary>
/// <param name="path">需要转换的路径。</param>
/// <returns>将当前路径转换为完全路径后对应的 <see cref="DirectoryInfo"/> 实例。</returns>
/// <seealso cref="ToFullPath"/>
[DebuggerStepThrough]
public static implicit operator DirectoryInfo(FilePath path) {
return new DirectoryInfo(path.ToFullPath()._value);
}
/// <summary>将 <see cref="FilePath"/> 实例隐式转换为 <see cref="Uri"/> 实例。</summary>
/// <param name="path">需要转换的路径。</param>
[DebuggerStepThrough]
public static implicit operator Uri(FilePath path) {
return new Uri(path._value);
}
#endregion
#region IEquatable<FilePath> 实现
/// <summary>比较两个文件路径是否相同。</summary>
/// <param name="path1">需要比较的第一个路径。</param>
/// <param name="path2">需要比较的第二个路径。</param>
/// <returns>相同时,返回 true。</returns>
[DebuggerStepThrough]
public static bool operator ==(FilePath path1, FilePath path2) {
return path1.Equals(path2);
}
/// <summary>比较两个文件路径是否不相同。</summary>
/// <param name="path1">需要比较的第一个路径。</param>
/// <param name="path2">需要比较的第二个路径。</param>
/// <returns>不相同时,返回 true。</returns>
[DebuggerStepThrough]
public static bool operator !=(FilePath path1, FilePath path2) {
return !path1.Equals(path2);
}
/// <summary>指示当前文件路径是否等于同一类型的另一个文件路径。</summary>
/// <param name="other">与此对象进行比较的对象。</param>
/// <returns>如果当前对象等于 <paramref name="other"/> 参数,则为 <see langword="true"/>;否则为 <see langword="false"/>。</returns>
public bool Equals(FilePath other) {
return __PathComparer(_value, other._value)
|| __PathComparer(
Path.Combine(AppRoot._value, _value ?? string.Empty),
Path.Combine(AppRoot._value, other._value ?? string.Empty));
}
/// <summary>确定当前文件路径是否与另一个实例相等。</summary>
/// <param name="obj">需要与当前实例比较的对象。</param>
/// <returns>在两个文件路径相等时,返回 true。</returns>
[DebuggerStepThrough]
public override bool Equals(object obj) {
return obj is FilePath && Equals((FilePath)obj);
}
/// <summary>返回路径字符串的散列值。</summary>
/// <returns>路径字符串的散列值。</returns>
[DebuggerStepThrough]
public override int GetHashCode() {
return _value == null ? 0 : _value.GetHashCode();
}
#endregion
/// <summary>返回表示当前文件路径的 <see cref="string"/> 实例。</summary>
/// <returns>表示当前文件路径的 <see cref="string"/> 实例。</returns>
[DebuggerStepThrough]
public override string ToString() {
return _value ?? string.Empty;
}
}
}
================================================
FILE: App/Common/FontHelper.cs
================================================
using System;
using System.Collections.Generic;
using iTextSharp.text.pdf;
using Microsoft.Win32;
using CharSet = System.Runtime.InteropServices.CharSet;
using DllImport = System.Runtime.InteropServices.DllImportAttribute;
namespace PDFPatcher.Common
{
static class FontHelper
{
public static string FontDirectory { get; } = System.IO.Path.GetFullPath(Environment.GetFolderPath(Environment.SpecialFolder.System) + "\\..\\fonts\\");
/// <summary>
/// 列出已安装的字体及其路径。
/// </summary>
/// <param name="includeFamilyName">是否包含字体组名称</param>
public static Dictionary<string, string> GetInstalledFonts(bool includeFamilyName) {
var d = new Dictionary<string, string>(50);
using (var k = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts")) {
GetFontsFromRegistryKey(includeFamilyName, d, k);
}
using (var k = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts")) {
GetFontsFromRegistryKey(includeFamilyName, d, k);
}
return d;
}
static void GetFontsFromRegistryKey(bool includeFamilyName, Dictionary<string, string> d, RegistryKey k) {
if (k is null) {
return;
}
foreach (var name in k.GetValueNames()) {
if (name is null) {
continue;
}
var p = k.GetValue(name) as string;
if (String.IsNullOrEmpty(p)) {
continue;
}
if (p.IndexOf('\\') == -1) {
p = FontDirectory + p;
}
var fp = new FilePath(p);
try {
if (fp.HasExtension(Constants.FileExtensions.Ttf)
|| fp.HasExtension(Constants.FileExtensions.Otf)) {
AddFontNames(d, p, includeFamilyName);
}
else if (fp.HasExtension(Constants.FileExtensions.Ttc)) {
var nl = BaseFont.EnumerateTTCNames(p).Length;
for (int i = 0; i < nl; i++) {
AddFontNames(d, p + "," + i.ToText(), includeFamilyName);
}
}
}
catch (System.IO.IOException) {
// ignore
}
catch (NullReferenceException) {
}
catch (iTextSharp.text.DocumentException) {
// ignore
}
}
}
static void AddFontNames(Dictionary<string, string> fontNames, string fontPath, bool includeFamilyName) {
var nl = BaseFont.GetAllFontNames(fontPath, "Cp936", null);
if (includeFamilyName) {
AddFontName(fontNames, nl[0] as string, fontPath);
}
var ffn = nl[2] as string[][];
string n = null;
string nn = null, cn = null;
foreach (var fn in ffn) {
var enc = fn[2];
n = fn[3];
if ("2052" == enc) {
cn = n;
break;
}
if ("1033" == enc) {
nn = n;
}
else if ("0" == enc && nn == null) {
nn = n;
}
}
if (n != null) {
AddFontName(fontNames, cn ?? nn ?? n, fontPath);
}
}
static void AddFontName(Dictionary<string, string> fontNames, string name, string path) {
if (!String.IsNullOrEmpty(name)) {
fontNames[name] = path;
}
}
static class NativeMethods
{
[DllImport("Gdi32.dll", CharSet = CharSet.Unicode)]
private static extern int AddFontResourceEx(string fontPath, int flag, IntPtr preserved);
[DllImport("Gdi32.dll", CharSet = CharSet.Unicode)]
private static extern int RemoveFontResourceEx(string fontPath, int flag, IntPtr preserved);
internal static int LoadFont(string path) {
return AddFontResourceEx(path, 0x10, IntPtr.Zero);
}
internal static int RemoveFont(string path) {
return RemoveFontResourceEx(path, 0x10, IntPtr.Zero);
}
}
}
}
================================================
FILE: App/Common/FontUtility.cs
================================================
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace PDFPatcher.Common
{
static class FontUtility
{
static readonly Regex _italic = new Regex(" (?:Italic|Oblique)$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
static readonly Regex _bold = new Regex(" Bold$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
static readonly Regex _boldItalic = new Regex(" Bold (?:Italic|Oblique)$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
static FriendlyFontName[] _Fonts;
public static FriendlyFontName[] InstalledFonts {
get {
if (_Fonts == null) {
ListInstalledFonts();
}
return _Fonts;
}
}
static void ListInstalledFonts() {
var uf = new List<FriendlyFontName>(); // 可能包含中文的字体
var of = new List<FriendlyFontName>(); // 其他字体
var fs = FontHelper.GetInstalledFonts(false);
string dn /*显示名称*/, fn /*字体名称*/;
foreach (var item in fs.Keys) {
fn = item;
dn = _boldItalic.Replace(fn, "(粗斜体)");
dn = _italic.Replace(dn, "(斜体)");
dn = _bold.Replace(dn, "(粗体)");
if (dn[0] > 0xFF) {
uf.Add(new FriendlyFontName(fn, dn));
}
else {
of.Add(new FriendlyFontName(fn, dn));
}
}
uf.Sort();
of.Sort();
_Fonts = new FriendlyFontName[uf.Count + of.Count];
uf.CopyTo(_Fonts);
of.CopyTo(_Fonts, uf.Count);
}
internal struct FriendlyFontName : IComparable<FriendlyFontName>
{
public string OriginalName;
public string DisplayName;
public FriendlyFontName(string originalName, string displayName) {
OriginalName = originalName;
DisplayName = displayName != originalName ? displayName : null;
}
public override string ToString() {
return DisplayName ?? OriginalName;
}
#region IComparable<FriendlyFontName> 成员
int IComparable<FriendlyFontName>.CompareTo(FriendlyFontName other) {
return OriginalName.CompareTo(other.OriginalName);
}
#endregion
}
}
}
================================================
FILE: App/Common/FormHelper.cs
================================================
using System;
using System.Drawing;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace PDFPatcher.Common
{
static class FormHelper
{
public const int ProcMsg = NativeMethods.WM_COPYDATA;
public static bool IsCtrlKeyDown => (Control.ModifierKeys & Keys.Control) != 0;
public static bool IsShiftKeyDown => (Control.ModifierKeys & Keys.Shift) != 0;
public static bool IsAltKeyDown => (Control.ModifierKeys & Keys.Alt) != 0;
public static bool IsEmptyOrTransparent(this Color color) {
return color.IsEmpty || color.A == 0;
}
public static Point Round(this PointF point) {
return new Point(point.X.ToInt32(), point.Y.ToInt32());
}
public static RectangleF Union(this RectangleF rectangle, RectangleF other) {
return RectangleF.FromLTRB(
rectangle.Left < other.Left ? rectangle.Left : other.Left,
rectangle.Top < other.Top ? rectangle.Top : other.Top,
rectangle.Right > other.Right ? rectangle.Right : other.Right,
rectangle.Bottom > other.Bottom ? rectangle.Bottom : other.Bottom
);
}
public static Point Transpose(this Point point, int x, int y) {
return new Point(point.X + x, point.Y + y);
}
public static Point Transpose(this Point point, Point transpose) {
return new Point(point.X + transpose.X, point.Y + transpose.Y);
}
public static Size Scale(this Size size, float scale) {
return new Size((int)(size.Width * scale), (int)(size.Height * scale));
}
public static void OnFirstLoad(this Form form, Action handler) {
new FormEventHandler(form, handler);
}
public static void SetIcon(this Form form, Bitmap bitmap) {
form.Icon = Icon.FromHandle(bitmap.GetHicon());
}
public static void OnFirstLoad(this UserControl control, Action handler) {
new UserControlLoadHandler(control, handler);
}
public static ProgressBar SetValue(this ProgressBar control, int value) {
control.Value = value < control.Minimum ? control.Minimum
: value > control.Maximum ? control.Maximum
: value;
return control;
}
public static NumericUpDown SetValue(this NumericUpDown box, int value) {
return box.SetValue((decimal)value);
}
public static NumericUpDown SetValue(this NumericUpDown box, float value) {
return box.SetValue((decimal)value);
}
public static NumericUpDown SetValue(this NumericUpDown box, double value) {
return box.SetValue((decimal)value);
}
public static NumericUpDown SetValue(this NumericUpDown box, decimal value) {
box.Value =
value >= box.Minimum && value <= box.Maximum ? value
: value > box.Maximum ? box.Maximum
: box.Minimum;
return box;
}
public static ListBox Select(this ListBox control, string item) {
if (control.Items.Count == 0) {
return control;
}
var i = control.FindString(item);
if (i != -1) {
control.SelectedIndex = i;
}
return control;
}
public static ComboBox Select(this ComboBox control, string item) {
if (control.Items.Count == 0) {
return control;
}
var i = control.FindString(item);
if (i != -1) {
control.SelectedIndex = i;
}
return control;
}
public static ListBox Select(this ListBox control, int index) {
var items = control.Items;
if (items.Count == 0) {
return control;
}
control.SelectedIndex = index < 0 ? 0
: index > items.Count - 1 ? items.Count - 1
: index;
return control;
}
public static ComboBox Select(this ComboBox control, int index) {
var items = control.Items;
if (items.Count == 0) {
return control;
}
control.SelectedIndex = index < 0 ? 0
: index > items.Count - 1 ? items.Count - 1
: index;
return control;
}
public static ComboBox AddRange(this ComboBox view, params object[] values) {
view.Items.AddRange(values);
return view;
}
public static TTextBox AppendLine<TTextBox>(this TTextBox box) where TTextBox : TextBoxBase {
box.AppendText(Environment.NewLine);
return box;
}
public static TTextBox AppendLine<TTextBox>(this TTextBox box, string text) where TTextBox : TextBoxBase {
box.AppendText(text + Environment.NewLine);
return box;
}
public static void SetLocation(this FileDialog dialog, string path) {
if (FileHelper.IsPathValid(path) == false) {
return;
}
dialog.InitialDirectory = System.IO.Path.GetDirectoryName(path);
dialog.FileName = System.IO.Path.GetFileName(path);
}
public static ToolStrip ToggleEnabled(this ToolStrip toolStrip, bool enabled, params string[] names) {
foreach (ToolStripItem item in toolStrip.Items) {
if (Array.IndexOf(names, item.Name) != -1) {
item.Enabled = enabled;
}
}
return toolStrip;
}
public static float GetDpiScale(this Control control) {
using (var g = control.CreateGraphics()) {
return g.DpiX / 96;
}
}
public static void ScaleColumnWidths(this ListView listView, float scale) {
foreach (ColumnHeader column in listView.Columns) {
column.Width = (int)(column.Width * scale);
}
}
public static void ScaleColumnWidths(this ListView listView) {
float scale = GetDpiScale(listView);
foreach (ColumnHeader column in listView.Columns) {
column.Width = (int)(column.Width * scale);
}
}
public static ToolStrip ScaleIcons(this ToolStrip toolStrip, int size) {
size = (int)(toolStrip.GetDpiScale() * size);
return toolStrip.ScaleIcons(new Size(size, size));
}
public static ToolStrip ScaleIcons(this ToolStrip toolStrip, Size size) {
toolStrip.SuspendLayout();
toolStrip.AutoSize = false;
toolStrip.ImageScalingSize = size;
toolStrip.ResumeLayout();
toolStrip.AutoSize = true;
return toolStrip;
}
internal static void InsertLinkedText(this RichTextBoxLinks.RichTextBoxEx textBox, string text) {
const int TokenLength = 2;
int p1 = text.IndexOf("<<");
int p2 = text.IndexOf(">>");
if (p1 != -1 && p2 != -1 && p2 > p1) {
textBox.AppendText(text.Substring(0, p1));
var c = textBox.SelectionColor;
var f = textBox.SelectionFont;
textBox.InsertLink(text.Substring(p1 + TokenLength, p2 - p1 - TokenLength));
if (p2 < text.Length - TokenLength) {
textBox.SelectionColor = c;
textBox.SelectionFont = f;
textBox.AppendText(text.Substring(p2 + TokenLength));
}
}
else {
textBox.AppendText(text);
}
}
public static void FeedbackDragFileOver(this DragEventArgs args, params string[] allowedFileExtension) {
if (args.Data.GetDataPresent(DataFormats.FileDrop)) {
var files = args.Data.GetData(DataFormats.FileDrop) as string[];
if (Array.Exists(files,
f => {
return Array.Exists(allowedFileExtension,
ext => f.EndsWith(ext, StringComparison.InvariantCultureIgnoreCase));
})) {
args.Effect = DragDropEffects.Copy;
}
}
}
public static string[] DropFileOver(this DragEventArgs args, params string[] allowedFileExtension) {
if (args.Data.GetDataPresent(DataFormats.FileDrop)) {
var files = (string[])args.Data.GetData(DataFormats.FileDrop);
return Array.FindAll(files, f => {
return Array.Exists(allowedFileExtension,
ext => f.EndsWith(ext, StringComparison.InvariantCultureIgnoreCase));
});
}
return [];
}
public static bool DropFileOver(this Control control, DragEventArgs args, params string[] allowedFileExtension) {
var files = DropFileOver(args, allowedFileExtension);
if (files.Length > 0) {
control.Text = files[0];
return true;
}
return false;
}
public static void HidePopupMenu(this ToolStripItem item) {
if (item is ToolStripDropDownItem mi && mi.HasDropDownItems) {
return;
}
var oo = item.Owner as ToolStripDropDownMenu;
oo?.Hide();
var oi = item.OwnerItem as ToolStripDropDownItem;
while (oi != null) {
oi.DropDown.Close();
oo = oi.Owner as ToolStripDropDownMenu;
oo?.Hide();
oi = oi.OwnerItem as ToolStripDropDownItem;
}
}
public static void ClearDropDownItems(this ToolStripItemCollection items, int keepItems = 0) {
if (items.Count == 0) {
return;
}
keepItems--;
for (var i = items.Count - 1; i > keepItems; i--) {
items[i].Dispose();
}
}
public static void ToggleVisibility(bool visible, params Control[] controls) {
foreach (var item in controls) {
item.Visible = visible;
}
}
public static DialogResult ShowDialog<TForm>() where TForm : Form, new() {
using (var f = new TForm()) {
return f.ShowDialog();
}
}
public static DialogResult ShowDialog<TForm>(this IWin32Window form) where TForm : Form, new() {
using (var f = new TForm()) {
f.StartPosition = FormStartPosition.CenterParent;
return f.ShowDialog(form);
}
}
public static DialogResult ShowDialog<TForm>(this IWin32Window form, object formParameter)
where TForm : Form, new() {
using (var f = new TForm()) {
f.Tag = formParameter;
return f.ShowDialog(form);
}
}
public static DialogResult ShowDialog<TForm>(this IWin32Window form, Action<TForm> formConfigurator, Action<TForm> formConfirmationHandler) where TForm : Form, new() {
using (var f = new TForm()) {
formConfigurator?.Invoke(f);
var r = f.ShowDialog(form);
if (formConfirmationHandler != null && (r == DialogResult.OK || r == DialogResult.Yes)) {
formConfirmationHandler(f);
}
return r;
}
}
public static DialogResult ShowCommonDialog<TDialog>(this IWin32Window form, Action<TDialog> formConfigurator, Action<TDialog> formConfirmationHandler) where TDialog : CommonDialog, new() {
using (var f = new TDialog()) {
formConfigurator?.Invoke(f);
var r = f.ShowDialog(form);
if (formConfirmationHandler != null && (r == DialogResult.OK || r == DialogResult.Yes)) {
formConfirmationHandler(f);
}
return r;
}
}
internal static void ErrorBox(string text) {
MessageBox.Show(text, Constants.AppName, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public static void ErrorBox(this Control control, string text) {
MessageBox.Show(text, control.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public static void ErrorBox(this Control control, string title, Exception exception) {
var s = new System.Text.StringBuilder(title);
s.AppendLine().AppendLine();
s.AppendLine(exception.Message);
#if DEBUG
s.AppendLine(exception.StackTrace);
#endif
while ((exception = exception.InnerException) != null) {
s.AppendLine();
s.Append(exception.Message);
}
MessageBox.Show(s.ToString(), control.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
}
internal static void InfoBox(string text) {
MessageBox.Show(text, Constants.AppName, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
internal static DialogResult YesNoBox(string text) {
return MessageBox.Show(text, Constants.AppName, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
}
internal static DialogResult YesNoCancelBox(string text) {
return MessageBox.Show(text, Constants.AppName, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
}
public static bool ConfirmOKBox(string text) {
return MessageBox.Show(text, Constants.AppName, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK;
}
public static bool ConfirmOKBox(this Control control, string text) {
return MessageBox.Show(text, control.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK;
}
public static bool ConfirmYesBox(this Control control, string text) {
return MessageBox.Show(text, control.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes;
}
public static int SendCopyDataMessage(this System.Diagnostics.Process process, string text) {
var s = new CopyDataStruct(text);
var r = NativeMethods.SendMessage(process.MainWindowHandle, ProcMsg, 0, ref s);
s.Dispose();
return r;
}
public static string GetCopyDataContent(ref Message message) {
if (message.Msg == ProcMsg) {
return Marshal.PtrToStringUni(((CopyDataStruct)Marshal.PtrToStructure(message.LParam, typeof(CopyDataStruct))).lpData);
}
return null;
}
sealed class FormEventHandler
{
readonly Form _Form;
readonly Action _Handler;
public FormEventHandler(Form form, Action handler) {
_Form = form;
_Handler = handler;
form.Load += OnLoadHandler;
}
public void OnLoadHandler(object s, EventArgs args) {
_Form.Load -= OnLoadHandler;
_Handler();
}
}
sealed class UserControlLoadHandler
{
readonly UserControl _Control;
readonly Action _Handler;
public UserControlLoadHandler(UserControl control, Action handler) {
_Control = control;
_Handler = handler;
control.Load += OnLoadHandler;
}
public void OnLoadHandler(object s, EventArgs args) {
_Control.Load -= OnLoadHandler;
_Handler();
}
}
static class NativeMethods
{
const string User32DLL = "User32.dll";
internal const int WM_COPYDATA = 0x004A;
[DllImport(User32DLL, SetLastError = false, CharSet = CharSet.Unicode)]
public static extern int SendMessage(IntPtr hWnd, int uMsg, int wParam, ref CopyDataStruct lParam);
[DllImport("kernel32.dll", SetLastError = true)]
public static extern IntPtr LocalFree(IntPtr p);
}
struct CopyDataStruct(string text) : IDisposable
{
readonly IntPtr dwData = (IntPtr)1;
readonly int cbData = (text.Length + 1) * 2;
internal IntPtr lpData = Marshal.StringToBSTR(text);
public void Dispose() {
NativeMethods.LocalFree(lpData);
lpData = IntPtr.Zero;
}
}
}
}
================================================
FILE: App/Common/ImageBox/DragHandle.cs
================================================
using System.Drawing;
namespace Cyotek.Windows.Forms.Demo
{
// Cyotek ImageBox
// Copyright (c) 2010-2015 Cyotek Ltd.
// http://cyotek.com
// http://cyotek.com/blog/tag/imagebox
// Licensed under the MIT License. See license.txt for the full text.
// If you use this control in your applications, attribution, donations or contributions are welcome.
internal sealed class DragHandle
{
#region Public Constructors
public DragHandle(DragHandleAnchor anchor)
: this() {
Anchor = anchor;
}
#endregion
#region Protected Constructors
private DragHandle() {
Enabled = true;
Visible = true;
}
#endregion
#region Public Properties
public DragHandleAnchor Anchor { get; set; }
public Rectangle Bounds { get; set; }
public bool Enabled { get; set; }
public bool Visible { get; set; }
#endregion
}
}
================================================
FILE: App/Common/ImageBox/DragHandleAnchor.cs
================================================
namespace Cyotek.Windows.Forms.Demo
{
// Cyotek ImageBox
// Copyright (c) 2010-2015 Cyotek Ltd.
// http://cyotek.com
// http://cyotek.com/blog/tag/imagebox
// Licensed under the MIT License. See license.txt for the full text.
// If you use this control in your applications, attribution, donations or contributions are welcome.
internal enum DragHandleAnchor
{
None,
TopLeft,
TopCenter,
TopRight,
MiddleLeft,
MiddleRight,
BottomLeft,
BottomCenter,
BottomRight
}
}
================================================
FILE: App/Common/ImageBox/DragHandleCollection.cs
================================================
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
namespace Cyotek.Windows.Forms.Demo
{
// Cyotek ImageBox
// Copyright (c) 2010-2015 Cyotek Ltd.
// http://cyotek.com
// http://cyotek.com/blog/tag/imagebox
// Licensed under the MIT License. See license.txt for the full text.
// If you use this control in your applications, attribution, donations or contributions are welcome.
internal sealed class DragHandleCollection : IEnumerable<DragHandle>
{
#region Instance Fields
private readonly IDictionary<DragHandleAnchor, DragHandle> _items;
#endregion
#region Public Constructors
public DragHandleCollection() {
_items = new Dictionary<DragHandleAnchor, DragHandle> {
{ DragHandleAnchor.TopLeft, new DragHandle(DragHandleAnchor.TopLeft) },
{ DragHandleAnchor.TopCenter, new DragHandle(DragHandleAnchor.TopCenter) },
{ DragHandleAnchor.TopRight, new DragHandle(DragHandleAnchor.TopRight) },
{ DragHandleAnchor.MiddleLeft, new DragHandle(DragHandleAnchor.MiddleLeft) },
{ DragHandleAnchor.MiddleRight, new DragHandle(DragHandleAnchor.MiddleRight) },
{ DragHandleAnchor.BottomLeft, new DragHandle(DragHandleAnchor.BottomLeft) },
{ DragHandleAnchor.BottomCenter, new DragHandle(DragHandleAnchor.BottomCenter) },
{ DragHandleAnchor.BottomRight, new DragHandle(DragHandleAnchor.BottomRight) }
};
}
#endregion
#region Public Properties
public int Count => _items.Count;
public DragHandle this[DragHandleAnchor index] => _items[index];
#endregion
#region Public Members
/// <summary>
/// Returns an enumerator that iterates through the collection.
/// </summary>
/// <returns>
/// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
/// </returns>
public IEnumerator<DragHandle> GetEnumerator() {
return _items.Values.GetEnumerator();
}
public DragHandleAnchor HitTest(Point point) {
DragHandleAnchor result;
result = DragHandleAnchor.None;
foreach (DragHandle handle in this) {
if (handle.Visible && handle.Bounds.Contains(point)) {
result = handle.Anchor;
break;
}
}
return result;
}
#endregion
#region IEnumerable<DragHandle> Members
/// <summary>
/// Returns an enumerator that iterates through a collection.
/// </summary>
/// <returns>
/// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
/// </returns>
IEnumerator IEnumerable.GetEnumerator() {
return GetEnumerator();
}
#endregion
}
}
================================================
FILE: App/Common/ImageBox/ImageBoxEx.cs
================================================
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace Cyotek.Windows.Forms.Demo
{
// Cyotek ImageBox
// Copyright (c) 2010-2015 Cyotek Ltd.
// http://cyotek.com
// http://cyotek.com/blog/tag/imagebox
// Licensed under the MIT License. See license.txt for the full text.
// If you use this control in your applications, attribution, donations or contributions are welcome.
internal class ImageBoxEx : ImageBox
{
#region Constants
private readonly DragHandleCollection _dragHandles;
private static readonly object _eventDragHandleSizeChanged = new object();
private static readonly object _eventMaximumSelectionSizeChanged = new object();
private static readonly object _eventMinimumSelectionSizeChanged = new object();
private static readonly object _eventSelectionMoved = new object();
private static readonly object _eventSelectionMoving = new object();
private static readonly object _eventSelectionResized = new object();
private static readonly object _eventSelectionResizing = new object();
#endregion
#region Fields
private int _dragHandleSize;
private Point _dragOrigin;
private Point _dragOriginOffset;
private bool _isMoving;
private bool _isResizing;
private Size _maximumSelectionSize;
private Size _minimumSelectionSize;
private RectangleF _previousSelectionRegion;
private DragHandleAnchor _resizeAnchor;
#endregion
#region Constructors
public ImageBoxEx() {
_dragHandles = new DragHandleCollection();
_dragHandleSize = 8;
_maximumSelectionSize = Size.Empty;
PositionDragHandles();
}
#endregion
#region Events
/// <summary>
/// Occurs when the DragHandleSize property value changes
/// </summary>
[Category("Property Changed")]
public event EventHandler DragHandleSizeChanged {
add { Events.AddHandler(_eventDragHandleSizeChanged, value); }
remove { Events.RemoveHandler(_eventDragHandleSizeChanged, value); }
}
/// <summary>
/// Occurs when the MaximumSelectionSize property value changes
/// </summary>
[Category("Property Changed")]
public event EventHandler MaximumSelectionSizeChanged {
add { Events.AddHandler(_eventMaximumSelectionSizeChanged, value); }
remove { Events.RemoveHandler(_eventMaximumSelectionSizeChanged, value); }
}
/// <summary>
/// Occurs when the MinimumSelectionSize property value changes
/// </summary>
[Category("Property Changed")]
public event EventHandler MinimumSelectionSizeChanged {
add { Events.AddHandler(_eventMinimumSelectionSizeChanged, value); }
remove { Events.RemoveHandler(_eventMinimumSelectionSizeChanged, value); }
}
[Category("Action")]
public event EventHandler SelectionMoved {
add { Events.AddHandler(_eventSelectionMoved, value); }
remove { Events.RemoveHandler(_eventSelectionMoved, value); }
}
[Category("Action")]
public event CancelEventHandler SelectionMoving {
add { Events.AddHandler(_eventSelectionMoving, value); }
remove { Events.RemoveHandler(_eventSelectionMoving, value); }
}
[Category("Action")]
public event EventHandler SelectionResized {
add { Events.AddHandler(_eventSelectionResized, value); }
remove { Events.RemoveHandler(_eventSelectionResized, value); }
}
[Category("Action")]
public event CancelEventHandler SelectionResizing {
add { Events.AddHandler(_eventSelectionResizing, value); }
remove { Events.RemoveHandler(_eventSelectionResizing, value); }
}
#endregion
#region Properties
[Browsable(false)]
public DragHandleCollection DragHandles => _dragHandles;
[Category("Appearance")]
[DefaultValue(8)]
public virtual int DragHandleSize {
get => _dragHandleSize;
set {
if (_dragHandleSize != value) {
_dragHandleSize = value;
OnDragHandleSizeChanged(EventArgs.Empty);
}
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsMoving {
get => _isMoving;
protected set => _isMoving = value;
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public bool IsResizing {
get => _isResizing;
protected set => _isResizing = value;
}
[Category("Behavior")]
[DefaultValue(typeof(Size), "0, 0")]
public virtual Size MaximumSelectionSize {
get => _maximumSelectionSize;
set {
if (MaximumSelectionSize != value) {
_maximumSelectionSize = value;
OnMaximumSelectionSizeChanged(EventArgs.Empty);
}
}
}
[Category("Behavior")]
[DefaultValue(typeof(Size), "0, 0")]
public virtual Size MinimumSelectionSize {
get => _minimumSelectionSize;
set {
if (MinimumSelectionSize != value) {
_minimumSelectionSize = value;
OnMinimumSelectionSizeChanged(EventArgs.Empty);
}
}
}
[Browsable(false)]
public RectangleF PreviousSelectionRegion {
get => _previousSelectionRegion;
protected set => _previousSelectionRegion = value;
}
protected Point DragOrigin {
get => _dragOrigin;
set => _dragOrigin = value;
}
protected Point DragOriginOffset {
get => _dragOriginOffset;
set => _dragOriginOffset = value;
}
protected DragHandleAnchor ResizeAnchor {
get => _resizeAnchor;
set => _resizeAnchor = value;
}
#endregion
#region Methods
public void CancelResize() {
SelectionRegion = _previousSelectionRegion;
CompleteResize();
}
public void StartMove() {
CancelEventArgs e;
if (_isMoving || _isResizing) {
throw new InvalidOperationException("A move or resize action is currently being performed.");
}
e = new CancelEventArgs();
OnSelectionMoving(e);
if (!e.Cancel) {
_previousSelectionRegion = SelectionRegion;
_isMoving = true;
}
}
protected virtual void DrawDragHandle(Graphics graphics, DragHandle handle) {
int left;
int top;
int width;
int height;
Pen outerPen;
Brush innerBrush;
left = handle.Bounds.Left;
top = handle.Bounds.Top;
width = handle.Bounds.Width;
height = handle.Bounds.Height;
if (handle.Enabled) {
outerPen = SystemPens.WindowFrame;
innerBrush = SystemBrushes.Window;
}
else {
outerPen = SystemPens.ControlDark;
innerBrush = SystemBrushes.Control;
}
graphics.FillRectangle(innerBrush, left + 1, top + 1, width - 2, height - 2);
graphics.DrawLine(outerPen, left + 1, top, left + width - 2, top);
graphics.DrawLine(outerPen, left, top + 1, left, top + height - 2);
graphics.DrawLine(outerPen, left + 1, top + height - 1, left + width - 2, top + height - 1);
graphics.DrawLine(outerPen, left + width - 1, top + 1, left + width - 1, top + height - 2);
}
/// <summary>
/// Raises the <see cref="DragHandleSizeChanged" /> event.
/// </summary>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
protected virtual void OnDragHandleSizeChanged(EventArgs e) {
EventHandler handler;
PositionDragHandles();
Invalidate();
handler = (EventHandler)Events[_eventDragHandleSizeChanged];
handler?.Invoke(this, e);
}
/// <summary>
/// Raises the <see cref="MaximumSelectionSizeChanged" /> event.
/// </summary>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
protected virtual void OnMaximumSelectionSizeChanged(EventArgs e) {
EventHandler handler;
handler = (EventHandler)Events[_eventMaximumSelectionSizeChanged];
handler?.Invoke(this, e);
}
/// <summary>
/// Raises the <see cref="MinimumSelectionSizeChanged" /> event.
/// </summary>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
protected virtual void OnMinimumSelectionSizeChanged(EventArgs e) {
EventHandler handler;
handler = (EventHandler)Events[_eventMinimumSelectionSizeChanged];
handler?.Invoke(this, e);
}
/// <summary>
/// Raises the <see cref="System.Windows.Forms.Control.MouseDown" /> event.
/// </summary>
/// <param name="e">
/// A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.
/// </param>
protected override void OnMouseDown(MouseEventArgs e) {
Point imagePoint;
RectangleF selectionRegion;
imagePoint = PointToImage(e.Location);
selectionRegion = SelectionRegion;
if (e.Button == MouseButtons.Left && (selectionRegion.Contains(imagePoint) || HitTest(e.Location) != DragHandleAnchor.None)) {
_dragOrigin = e.Location;
_dragOriginOffset = new Point(imagePoint.X - (int)selectionRegion.X, imagePoint.Y - (int)selectionRegion.Y);
}
else {
_dragOriginOffset = Point.Empty;
_dragOrigin = Point.Empty;
}
base.OnMouseDown(e);
}
/// <summary>
/// Raises the <see cref="System.Windows.Forms.Control.MouseMove" /> event.
/// </summary>
/// <param name="e">
/// A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.
/// </param>
protected override void OnMouseMove(MouseEventArgs e) {
// start either a move or a resize operation
if (!IsSelecting && !_isMoving && !_isResizing && e.Button == MouseButtons.Left && !_dragOrigin.IsEmpty && IsOutsideDragZone(e.Location)) {
DragHandleAnchor anchor;
anchor = HitTest(_dragOrigin);
if (anchor == DragHandleAnchor.None) {
// move
StartMove();
}
else if (_dragHandles[anchor].
Enabled && _dragHandles[anchor].
Visible) {
// resize
StartResize(anchor);
}
}
// set the cursor
SetCursor(e.Location);
// perform operations
ProcessSelectionMove(e.Location);
ProcessSelectionResize(e.Location);
base.OnMouseMove(e);
}
/// <summary>
/// Raises the <see cref="System.Windows.Forms.Control.MouseUp" /> event.
/// </summary>
/// <param name="e">
/// A <see cref="T:System.Windows.Forms.MouseEventArgs" /> that contains the event data.
/// </param>
protected override void OnMouseUp(MouseEventArgs e) {
if (_isMoving) {
CompleteMove();
}
else if (_isResizing) {
CompleteResize();
}
base.OnMouseUp(e);
}
/// <summary>
/// Raises the <see cref="System.Windows.Forms.Control.Paint" /> event.
/// </summary>
/// <param name="e">
/// A <see cref="T:System.Windows.Forms.PaintEventArgs" /> that contains the event data.
/// </param>
protected override void OnPaint(PaintEventArgs e) {
base.OnPaint(e);
if (AllowPainting && !SelectionRegion.IsEmpty) {
foreach (DragHandle handle in _dragHandles) {
if (handle.Visible) {
DrawDragHandle(e.Graphics, handle);
}
}
}
}
/// <summary>
/// Raises the <see cref="ImageBox.PanStart" /> event.
/// </summary>
/// <param name="e">
/// The <see cref="System.ComponentModel.CancelEventArgs" /> instance containing the event data.
/// </param>
protected override void OnPanStart(CancelEventArgs e) {
if (_isMoving || _isResizing || !_dragOrigin.IsEmpty) {
e.Cancel = true;
}
base.OnPanStart(e);
}
/// <summary>
/// Raises the <see cref="System.Windows.Forms.Control.Resize" /> event.
/// </summary>
/// <param name="e">
/// An <see cref="T:System.EventArgs" /> that contains the event data.
/// </param>
protected override void OnResize(EventArgs e) {
base.OnResize(e);
PositionDragHandles();
}
/// <summary>
/// Raises the <see cref="System.Windows.Forms.ScrollableControl.Scroll" /> event.
/// </summary>
/// <param name="se">
/// A <see cref="T:System.Windows.Forms.ScrollEventArgs" /> that contains the event data.
/// </param>
protected override void OnScroll(ScrollEventArgs se) {
base.OnScroll(se);
PositionDragHandles();
}
/// <summary>
/// Raises the <see cref="ImageBox.Selecting" /> event.
/// </summary>
/// <param name="e">
/// The <see cref="System.EventArgs" /> instance containing the event data.
/// </param>
protected override void OnSelecting(ImageBoxCancelEventArgs e) {
e.Cancel = _isMoving || _isResizing || SelectionRegion.Contains(PointToImage(e.Location)) || HitTest(e.Location) != DragHandleAnchor.None;
base.OnSelecting(e);
}
/// <summary>
/// Raises the <see cref="SelectionMoved" /> event.
/// </summary>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
protected virtual void OnSelectionMoved(EventArgs e) {
EventHandler handler;
handler = (EventHandler)Events[_eventSelectionMoved];
handler?.Invoke(this, e);
}
/// <summary>
/// Raises the <see cref="SelectionMoving" /> event.
/// </summary>
/// <param name="e">The <see cref="CancelEventArgs" /> instance containing the event data.</param>
protected virtual void OnSelectionMoving(CancelEventArgs e) {
CancelEventHandler handler;
handler = (CancelEventHandler)Events[_eventSelectionMoving];
handler?.Invoke(this, e);
}
/// <summary>
/// Raises the <see cref="ImageBox.SelectionRegionChanged" /> event.
/// </summary>
/// <param name="e">
/// The <see cref="System.EventArgs" /> instance containing the event data.
/// </param>
protected override void OnSelectionRegionChanged(EventArgs e) {
base.OnSelectionRegionChanged(e);
PositionDragHandles();
}
/// <summary>
/// Raises the <see cref="SelectionResized" /> event.
/// </summary>
/// <param name="e">The <see cref="EventArgs" /> instance containing the event data.</param>
protected virtual void OnSelectionResized(EventArgs e) {
EventHandler handler;
handler = (EventHandler)Events[_eventSelectionResized];
handler?.Invoke(this, e);
}
/// <summary>
/// Raises the <see cref="SelectionResizing" /> event.
/// </summary>
/// <param name="e">The <see cref="CancelEventArgs" /> instance containing the event data.</param>
protected virtual void OnSelectionResizing(CancelEventArgs e) {
CancelEventHandler handler;
handler = (CancelEventHandler)Events[_eventSelectionResizing];
handler?.Invoke(this, e);
}
/// <summary>
/// Raises the <see cref="ImageBox.ZoomChanged" /> event.
/// </summary>
/// <param name="e">
/// The <see cref="System.EventArgs" /> instance containing the event data.
/// </param>
protected override void OnZoomChanged(EventArgs e) {
base.OnZoomChanged(e);
PositionDragHandles();
}
/// <summary>
/// Processes a dialog key.
/// </summary>
/// <returns>
/// true if the key was processed by the control; otherwise, false.
/// </returns>
/// <param name="keyData">One of the <see cref="T:System.Windows.Forms.Keys"/> values that represents the key to process. </param>
protected override bool ProcessDialogKey(Keys keyData) {
bool result;
if (keyData == Keys.Escape && (_isResizing || _isMoving)) {
if (_isResizing) {
CancelResize();
}
else {
CancelMove();
}
result = true;
}
else {
result = base.ProcessDialogKey(keyData);
}
return result;
}
protected virtual void SetCursor(Point point) {
// http://forums.cyotek.com/imagebox/cursor-issue-in-imageboxex/msg92/#msg92
if (!IsPanning) {
Cursor cursor;
if (IsSelecting) {
cursor = Cursors.Default;
}
else {
DragHandleAnchor handleAnchor;
handleAnchor = _isResizing ? _resizeAnchor : HitTest(point);
if (handleAnchor != DragHandleAnchor.None && _dragHandles[handleAnchor].
Enabled) {
switch (handleAnchor) {
case DragHandleAnchor.TopLeft:
case DragHandleAnchor.BottomRight:
cursor = Cursors.SizeNWSE;
break;
case DragHandleAnchor.TopCenter:
case DragHandleAnchor.BottomCenter:
cursor = Cursors.SizeNS;
break;
case DragHandleAnchor.TopRight:
case DragHandleAnchor.BottomLeft:
cursor = Cursors.SizeNESW;
break;
case DragHandleAnchor.MiddleLeft:
case DragHandleAnchor.MiddleRight:
cursor = Cursors.SizeWE;
break;
default:
throw new ArgumentOutOfRangeException();
}
}
else if (_isMoving || SelectionRegion.Contains(PointToImage(point))) {
cursor = Cursors.SizeAll;
}
else {
cursor = Cursors.Default;
}
}
Cursor = cursor;
}
}
private void CancelMove() {
SelectionRegion = _previousSelectionRegion;
CompleteMove();
}
private void CompleteMove() {
ResetDrag();
OnSelectionMoved(EventArgs.Empty);
}
private void CompleteResize() {
ResetDrag();
OnSelectionResized(EventArgs.Empty);
}
private DragHandleAnchor HitTest(Point cursorPosition) {
return _dragHandles.HitTest(cursorPosition);
}
private bool IsOutsideDragZone(Point location) {
Rectangle dragZone;
int dragWidth;
int dragHeight;
dragWidth = SystemInformation.DragSize.Width;
dragHeight = SystemInformation.DragSize.Height;
dragZone = new Rectangle(_dragOrigin.X - (dragWidth / 2), _dragOrigin.Y - (dragHeight / 2), dragWidth, dragHeight);
return !dragZone.Contains(location);
}
private void PositionDragHandles() {
if (_dragHandles != null && _dragHandleSize > 0) {
RectangleF selectionRegion;
selectionRegion = SelectionRegion;
if (selectionRegion.IsEmpty) {
foreach (DragHandle handle in _dragHandles) {
handle.Bounds = Rectangle.Empty;
}
}
else {
int left;
int top;
int right;
int bottom;
int halfWidth;
int halfHeight;
int halfDragHandleSize;
Rectangle viewport;
int offsetX;
int offsetY;
viewport = GetImageViewPort();
offsetX = viewport.Left + Padding.Left + AutoScrollPosition.X;
offsetY = viewport.Top + Padding.Top + AutoScrollPosition.Y;
halfDragHandleSize = _dragHandleSize / 2;
left = Convert.ToInt32((selectionRegion.Left * ZoomFactor) + offsetX);
top = Convert.ToInt32((selectionRegion.Top * ZoomFactor) + offsetY);
right = left + Convert.ToInt32(selectionRegion.Width * ZoomFactor);
bottom = top + Convert.ToInt32(selectionRegion.Height * ZoomFactor);
halfWidth = Convert.ToInt32(selectionRegion.Width * ZoomFactor) / 2;
halfHeight = Convert.ToInt32(selectionRegion.Height * ZoomFactor) / 2;
_dragHandles[DragHandleAnchor.TopLeft].
Bounds = new Rectangle(left - _dragHandleSize, top - _dragHandleSize, _dragHandleSize, _dragHandleSize);
_dragHandles[DragHandleAnchor.TopCenter].
Bounds = new Rectangle(left + halfWidth - halfDragHandleSize, top - _dragHandleSize, _dragHandleSize, _dragHandleSize);
_dragHandles[DragHandleAnchor.TopRight].
Bounds = new Rectangle(right, top - _dragHandleSize, _dragHandleSize, _dragHandleSize);
_dragHandles[DragHandleAnchor.MiddleLeft].
Bounds = new Rectangle(left - _dragHandleSize, top + halfHeight - halfDragHandleSize, _dragHandleSize, _dragHandleSize);
_dragHandles[DragHandleAnchor.MiddleRight].
Bounds = new Rectangle(right, top + halfHeight - halfDragHandleSize, _dragHandleSize, _dragHandleSize);
_dragHandles[DragHandleAnchor.BottomLeft].
Bounds = new Rectangle(left - _dragHandleSize, bottom, _dragHandleSize, _dragHandleSize);
_dragHandles[DragHandleAnchor.BottomCenter].
Bounds = new Rectangle(left + halfWidth - halfDragHandleSize, bottom, _dragHandleSize, _dragHandleSize);
_dragHandles[DragHandleAnchor.BottomRight].
Bounds = new Rectangle(right, bottom, _dragHandleSize, _dragHandleSize);
}
}
}
private void ProcessSelectionMove(Point cursorPosition) {
if (_isMoving) {
int x;
int y;
Point imagePoint;
Size viewSize;
RectangleF selectionRegion;
imagePoint = PointToImage(cursorPosition, false);
viewSize = ViewSize;
selectionRegion = SelectionRegion;
x = Math.Max(0, imagePoint.X - _dragOriginOffset.X);
if (x + selectionRegion.Width >= viewSize.Width) {
x = viewSize.Width - (int)selectionRegion.Width;
}
y = Math.Max(0, imagePoint.Y - _dragOriginOffset.Y);
if (y + selectionRegion.Height >= viewSize.Height) {
y = viewSize.Height - (int)selectionRegion.Height;
}
SelectionRegion = new RectangleF(x, y, selectionRegion.Width, selectionRegion.Height);
}
}
private void ProcessSelectionResize(Point cursorPosition) {
if (_isResizing) {
Point imagePosition;
float left;
float top;
float right;
float bottom;
bool resizingTopEdge;
bool resizingBottomEdge;
bool resizingLeftEdge;
bool resizingRightEdge;
RectangleF selectionRegion;
Size viewSize;
imagePosition = PointToImage(cursorPosition);
viewSize = ViewSize;
// get the current selection
selectionRegion = SelectionRegion;
left = selectionRegion.Left;
top = selectionRegion.Top;
right = selectionRegion.Right;
bottom = selectionRegion.Bottom;
// decide which edges we're resizing
resizingTopEdge = _resizeAnchor >= DragHandleAnchor.TopLeft && _resizeAnchor <= DragHandleAnchor.TopRight;
resizingBottomEdge = _resizeAnchor >= DragHandleAnchor.BottomLeft && _resizeAnchor <= DragHandleAnchor.BottomRight;
resizingLeftEdge = _resizeAnchor == DragHandleAnchor.TopLeft || _resizeAnchor == DragHandleAnchor.MiddleLeft || _resizeAnchor == DragHandleAnchor.BottomLeft;
resizingRightEdge = _resizeAnchor == DragHandleAnchor.TopRight || _resizeAnchor == DragHandleAnchor.MiddleRight || _resizeAnchor == DragHandleAnchor.BottomRight;
// and resize!
if (resizingTopEdge) {
top = imagePosition.Y > 0 ? imagePosition.Y : 0;
if (bottom - top < MinimumSelectionSize.Height) {
top = bottom - MinimumSelectionSize.Height;
}
else if (MaximumSelectionSize.Height > 0 && bottom - top > MaximumSelectionSize.Height) {
top = bottom - MaximumSelectionSize.Height;
}
}
else if (resizingBottomEdge) {
bottom = imagePosition.Y < viewSize.Height ? imagePosition.Y : viewSize.Height;
if (bottom - top < MinimumSelectionSize.Height) {
bottom = top + MinimumSelectionSize.Height;
}
else if (MaximumSelectionSize.Height > 0 && bottom - top > MaximumSelectionSize.Height) {
bottom = top + MaximumSelectionSize.Height;
}
}
if (resizingLeftEdge) {
left = imagePosition.X > 0 ? imagePosition.X : 0;
if (right - left < MinimumSelectionSize.Width) {
left = right - MinimumSelectionSize.Width;
}
else if (MaximumSelectionSize.Width > 0 && right - left > MaximumSelectionSize.Width) {
left = right - MaximumSelectionSize.Width;
}
}
else if (resizingRightEdge) {
right = imagePosition.X < viewSize.Width ? imagePosition.X : viewSize.Width;
if (right - left < MinimumSelectionSize.Width) {
right = left + MinimumSelectionSize.Width;
}
else if (MaximumSelectionSize.Width > 0 && right - left > MaximumSelectionSize.Width) {
right = left + MaximumSelectionSize.Width;
}
}
SelectionRegion = new RectangleF(left, top, right - left, bottom - top);
}
}
private void ResetDrag() {
_isResizing = false;
_isMoving = false;
_dragOrigin = Point.Empty;
_dragOriginOffset = Point.Empty;
}
private void StartResize(DragHandleAnchor anchor) {
CancelEventArgs e;
if (_isMoving || _isResizing) {
throw new InvalidOperationException("A move or resize action is currently being performed.");
}
e = new CancelEventArgs();
OnSelectionResizing(e);
if (!e.Cancel) {
_resizeAnchor = anchor;
_previousSelectionRegion = SelectionRegion;
_isResizing = true;
}
}
#endregion
}
}
================================================
FILE: App/Common/ObjectListViewHelper.cs
================================================
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Drawing2D;
namespace BrightIdeasSoftware
{
static class ObjectListViewHelper
{
/// <summary>修复编辑控件太窄小的问题。</summary>
public static void FixEditControlWidth(this ObjectListView view) {
view.CellEditStarting += View_CellEditStarting;
view.Disposed += View_Disposed;
}
public static bool HasSelection(this ObjectListView view) {
return view.SelectedIndices.Count > 0;
}
static void View_Disposed(object sender, EventArgs e) {
var view = (ObjectListView)sender;
view.CellEditStarting -= View_CellEditStarting;
view.Disposed -= View_Disposed;
}
static void View_CellEditStarting(object sender, CellEditEventArgs e) {
var b = e.CellBounds;
if (b.Width < 60) {
b.Width = 60;
}
if (e.Control is System.Windows.Forms.Control c) {
c.Bounds = b;
c.Location = b.Location;
}
}
public static void RedrawItem(this ObjectListView view, int index) {
var c = view.GetItemCount();
if (c > 0) {
view.RedrawItems(Math.Max(0, index - 1), Math.Min(index + 1, c - 1), true);
}
}
public static void SetTreeViewLine(this TreeListView view) {
var tcr = view.TreeColumnRenderer as TreeListView.TreeRenderer;
tcr.LinePen = new Pen(SystemColors.ControlDark) {
DashCap = DashCap.Round,
DashStyle = DashStyle.Dash
};
}
public static void ExpandSelected(this TreeListView view, bool moveToFirstChild = false) {
if (view.HasSelection() == false) {
return;
}
var so = view.SelectedObjects;
var expanded = false;
foreach (var item in so) {
if (view.IsExpanded(item) == false) {
view.Expand(item);
expanded = true;
}
}
if (moveToFirstChild && expanded == false) {
foreach (var ch in view.GetChildren(so[0])) {
view.SelectedObject = view.FocusedObject = ch;
return;
}
}
}
public static void Expand(this TreeListView view, System.Collections.IEnumerable items, bool recursive) {
foreach (var item in items) {
view.Expand(item);
if (recursive) {
view.Expand(view.GetChildren(item), true);
}
}
}
public static void Collapse(this TreeListView view, System.Collections.IEnumerable items, bool recursive) {
foreach (var item in items) {
if (recursive && view.IsExpanded(item)) {
view.Collapse(view.GetChildren(item), true);
}
view.Collapse(item);
}
}
public static TypedObjectListView<T> AsTyped<T>(this ObjectListView view) where T : class {
return view.AsTyped<T>(null);
}
public static TypedObjectListView<T> AsTyped<T>(this ObjectListView view, Action<TypedObjectListView<T>> configurator) where T : class {
var v = new TypedObjectListView<T>(view);
configurator?.Invoke(v);
return v;
}
public static TypedObjectListView<T> ConfigColumn<T>(this TypedObjectListView<T> view, OLVColumn column, Action<TypedColumn<T>> configurator) where T : class {
var t = new TypedColumn<T>(column);
configurator(t);
return view;
}
public static TypedColumn<T> AsTyped<T>(this OLVColumn column, Action<TypedColumn<T>> configurator) where T : class {
var t = new TypedColumn<T>(column);
configurator(t);
return t;
}
public static T GetParentModel<T>(this TreeListView view, T model) where T : class {
return view.GetParent(model) as T;
}
public static List<T> GetAncestorsOrSelf<T>(this TreeListView view, T model) where T : class {
var r = new List<T>();
do {
r.Add(model);
} while ((model = view.GetParent(model) as T) != null);
return r;
}
public static void CollapseSelected(this TreeListView view, bool moveToParent = false) {
if (view.HasSelection() == false) {
return;
}
var so = view.SelectedObjects;
var collapsed = false;
foreach (var item in so) {
if (view.IsExpanded(item)) {
view.Collapse(item);
collapsed = true;
}
}
if (moveToParent && collapsed == false) {
var parent = view.GetParent(so[0]);
if (parent != null) {
view.SelectedObject = view.FocusedObject = parent;
}
}
}
public static void MoveUpSelection(this ObjectListView view) {
var si = view.GetFirstSelectedIndex();
if (si < 1) {
return;
}
var so = view.SelectedObjects;
view.MoveObjects(--si, so);
view.SelectedObjects = so;
}
public static void MoveDownSelection(this ObjectListView view) {
var ls = view.GetLastItemInDisplayOrder();
if (ls == null || ls.Selected == true) {
return;
}
var si = view.GetFirstSelectedIndex();
if (si < 0) {
return;
}
var so = view.SelectedObjects;
view.MoveObjects(si + 2, so);
view.SelectedObjects = so;
}
public static T GetFirstSelectedModel<T>(this ObjectListView view) where T : class {
return view.GetModelObject(view.GetFirstSelectedIndex()) as T;
}
public static OLVListItem GetFocusedOrFirstSelectedItem(this ObjectListView view) {
return view.GetItemCount() == 0 ? null
: (view.FocusedItem
?? view.SelectedItem
?? (view.HasSelection() ? view.GetItem(view.SelectedIndices[0]) : null)) as OLVListItem;
}
// 树视图存在子节点且多选节点时,在 SelectedIndexChanged 事件中,SelectedIndices属性可能返回无内容的集合。
public static int GetFirstSelectedIndex(this ObjectListView view) {
var c = view.GetItemCount();
int i = c;
foreach (int item in view.SelectedIndices) {
if (item < i) {
i = item;
}
}
return i == c ? -1 : i;
}
public static int GetLastSelectedIndex(this ObjectListView view) {
int i = -1;
foreach (int item in view.SelectedIndices) {
if (item > i) {
i = item;
}
}
return i;
}
public static List<T> GetSelectedModels<T>(this ObjectListView view) where T : class {
var s = view.SelectedObjects;
var r = new List<T>(s.Count);
foreach (T item in s) {
if (item != null) {
r.Add(item);
}
}
return r;
}
/// <summary>测试坐标点属于哪个单元格。</summary>
public static GridTestResult GetGridAt(this ObjectListView view, int x, int y) {
var cr = view.ContentRectangle;
var ic = view.GetItemCount();
var ob = false;
if (x < cr.Left) {
x = cr.Left;
ob = true;
}
else if (x >= cr.Right) {
x = cr.Right - 1;
ob = true;
}
var cb = cr.Top + ic * view.RowHeightEffective;
if (y < cr.Top) {
y = cr.Top;
ob = true;
}
else if (y >= cb) {
y = cb;
ob = true;
}
var r = view.GetItemAt(x, y, out OLVColumn c);
if (r != null) {
return new GridTestResult(c.DisplayIndex, r.Index, ob);
}
// 当列表框滚动时,上述方法失效,使用此替补方法
r = view.GetNthItemInDisplayOrder((y - 1 - cr.Top) / view.RowHeightEffective);
var w = cr.Left;
var cl = view.ColumnsInDisplayOrder;
for (int i = 0; i < cl.Count; i++) {
if (x >= w && x <= (w += cl[i].Width)) {
c = cl[i];
break;
}
}
if (c == null) {
c = cl[cl.Count - 1];
ob = true;
}
y = r.Index + view.TopItemIndex;
if (y >= view.GetItemCount()) {
y = view.GetItemCount() - 1;
}
return new GridTestResult(c.DisplayIndex, y, ob);
}
public static void InvertSelect(this ObjectListView view) {
view.Freeze();
var l = view.GetItemCount();
for (int i = 0; i < l; i++) {
var oi = view.GetItem(i);
oi.Selected = !oi.Selected;
}
view.Unfreeze();
}
}
readonly struct GridTestResult(int columnIndex, int rowIndex, bool isOutOfRange)
{
public int ColumnIndex { get; } = columnIndex;
public int RowIndex { get; } = rowIndex;
public bool IsOutOfRange { get; } = isOutOfRange;
}
}
================================================
FILE: App/Common/PInvokeHelper.cs
================================================
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
namespace PDFPatcher.Common
{
static class PInvokeHelper
{
/// <summary>
/// 将 <paramref name="ptr"/> 指针对应的数据转换为 <typeparamref name="T"/> 类型实例。
/// </summary>
/// <typeparam name="T">传出类型实例。</typeparam>
/// <param name="ptr">指向数据的指针。</param>
/// <returns>指针封装后的托管实例。</returns>
internal static T Unwrap<T>(this IntPtr ptr) where T : class, new() {
var t = new T();
Marshal.PtrToStructure(ptr, t);
return t;
}
}
}
================================================
FILE: App/Common/ShortcutFile.cs
================================================
using System;
using System.Runtime.InteropServices;
using System.Text;
namespace PDFPatcher.Common
{
/// <summary>用于创建或管理快捷方式文件的类。</summary>
public sealed class ShortcutFile
{
readonly IShellLink _link;
/// <summary>获取或设置快捷方式的目标路径。</summary>
public string Destination { get; private set; }
/// <summary>获取或设置快捷方式的工作目录。</summary>
public string WorkingDirectory { get; set; }
/// <summary>获取或设置快捷方式的描述文本。</summary>
public string Description { get; set; }
/// <summary>获取或设置快捷方式的启动参数。</summary>
public string Arguments { get; set; }
/// <summary>获取或设置快捷方式的图标文件位置。</summary>
public string IconLocation { get; set; }
/// <summary>获取或设置快捷方式的图标文件索引。</summary>
public int IconIndex { get; set; }
private ShortcutFile() {
_link = (IShellLink)new ShellLink();
}
/// <summary>创建快捷方式。</summary>
/// <param name="destination">快捷方式指向的目标文件路径。</param>
public ShortcutFile(string destination) {
_link = (IShellLink)new ShellLink();
Destination = destination;
_link.SetPath(destination);
}
/// <summary>加载快捷方式。</summary>
/// <param name="shortcutFilePath">快捷方式文件的位置。</param>
/// <returns><see cref="ShortcutFile"/> 实例。</returns>
public static ShortcutFile Load(string shortcutFilePath) {
var s = new ShortcutFile();
var l = s._link;
var file = (System.Runtime.InteropServices.ComTypes.IPersistFile)s._link;
file.Load(shortcutFilePath, 0);
s.Destination = shortcutFilePath;
var sb = new StringBuilder();
l.GetDescription(sb, 512);
s.Description = sb.ToString();
sb.Length = 0;
l.GetWorkingDirectory(sb, 256);
s.WorkingDirectory = sb.ToString();
int ii;
sb.Length = 0;
l.GetIconLocation(sb, 256, out ii);
s.IconLocation = sb.ToString();
sb.Length = 0;
l.GetArguments(sb, 256);
s.Arguments = sb.ToString();
return s;
}
/// <summary>将快捷方式保存到目标位置。</summary>
/// <param name="position">快捷方式文件的位置。</param>
public void Save(string position) {
if (String.IsNullOrEmpty(WorkingDirectory) == false) {
_link.SetWorkingDirectory(WorkingDirectory);
}
if (String.IsNullOrEmpty(Description) == false) {
_link.SetDescription(Description);
}
if (String.IsNullOrEmpty(Arguments) == false) {
_link.SetArguments(Arguments);
}
if (String.IsNullOrEmpty(IconLocation) == false) {
_link.SetIconLocation(IconLocation, IconIndex >= 0 ? IconIndex : 0);
}
var file = (System.Runtime.InteropServices.ComTypes.IPersistFile)_link;
file.Save(position, false);
}
#region COM Interops
[ComImport]
[Guid("00021401-0000-0000-C000-000000000046")]
class ShellLink
{
}
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("000214F9-0000-0000-C000-000000000046")]
interface IShellLink
{
void GetPath([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, int cchMaxPath, out IntPtr pfd, int fFlags);
void GetIDList(out IntPtr ppidl);
void SetIDList(IntPtr pidl);
void GetDescription([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszName, int cchMaxName);
void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
void GetWorkingDirectory([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszDir, int cchMaxPath);
void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
void GetArguments([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszArgs, int cchMaxPath);
void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
void GetHotkey(out short pwHotkey);
void SetHotkey(short wHotkey);
void GetShowCmd(out int piShowCmd);
void SetShowCmd(int iShowCmd);
void GetIconLocation([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszIconPath, int cchIconPath, out int piIcon);
void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, int dwReserved);
void Resolve(IntPtr hwnd, int fFlags);
void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
}
#endregion
}
}
================================================
FILE: App/Common/StringBuilderCache.cs
================================================
using System;
using System.Text;
namespace PDFPatcher.Common
{
internal static class StringBuilderCache
{
internal const int MaxBuilderSize = 360;
const int DefaultCapacity = 16; // == StringBuilder.DefaultCapacity
[ThreadStatic]
static StringBuilder __CachedInstance;
public static StringBuilder Acquire(int capacity = DefaultCapacity) {
if (capacity <= MaxBuilderSize) {
StringBuilder sb = __CachedInstance;
if (sb != null) {
// Avoid stringbuilder block fragmentation by getting a new StringBuilder
// when the requested size is larger than the current capacity
if (capacity <= sb.Capacity) {
__CachedInstance = null;
sb.Length = 0;
return sb;
}
}
}
return new StringBuilder(capacity);
}
public static void Release(StringBuilder sb) {
if (sb.Capacity <= MaxBuilderSize) {
__CachedInstance = sb;
}
}
public static string GetStringAndRelease(StringBuilder sb) {
string result = sb.ToString();
Release(sb);
return result;
}
}
}
================================================
FILE: App/Common/StringHelper.cs
================================================
using System;
using System.Diagnostics;
namespace PDFPatcher.Common
{
static class StringHelper
{
[DebuggerStepThrough]
public static bool IsNullOrWhiteSpace(this string text) {
return String.IsNullOrWhiteSpace(text);
}
public static string ReplaceControlAndBomCharacters(string source) {
if (String.IsNullOrEmpty(source)) {
return String.Empty;
}
var p = source.ToCharArray();
var m = false;
for (int i = 0; i < source.Length; i++) {
ref var c = ref p[i];
if ((Char.IsControl(c) && c != '\t' && c != '\r' && c != '\n')
|| (c > 0xFFFD && (c == 0xFFFF || c == 0xFFFE || c == 0xFFEF))
) {
c = ' ';
m = true;
}
}
return m ? new String(p) : source;
}
public static string Take(this string text, int startIndex, int count) {
if (String.IsNullOrEmpty(text) || startIndex >= text.Length) {
return String.Empty;
}
if (startIndex < 0) {
startIndex = text.Length + startIndex;
if (startIndex < 0) {
startIndex = 0;
}
}
return count <= 0
? String.Empty
: text.Substring(startIndex, startIndex + count > text.Length ? text.Length - startIndex : count);
}
public static string ToDescription<TEnum>(this TEnum value) where TEnum : Enum {
return value.ToString();
}
public static bool HasCaseInsensitivePrefix(this string text, string prefix) {
return text?.StartsWith(prefix, StringComparison.OrdinalIgnoreCase) == true;
}
public static bool HasPrefix(this string text, string prefix) {
return text?.StartsWith(prefix, StringComparison.Ordinal) == true;
}
/// <summary>返回字符串中包含指定字符串之后的子字符串。</summary>
/// <remarks>如果找不到指定字符串,则返回空字符串。</remarks>
public static string SubstringAfter(this string source, char value) {
int index = source.LastIndexOf(value);
return index != -1
? source.Substring(index + 1)
: String.Empty;
}
}
}
================================================
FILE: App/Common/ValueHelper.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Text;
namespace PDFPatcher.Common
{
static class ValueHelper
{
[DebuggerStepThrough]
public static TValue CastOrDefault<TValue>(this object value, TValue defaultValue) where TValue : struct {
return value is TValue v ? v : defaultValue;
}
[DebuggerStepThrough]
public static TValue CastOrDefault<TValue>(this object value) where TValue : struct {
return value is TValue v ? v : default;
}
[DebuggerStepThrough]
public static bool HasContent<T>(this ICollection<T> collection) {
return collection?.Count > 0;
}
[DebuggerStepThrough]
public static T SubstituteDefault<T>(this T value, T otherValue) {
return EqualityComparer<T>.Default.Equals(value, default(T)) ? otherValue : value;
}
public static TDisposable TryDispose<TDisposable>(this TDisposable disposable)
where TDisposable : IDisposable {
if (disposable != null) {
try {
disposable.Dispose();
}
catch (Exception) {
// ignore
}
}
return disposable;
}
[DebuggerStepThrough]
public static bool IsInCollection<T>(T input, params T[] values) {
return values != null && input != null && values.Length != 0 && Array.IndexOf(values, input) != -1;
}
[DebuggerStepThrough]
public static IComparer<TItem> GetReverseComparer<TItem>()
where TItem : IComparable<TItem> {
return new ReverseComparer<TItem>();
}
public static T LimitInRange<T>(this T value, T minValue, T maxValue)
where T : IComparable<T> {
return
value.CompareTo(minValue) < 0 ? minValue
: value.CompareTo(maxValue) > 0 ? maxValue
: value;
}
public static TValue GetOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key) {
TValue r;
return dictionary == null ? default : dictionary.TryGetValue(key, out r) ? r : r;
}
public static TValue GetOrDefault<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, TValue defaultValue) {
TValue r;
return dictionary != null && dictionary.TryGetValue(key, out r) ? r : defaultValue;
}
public static TMapped MapValue<TValue, TMapped>(TValue input, TValue[] fromValues, TMapped[] toValues) {
return MapValue(input, fromValues, toValues, default(TMapped));
}
public static TMapped MapValue<TValue, TMapped>(TValue input, TValue[] fromValues, TMapped[] toValues, TMapped defaultValue) {
if (fromValues == null) {
return defaultValue;
}
if (toValues == null) {
return defaultValue;
}
var i = Array.IndexOf(fromValues, input);
if (i == -1 || i >= toValues.Length) {
return defaultValue;
}
return toValues[i];
}
public static TMapped MapValue<TValue, TMapped>(TValue input, IEnumerable<TValue> fromValues, IEnumerable<TMapped> toValues, TMapped defaultValue) {
if (fromValues == null) {
return defaultValue;
}
if (toValues == null) {
return defaultValue;
}
var i = 0;
var j = 0;
var c = EqualityComparer<TValue>.Default;
foreach (var x in fromValues) {
if (c.Equals(input, x)) {
foreach (var y in toValues) {
if (i == j) {
return y;
}
j++;
}
return defaultValue;
}
i++;
}
return defaultValue;
}
public static IEnumerable ForEach<TItem>(this IEnumerable collection, Action<TItem> itemHandler) {
if (collection == null || itemHandler == null) {
return collection;
}
foreach (var item in collection) {
if (item is TItem v) {
itemHandler(v);
}
}
return collection;
}
public static TCollection AddRange<TCollection, T>(this TCollection target, IEnumerable<T> source)
where TCollection : ICollection<T> {
if (source == null || target == null) {
return target;
}
if (target is List<T> list) {
list.AddRange(source);
return target;
}
foreach (T item in source) {
target.Add(item);
}
return target;
}
[DebuggerStepThrough]
public static string ToText(this DateTimeOffset value) {
return value.ToString(NumberFormatInfo.InvariantInfo);
}
[DebuggerStepThrough]
public static string ToText(this int value) {
return value.ToString(NumberFormatInfo.InvariantInfo);
}
[DebuggerStepThrough]
public static string ToText(this float value) {
return Math.Abs(value) < 0.00001 ? "0" : value.ToString(NumberFormatInfo.InvariantInfo);
}
[DebuggerStepThrough]
public static string ToText(this double value) {
return Math.Abs(value) < 0.000000000001 ? "0" : value.ToString(NumberFormatInfo.InvariantInfo);
}
[DebuggerStepThrough]
public static string ToText(this long value) {
return value.ToString(CultureInfo.InvariantCulture);
}
[DebuggerStepThrough]
public static string ToText(this decimal value) {
return value.ToString(NumberFormatInfo.InvariantInfo);
}
[DebuggerStepThrough]
public static string ToText<TFormattable>(this TFormattable value)
where TFormattable : IFormattable {
return value.ToString(null, NumberFormatInfo.InvariantInfo);
}
[DebuggerStepThrough]
public static string ToText<TFormattable>(this TFormattable value, string format)
where TFormattable : IFormattable {
return value.ToString(format, NumberFormatInfo.InvariantInfo);
}
public static bool ToBoolean(this string value, bool defaultValue) {
if (string.IsNullOrEmpty(value)) {
return defaultValue;
}
switch (ParseBoolean(value)) {
case 1: return true;
case 0: return false;
default: return defaultValue;
}
}
static int ParseBoolean(string value) {
const int True = 1, False = 0, Invalid = -1;
var i = 0;
var l = value.Length;
do {
var c = value[i];
switch (c) {
case 'T':
case 't':
if (i + 3 < l && ((c = value[++i]) == 'r' || c == 'R') && ((c = value[++i]) == 'u' || c == 'U') && ((c = value[++i]) == 'e' || c == 'E')) {
goto EndsWithWhitespaceTrue;
}
return Invalid;
case 'F':
case 'f':
if (i + 4 < l && ((c = value[++i]) == 'a' || c == 'A') && ((c = value[++i]) == 'l' || c == 'L') && ((c = value[++i]) == 's' || c == 'S') && ((c = value[++i]) == 'e' || c == 'E')) {
goto EndsWithWhitespaceFalse;
}
return Invalid;
case 'Y':
case 'y':
if (i + 2 < l && ((c = value[++i]) == 'e' || c == 'E') && ((c = value[++i]) == 's' || c == 'S')) {
goto EndsWithWhitespaceTrue;
}
return Invalid;
case 'N':
case 'n':
if (i + 1 < l && ((c = value[++i]) == 'o' || c == 'O')) {
goto EndsWithWhitespaceFalse;
}
return Invalid;
case 'O':
case 'o':
if (i + 2 < l && ((c = value[++i]) == 'f' || c == 'F') && ((c = value[++i]) == 'f' || c == 'F')) {
goto EndsWithWhitespaceFalse;
}
if (i + 1 < l && ((c = value[++i]) == 'n' || c == 'N' || c == 'k' || c == 'K')) {
goto EndsWithWhitespaceTrue;
}
return Invalid;
case '是':
case '对':
case '开':
goto EndsWithWhitespaceTrue;
case '否':
case '关':
goto EndsWithWhitespaceFalse;
case '正':
if (i + 1 < l && value[++i] == '确') {
goto EndsWithWhitespaceTrue;
}
goto EndsWithWhitespaceFalse;
case '错':
if (i + 1 < l && value[++i] == '误') {
goto EndsWithWhitespaceFalse;
}
goto EndsWithWhitespaceFalse;
default:
if (Char.IsWhiteSpace(c)) {
continue;
}
if (c >= '0' && c <= '9' || c == '-' || c == '+' || c == '.') {
bool notZero = c > '0' && c <= '9';
var hasDot = false;
while (++i < l) {
c = value[i];
if (Char.IsNumber(c) == false && Char.IsWhiteSpace(c) == false) {
if (c == '.') {
if (hasDot == false) {
hasDot = true;
continue;
}
else {
return Invalid;
}
}
return Invalid;
}
if (notZero == false) {
notZero = c > '0' && c <= '9';
}
}
return notZero ? True : False;
}
return -1;
}
} while (++i < l);
EndsWithWhitespaceTrue:
while (++i < l && Char.IsWhiteSpace(value[i])) { }
return i == l ? True : Invalid;
EndsWithWhitespaceFalse:
while (++i < l && Char.IsWhiteSpace(value[i])) { }
return i == l ? False : Invalid;
}
[DebuggerStepThrough]
public static int ToInt32(this float value) {
return (int)(value > 0 ? value + 0.5f : value - 0.5f);
}
[DebuggerStepThrough]
public static int ToInt32(this double value) {
return (int)(value > 0 ? value + 0.5d : value - 0.5d);
}
[DebuggerStepThrough]
public static long ToInt64(this float value) {
return (long)(value > 0 ? value + 0.5f : value - 0.5f);
}
[DebuggerStepThrough]
public static long ToInt64(this double value) {
return (long)(value > 0 ? value + 0.5d : value - 0.5d);
}
[DebuggerStepThrough]
public static int ToInt32(this string value) {
int i;
value.TryParse(out i);
return i;
}
[DebuggerStepThrough]
public static int ToInt32(this string value, int defaultValue) {
int i;
return value.TryParse(out i) ? i : defaultValue;
}
[DebuggerStepThrough]
public static long ToInt64(this string value) {
long i;
value.TryParse(out i);
return i;
}
[DebuggerStepThrough]
public static long ToInt64(this string value, long defaultValue) {
long i;
return value.TryParse(out i) ? i : defaultValue;
}
[DebuggerStepThrough]
public static float ToSingle(this string value) {
float i;
value.TryParse(out i);
return i;
}
[DebuggerStepThrough]
public static float ToSingle(this string value, float defaultValue) {
float i;
return value.TryParse(out i) ? i : defaultValue;
}
[DebuggerStepThrough]
public static double ToDouble(this string value) {
double i;
value.TryParse(out i);
return i;
}
[DebuggerStepThrough]
public static double ToDouble(this string value, double defaultValue) {
double i;
return value.TryParse(out i) ? i : defaultValue;
}
[DebuggerStepThrough]
public static string ToText(this byte value) {
return value.ToString(CultureInfo.InvariantCulture);
}
public static bool TryParse(this string value, out int result) {
return Int32.TryParse(value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result)
|| ParseFloatStringToInt32(value, ref result);
}
static bool ParseFloatStringToInt32(string value, ref int result) {
if (double.TryParse(value, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out var d)) {
result = d.ToInt32();
return true;
}
return false;
}
public static bool TryParse(this string value, out long result) {
return Int64.TryParse(value, NumberStyles.Integer, NumberFormatInfo.InvariantInfo, out result)
|| ParseFloatStringToInt64(value, ref result);
}
static bool ParseFloatStringToInt64(string value, ref long result) {
if (double.TryParse(value, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out var d)) {
result = d.ToInt64();
return true;
}
return false;
}
[DebuggerStepThrough]
public static bool TryParse(this string value, out float result) {
return float.TryParse(value, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out result);
}
[DebuggerStepThrough]
public static bool TryParse(this string value, out double result) {
return double.TryParse(value, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out result);
}
[DebuggerStepThrough]
public static bool TryParse(this string value, out decimal result) {
return decimal.TryParse(value, NumberStyles.Float, NumberFormatInfo.InvariantInfo, out result);
}
public static string ToRoman(this int value) {
if (value > 49999 || value < 1) {
return string.Empty;
}
var sb = new StringBuilder();
do {
for (int i = value < 40 ? 5 : value < 400 ? 9 : Roman.Values.Length - 1; i >= 0; i--) {
var n = Roman.Values[i];
if (value >= n) {
value -= n;
sb.Append(Roman.Chars[i]);
break;
}
}
} while (value > 0);
return sb.ToString();
}
public static string ToAlphabet(this int value, bool upper) {
if (value <= 0) {
return string.Empty;
}
var stack = new char[7];
var c = (upper ? 'A' : 'a') - 1;
var p = -1;
while (value > 0) {
var i = value % 26;
stack[++p] = (char)(c + (i == 0 ? 26 : i));
value = --value / 26;
}
return new string(stack, 0, ++p);
}
public static string ToHexBinString(this byte value, bool upperCaseHex) {
return HexBinByteToString.ToString(value, upperCaseHex);
}
public static string ToHexBinString(this byte[] source) {
return InternalToHexBinString(source, true, '\0', 0, Int32.MaxValue);
}
public static string ToHexBinString(this byte[] source, bool upperCaseHex, char separator, int offset, int count) {
return InternalToHexBinString(source, upperCaseHex, separator, offset, count);
}
unsafe static string InternalToHexBinString(byte[] source, bool upperCaseHex, char separator, int offset, int count) {
if (source == null || offset < 0 || count < 1) {
return String.Empty;
}
var length = source.Length;
if (length == 0 || offset >= length) {
return String.Empty;
}
if (count > length - offset) {
count = length - offset;
}
if (count == 1) {
return source[offset].ToHexBinString(upperCaseHex);
}
var result = new string('0', (count << 1) + (separator > 0 ? count - 1 : 0));
fixed (char* p = result)
fixed (byte* bp = &source[offset]) {
byte* b = bp;
byte* end = bp + count;
var mapper = HexBinByteValues.GetHexBinMapper(upperCaseHex);
if (separator == 0) {
int* h = (int*)p;
while (b < end) {
*(h++) = mapper[*(b++)];
}
return result;
}
else {
char* c = p;
*(int*)(c) = mapper[*bp];
while (++b < end) {
c += 2;
*c = separator;
*(int*)(++c) = mapper[*b];
}
return result;
}
}
}
static class HexBinByteToString
{
static readonly string[] __HexBins = InitHexBinStrings(true);
static readonly string[] __HexBinLower = InitHexBinStrings(false);
public static string ToString(byte value, bool upperCase) {
return (upperCase ? __HexBins : __HexBinLower)[value];
}
static string[] InitHexBinStrings(bool upperCase) {
var s = new string[Byte.MaxValue + 1];
for (int i = 0; i < s.Length; i++) {
s[i] = ToHexBinString((byte)i, upperCase);
}
return s;
string ToHexBinString(byte value, bool upperCaseHex) {
var h = (upperCaseHex ? 0x41 : 0x61) - 10;
var a = new char[2];
var t = (byte)(value >> 4);
a[0] = (char)(t > 9 ? t + h : t + 0x30);
t = (byte)(value & 0x0F);
a[1] = (char)(t > 9 ? t + h : t + 0x30);
return new string(a);
}
}
}
static class HexBinByteValues
{
static readonly int[] __HexBins = InitHexBin(true);
static readonly int[] __HexBinLowerCase = InitHexBin(false);
unsafe static int[] InitHexBin(bool upperCase) {
var v = new int[Byte.MaxValue + 1];
var a = new char[2];
var h = (upperCase ? 0x41 : 0x61) - 10;
for (int i = 0; i <= Byte.MaxValue; i++) {
var t = (byte)(i >> 4);
a[0] = (char)(t > 9 ? t + h : t + 0x30);
t = (byte)(i & 0x0F);
a[1] = (char)(t > 9 ? t + h : t + 0x30);
fixed (char* p = new string(a)) {
v[i] = *(int*)p;
}
}
return v;
}
public static int[] GetHexBinMapper(bool upperCase) {
return upperCase ? __HexBins : __HexBinLowerCase;
}
}
static class Roman
{
internal static readonly int[] Values = { 1, 4, 5, 9, 10, 40, 50, 90, 100, 400, 500, 900, 1000, 4000, 5000, 9000, 10000, 40000 };
internal static readonly string[] Chars = { "I", "IV", "V", "IX", "X", "XL", "L", "XC", "C", "CD", "D", "CM", "M", "Mv", "v", "Mx", "x", "xl" };
}
sealed class ReverseComparer<T> : IComparer<T>
where T : IComparable<T>
{
int IComparer<T>.Compare(T x, T y) {
return y.CompareTo(x);
}
}
}
}
================================================
FILE: App/Common/XmlHelper.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Xml;
namespace PDFPatcher.Common
{
static class XmlHelper
{
const string BooleanYes = "yes";
const string BooleanNo = "no";
[DebuggerStepThrough]
public static bool GetValue(this XmlElement element, string name, bool defaultValue) {
if (element == null) {
return defaultValue;
}
var a = element.GetAttributeNode(name);
return a != null ? a.Value.ToBoolean(defaultValue) : defaultValue;
}
/// <summary>获取 <paramref name="element"/> 元素名称为 <paramref name="name"/> 的属性值,如不存在该属性,或属性不能解析为整数值,则返回 <paramref name="defaultValue"/>。</summary>
/// <param name="element">需要获取属性值的元素。</param>
/// <param name="name">属性的名称。</param>
/// <param name="defaultValue">属性的默认值。</param>
/// <returns>属性的值;如不存在该属性,返回默认值。</returns>
[DebuggerStepThrough]
public static int GetValue(this XmlElement element, string name, int defaultValue) {
if (element == null) {
return defaultValue;
}
var a = element.GetAttributeNode(name);
return a != null ? a.Value.ToInt32(defaultValue) : defaultValue;
}
[DebuggerStepThrough]
public static long GetValue(this XmlElement element, string name, long defaultValue) {
if (element == null) {
return defaultValue;
}
var a = element.GetAttributeNode(name);
return a != null ? a.Value.ToInt64(defaultValue) : defaultValue;
}
[DebuggerStepThrough]
public static float GetValue(this XmlElement element, string name, float defaultValue) {
if (element == null) {
return defaultValue;
}
var a = element.GetAttributeNode(name);
return a != null ? a.Value.ToSingle(defaultValue) : defaultValue;
}
[DebuggerStepThrough]
public static double GetValue(this XmlElement element, string name, double defaultValue) {
if (element == null) {
return defaultValue;
}
var a = element.GetAttributeNode(name);
if (a == null) {
return defaultValue;
}
return a.Value.ToDouble(defaultValue);
}
[DebuggerStepThrough]
public static bool GetValue(this XmlReader reader, string name, bool defaultValue) {
if (reader == null) {
return defaultValue;
}
var a = reader.GetAttribute(name);
return a?.ToBoolean(defaultValue) ?? defaultValue;
}
[DebuggerStepThrough]
public static int GetValue(this XmlReader reader, string name, int defaultValue) {
if (reader == null) {
return defaultValue;
}
var a = reader.GetAttribute(name);
return a?.ToInt32(defaultValue) ?? defaultValue;
}
[DebuggerStepThrough]
public static float GetValue(this XmlReader reader, string name, float defaultValue) {
if (reader == null) {
return defaultValue;
}
var a = reader.GetAttribute(name);
return a?.ToSingle(defaultValue) ?? defaultValue;
}
[DebuggerStepThrough]
public static string GetValue(this XmlElement element, string name) {
return element?.GetAttributeNode(name)?.Value;
}
[DebuggerStepThrough]
public static string GetValue(this XmlElement element, string name, string defaultValue) {
return element?.GetAttributeNode(name)?.Value ?? defaultValue;
}
[DebuggerStepThrough]
public static void SetValue(this XmlElement element, string name, bool value, bool defaultValue) {
if (element == null) { return; }
if (value == defaultValue) {
element.RemoveAttribute(name);
}
else {
element.SetAttribute(name, value ? BooleanYes : BooleanNo);
}
}
[DebuggerStepThrough]
public static void SetValue(this XmlElement element, string name, int value, int defaultValue) {
if (element == null) { return; }
if (value == defaultValue) {
element.RemoveAttribute(name);
}
else {
element.SetAttribute(name, value.ToText());
}
}
[DebuggerStepThrough]
public static void SetValue(this XmlElement element, string name, float value, float defaultValue) {
if (element == null) { return; }
if (value == defaultValue) {
element.RemoveAttribute(name);
}
else {
element.SetAttribute(name, value.ToText());
}
}
[DebuggerStepThrough]
public static void SetValue(this XmlElement element, string name, string value) {
if (element == null) { return; }
if (string.IsNullOrEmpty(value)) {
element.RemoveAttribute(name);
}
else {
element.SetAttribute(name, value);
}
}
[DebuggerStepThrough]
public static void SetValue(this XmlElement element, string name, string value, string defaultValue) {
if (element == null) { return; }
if (value == null || value == defaultValue) {
element.RemoveAttribute(name);
}
else {
element.SetAttribute(name, value);
}
}
[DebuggerStepThrough]
public static void WriteValue(this XmlWriter writer, string name, bool value) {
writer?.WriteAttributeString(name, value ? BooleanYes : BooleanNo);
}
[DebuggerStepThrough]
public static void WriteValue(this XmlWriter writer, string name, bool value, bool defaultValue) {
if (writer != null && value != defaultValue) {
writer.WriteAttributeString(name, value ? BooleanYes : BooleanNo);
}
}
[DebuggerStepThrough]
public static void WriteValue(this XmlWriter writer, string name, int value) {
writer?.WriteAttributeString(name, value.ToText());
}
[DebuggerStepThrough]
public static void WriteValue(this XmlWriter writer, string name, int value, int defaultValue) {
if (writer != null && value != defaultValue) {
writer.WriteAttributeString(name, value.ToText());
}
}
[DebuggerStepThrough]
public static void WriteValue(this XmlWriter writer, string name, float value) {
writer?.WriteAttributeString(name, value.ToText());
}
[DebuggerStepThrough]
public static void WriteValue(this XmlWriter writer, string name, string value, string defaultValue) {
if (writer != null && string.Equals(value, defaultValue, StringComparison.OrdinalIgnoreCase) == false) {
writer.WriteAttributeString(name, value);
}
}
public static XmlElement GetOrCreateElement(this XmlNode parent, string name) {
return parent == null
? null
: GetElement(parent, name) ?? parent.AppendElement(name);
}
public static XmlElement GetElement(this XmlNode parent, string name) {
if (parent == null) {
return null;
}
var n = parent.FirstChild;
while (n != null) {
if (n.NodeType == XmlNodeType.Element && n.Name == name) {
return n as XmlElement;
}
n = n.NextSibling;
}
return null;
}
[DebuggerStepThrough]
public static XmlElement AppendElement(this XmlNode element, string name) {
if (element == null) {
return null;
}
var d = element.NodeType != XmlNodeType.Document ? element.OwnerDocument : element as XmlDocument;
var e = d.CreateElement(name);
element.AppendChild(e);
return e;
}
public static XmlNode[] ToXmlNodeArray(this XmlNodeList nodes) {
if (nodes == null) {
return Empty<XmlNode>.Item;
}
var a = new XmlNode[nodes.Count];
var i = -1;
foreach (XmlNode item in nodes) {
a[++i] = item;
}
return a;
}
public static IList<TNode> ToNodeList<TNode>(this XmlNodeList nodes) where TNode : XmlNode {
if (nodes == null) {
return Empty<TNode>.Item;
}
var a = new List<TNode>(7);
foreach (var item in nodes) {
if (item is TNode n) {
a.Add(n);
}
}
return a;
}
public static IEnumerable<XmlElement> ChildrenOrFollowingSiblings(this XmlElement element) {
return new ChildrenOrFollowingElementEnumerator(element);
}
static class Empty<TNode>
{
public static readonly TNode[] Item = new TNode[0];
}
sealed class ChildrenOrFollowingElementEnumerator(XmlElement baseElement) : IEnumerable<XmlElement>, IEnumerator<XmlElement>
{
readonly XmlElement _base = baseElement;
XmlNode _active = baseElement;
public XmlElement Current => _active as XmlElement;
object IEnumerator.Current => _active;
public void Dispose() {}
public IEnumerator<XmlElement> GetEnumerator() {
return this;
}
public bool MoveNext() {
return _active != null
&& (_active.HasChildNodes && TryGetFirstChildElement(ref _active)
|| TryGetFirstFollowingElement(ref _active));
}
static bool TryGetFirstChildElement(ref XmlNode active) {
var c = active.FirstChild;
do {
if (c.NodeType == XmlNodeType.Element) {
active = c;
return true;
}
}
while ((c = c.NextSibling) != null);
return false;
}
static bool TryGetFirstFollowingElement(ref XmlNode active) {
XmlNode s;
while ((s = active.NextSibling) != null) {
if (s.NodeType == XmlNodeType.Element) {
active = s;
return true;
}
}
return false;
}
public void Reset() {
_active = _base;
}
IEnumerator IEnumerable.GetEnumerator() {
return this;
}
}
}
}
================================================
FILE: App/Common/app.manifest
================================================
<?xml version="1.0" encoding="utf-8"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3" >
<assemblyIdentity version="1.0.0.0" name="PDFPatcher.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<!-- This manifest fixes High DPI blurry issue -->
<asmv3:application>
<asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
<dpiAware>true</dpiAware>
</asmv3:windowsSettings>
</asmv3:application>
</assembly>
================================================
FILE: App/Configuration.Designer.cs
================================================
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace PDFPatcher {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Configuration {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Configuration() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("PDFPatcher.Configuration", typeof(Configuration).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to 书签文本.
/// </summary>
internal static string BookmarkText {
get {
return ResourceManager.GetString("BookmarkText", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 自定义工具栏按钮.
/// </summary>
internal static string CustomToolbarButtons {
get {
return ResourceManager.GetString("CustomToolbarButtons", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 文档属性.
/// </summary>
internal static string DocInfo {
get {
return ResourceManager.GetString("DocInfo", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 正文文本.
/// </summary>
internal static string DocText {
get {
return ResourceManager.GetString("DocText", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 编码方式.
/// </summary>
internal static string Encodings {
get {
return ResourceManager.GetString("Encodings", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 导出图片目录.
/// </summary>
internal static string Folders {
get {
return ResourceManager.GetString("Folders", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 信息文件.
/// </summary>
internal static string InfoFiles {
get {
return ResourceManager.GetString("InfoFiles", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 减少占用内存.
/// </summary>
internal static string OptimalMemoryUsage {
get {
return ResourceManager.GetString("OptimalMemoryUsage", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 优化处理效率.
/// </summary>
internal static string OptimalSpeed {
get {
return ResourceManager.GetString("OptimalSpeed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 处理选项.
/// </summary>
internal static string Options {
get {
return ResourceManager.GetString("Options", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 路径.
/// </summary>
internal static string Path {
get {
return ResourceManager.GetString("Path", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PDF读取方式.
/// </summary>
internal static string PdfLoadMode {
get {
return ResourceManager.GetString("PdfLoadMode", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to PDF阅读器路径.
/// </summary>
internal static string PdfReaderPath {
get {
return ResourceManager.GetString("PdfReaderPath", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 历史文件.
/// </summary>
internal static string RecentFiles {
get {
return ResourceManager.GetString("RecentFiles", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 替换文本.
/// </summary>
internal static string ReplaceItems {
get {
return ResourceManager.GetString("ReplaceItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 配置文件.
/// </summary>
internal static string Root {
get {
return ResourceManager.GetString("Root", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 保存程序配置.
/// </summary>
internal static string SaveAppSettings {
get {
return ResourceManager.GetString("SaveAppSettings", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 查找文本.
/// </summary>
internal static string SearchItems {
get {
return ResourceManager.GetString("SearchItems", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 输入文件.
/// </summary>
internal static string SourceFiles {
get {
return ResourceManager.GetString("SourceFiles", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 目标文件.
/// </summary>
internal static string TargetFiles {
get {
return ResourceManager.GetString("TargetFiles", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 版本.
/// </summary>
internal static string Version {
get {
return ResourceManager.GetString("Version", resourceCulture);
}
}
}
}
================================================
FILE: App/Configuration.resx
================================================
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="BookmarkText" xml:space="preserve">
<value>书签文本</value>
</data>
<data name="CustomToolbarButtons" xml:space="preserve">
<value>自定义工具栏按钮</value>
</data>
<data name="DocInfo" xml:space="preserve">
<value>文档属性</value>
</data>
<data name="DocText" xml:space="preserve">
<value>正文文本</value>
</data>
<data name="Encodings" xml:space="preserve">
<value>编码方式</value>
</data>
<data name="Folders" xml:space="preserve">
<value>导出图片目录</value>
</data>
<data name="InfoFiles" xml:space="preserve">
<value>信息文件</value>
</data>
<data name="OptimalMemoryUsage" xml:space="preserve">
<value>减少占用内存</value>
</data>
<data name="OptimalSpeed" xml:space="preserve">
<value>优化处理效率</value>
</data>
<data name="Options" xml:space="preserve">
<value>处理选项</value>
</data>
<data name="Path" xml:space="preserve">
<value>路径</value>
</data>
<data name="PdfLoadMode" xml:space="preserve">
<value>PDF读取方式</value>
</data>
<data name="PdfReaderPath" xml:space="preserve">
<value>PDF阅读器路径</value>
</data>
<data name="RecentFiles" xml:space="preserve">
<value>历史文件</value>
</data>
<data name="ReplaceItems" xml:space="preserve">
<value>替换文本</value>
</data>
<data name="Root" xml:space="preserve">
<value>配置文件</value>
</data>
<data name="SaveAppSettings" xml:space="preserve">
<value>保存程序配置</value>
</data>
<data name="SearchItems" xml:space="preserve">
<value>查找文本</value>
</data>
<data name="SourceFiles" xml:space="preserve">
<value>输入文件</value>
</data>
<data name="TargetFiles" xml:space="preserve">
<value>目标文件</value>
</data>
<data name="Version" xml:space="preserve">
<value>版本</value>
</data>
</root>
================================================
FILE: App/ConfigurationSerialization.cs
================================================
using System;
using System.Xml.Serialization;
using PowerJson;
namespace PDFPatcher
{
[XmlRoot("处理选项")]
public class ConfigurationSerialization
{
[XmlAttribute("检查更新时间")]
public DateTime CheckUpdateDate { get; set; }
[XmlAttribute("检查更新间隔")]
public int CheckUpdateInterval { get; set; } = 14;
[XmlAttribute("保存程序设置")]
public bool SaveAppSettings { get; set; }
[XmlAttribute("文档加载模式")]
public string PdfLoadMode { get; set; }
[XmlElement("编码设置")]
public EncodingOptions Encodings { get; set; }
///<summary>获取导出设置。</summary>
[XmlElement("信息文件导出设置")]
public ExporterOptions ExporterOptions { get; set; }
///<summary>获取导入设置。</summary>
[XmlElement("信息文件导入设置")]
public ImporterOptions ImporterOptions { get; set; }
///<summary>获取生成文档的设置。</summary>
[XmlElement("PDF文件处理设置")]
public MergerOptions MergerOptions { get; set; }
[XmlElement("PDF文档设置")]
public PatcherOptions PatcherOptions { get; set; }
[XmlElement("PDF编辑器设置")]
public PatcherOptions EditorOptions { get; set; }
[XmlElement("PDF阅读器设置")]
public ReaderOptions ReaderOptions { get; set; }
[XmlElement("自动生成书签设置")]
public AutoBookmarkOptions AutoBookmarkOptions { get; set; }
[XmlElement("导出图像设置")]
public ImageExtracterOptions ImageExporterOptions { get; set; }
[XmlElement("转为图片设置")]
public MuPDF.ImageRendererOptions ImageRendererOptions { get; set; }
[XmlElement("提取页面设置")]
public ExtractPageOptions ExtractPageOptions { get; set; }
[XmlElement("文本识别设置")]
public OcrOptions OcrOptions { get; set; }
[XmlElement("工具栏设置")]
public ToolbarOptions ToolbarOptions { get; set; }
[XmlElement("窗口设置")]
public WindowStatus WindowStatus { get; set; }
[JsonField("最近使用的文档")]
[JsonInclude]
[JsonSerializable]
internal AppContext.RecentItems Recent { get; set; }
}
}
================================================
FILE: App/Constants.cs
================================================
using System;
using System.Collections.Generic;
using iTextSharp.text.pdf;
using E = System.Text.Encoding;
namespace PDFPatcher
{
internal enum Function
{
FrontPage, InfoFileOptions, InfoExchanger, ExtractPages, ExtractImages, RenderPages, EditorOptions, Patcher, PatcherOptions, Merger, MergerOptions, About, Editor, Options, BookmarkGenerator, Ocr, Inspector, Rename, Log, Default, CustomizeToolbar
}
internal static class Constants
{
internal const string AppName = "PDF 补丁丁";
internal const string AppEngName = "PDFPatcher";
internal const string AppHomePage = "http://pdfpatcher.cnblogs.com";
internal const string AppRepository = "https://github.com/wmjordan/pdfpatcher";
internal const string AppRepository2 = "https://gitee.com/wmjordan/pdfpatcher";
internal const string AppUpdateFile = "http://files.cnblogs.com/pdfpatcher/pdfpatcher.update.xml";
/// <summary>
/// 信息文件根元素。
/// </summary>
internal const string PdfInfo = "PDF信息";
internal const string InfoDocVersion = "0.3.3";
internal const string ContentPrefix = "pdf";
internal const string ContentNamespace = "pdf:ContentXml";
internal static class FileExtensions
{
internal const string Json = ".json";
internal const string JsonFilter = "程序配置文件 (*.json)|*.json";
internal const string Pdf = ".pdf";
internal const string PdfFilter = "PDF 文件 (*.pdf)|*.pdf";
internal const string Txt = ".txt";
internal const string TxtFilter = "简易文本书签文件 (*.txt)|*.txt";
internal const string Xml = ".xml";
internal const string XmlFilter = "PDF 信息文件 (*.xml)|*.xml";
internal const string PdfOrXmlFilter = "PDF 文件或信息文件 (*.pdf, *.xml)|*.pdf;*.xml";
internal const string XmlOrTxtFilter = "书签文件 (*.xml, *.txt)|*.xml;*.txt";
internal const string AllEditableFilter = "所有包含 PDF 信息的文件(*.pdf,*.xml,*.txt)|*.pdf;*.xml;*.txt|" + PdfFilter + "|" + XmlFilter + "|" + TxtFilter;
internal const string AllFilter = "所有文件|*.*";
internal const string ImageFilter = "图片文件 (*.jpg, *.jpeg, *.tiff, *.tif, *.png, *.gif)|*.jpg;*.jpeg;*.tiff;*.tif;*.png;*.gif";
internal const string Tif = ".tif";
internal const string Tiff = ".tiff";
internal const string Jpg = ".jpg";
internal const string Jpeg = ".jpeg";
internal const string Png = ".png";
internal const string Gif = ".gif";
internal const string Jp2 = ".jp2";
internal const string Bmp = ".bmp";
internal const string Dat = ".dat";
internal const string Tmp = ".tmp";
internal const string Ttf = ".ttf";
internal const string Ttc = ".ttc";
internal const string Otf = ".otf";
internal readonly static string[] AllBookmarkExtension = { ".xml", ".txt" };
internal readonly static string[] PdfAndAllBookmarkExtension = { ".pdf", ".xml", ".txt" };
internal readonly static string[] AllSupportedImageExtension = { Tif, Jpg, Png, Gif, Tiff, Jpeg, Bmp, Jp2 };
}
#region 功能名称
static class Functions
{
internal const string FrontPage = "FrontPage";
internal const string Patcher = "Patcher";
internal const string Merger = "Merger";
internal const string ImageExtractor = "ImageExtractor";
internal const string PageExtractor = "PageExtractor";
internal const string PageRenderer = "PageRenderer";
internal const string BookmarkEditor = "BookmarkEditor";
internal const string BookmarkGenerator = "BookmarkGenerator";
internal const string Ocr = "Ocr";
internal const string Inspector = "Inspector";
internal const string Log = "Log";
internal const string About = "About";
}
#endregion
#region PDF 对象类型
internal static class ObjectTypes
{
internal static readonly string[] Names = { "字典", "名称", "数值", "文本", "数组", "布尔", "引用" };
internal static readonly int[] IDs = { PdfObject.DICTIONARY, PdfObject.NAME, PdfObject.NUMBER, PdfObject.STRING, PdfObject.ARRAY, PdfObject.BOOLEAN, PdfObject.INDIRECT };
}
#endregion
#region 文件名替代符
internal static class FileNameMacros
{
internal const string FileName = "<源文件名>";
internal const string FolderName = "<源目录名>";
internal const string PathName = "<源目录路径>";
internal const string TitleProperty = "<" + Info.Title + ">";
internal const string AuthorProperty = "<" + Info.Author + ">";
internal const string SubjectProperty = "<" + Info.Subject + ">";
internal const string KeywordsProperty = "<" + Info.Keywords + ">";
internal const string PageCount = "<页数>";
}
#endregion
#region 度量单位
internal static class Units
{
internal const string ThisName = "度量单位";
internal const string Unit = "单位";
internal const string Point = "点";
internal const string CM = "厘米";
internal const string MM = "毫米";
internal const string Inch = "英寸";
internal const float CmToPoint = 72f / 2.54f;
internal const float MmToPoint = 7.2f / 2.54f;
internal const float DefaultDpi = 72f;
internal static readonly string[] Names = { CM, MM, Inch, Point };
internal static readonly float[] Factors = { CmToPoint, MmToPoint, DefaultDpi, 1 };
}
#endregion
#region 对齐方式
internal static class Alignments
{
internal static readonly string[] HorizontalAlignments = { "左对齐", "水平居中", "右对齐" };
internal static readonly string[]
gitextract_ote2ujmh/ ├── .gitattributes ├── .github/ │ └── ISSUE_TEMPLATE/ │ ├── 其它问题.md │ ├── 新功能需求.md │ └── 缺陷问题报告.md ├── .gitignore ├── .textlintrc ├── App/ │ ├── .editorconfig │ ├── AppContext.cs │ ├── Commands.cs │ ├── Common/ │ │ ├── CommandRegistry.cs │ │ ├── DualKeyDictionary.cs │ │ ├── FileHelper.cs │ │ ├── FilePath.cs │ │ ├── FontHelper.cs │ │ ├── FontUtility.cs │ │ ├── FormHelper.cs │ │ ├── ImageBox/ │ │ │ ├── DragHandle.cs │ │ │ ├── DragHandleAnchor.cs │ │ │ ├── DragHandleCollection.cs │ │ │ └── ImageBoxEx.cs │ │ ├── ObjectListViewHelper.cs │ │ ├── PInvokeHelper.cs │ │ ├── ShortcutFile.cs │ │ ├── StringBuilderCache.cs │ │ ├── StringHelper.cs │ │ ├── ValueHelper.cs │ │ ├── XmlHelper.cs │ │ └── app.manifest │ ├── Configuration.Designer.cs │ ├── Configuration.resx │ ├── ConfigurationSerialization.cs │ ├── Constants.cs │ ├── Functions/ │ │ ├── AboutControl.Designer.cs │ │ ├── AboutControl.cs │ │ ├── AboutControl.resx │ │ ├── AboutPage.html │ │ ├── AppOptionForm.Designer.cs │ │ ├── AppOptionForm.cs │ │ ├── AppOptionForm.resx │ │ ├── AutoBookmark/ │ │ │ ├── EditAdjustmentForm.Designer.cs │ │ │ ├── EditAdjustmentForm.cs │ │ │ ├── EditAdjustmentForm.resx │ │ │ ├── FontFilterForm.Designer.cs │ │ │ ├── FontFilterForm.cs │ │ │ ├── FontFilterForm.resx │ │ │ ├── FontNameConditionEditor.Designer.cs │ │ │ ├── FontNameConditionEditor.cs │ │ │ ├── FontNameConditionEditor.resx │ │ │ ├── PageRangeConditionEditor.Designer.cs │ │ │ ├── PageRangeConditionEditor.cs │ │ │ ├── PageRangeConditionEditor.resx │ │ │ ├── TextConditionEditor.Designer.cs │ │ │ ├── TextConditionEditor.cs │ │ │ ├── TextConditionEditor.resx │ │ │ ├── TextPositionConditionEditor.Designer.cs │ │ │ ├── TextPositionConditionEditor.cs │ │ │ ├── TextPositionConditionEditor.resx │ │ │ ├── TextSizeConditionEditor.Designer.cs │ │ │ ├── TextSizeConditionEditor.cs │ │ │ └── TextSizeConditionEditor.resx │ │ ├── AutoBookmarkControl.Designer.cs │ │ ├── AutoBookmarkControl.cs │ │ ├── AutoBookmarkControl.resx │ │ ├── BookmarkControl.Designer.cs │ │ ├── BookmarkControl.cs │ │ ├── BookmarkControl.resx │ │ ├── CustomButton/ │ │ │ └── GlassButton.cs │ │ ├── CustomizeToolbarForm.Designer.cs │ │ ├── CustomizeToolbarForm.cs │ │ ├── CustomizeToolbarForm.resx │ │ ├── DocumentInspector/ │ │ │ ├── AddPdfObjectForm.Designer.cs │ │ │ ├── AddPdfObjectForm.cs │ │ │ ├── AddPdfObjectForm.resx │ │ │ ├── ImageViewerForm.Designer.cs │ │ │ ├── ImageViewerForm.cs │ │ │ ├── ImageViewerForm.resx │ │ │ ├── TextViewerForm.Designer.cs │ │ │ ├── TextViewerForm.cs │ │ │ └── TextViewerForm.resx │ │ ├── DocumentInspectorControl.Designer.cs │ │ ├── DocumentInspectorControl.cs │ │ ├── DocumentInspectorControl.resx │ │ ├── DocumentOption/ │ │ │ ├── DocumentFontListForm.Designer.cs │ │ │ ├── DocumentFontListForm.cs │ │ │ ├── DocumentFontListForm.resx │ │ │ ├── DocumentInfoEditor.Designer.cs │ │ │ ├── DocumentInfoEditor.cs │ │ │ ├── DocumentInfoEditor.resx │ │ │ ├── FontCharSubstitutionForm.Designer.cs │ │ │ ├── FontCharSubstitutionForm.cs │ │ │ ├── FontCharSubstitutionForm.resx │ │ │ ├── FontSubstitutionsEditor.Designer.cs │ │ │ ├── FontSubstitutionsEditor.cs │ │ │ ├── FontSubstitutionsEditor.resx │ │ │ ├── PageLabelEditor.Designer.cs │ │ │ ├── PageLabelEditor.cs │ │ │ ├── PageLabelEditor.resx │ │ │ ├── PageSettingsEditor.Designer.cs │ │ │ ├── PageSettingsEditor.cs │ │ │ └── PageSettingsEditor.resx │ │ ├── DraggableForm.cs │ │ ├── Editor/ │ │ │ ├── ActionEditorForm.Designer.cs │ │ │ ├── ActionEditorForm.cs │ │ │ ├── ActionEditorForm.resx │ │ │ ├── AutoBookmarkForm.Designer.cs │ │ │ ├── AutoBookmarkForm.cs │ │ │ ├── AutoBookmarkForm.resx │ │ │ ├── AutoResizingTextBox.cs │ │ │ ├── BookmarkEditorView.Designer.cs │ │ │ ├── BookmarkEditorView.cs │ │ │ ├── BookmarkEditorView.resx │ │ │ ├── Commands/ │ │ │ │ ├── BookmarkActionCommand.cs │ │ │ │ ├── BookmarkLevelCommand.cs │ │ │ │ ├── BookmarkMarkerCommand.cs │ │ │ │ ├── BookmarkPageCommand.cs │ │ │ │ ├── BookmarkSelectionCommand.cs │ │ │ │ ├── BookmarkStyleCommand.cs │ │ │ │ ├── CopyBookmarkItemCommand.cs │ │ │ │ ├── DeleteBookmarkItemCommand.cs │ │ │ │ ├── DocumentPropertyCommand.cs │ │ │ │ ├── InsertBookmarkCommand.cs │ │ │ │ ├── InsertPageLabelCommand.cs │ │ │ │ ├── LoadDocumentCommand.cs │ │ │ │ ├── OcrPageCommand.cs │ │ │ │ ├── PagePropertiesCommand.cs │ │ │ │ ├── PasteBookmarkItemCommand.cs │ │ │ │ ├── QuickSelectCommand.cs │ │ │ │ ├── SaveDocumentCommand.cs │ │ │ │ ├── SavePageImageCommand.cs │ │ │ │ ├── SimpleBookmarkCommand.cs │ │ │ │ ├── ViewerCommand.cs │ │ │ │ └── ViewerScrollToBookmarkCommand.cs │ │ │ ├── Controller.cs │ │ │ ├── CustomPatternForm.Designer.cs │ │ │ ├── CustomPatternForm.cs │ │ │ ├── CustomPatternForm.resx │ │ │ ├── DocumentInfoForm.Designer.cs │ │ │ ├── DocumentInfoForm.cs │ │ │ ├── DocumentInfoForm.resx │ │ │ ├── DoubleClickableRadioButton.cs │ │ │ ├── EditModel.cs │ │ │ ├── EditorCommands.cs │ │ │ ├── IEditView.cs │ │ │ ├── IEditorCommand.cs │ │ │ ├── InsertBookmarkForm.Designer.cs │ │ │ ├── InsertBookmarkForm.cs │ │ │ ├── InsertBookmarkForm.resx │ │ │ ├── InsertPageLabelForm.Designer.cs │ │ │ ├── InsertPageLabelForm.cs │ │ │ ├── InsertPageLabelForm.resx │ │ │ ├── NewCoordinateEntryForm.Designer.cs │ │ │ ├── NewCoordinateEntryForm.cs │ │ │ ├── NewCoordinateEntryForm.resx │ │ │ ├── PagePropertyForm.Designer.cs │ │ │ ├── PagePropertyForm.cs │ │ │ ├── PagePropertyForm.resx │ │ │ ├── Parts/ │ │ │ │ ├── BookmarkInViewSynchronizer.cs │ │ │ │ └── BookmarkTitleEditHandler.cs │ │ │ ├── SavePdfForm.Designer.cs │ │ │ ├── SavePdfForm.cs │ │ │ ├── SavePdfForm.resx │ │ │ ├── SearchBookmarkForm.Designer.cs │ │ │ ├── SearchBookmarkForm.cs │ │ │ ├── SearchBookmarkForm.resx │ │ │ ├── ShiftPageNumberEntryForm.Designer.cs │ │ │ ├── ShiftPageNumberEntryForm.cs │ │ │ ├── ShiftPageNumberEntryForm.resx │ │ │ ├── ViewerControl.cs │ │ │ ├── ViewerStructures.cs │ │ │ ├── ZoomRateEntryForm.Designer.cs │ │ │ ├── ZoomRateEntryForm.cs │ │ │ └── ZoomRateEntryForm.resx │ │ ├── EditorControl.Designer.cs │ │ ├── EditorControl.cs │ │ ├── EditorControl.resx │ │ ├── ExtractImageControl.Designer.cs │ │ ├── ExtractImageControl.cs │ │ ├── ExtractImageControl.resx │ │ ├── ExtractPageControl.Designer.cs │ │ ├── ExtractPageControl.cs │ │ ├── ExtractPageControl.resx │ │ ├── FileListHelper.cs │ │ ├── FormState.cs │ │ ├── FrontPage.html │ │ ├── FrontPageControl.Designer.cs │ │ ├── FrontPageControl.cs │ │ ├── FrontPageControl.resx │ │ ├── FunctionControl.cs │ │ ├── FunctionTabContainer.cs │ │ ├── HistoryComboBox.cs │ │ ├── HtmlPageControl.cs │ │ ├── IDocumentEditor.cs │ │ ├── IResettableControl.cs │ │ ├── ITextInfoFilterEditor.cs │ │ ├── InfoExchangerControl.Designer.cs │ │ ├── InfoExchangerControl.cs │ │ ├── InfoExchangerControl.resx │ │ ├── InfoFileOptionControl.Designer.cs │ │ ├── InfoFileOptionControl.cs │ │ ├── InfoFileOptionControl.resx │ │ ├── ListViewItemComparer.cs │ │ ├── MacroMenu.cs │ │ ├── MergerControl.Designer.cs │ │ ├── MergerControl.cs │ │ ├── MergerControl.resx │ │ ├── MergerOptionForm.Designer.cs │ │ ├── MergerOptionForm.cs │ │ ├── MergerOptionForm.resx │ │ ├── OcrControl.Designer.cs │ │ ├── OcrControl.cs │ │ ├── OcrControl.resx │ │ ├── PasswordEntryForm.Designer.cs │ │ ├── PasswordEntryForm.cs │ │ ├── PasswordEntryForm.resx │ │ ├── PatcherControl.Designer.cs │ │ ├── PatcherControl.cs │ │ ├── PatcherControl.resx │ │ ├── PatcherOptionForm.Designer.cs │ │ ├── PatcherOptionForm.cs │ │ ├── PatcherOptionForm.resx │ │ ├── PatcherOptionsControl.Designer.cs │ │ ├── PatcherOptionsControl.cs │ │ ├── PatcherOptionsControl.resx │ │ ├── RecentFileMenuHelper.cs │ │ ├── RenameControl.Designer.cs │ │ ├── RenameControl.cs │ │ ├── RenameControl.resx │ │ ├── RenamePreviewForm.Designer.cs │ │ ├── RenamePreviewForm.cs │ │ ├── RenamePreviewForm.resx │ │ ├── RenderImageControl.Designer.cs │ │ ├── RenderImageControl.cs │ │ ├── RenderImageControl.resx │ │ ├── ReportControl.Designer.cs │ │ ├── ReportControl.cs │ │ ├── ReportControl.resx │ │ ├── RichTextBoxEx.cs │ │ ├── SourceFileControl.Designer.cs │ │ ├── SourceFileControl.cs │ │ ├── SourceFileControl.resx │ │ ├── SourceImageOptionForm.Designer.cs │ │ ├── SourceImageOptionForm.cs │ │ ├── SourceImageOptionForm.resx │ │ ├── SourcePdfOptionForm.Designer.cs │ │ ├── SourcePdfOptionForm.cs │ │ ├── SourcePdfOptionForm.resx │ │ ├── TargetFileControl.Designer.cs │ │ ├── TargetFileControl.cs │ │ ├── TargetFileControl.resx │ │ ├── UpdateForm.Designer.cs │ │ ├── UpdateForm.cs │ │ ├── UpdateForm.resx │ │ ├── ViewerPreferenceEditor.Designer.cs │ │ ├── ViewerPreferenceEditor.cs │ │ └── ViewerPreferenceEditor.resx │ ├── Lib/ │ │ ├── FreeImage.NET.chm │ │ ├── FreeImage.NET.chw │ │ ├── FreeImageNET.XML │ │ ├── PowerJSON.XML │ │ └── iTextSharp.xml │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── Model/ │ │ ├── AutoBookmarkCondition.cs │ │ ├── AutoBookmarkContext.cs │ │ ├── BookmarkSettings.cs │ │ ├── BookmarkStatus.cs │ │ ├── Bound.cs │ │ ├── ColorSpaces/ │ │ │ ├── CIELab.cs │ │ │ ├── CIEXYZ.cs │ │ │ ├── CMYK.cs │ │ │ ├── ColorSpaceHelper.cs │ │ │ ├── HSB.cs │ │ │ ├── HSL.cs │ │ │ ├── RGB.cs │ │ │ └── YUV.cs │ │ ├── CoordinateTranslationSettings.cs │ │ ├── DistanceInfo.cs │ │ ├── DocumentObject.cs │ │ ├── FontInfo.cs │ │ ├── GeneralInfo.cs │ │ ├── GraphicsState.cs │ │ ├── IHierarchicalObject.cs │ │ ├── ITextRegion.cs │ │ ├── InsertBookmarkPositionType.cs │ │ ├── Margins.cs │ │ ├── MatchPattern.cs │ │ ├── PDFStructInfo.xml │ │ ├── PDFStructInfo.xsd │ │ ├── PageBoxSettings.cs │ │ ├── PageFilterFlag.cs │ │ ├── PageLabel.cs │ │ ├── PageRange.cs │ │ ├── PageRangeCollection.cs │ │ ├── PageResizing.cs │ │ ├── PageSettings.cs │ │ ├── PaperSize.cs │ │ ├── PdfDocumentFont.cs │ │ ├── PdfImageData.cs │ │ ├── PdfInfoXmlDocument.cs │ │ ├── PdfModelHelper.cs │ │ ├── PdfNavigator.cs │ │ ├── PdfObjectType.cs │ │ ├── PdfPageCommand.cs │ │ ├── PdfPath/ │ │ │ ├── Context.cs │ │ │ ├── IPathAxis.cs │ │ │ ├── IPathExpression.cs │ │ │ ├── IPathFunction.cs │ │ │ ├── IPathPredicate.cs │ │ │ ├── IPathValue.cs │ │ │ ├── PathAxes.cs │ │ │ ├── PathAxisType.cs │ │ │ ├── PathCompiler.cs │ │ │ ├── PathValue.cs │ │ │ ├── PathValueType.cs │ │ │ └── PredicateOperatorType.cs │ │ ├── PdfPathDocument.cs │ │ ├── PdfStructInfo.cs │ │ ├── ResourceReference.cs │ │ ├── SourceItem.cs │ │ ├── TextInfo.cs │ │ ├── TextLine.cs │ │ ├── TextRegion.cs │ │ ├── UnitConverter.cs │ │ └── WritingDirection.cs │ ├── Options/ │ │ ├── AutoBookmarkOptions.cs │ │ ├── DocumentOptions.cs │ │ ├── EncodingOptions.cs │ │ ├── ExporterOptions.cs │ │ ├── ExtractPageOptions.cs │ │ ├── ImageExtracterOptions.cs │ │ ├── ImporterOptions.cs │ │ ├── MergerOptions.cs │ │ ├── OcrOptions.cs │ │ ├── PatcherOptions.cs │ │ ├── ReaderOptions.cs │ │ ├── ToolbarOptions.cs │ │ ├── ViewerOptions.cs │ │ └── WindowStatus.cs │ ├── PDFPatcher.csproj │ ├── Processor/ │ │ ├── AutoBookmarkCreator.cs │ │ ├── AutoBookmarkFilters/ │ │ │ ├── AutoBookmarkFilter.cs │ │ │ ├── FontNameFilter.cs │ │ │ ├── MultiConditionFilter.cs │ │ │ ├── PageRangeFilter.cs │ │ │ ├── TextFilter.cs │ │ │ ├── TextPositionFilter.cs │ │ │ └── TextSizeFilter.cs │ │ ├── ContentProcessors/ │ │ │ ├── CleanContentStreamProcessor.cs │ │ │ ├── ColorizeBinaryImageProcessor.cs │ │ │ ├── CommonProcessor.cs │ │ │ ├── FixContentProcessor.cs │ │ │ ├── IDocProcessor.cs │ │ │ ├── IPageProcessor.cs │ │ │ ├── ImageDeskewProcessor.cs │ │ │ ├── ImageRecompressor.cs │ │ │ ├── ImportOcrResultProcessor.cs │ │ │ ├── PageDimensionProcessor.cs │ │ │ ├── RemoveAnnotationProcessor.cs │ │ │ ├── RemoveBookmarkProcessor.cs │ │ │ ├── RemoveDictionaryItemProcessor.cs │ │ │ ├── RemoveEmptyCommandProcessor.cs │ │ │ ├── RemoveFormProcessor.cs │ │ │ ├── RemoveTextBlockProcessor.cs │ │ │ ├── RemoveThumbnailProcessor.cs │ │ │ ├── RemoveWrappedCommandProcessor.cs │ │ │ └── ReplaceFontProcessor.cs │ │ ├── DocInfoExporter.cs │ │ ├── DocInfoImporter.cs │ │ ├── DocProcessorContext.cs │ │ ├── DocumentSink.cs │ │ ├── IInfoDocProcessor.cs │ │ ├── IProcessor.cs │ │ ├── ImageExtractor.cs │ │ ├── Imaging/ │ │ │ ├── BitmapHelper.cs │ │ │ ├── FreeImageHelper.cs │ │ │ ├── ImageDeskew.cs │ │ │ ├── ImageDisposition.cs │ │ │ ├── ImageInfo.cs │ │ │ ├── JBig2Decoder.cs │ │ │ ├── JBig2Encoder.cs │ │ │ ├── JBig2Structs.cs │ │ │ ├── JpgHelper.cs │ │ │ ├── TiffHelper.cs │ │ │ ├── WuColorQuantizer.cs │ │ │ └── WuQuantize.c │ │ ├── InfoDocProcessor/ │ │ │ ├── CollapseBookmarkProcessor.cs │ │ │ ├── ConvertUnitProcessor.cs │ │ │ ├── ForceInternalDestinationProcessor.cs │ │ │ ├── GotoDestinationProcessor.cs │ │ │ ├── RemoveZoomRateProcessor.cs │ │ │ └── ShiftPageProcessor.cs │ │ ├── InfoXmlProcessors/ │ │ │ ├── BookmarkMatcher.cs │ │ │ ├── BookmarkOpenStatusProcessor.cs │ │ │ ├── ChangeCoordinateProcessor.cs │ │ │ ├── ChangePageCoordinateProcessor.cs │ │ │ ├── ChangePageNumberProcessor.cs │ │ │ ├── ChangeZoomRateProcessor.cs │ │ │ ├── ClearDestinationOffsetProcessor.cs │ │ │ ├── DestinationGotoTopProcessor.cs │ │ │ ├── ForceInternalLinkProcessor.cs │ │ │ ├── IPdfInfoXmlProcessor.cs │ │ │ ├── LevelDownProcessor.cs │ │ │ ├── LevelUpProcessor.cs │ │ │ ├── ReplaceTitleTextProcessor.cs │ │ │ ├── SetCaseProcessor.cs │ │ │ ├── SetTextColorProcessor.cs │ │ │ ├── SetTextStyleProcessor.cs │ │ │ └── UndoAction.cs │ │ ├── ModiOcr.cs │ │ ├── Mupdf/ │ │ │ ├── ImageRendererOptions.cs │ │ │ ├── MuPDFExtensions.cs │ │ │ ├── PageLabelCollection.cs │ │ │ └── RenderResultCache.cs │ │ ├── NullXmlWriter.cs │ │ ├── OcrProcessor.cs │ │ ├── OperatorGroup.cs │ │ ├── OutlineManager.cs │ │ ├── OutlineManager.iText.cs │ │ ├── PageProcessorContext.cs │ │ ├── PdfActionExporter.cs │ │ ├── PdfContentExport.cs │ │ ├── PdfContentStreamParser.cs │ │ ├── PdfDocumentCreator.cs │ │ ├── PdfHelper.cs │ │ ├── PdfPageCommandProcessor.cs │ │ ├── PdfPageExtractor.cs │ │ ├── PdfProcessingEngine.cs │ │ ├── SourceItemSerializer.cs │ │ └── Worker.cs │ ├── Program.cs │ ├── Properties/ │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ └── Resources.resx │ ├── ShellHelper.cs │ ├── Toolkit.cs │ ├── Tracker.cs │ ├── app.config │ └── packages.config ├── CODEOWNERS ├── CONTRIBUTING.zh-CN.md ├── JBig2/ │ ├── COPYING │ ├── JBig2.sln │ ├── LICENSE │ ├── README │ ├── include/ │ │ ├── config_win32.h │ │ ├── getopt.h │ │ ├── jbig2.h │ │ ├── jbig2_arith.h │ │ ├── jbig2_arith_iaid.h │ │ ├── jbig2_arith_int.h │ │ ├── jbig2_generic.h │ │ ├── jbig2_halftone.h │ │ ├── jbig2_huffman.h │ │ ├── jbig2_hufftab.h │ │ ├── jbig2_image.h │ │ ├── jbig2_image_rw.h │ │ ├── jbig2_mmr.h │ │ ├── jbig2_page.h │ │ ├── jbig2_priv.h │ │ ├── jbig2_refinement.h │ │ ├── jbig2_segment.h │ │ ├── jbig2_symbol_dict.h │ │ ├── jbig2_text.h │ │ ├── jbig2arith.h │ │ ├── jbig2enc.h │ │ ├── jbig2enc.lossless.h │ │ ├── jbig2segments.h │ │ ├── jbig2structs.h │ │ ├── jbig2sym.h │ │ ├── memento.h │ │ ├── os_types.h │ │ ├── pix.h │ │ ├── sha1.h │ │ ├── stdint.h │ │ └── unistd.h │ ├── jbig2.def │ ├── jbig2.vcxproj │ ├── jbig2.vcxproj.filters │ └── src/ │ ├── jbig2.c │ ├── jbig2.cc │ ├── jbig2_arith.c │ ├── jbig2_arith_iaid.c │ ├── jbig2_arith_int.c │ ├── jbig2_generic.c │ ├── jbig2_halftone.c │ ├── jbig2_huffman.c │ ├── jbig2_hufftab.c │ ├── jbig2_image.c │ ├── jbig2_image_pbm.c │ ├── jbig2_image_png.c │ ├── jbig2_mmr.c │ ├── jbig2_page.c │ ├── jbig2_refinement.c │ ├── jbig2_segment.c │ ├── jbig2_symbol_dict.c │ ├── jbig2_text.c │ ├── jbig2arith.cc │ ├── jbig2dec.c │ ├── jbig2enc.cc │ ├── jbig2enc.lossless.cc │ ├── jbig2sym.cc │ ├── memcmp.c │ ├── memento.c │ ├── pbm2png.c │ └── sha1.c ├── PDFPatcher.sln ├── README.md ├── doc/ │ ├── example.xml │ └── 使用手册.md ├── 使用手册.docx ├── 授权协议.txt └── 更新历史.txt
Showing preview only (330K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (3619 symbols across 408 files)
FILE: App/AppContext.cs
class AppContext (line 12) | internal static class AppContext
method AppContext (line 31) | static AppContext() {
class RecentItems (line 110) | [JsonSerializable]
method AddHistoryItem (line 135) | internal static void AddHistoryItem(IList<string> list, string item) {
method CleanUpInexistentFiles (line 164) | internal static void CleanUpInexistentFiles(List<string> list) {
method CleanUpInexistentFolders (line 168) | internal static void CleanUpInexistentFolders(List<string> list) {
method Load (line 172) | internal static bool Load(string path) {
method LoadJson (line 176) | internal static bool LoadJson(string path) {
method Save (line 251) | internal static void Save(string path, bool saveHistoryFileList, bool ...
method SaveJson (line 260) | static void SaveJson(FilePath path, bool saveHistoryFileList, bool ski...
method WriteRecentFiles (line 290) | private static void WriteRecentFiles(XmlWriter writer, IList<string> l...
FILE: App/Commands.cs
class Commands (line 6) | static class Commands
FILE: App/Common/CommandRegistry.cs
type ICommand (line 11) | interface ICommand<P>
method Process (line 13) | void Process(P context, params string[] parameters);
class CommandRegistry (line 20) | sealed class CommandRegistry<P>
method Register (line 29) | public void Register(ICommand<P> command, params string[] commandIDs) {
method Process (line 42) | public bool Process(string commandID, P context, params string[] param...
FILE: App/Common/DualKeyDictionary.cs
class DualKeyDictionary (line 6) | public class DualKeyDictionary<K, V> : IDictionary<K, V>
method DualKeyDictionary (line 11) | public DualKeyDictionary() {
method GetKeyByValue (line 15) | public K GetKeyByValue(V value) {
method Add (line 21) | public void Add(K key, V value) {
method ContainsKey (line 26) | public bool ContainsKey(K key) {
method ContainsValue (line 29) | public bool ContainsValue(V value) {
method Remove (line 35) | public bool Remove(K key) {
method TryGetValue (line 45) | public bool TryGetValue(K key, out V value) {
method Add (line 63) | public void Add(KeyValuePair<K, V> item) {
method Clear (line 67) | public void Clear() {
method Contains (line 72) | public bool Contains(KeyValuePair<K, V> item) {
method CopyTo (line 76) | public void CopyTo(KeyValuePair<K, V>[] array, int arrayIndex) {
method Remove (line 84) | public bool Remove(KeyValuePair<K, V> item) {
method GetEnumerator (line 92) | public IEnumerator<KeyValuePair<K, V>> GetEnumerator() {
method GetEnumerator (line 100) | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnume...
FILE: App/Common/FileHelper.cs
class FileHelper (line 6) | static class FileHelper
type OverwriteType (line 8) | enum OverwriteType
method HasExtension (line 14) | public static bool HasExtension(FilePath fileName, string extension) {
method HasFileNameMacro (line 17) | public static bool HasFileNameMacro(string fileName) {
method NumericAwareComparePath (line 29) | public static int NumericAwareComparePath(string path1, string path2) {
method ToLowerAscii (line 110) | static char ToLowerAscii(char c) {
method CheckOverwrite (line 114) | internal static bool CheckOverwrite(string targetFile) {
method CombinePath (line 149) | public static string CombinePath(string path1, string path2) {
method ComparePath (line 168) | public static bool ComparePath(FilePath path1, FilePath path2) {
method IsPathValid (line 172) | public static bool IsPathValid(string filePath) {
method IsPathSeparator (line 176) | static bool IsPathSeparator(char c) {
method ResetOverwriteMode (line 180) | internal static void ResetOverwriteMode() {
method MakePathRootedAndWithExtension (line 184) | internal static string MakePathRootedAndWithExtension(string path, str...
method AttachExtensionName (line 189) | static FilePath AttachExtensionName(FilePath fileName, string extensio...
method GetNewFileName (line 193) | static string GetNewFileName(string fileName, string extName) {
method GetValidFileName (line 201) | public static string GetValidFileName(FilePath fileName) {
method GetNewFileNameFromSourceFile (line 204) | internal static string GetNewFileNameFromSourceFile(string fileName, s...
method GetTempNameFromFileDirectory (line 211) | internal static string GetTempNameFromFileDirectory(string fileName, s...
method GetEllipticPath (line 216) | public static string GetEllipticPath(string path, int length) {
method DumpBytes (line 225) | public static byte[] DumpBytes(this byte[] source, FilePath path) {
method DumpBytes (line 228) | public static byte[] DumpBytes(this byte[] source, FilePath path, int ...
method DumpHexBinBytes (line 237) | public static byte[] DumpHexBinBytes(this byte[] source, FilePath path) {
class LocaleInfo (line 262) | static class LocaleInfo
FILE: App/Common/FilePath.cs
type FilePath (line 13) | public readonly struct FilePath : IEquatable<FilePath>
method FilePath (line 39) | public FilePath(string path) : this(path, true) { }
method FilePath (line 41) | internal FilePath(string path, bool trim) {
method AppendPathSeparator (line 184) | public FilePath AppendPathSeparator() {
method TrimPathSeparator (line 191) | public FilePath TrimPathSeparator() {
method ChangeExtension (line 210) | public FilePath ChangeExtension(string extension) {
method Combine (line 236) | public FilePath Combine(FilePath path) {
method Combine (line 244) | public FilePath Combine(FilePath path, bool rootAsRelative) {
method CreateDirectory (line 275) | public FilePath CreateDirectory() {
method CreateContainingDirectory (line 288) | public FilePath CreateContainingDirectory() {
method DeleteFile (line 300) | public void DeleteFile() {
method DeleteDirectory (line 306) | public void DeleteDirectory(bool recursive) {
method EnsureExtension (line 314) | public FilePath EnsureExtension(string extension) {
method FromRoot (line 321) | public static FilePath FromRoot(string path) {
method GetDescription (line 327) | public string GetDescription() {
method GetFiles (line 334) | public FilePath[] GetFiles(string pattern) {
method GetDirectories (line 341) | public FilePath[] GetDirectories(string pattern) {
method GetFiles (line 349) | public FilePath[] GetFiles(string pattern, Predicate<string> filter) {
method GetFiles (line 383) | static FilePath[] GetFiles(string directory, string filePattern, Predi...
method GetDirectories (line 394) | public FilePath[] GetDirectories(string pattern, Predicate<string> fil...
method GetDirectories (line 428) | static FilePath[] GetDirectories(string directory, string filePattern,...
method GetDirectories (line 434) | static NameList GetDirectories(string path, string[] parts, int partCo...
method GetDirectoriesRecursively (line 475) | static void GetDirectoriesRecursively(string directoryPath, ref NameLi...
method GetParts (line 490) | public string[] GetParts() {
method GetParts (line 497) | public string[] GetParts(bool removeInvalidParts) {
method GetRelativePath (line 585) | public FilePath GetRelativePath(FilePath path) {
method HasExtension (line 626) | public bool HasExtension(string extension) {
method HasExtension (line 635) | public bool HasExtension(params string[] extensions) {
method IsInDirectory (line 658) | public bool IsInDirectory(FilePath containingPath, bool rootAsRelative) {
method IsDirectorySeparator (line 667) | static bool IsDirectorySeparator(char ch) {
method IsSubPath (line 673) | public bool IsSubPath(bool rootAsRelative) {
method Normalize (line 716) | public FilePath Normalize() {
method OpenFileReader (line 734) | public Stream OpenFileReader() {
method OpenFileWriter (line 739) | public Stream OpenFileWriter(bool overwrite) {
method OpenFile (line 745) | public Stream OpenFile(FileMode mode, FileAccess access, FileShare sha...
method OpenFile (line 754) | public Stream OpenFile(FileMode mode, FileAccess access, FileShare sha...
method OpenTextReader (line 761) | public StreamReader OpenTextReader(Encoding encoding) {
method OpenTextWriter (line 769) | public StreamWriter OpenTextWriter(bool append, Encoding encoding) {
method ReadAllBytes (line 777) | public byte[] ReadAllBytes() { return ReadAllBytes(-1); }
method ReadAllBytes (line 781) | public byte[] ReadAllBytes(int maxBytes) {
method ReadTextFile (line 802) | public string ReadTextFile(Encoding encoding) {
method ReadLines (line 809) | public IEnumerable<string> ReadLines(Encoding encoding) {
method WriteAllBytes (line 818) | public void WriteAllBytes(bool append, byte[] bytes) {
method WriteAllText (line 833) | public void WriteAllText(bool append, Encoding encoding, string text) {
method WriteAllLines (line 846) | public void WriteAllLines(bool append, Encoding encoding, IEnumerable<...
method WriteAllLines (line 858) | public void WriteAllLines(bool append, Encoding encoding, params strin...
method StartProcess (line 865) | public Process StartProcess(string arguments) {
method StartProcess (line 871) | public Process StartProcess() {
method SubstituteInvalidChars (line 878) | public FilePath SubstituteInvalidChars(char substitution) {
method ToFullPath (line 900) | public FilePath ToFullPath() {
method ToFileInfo (line 909) | [DebuggerStepThrough]
method ToFileVersionInfo (line 918) | [DebuggerStepThrough]
method ToDirectoryInfo (line 928) | [DebuggerStepThrough]
method ToUri (line 938) | [DebuggerStepThrough]
method Equals (line 1026) | public bool Equals(FilePath other) {
method Equals (line 1036) | [DebuggerStepThrough]
method GetHashCode (line 1043) | [DebuggerStepThrough]
method ToString (line 1051) | [DebuggerStepThrough]
FILE: App/Common/FontHelper.cs
class FontHelper (line 10) | static class FontHelper
method GetInstalledFonts (line 18) | public static Dictionary<string, string> GetInstalledFonts(bool includ...
method GetFontsFromRegistryKey (line 29) | static void GetFontsFromRegistryKey(bool includeFamilyName, Dictionary...
method AddFontNames (line 68) | static void AddFontNames(Dictionary<string, string> fontNames, string ...
method AddFontName (line 95) | static void AddFontName(Dictionary<string, string> fontNames, string n...
class NativeMethods (line 101) | static class NativeMethods
method AddFontResourceEx (line 103) | [DllImport("Gdi32.dll", CharSet = CharSet.Unicode)]
method RemoveFontResourceEx (line 105) | [DllImport("Gdi32.dll", CharSet = CharSet.Unicode)]
method LoadFont (line 108) | internal static int LoadFont(string path) {
method RemoveFont (line 111) | internal static int RemoveFont(string path) {
FILE: App/Common/FontUtility.cs
class FontUtility (line 7) | static class FontUtility
method ListInstalledFonts (line 23) | static void ListInstalledFonts() {
type FriendlyFontName (line 47) | internal struct FriendlyFontName : IComparable<FriendlyFontName>
method FriendlyFontName (line 51) | public FriendlyFontName(string originalName, string displayName) {
method ToString (line 55) | public override string ToString() {
method CompareTo (line 61) | int IComparable<FriendlyFontName>.CompareTo(FriendlyFontName other) {
FILE: App/Common/FormHelper.cs
class FormHelper (line 8) | static class FormHelper
method IsEmptyOrTransparent (line 18) | public static bool IsEmptyOrTransparent(this Color color) {
method Round (line 21) | public static Point Round(this PointF point) {
method Union (line 24) | public static RectangleF Union(this RectangleF rectangle, RectangleF o...
method Transpose (line 32) | public static Point Transpose(this Point point, int x, int y) {
method Transpose (line 35) | public static Point Transpose(this Point point, Point transpose) {
method Scale (line 38) | public static Size Scale(this Size size, float scale) {
method OnFirstLoad (line 41) | public static void OnFirstLoad(this Form form, Action handler) {
method SetIcon (line 44) | public static void SetIcon(this Form form, Bitmap bitmap) {
method OnFirstLoad (line 47) | public static void OnFirstLoad(this UserControl control, Action handle...
method SetValue (line 50) | public static ProgressBar SetValue(this ProgressBar control, int value) {
method SetValue (line 56) | public static NumericUpDown SetValue(this NumericUpDown box, int value) {
method SetValue (line 59) | public static NumericUpDown SetValue(this NumericUpDown box, float val...
method SetValue (line 62) | public static NumericUpDown SetValue(this NumericUpDown box, double va...
method SetValue (line 65) | public static NumericUpDown SetValue(this NumericUpDown box, decimal v...
method Select (line 72) | public static ListBox Select(this ListBox control, string item) {
method Select (line 82) | public static ComboBox Select(this ComboBox control, string item) {
method Select (line 92) | public static ListBox Select(this ListBox control, int index) {
method Select (line 102) | public static ComboBox Select(this ComboBox control, int index) {
method AddRange (line 112) | public static ComboBox AddRange(this ComboBox view, params object[] va...
method AppendLine (line 116) | public static TTextBox AppendLine<TTextBox>(this TTextBox box) where T...
method AppendLine (line 120) | public static TTextBox AppendLine<TTextBox>(this TTextBox box, string ...
method SetLocation (line 124) | public static void SetLocation(this FileDialog dialog, string path) {
method ToggleEnabled (line 131) | public static ToolStrip ToggleEnabled(this ToolStrip toolStrip, bool e...
method GetDpiScale (line 140) | public static float GetDpiScale(this Control control) {
method ScaleColumnWidths (line 146) | public static void ScaleColumnWidths(this ListView listView, float sca...
method ScaleColumnWidths (line 151) | public static void ScaleColumnWidths(this ListView listView) {
method ScaleIcons (line 158) | public static ToolStrip ScaleIcons(this ToolStrip toolStrip, int size) {
method ScaleIcons (line 162) | public static ToolStrip ScaleIcons(this ToolStrip toolStrip, Size size) {
method InsertLinkedText (line 171) | internal static void InsertLinkedText(this RichTextBoxLinks.RichTextBo...
method FeedbackDragFileOver (line 191) | public static void FeedbackDragFileOver(this DragEventArgs args, param...
method DropFileOver (line 203) | public static string[] DropFileOver(this DragEventArgs args, params st...
method DropFileOver (line 213) | public static bool DropFileOver(this Control control, DragEventArgs ar...
method HidePopupMenu (line 222) | public static void HidePopupMenu(this ToolStripItem item) {
method ClearDropDownItems (line 236) | public static void ClearDropDownItems(this ToolStripItemCollection ite...
method ToggleVisibility (line 245) | public static void ToggleVisibility(bool visible, params Control[] con...
method ShowDialog (line 250) | public static DialogResult ShowDialog<TForm>() where TForm : Form, new...
method ShowDialog (line 255) | public static DialogResult ShowDialog<TForm>(this IWin32Window form) w...
method ShowDialog (line 261) | public static DialogResult ShowDialog<TForm>(this IWin32Window form, o...
method ShowDialog (line 268) | public static DialogResult ShowDialog<TForm>(this IWin32Window form, A...
method ShowCommonDialog (line 278) | public static DialogResult ShowCommonDialog<TDialog>(this IWin32Window...
method ErrorBox (line 289) | internal static void ErrorBox(string text) {
method ErrorBox (line 292) | public static void ErrorBox(this Control control, string text) {
method ErrorBox (line 295) | public static void ErrorBox(this Control control, string title, Except...
method InfoBox (line 308) | internal static void InfoBox(string text) {
method YesNoBox (line 311) | internal static DialogResult YesNoBox(string text) {
method YesNoCancelBox (line 314) | internal static DialogResult YesNoCancelBox(string text) {
method ConfirmOKBox (line 317) | public static bool ConfirmOKBox(string text) {
method ConfirmOKBox (line 320) | public static bool ConfirmOKBox(this Control control, string text) {
method ConfirmYesBox (line 323) | public static bool ConfirmYesBox(this Control control, string text) {
method SendCopyDataMessage (line 326) | public static int SendCopyDataMessage(this System.Diagnostics.Process ...
method GetCopyDataContent (line 332) | public static string GetCopyDataContent(ref Message message) {
class FormEventHandler (line 339) | sealed class FormEventHandler
method FormEventHandler (line 344) | public FormEventHandler(Form form, Action handler) {
method OnLoadHandler (line 349) | public void OnLoadHandler(object s, EventArgs args) {
class UserControlLoadHandler (line 354) | sealed class UserControlLoadHandler
method UserControlLoadHandler (line 359) | public UserControlLoadHandler(UserControl control, Action handler) {
method OnLoadHandler (line 364) | public void OnLoadHandler(object s, EventArgs args) {
class NativeMethods (line 370) | static class NativeMethods
method SendMessage (line 375) | [DllImport(User32DLL, SetLastError = false, CharSet = CharSet.Unicode)]
method LocalFree (line 377) | [DllImport("kernel32.dll", SetLastError = true)]
type CopyDataStruct (line 381) | struct CopyDataStruct(string text) : IDisposable
method Dispose (line 387) | public void Dispose() {
FILE: App/Common/ImageBox/DragHandle.cs
class DragHandle (line 14) | internal sealed class DragHandle
method DragHandle (line 18) | public DragHandle(DragHandleAnchor anchor)
method DragHandle (line 27) | private DragHandle() {
FILE: App/Common/ImageBox/DragHandleAnchor.cs
type DragHandleAnchor (line 12) | internal enum DragHandleAnchor
FILE: App/Common/ImageBox/DragHandleCollection.cs
class DragHandleCollection (line 16) | internal sealed class DragHandleCollection : IEnumerable<DragHandle>
method DragHandleCollection (line 26) | public DragHandleCollection() {
method GetEnumerator (line 57) | public IEnumerator<DragHandle> GetEnumerator() {
method HitTest (line 61) | public DragHandleAnchor HitTest(Point point) {
method GetEnumerator (line 86) | IEnumerator IEnumerable.GetEnumerator() {
FILE: App/Common/ImageBox/ImageBoxEx.cs
class ImageBoxEx (line 17) | internal class ImageBoxEx : ImageBox
method ImageBoxEx (line 63) | public ImageBoxEx() {
method CancelResize (line 210) | public void CancelResize() {
method StartMove (line 215) | public void StartMove() {
method DrawDragHandle (line 232) | protected virtual void DrawDragHandle(Graphics graphics, DragHandle ha...
method OnDragHandleSizeChanged (line 265) | protected virtual void OnDragHandleSizeChanged(EventArgs e) {
method OnMaximumSelectionSizeChanged (line 280) | protected virtual void OnMaximumSelectionSizeChanged(EventArgs e) {
method OnMinimumSelectionSizeChanged (line 292) | protected virtual void OnMinimumSelectionSizeChanged(EventArgs e) {
method OnMouseDown (line 306) | protected override void OnMouseDown(MouseEventArgs e) {
method OnMouseMove (line 331) | protected override void OnMouseMove(MouseEventArgs e) {
method OnMouseUp (line 366) | protected override void OnMouseUp(MouseEventArgs e) {
method OnPaint (line 383) | protected override void OnPaint(PaintEventArgs e) {
method OnPanStart (line 401) | protected override void OnPanStart(CancelEventArgs e) {
method OnResize (line 415) | protected override void OnResize(EventArgs e) {
method OnScroll (line 427) | protected override void OnScroll(ScrollEventArgs se) {
method OnSelecting (line 439) | protected override void OnSelecting(ImageBoxCancelEventArgs e) {
method OnSelectionMoved (line 449) | protected virtual void OnSelectionMoved(EventArgs e) {
method OnSelectionMoving (line 461) | protected virtual void OnSelectionMoving(CancelEventArgs e) {
method OnSelectionRegionChanged (line 475) | protected override void OnSelectionRegionChanged(EventArgs e) {
method OnSelectionResized (line 485) | protected virtual void OnSelectionResized(EventArgs e) {
method OnSelectionResizing (line 497) | protected virtual void OnSelectionResizing(CancelEventArgs e) {
method OnZoomChanged (line 511) | protected override void OnZoomChanged(EventArgs e) {
method ProcessDialogKey (line 524) | protected override bool ProcessDialogKey(Keys keyData) {
method SetCursor (line 544) | protected virtual void SetCursor(Point point) {
method CancelMove (line 592) | private void CancelMove() {
method CompleteMove (line 597) | private void CompleteMove() {
method CompleteResize (line 602) | private void CompleteResize() {
method HitTest (line 607) | private DragHandleAnchor HitTest(Point cursorPosition) {
method IsOutsideDragZone (line 611) | private bool IsOutsideDragZone(Point location) {
method PositionDragHandles (line 623) | private void PositionDragHandles() {
method ProcessSelectionMove (line 677) | private void ProcessSelectionMove(Point cursorPosition) {
method ProcessSelectionResize (line 703) | private void ProcessSelectionResize(Point cursorPosition) {
method ResetDrag (line 780) | private void ResetDrag() {
method StartResize (line 787) | private void StartResize(DragHandleAnchor anchor) {
FILE: App/Common/ObjectListViewHelper.cs
class ObjectListViewHelper (line 8) | static class ObjectListViewHelper
method FixEditControlWidth (line 11) | public static void FixEditControlWidth(this ObjectListView view) {
method HasSelection (line 16) | public static bool HasSelection(this ObjectListView view) {
method View_Disposed (line 20) | static void View_Disposed(object sender, EventArgs e) {
method View_CellEditStarting (line 26) | static void View_CellEditStarting(object sender, CellEditEventArgs e) {
method RedrawItem (line 37) | public static void RedrawItem(this ObjectListView view, int index) {
method SetTreeViewLine (line 44) | public static void SetTreeViewLine(this TreeListView view) {
method ExpandSelected (line 52) | public static void ExpandSelected(this TreeListView view, bool moveToF...
method Expand (line 71) | public static void Expand(this TreeListView view, System.Collections.I...
method Collapse (line 79) | public static void Collapse(this TreeListView view, System.Collections...
method AsTyped (line 88) | public static TypedObjectListView<T> AsTyped<T>(this ObjectListView vi...
method AsTyped (line 92) | public static TypedObjectListView<T> AsTyped<T>(this ObjectListView vi...
method ConfigColumn (line 97) | public static TypedObjectListView<T> ConfigColumn<T>(this TypedObjectL...
method AsTyped (line 102) | public static TypedColumn<T> AsTyped<T>(this OLVColumn column, Action<...
method GetParentModel (line 107) | public static T GetParentModel<T>(this TreeListView view, T model) whe...
method GetAncestorsOrSelf (line 111) | public static List<T> GetAncestorsOrSelf<T>(this TreeListView view, T ...
method CollapseSelected (line 119) | public static void CollapseSelected(this TreeListView view, bool moveT...
method MoveUpSelection (line 139) | public static void MoveUpSelection(this ObjectListView view) {
method MoveDownSelection (line 149) | public static void MoveDownSelection(this ObjectListView view) {
method GetFirstSelectedModel (line 163) | public static T GetFirstSelectedModel<T>(this ObjectListView view) whe...
method GetFocusedOrFirstSelectedItem (line 167) | public static OLVListItem GetFocusedOrFirstSelectedItem(this ObjectLis...
method GetFirstSelectedIndex (line 175) | public static int GetFirstSelectedIndex(this ObjectListView view) {
method GetLastSelectedIndex (line 186) | public static int GetLastSelectedIndex(this ObjectListView view) {
method GetSelectedModels (line 196) | public static List<T> GetSelectedModels<T>(this ObjectListView view) w...
method GetGridAt (line 208) | public static GridTestResult GetGridAt(this ObjectListView view, int x...
method InvertSelect (line 254) | public static void InvertSelect(this ObjectListView view) {
type GridTestResult (line 265) | readonly struct GridTestResult(int columnIndex, int rowIndex, bool isOut...
FILE: App/Common/PInvokeHelper.cs
class PInvokeHelper (line 7) | static class PInvokeHelper
method Unwrap (line 15) | internal static T Unwrap<T>(this IntPtr ptr) where T : class, new() {
FILE: App/Common/ShortcutFile.cs
class ShortcutFile (line 8) | public sealed class ShortcutFile
method ShortcutFile (line 25) | private ShortcutFile() {
method ShortcutFile (line 31) | public ShortcutFile(string destination) {
method Load (line 40) | public static ShortcutFile Load(string shortcutFilePath) {
method Save (line 64) | public void Save(string position) {
class ShellLink (line 82) | [ComImport]
type IShellLink (line 88) | [ComImport]
method GetPath (line 93) | void GetPath([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder ps...
method GetIDList (line 94) | void GetIDList(out IntPtr ppidl);
method SetIDList (line 95) | void SetIDList(IntPtr pidl);
method GetDescription (line 96) | void GetDescription([Out, MarshalAs(UnmanagedType.LPWStr)] StringBui...
method SetDescription (line 97) | void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
method GetWorkingDirectory (line 98) | void GetWorkingDirectory([Out, MarshalAs(UnmanagedType.LPWStr)] Stri...
method SetWorkingDirectory (line 99) | void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string ps...
method GetArguments (line 100) | void GetArguments([Out, MarshalAs(UnmanagedType.LPWStr)] StringBuild...
method SetArguments (line 101) | void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
method GetHotkey (line 102) | void GetHotkey(out short pwHotkey);
method SetHotkey (line 103) | void SetHotkey(short wHotkey);
method GetShowCmd (line 104) | void GetShowCmd(out int piShowCmd);
method SetShowCmd (line 105) | void SetShowCmd(int iShowCmd);
method GetIconLocation (line 106) | void GetIconLocation([Out, MarshalAs(UnmanagedType.LPWStr)] StringBu...
method SetIconLocation (line 107) | void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIco...
method SetRelativePath (line 108) | void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPat...
method Resolve (line 109) | void Resolve(IntPtr hwnd, int fFlags);
method SetPath (line 110) | void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
FILE: App/Common/StringBuilderCache.cs
class StringBuilderCache (line 6) | internal static class StringBuilderCache
method Acquire (line 14) | public static StringBuilder Acquire(int capacity = DefaultCapacity) {
method Release (line 31) | public static void Release(StringBuilder sb) {
method GetStringAndRelease (line 37) | public static string GetStringAndRelease(StringBuilder sb) {
FILE: App/Common/StringHelper.cs
class StringHelper (line 6) | static class StringHelper
method IsNullOrWhiteSpace (line 8) | [DebuggerStepThrough]
method ReplaceControlAndBomCharacters (line 13) | public static string ReplaceControlAndBomCharacters(string source) {
method Take (line 31) | public static string Take(this string text, int startIndex, int count) {
method ToDescription (line 46) | public static string ToDescription<TEnum>(this TEnum value) where TEnu...
method HasCaseInsensitivePrefix (line 50) | public static bool HasCaseInsensitivePrefix(this string text, string p...
method HasPrefix (line 53) | public static bool HasPrefix(this string text, string prefix) {
method SubstringAfter (line 59) | public static string SubstringAfter(this string source, char value) {
FILE: App/Common/ValueHelper.cs
class ValueHelper (line 10) | static class ValueHelper
method CastOrDefault (line 12) | [DebuggerStepThrough]
method CastOrDefault (line 16) | [DebuggerStepThrough]
method HasContent (line 20) | [DebuggerStepThrough]
method SubstituteDefault (line 24) | [DebuggerStepThrough]
method TryDispose (line 28) | public static TDisposable TryDispose<TDisposable>(this TDisposable dis...
method IsInCollection (line 40) | [DebuggerStepThrough]
method GetReverseComparer (line 44) | [DebuggerStepThrough]
method LimitInRange (line 49) | public static T LimitInRange<T>(this T value, T minValue, T maxValue)
method GetOrDefault (line 56) | public static TValue GetOrDefault<TKey, TValue>(this IDictionary<TKey,...
method GetOrDefault (line 60) | public static TValue GetOrDefault<TKey, TValue>(this IDictionary<TKey,...
method MapValue (line 65) | public static TMapped MapValue<TValue, TMapped>(TValue input, TValue[]...
method MapValue (line 68) | public static TMapped MapValue<TValue, TMapped>(TValue input, TValue[]...
method MapValue (line 82) | public static TMapped MapValue<TValue, TMapped>(TValue input, IEnumera...
method ForEach (line 106) | public static IEnumerable ForEach<TItem>(this IEnumerable collection, ...
method AddRange (line 117) | public static TCollection AddRange<TCollection, T>(this TCollection ta...
method ToText (line 133) | [DebuggerStepThrough]
method ToText (line 138) | [DebuggerStepThrough]
method ToText (line 143) | [DebuggerStepThrough]
method ToText (line 148) | [DebuggerStepThrough]
method ToText (line 153) | [DebuggerStepThrough]
method ToText (line 158) | [DebuggerStepThrough]
method ToText (line 163) | [DebuggerStepThrough]
method ToText (line 168) | [DebuggerStepThrough]
method ToBoolean (line 174) | public static bool ToBoolean(this string value, bool defaultValue) {
method ParseBoolean (line 185) | static int ParseBoolean(string value) {
method ToInt32 (line 280) | [DebuggerStepThrough]
method ToInt32 (line 285) | [DebuggerStepThrough]
method ToInt64 (line 290) | [DebuggerStepThrough]
method ToInt64 (line 295) | [DebuggerStepThrough]
method ToInt32 (line 300) | [DebuggerStepThrough]
method ToInt32 (line 306) | [DebuggerStepThrough]
method ToInt64 (line 312) | [DebuggerStepThrough]
method ToInt64 (line 319) | [DebuggerStepThrough]
method ToSingle (line 325) | [DebuggerStepThrough]
method ToSingle (line 332) | [DebuggerStepThrough]
method ToDouble (line 338) | [DebuggerStepThrough]
method ToDouble (line 345) | [DebuggerStepThrough]
method ToText (line 351) | [DebuggerStepThrough]
method TryParse (line 355) | public static bool TryParse(this string value, out int result) {
method ParseFloatStringToInt32 (line 360) | static bool ParseFloatStringToInt32(string value, ref int result) {
method TryParse (line 368) | public static bool TryParse(this string value, out long result) {
method ParseFloatStringToInt64 (line 373) | static bool ParseFloatStringToInt64(string value, ref long result) {
method TryParse (line 381) | [DebuggerStepThrough]
method TryParse (line 386) | [DebuggerStepThrough]
method TryParse (line 391) | [DebuggerStepThrough]
method ToRoman (line 396) | public static string ToRoman(this int value) {
method ToAlphabet (line 413) | public static string ToAlphabet(this int value, bool upper) {
method ToHexBinString (line 427) | public static string ToHexBinString(this byte value, bool upperCaseHex) {
method ToHexBinString (line 430) | public static string ToHexBinString(this byte[] source) {
method ToHexBinString (line 433) | public static string ToHexBinString(this byte[] source, bool upperCase...
method InternalToHexBinString (line 436) | unsafe static string InternalToHexBinString(byte[] source, bool upperC...
class HexBinByteToString (line 476) | static class HexBinByteToString
method ToString (line 481) | public static string ToString(byte value, bool upperCase) {
method InitHexBinStrings (line 484) | static string[] InitHexBinStrings(bool upperCase) {
class HexBinByteValues (line 502) | static class HexBinByteValues
method InitHexBin (line 507) | unsafe static int[] InitHexBin(bool upperCase) {
FILE: App/Common/XmlHelper.cs
class XmlHelper (line 9) | static class XmlHelper
method GetValue (line 14) | [DebuggerStepThrough]
method GetValue (line 28) | [DebuggerStepThrough]
method GetValue (line 37) | [DebuggerStepThrough]
method GetValue (line 46) | [DebuggerStepThrough]
method GetValue (line 55) | [DebuggerStepThrough]
method GetValue (line 66) | [DebuggerStepThrough]
method GetValue (line 74) | [DebuggerStepThrough]
method GetValue (line 82) | [DebuggerStepThrough]
method GetValue (line 91) | [DebuggerStepThrough]
method GetValue (line 96) | [DebuggerStepThrough]
method SetValue (line 100) | [DebuggerStepThrough]
method SetValue (line 111) | [DebuggerStepThrough]
method SetValue (line 122) | [DebuggerStepThrough]
method SetValue (line 133) | [DebuggerStepThrough]
method SetValue (line 144) | [DebuggerStepThrough]
method WriteValue (line 154) | [DebuggerStepThrough]
method WriteValue (line 159) | [DebuggerStepThrough]
method WriteValue (line 166) | [DebuggerStepThrough]
method WriteValue (line 171) | [DebuggerStepThrough]
method WriteValue (line 178) | [DebuggerStepThrough]
method WriteValue (line 183) | [DebuggerStepThrough]
method GetOrCreateElement (line 190) | public static XmlElement GetOrCreateElement(this XmlNode parent, strin...
method GetElement (line 195) | public static XmlElement GetElement(this XmlNode parent, string name) {
method AppendElement (line 208) | [DebuggerStepThrough]
method ToXmlNodeArray (line 219) | public static XmlNode[] ToXmlNodeArray(this XmlNodeList nodes) {
method ToNodeList (line 230) | public static IList<TNode> ToNodeList<TNode>(this XmlNodeList nodes) w...
method ChildrenOrFollowingSiblings (line 243) | public static IEnumerable<XmlElement> ChildrenOrFollowingSiblings(this...
class Empty (line 247) | static class Empty<TNode>
class ChildrenOrFollowingElementEnumerator (line 252) | sealed class ChildrenOrFollowingElementEnumerator(XmlElement baseEleme...
method Dispose (line 260) | public void Dispose() {}
method GetEnumerator (line 262) | public IEnumerator<XmlElement> GetEnumerator() {
method MoveNext (line 266) | public bool MoveNext() {
method TryGetFirstChildElement (line 272) | static bool TryGetFirstChildElement(ref XmlNode active) {
method TryGetFirstFollowingElement (line 284) | static bool TryGetFirstFollowingElement(ref XmlNode active) {
method Reset (line 295) | public void Reset() {
method GetEnumerator (line 299) | IEnumerator IEnumerable.GetEnumerator() {
FILE: App/Configuration.Designer.cs
class Configuration (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource...
method Configuration (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic...
FILE: App/ConfigurationSerialization.cs
class ConfigurationSerialization (line 7) | [XmlRoot("处理选项")]
FILE: App/Constants.cs
type Function (line 8) | internal enum Function
class Constants (line 13) | internal static class Constants
class FileExtensions (line 30) | internal static class FileExtensions
class Functions (line 64) | static class Functions
class ObjectTypes (line 82) | internal static class ObjectTypes
class FileNameMacros (line 90) | internal static class FileNameMacros
class Units (line 104) | internal static class Units
class Alignments (line 121) | internal static class Alignments
class Coordinates (line 129) | internal static class Coordinates
class Encoding (line 146) | internal static class Encoding
class Info (line 168) | internal static class Info
class PageLayoutType (line 196) | internal static class PageLayoutType
class PageModes (line 206) | internal static class PageModes
class ViewerPreferencesType (line 216) | internal static class ViewerPreferencesType
class DirectionType (line 225) | internal static class DirectionType
class PageLabelStyles (line 235) | internal static class PageLabelStyles
class PageLabelsAttributes (line 249) | internal static class PageLabelsAttributes
class Content (line 259) | internal static class Content
class PageSettings (line 275) | internal static class PageSettings
class OperandNames (line 285) | internal static class OperandNames
class RotationDirections (line 292) | internal static class RotationDirections
class PageFilterTypes (line 307) | internal static class PageFilterTypes
class DestinationAttributes (line 318) | internal static class DestinationAttributes
class ViewType (line 330) | internal static class ViewType
class ActionType (line 344) | internal static class ActionType
class BookmarkAttributes (line 358) | internal static class BookmarkAttributes
class StyleType (line 363) | internal static class StyleType
class Colors (line 373) | internal static class Colors
class Boolean (line 385) | internal static class Boolean
class PageLinkAttributes (line 394) | internal static class PageLinkAttributes
class Ocr (line 407) | internal static class Ocr
class Font (line 444) | internal static class Font
class FontOccurrence (line 452) | internal static class FontOccurrence
class ColorSpaces (line 461) | internal static class ColorSpaces
class CajNaming (line 472) | internal static class CajNaming
class AutoBookmark (line 482) | internal static class AutoBookmark
class Chinese (line 492) | internal static class Chinese {
class Messages (line 498) | internal static class Messages
FILE: App/Functions/AboutControl.Designer.cs
class AboutControl (line 3) | partial class AboutControl
method Dispose (line 13) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 26) | private void InitializeComponent () {
FILE: App/Functions/AboutControl.cs
class AboutControl (line 11) | [ToolboxItem(false)]
method AboutControl (line 18) | public AboutControl() {
method ExecuteCommand (line 77) | public override void ExecuteCommand(string commandName, params string[...
method SetupCommand (line 97) | public override void SetupCommand(ToolStripItem item) {
method _FrontPageBox_ImageLoad (line 105) | void _FrontPageBox_ImageLoad(object sender, TheArtOfDev.HtmlRenderer.C...
method _FrontPageBox_LinkClicked (line 109) | void _FrontPageBox_LinkClicked(object sender, TheArtOfDev.HtmlRenderer...
FILE: App/Functions/AppOptionForm.Designer.cs
class AppOptionForm (line 3) | partial class AppOptionForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AppOptionForm.cs
class AppOptionForm (line 8) | [ToolboxItem(false)]
method AppOptionForm (line 13) | public AppOptionForm() {
method Reset (line 27) | public void Reset() {
method Reload (line 34) | public void Reload() {
method InitEncodingList (line 50) | static void InitEncodingList(ComboBox list, string encodingName) {
method ControlChanged (line 63) | void ControlChanged(object sender, EventArgs e) {
method _CreateShortcutButton_Click (line 99) | void _CreateShortcutButton_Click(object sender, EventArgs e) {
FILE: App/Functions/AutoBookmark/EditAdjustmentForm.Designer.cs
class EditAdjustmentForm (line 3) | partial class EditAdjustmentForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmark/EditAdjustmentForm.cs
class EditAdjustmentForm (line 9) | sealed partial class EditAdjustmentForm : Form
method EditAdjustmentForm (line 18) | public EditAdjustmentForm() {
method EditAdjustmentForm (line 22) | public EditAdjustmentForm(AutoBookmarkOptions.LevelAdjustmentOption fi...
method OnLoad (line 48) | void OnLoad() {
method _OkButton_Click (line 53) | void _OkButton_Click(Object source, EventArgs args) {
method _CancelButton_Click (line 68) | void _CancelButton_Click(Object source, EventArgs args) {
method _AddFilterMenuItem_DropDownItemClicked (line 73) | private void _AddFilterMenuItem_DropDownItemClicked(object sender, Too...
method _FilterBox_SelectedIndexChanged (line 80) | private void _FilterBox_SelectedIndexChanged(object sender, EventArgs ...
method CreateCondition (line 96) | internal static AutoBookmarkCondition CreateCondition(string name) {
method UpdateFilter (line 107) | internal static void UpdateFilter(IFilterConditionEditor filter) {
method GetFilterEditor (line 113) | private IFilterConditionEditor GetFilterEditor(AutoBookmarkCondition f...
method _RemoveButton_Click (line 144) | private void _RemoveButton_Click(object sender, EventArgs e) {
FILE: App/Functions/AutoBookmark/FontFilterForm.Designer.cs
class FontFilterForm (line 3) | partial class FontFilterForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmark/FontFilterForm.cs
class FontFilterForm (line 11) | sealed partial class FontFilterForm : Form
class FilterSetting (line 13) | sealed class FilterSetting
method FilterSetting (line 18) | public FilterSetting(string fontName, bool fullMatch, float size) {
method FontFilterForm (line 30) | public FontFilterForm() {
method FontFilterForm (line 34) | public FontFilterForm(XmlNode fontInfo) : this() {
method OnLoad (line 38) | void OnLoad() {
method _OkButton_Click (line 106) | void _OkButton_Click(Object source, EventArgs args) {
method _CancelButton_Click (line 117) | void _CancelButton_Click(Object source, EventArgs args) {
method _AddFilterMenu_Opening (line 122) | void _AddFilterMenu_Opening(object sender, CancelEventArgs e) {
method _AddFilterMenu_ItemClicked (line 186) | void _AddFilterMenu_ItemClicked(object sender, ToolStripItemClickedEve...
method ControlEvent (line 199) | void ControlEvent(object sender, EventArgs e) {
FILE: App/Functions/AutoBookmark/FontNameConditionEditor.Designer.cs
class FontNameConditionEditor (line 3) | partial class FontNameConditionEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmark/FontNameConditionEditor.cs
class FontNameConditionEditor (line 8) | [ToolboxItem(false)]
method FontNameConditionEditor (line 14) | public FontNameConditionEditor() {
method ControlChanged (line 34) | void ControlChanged(object sender, EventArgs e) {
FILE: App/Functions/AutoBookmark/PageRangeConditionEditor.Designer.cs
class PageRangeConditionEditor (line 3) | partial class PageRangeConditionEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmark/PageRangeConditionEditor.cs
class PageRangeConditionEditor (line 7) | sealed partial class PageRangeConditionEditor : UserControl, IFilterCond...
method PageRangeConditionEditor (line 12) | public PageRangeConditionEditor() {
method ControlChanged (line 32) | void ControlChanged(object sender, EventArgs e) {
FILE: App/Functions/AutoBookmark/TextConditionEditor.Designer.cs
class TextConditionEditor (line 3) | partial class TextConditionEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmark/TextConditionEditor.cs
class TextConditionEditor (line 8) | [ToolboxItem(false)]
method TextConditionEditor (line 14) | public TextConditionEditor() {
method ControlChanged (line 36) | void ControlChanged(object sender, EventArgs e) {
FILE: App/Functions/AutoBookmark/TextPositionConditionEditor.Designer.cs
class TextPositionConditionEditor (line 3) | partial class TextPositionConditionEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmark/TextPositionConditionEditor.cs
class TextPositionConditionEditor (line 7) | sealed partial class TextPositionConditionEditor : UserControl, IFilterC...
method TextPositionConditionEditor (line 12) | public TextPositionConditionEditor() {
method ControlChanged (line 45) | void ControlChanged(object sender, EventArgs e) {
method ToggleControlState (line 62) | void ToggleControlState() {
FILE: App/Functions/AutoBookmark/TextSizeConditionEditor.Designer.cs
class TextSizeConditionEditor (line 3) | partial class TextSizeConditionEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmark/TextSizeConditionEditor.cs
class TextSizeConditionEditor (line 7) | sealed partial class TextSizeConditionEditor : UserControl, IFilterCondi...
method TextSizeConditionEditor (line 12) | public TextSizeConditionEditor() {
method ControlChanged (line 41) | void ControlChanged(object sender, EventArgs e) {
method ToggleControlState (line 55) | void ToggleControlState() {
FILE: App/Functions/AutoBookmarkControl.Designer.cs
class AutoBookmarkControl (line 3) | partial class AutoBookmarkControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/AutoBookmarkControl.cs
class AutoBookmarkControl (line 10) | [ToolboxItem(false)]
method AutoBookmarkControl (line 16) | public AutoBookmarkControl() {
method OnLoad (line 29) | void OnLoad() {
method Reset (line 97) | public void Reset() {
method Reload (line 102) | public void Reload() {
method _ExportBookmarkButton_Click (line 135) | private void _ExportBookmarkButton_Click(object sender, EventArgs e) {
method SyncOptions (line 162) | private void SyncOptions() {
method ExportControl_DoWork (line 204) | void ExportControl_DoWork(object sender, DoWorkEventArgs e) {
method _IgnorePatternsBox_CellContentClick (line 224) | private void _IgnorePatternsBox_CellContentClick(object sender, DataGr...
method _ImportLink_LinkClicked (line 230) | private void _ImportLink_LinkClicked(object sender, LinkLabelLinkClick...
method ControlEvent (line 234) | private void ControlEvent(object sender, EventArgs e) {
method _LevelAdjustmentBox_ItemActivate (line 296) | private void _LevelAdjustmentBox_ItemActivate(object sender, EventArgs...
method _AddFilterMenu_ItemClicked (line 314) | private void _AddFilterMenu_ItemClicked(object sender, ToolStripItemCl...
FILE: App/Functions/BookmarkControl.Designer.cs
class BookmarkControl (line 3) | partial class BookmarkControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/BookmarkControl.cs
class BookmarkControl (line 8) | public partial class BookmarkControl : UserControl
method BookmarkControl (line 12) | public BookmarkControl() {
method _BrowseSourcePdfButton_Click (line 44) | private void _BrowseSourcePdfButton_Click(object sender, EventArgs e) {
method _BookmarkBox_DragEnter (line 70) | private void _BookmarkBox_DragEnter(object sender, DragEventArgs e) {
method _BookmarkBox_DragDrop (line 74) | private void _BookmarkBox_DragDrop(object sender, DragEventArgs e) {
method _BookmarkBox_TextChanged (line 78) | private void _BookmarkBox_TextChanged(object sender, EventArgs e) {
method BookmarkControl_Show (line 82) | private void BookmarkControl_Show(object sender, EventArgs e) {
FILE: App/Functions/CustomButton/GlassButton.cs
class GlassButton (line 22) | [ToolboxBitmap(typeof(System.Windows.Forms.Button)), ToolboxItem(true), ...
method GlassButton (line 77) | public GlassButton() {
method InitializeComponent (line 114) | private void InitializeComponent() {
method Dispose (line 130) | protected override void Dispose(bool disposing) {
method DisposeAll (line 144) | private void DisposeAll(params IDisposable[] objects) {
type SpecialSymbols (line 331) | public enum SpecialSymbols
type Direction (line 370) | public enum Direction
method OnClick (line 540) | protected override void OnClick(EventArgs e) {
method OnEnter (line 549) | protected override void OnEnter(EventArgs e) {
method OnLeave (line 558) | protected override void OnLeave(EventArgs e) {
method OnKeyDown (line 568) | protected override void OnKeyDown(KeyEventArgs kevent) {
method OnKeyUp (line 580) | protected override void OnKeyUp(KeyEventArgs kevent) {
method OnMouseDown (line 592) | protected override void OnMouseDown(MouseEventArgs e) {
method OnMouseUp (line 605) | protected override void OnMouseUp(MouseEventArgs e) {
method OnMouseMove (line 617) | protected override void OnMouseMove(MouseEventArgs mevent) {
method OnMouseEnter (line 639) | protected override void OnMouseEnter(EventArgs e) {
method OnMouseLeave (line 650) | protected override void OnMouseLeave(EventArgs e) {
method OnPaint (line 665) | protected override void OnPaint(PaintEventArgs pevent) {
method DrawButtonBackground (line 680) | private void DrawButtonBackground(Graphics g) {
method DrawSpecialSymbol (line 712) | private void DrawSpecialSymbol(Graphics g) {
method DrawButtonForeground (line 898) | private void DrawButtonForeground(Graphics g) {
method DrawForegroundFromButton (line 911) | private void DrawForegroundFromButton(PaintEventArgs pevent) {
class TransparentControl (line 944) | sealed class TransparentControl : Control
method OnPaintBackground (line 946) | protected override void OnPaintBackground(PaintEventArgs pevent) { }
method OnPaint (line 947) | protected override void OnPaint(PaintEventArgs e) { }
method CreateRoundRectangle (line 956) | private GraphicsPath CreateRoundRectangle(Rectangle rectangle, int rad...
method CreateTopRoundRectangle (line 1010) | private GraphicsPath CreateTopRoundRectangle(Rectangle rectangle, int ...
method CreateBottomRadialPath (line 1055) | private GraphicsPath CreateBottomRadialPath(Rectangle rectangle) {
method GlassButton_SizeChanged (line 1072) | private void GlassButton_SizeChanged(object sender, EventArgs e) {
method GlassButton_MouseLeave (line 1081) | private void GlassButton_MouseLeave(object sender, EventArgs e) {
method GlassButton_MouseEnter (line 1090) | private void GlassButton_MouseEnter(object sender, EventArgs e) {
method GlassButton_LostFocus (line 1099) | private void GlassButton_LostFocus(object sender, EventArgs e) {
method GlassButton_GotFocus (line 1108) | private void GlassButton_GotFocus(object sender, EventArgs e) {
method RecalcRect (line 1116) | private void RecalcRect(float glowOpacity) {
method RecalcShine (line 1146) | private Rectangle RecalcShine(Rectangle rect2) {
method RecalcGlow (line 1178) | private void RecalcGlow(float glowOpacity) {
method RecalcContent (line 1211) | private Rectangle RecalcContent(Rectangle rect, out Rectangle rect2) {
method RecalcOuterBorder (line 1238) | private Rectangle RecalcOuterBorder() {
method FadeIn (line 1301) | private void FadeIn() {
method FadeOut (line 1306) | private void FadeOut() {
method timer_Tick (line 1311) | private void timer_Tick(object sender, EventArgs e) {
FILE: App/Functions/CustomizeToolbarForm.Designer.cs
class CustomizeToolbarForm (line 3) | partial class CustomizeToolbarForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/CustomizeToolbarForm.cs
class CustomizeToolbarForm (line 11) | public partial class CustomizeToolbarForm : Form
method CustomizeToolbarForm (line 13) | public CustomizeToolbarForm() {
method _ResetButton_Click (line 17) | void _ResetButton_Click(object sender, EventArgs e) {
method CustomizeToolbarForm_Load (line 22) | void CustomizeToolbarForm_Load(object sender, EventArgs e) {
method _OkButton_Click (line 55) | void _OkButton_Click(object sender, EventArgs e) {
FILE: App/Functions/DocumentInspector/AddPdfObjectForm.Designer.cs
class AddPdfObjectForm (line 3) | partial class AddPdfObjectForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentInspector/AddPdfObjectForm.cs
class AddPdfObjectForm (line 9) | sealed partial class AddPdfObjectForm : Form
method AddPdfObjectForm (line 46) | public AddPdfObjectForm() {
method AddPdfObjectForm_Load (line 51) | void AddPdfObjectForm_Load(object sender, EventArgs e) {
method _OkButton_Click (line 55) | void _OkButton_Click(Object source, EventArgs args) {
method _CancelButton_Click (line 60) | void _CancelButton_Click(Object source, EventArgs args) {
FILE: App/Functions/DocumentInspector/ImageViewerForm.Designer.cs
class ImageViewerForm (line 3) | partial class ImageViewerForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentInspector/ImageViewerForm.cs
class ImageViewerForm (line 9) | sealed partial class ImageViewerForm : Form
method ImageViewerForm (line 11) | public ImageViewerForm() {
method ImageViewerForm (line 14) | internal ImageViewerForm(ImageInfo image, byte[] bytes) : this() {
method OnClosed (line 35) | protected override void OnClosed(System.EventArgs e) {
method _MainToolbar_ItemClicked (line 40) | void _MainToolbar_ItemClicked(object sender, ToolStripItemClickedEvent...
FILE: App/Functions/DocumentInspector/TextViewerForm.Designer.cs
class TextViewerForm (line 3) | partial class TextViewerForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentInspector/TextViewerForm.cs
class TextViewerForm (line 9) | sealed partial class TextViewerForm : Form
method TextViewerForm (line 30) | public TextViewerForm() {
method TextViewerForm (line 34) | public TextViewerForm(byte[] data, bool isTextReadonly) : this() {
method EscapeChar (line 40) | static string EscapeChar(char c) {
method _EncodingBox_SelectedIndexChanged (line 49) | void _EncodingBox_SelectedIndexChanged(object sender, EventArgs e) {
method ShowHexBin (line 67) | string ShowHexBin() {
FILE: App/Functions/DocumentInspectorControl.Designer.cs
class DocumentInspectorControl (line 3) | partial class DocumentInspectorControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentInspectorControl.cs
class DocumentInspectorControl (line 19) | [ToolboxItem(false)]
method DocumentInspectorControl (line 54) | public DocumentInspectorControl() {
method OnLoad (line 59) | void OnLoad() {
method SetupCommand (line 261) | public override void SetupCommand(ToolStripItem item) {
method ExecuteCommand (line 283) | public override void ExecuteCommand(string commandName, params string[...
method ProcessCmdKey (line 312) | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermiss...
method RefreshReferences (line 325) | void RefreshReferences(DocumentObject r) {
method CloseDocument (line 347) | public void CloseDocument() {
method Reopen (line 351) | public void Reopen() {
method _ObjectDetailBox_CanDrop (line 355) | void _ObjectDetailBox_CanDrop(object sender, OlvDropEventArgs e) {
method _ObjectDetailBox_Dropped (line 373) | void _ObjectDetailBox_Dropped(object sender, OlvDropEventArgs e) {
method _ObjectDetailBox_SelectionChanged (line 384) | void _ObjectDetailBox_SelectionChanged(object sender, EventArgs e) {
method InitOpNameIcons (line 434) | Dictionary<string, int> InitOpNameIcons() {
method InitPdfObjectIcons (line 473) | Dictionary<int, int> InitPdfObjectIcons() {
method GetImageKey (line 484) | static int GetImageKey(DocumentObject d) {
method _GotoImportLink_LinkClicked (line 495) | void _GotoImportLink_LinkClicked(object sender, LinkLabelLinkClickedEv...
method ControlEvent (line 499) | void ControlEvent(object sender, EventArgs e) {
method LoadDocument (line 505) | void LoadDocument(string path) {
method ShowDescription (line 511) | void ShowDescription(string name, string description, string type) {
method ToolbarItemClicked (line 531) | void ToolbarItemClicked(object sender, ToolStripItemClickedEventArgs e) {
method AddChildNode (line 639) | void AddChildNode(DocumentObject documentObject, int objectType) {
method ExportXmlInfo (line 651) | void ExportXmlInfo(string fileName, bool exportTrailer, int[] pages) {
method ExportBinHexStream (line 676) | void ExportBinHexStream(DocumentObject n, bool decode) {
method ExportBinaryStream (line 697) | void ExportBinaryStream(DocumentObject n, bool decode) {
method ExportToUnicode (line 718) | void ExportToUnicode(DocumentObject n) {
method DecodeStreamBytes (line 755) | byte[] DecodeStreamBytes(DocumentObject d) {
method SaveDocument (line 764) | void SaveDocument() {
method _LoadDocumentWorker_DoWork (line 817) | void _LoadDocumentWorker_DoWork(object sender, DoWorkEventArgs e) {
method _LoadDocumentWorker_RunWorkerCompleted (line 833) | void _LoadDocumentWorker_RunWorkerCompleted(object sender, RunWorkerCo...
method ReloadPdf (line 843) | void ReloadPdf() {
method _ExportButton_DropDownOpening (line 853) | void _ExportButton_DropDownOpening(object sender, EventArgs e) {
method _AddObjectMenu_DropDownItemClicked (line 866) | void _AddObjectMenu_DropDownItemClicked(object sender, ToolStripItemCl...
FILE: App/Functions/DocumentOption/DocumentFontListForm.Designer.cs
class DocumentFontListForm (line 3) | partial class DocumentFontListForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentOption/DocumentFontListForm.cs
class DocumentFontListForm (line 12) | sealed partial class DocumentFontListForm : Form
method DocumentFontListForm (line 28) | public DocumentFontListForm() {
method OnLoad (line 33) | void OnLoad() {
method RegisterFonts (line 102) | void RegisterFonts(IEnumerable<ResourceReference> fontRefs, int pageNu...
method _ListFontsButton_Click (line 124) | void _ListFontsButton_Click(object sender, EventArgs e) {
class PageFont (line 130) | sealed class PageFont
method PageFont (line 137) | public PageFont(string name, int firstPage, bool embedded) {
method IncrementReference (line 144) | public void IncrementReference() {
method _SelectAllButton_Click (line 149) | void _SelectAllButton_Click(object sender, EventArgs e) {
method _AddSelectedFontsButton_Click (line 162) | void _AddSelectedFontsButton_Click(object sender, EventArgs e) {
method _AppConfigButton_Click (line 175) | void _AppConfigButton_Click(object sender, EventArgs e) {
FILE: App/Functions/DocumentOption/DocumentInfoEditor.Designer.cs
class DocumentInfoEditor (line 3) | partial class DocumentInfoEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentOption/DocumentInfoEditor.cs
class DocumentInfoEditor (line 8) | sealed partial class DocumentInfoEditor : UserControl
method DocumentInfoEditor (line 27) | public DocumentInfoEditor() {
method OnLoad (line 32) | void OnLoad() {
method DocumentInfoChanged (line 41) | void DocumentInfoChanged(object sender, EventArgs e) {
FILE: App/Functions/DocumentOption/FontCharSubstitutionForm.Designer.cs
class FontCharSubstitutionForm (line 3) | partial class FontCharSubstitutionForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentOption/FontCharSubstitutionForm.cs
class FontCharSubstitutionForm (line 8) | sealed partial class FontCharSubstitutionForm : Form
method FontCharSubstitutionForm (line 11) | public FontCharSubstitutionForm() {
method FontCharSubstitutionForm (line 14) | public FontCharSubstitutionForm(FontSubstitution substitution) : this() {
method _OriginalCharactersBox_TextChanged (line 27) | void _OriginalCharactersBox_TextChanged(object sender, EventArgs e) {
method _SubstituteCharactersBox_TextChanged (line 31) | void _SubstituteCharactersBox_TextChanged(object sender, EventArgs e) {
method _SubstituteCharactersBox_Enter (line 35) | void _SubstituteCharactersBox_Enter(object sender, EventArgs e) {
method _OriginalCharactersBox_SelectionChanged (line 42) | void _OriginalCharactersBox_SelectionChanged(object sender, EventArgs ...
method _ChineseCaseBox_SelectedIndexChanged (line 49) | void _ChineseCaseBox_SelectedIndexChanged(object sender, EventArgs e) {
method _NumericWidthBox_SelectedIndexChanged (line 53) | void _NumericWidthBox_SelectedIndexChanged(object sender, EventArgs e) {
method _LetterWidthBox_SelectedIndexChanged (line 57) | void _LetterWidthBox_SelectedIndexChanged(object sender, EventArgs e) {
method _PunctuationWidthBox_SelectedIndexChanged (line 61) | void _PunctuationWidthBox_SelectedIndexChanged(object sender, EventArg...
FILE: App/Functions/DocumentOption/FontSubstitutionsEditor.Designer.cs
class FontSubstitutionsEditor (line 3) | partial class FontSubstitutionsEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentOption/FontSubstitutionsEditor.cs
class FontSubstitutionsEditor (line 10) | sealed partial class FontSubstitutionsEditor : UserControl
method FontSubstitutionsEditor (line 24) | public FontSubstitutionsEditor() {
method OnLoad (line 42) | void OnLoad() {
method EditSubstitutionItem (line 69) | void EditSubstitutionItem(CellEditEventArgs args) {
method FontSubstitutionsEditor_Load (line 106) | void FontSubstitutionsEditor_Load(object sender, EventArgs e) {
method _AddSubstitutionButton_Click (line 126) | void _AddSubstitutionButton_Click(object sender, EventArgs e) {
method _RemoveSubstitutionButton_Click (line 133) | void _RemoveSubstitutionButton_Click(object sender, EventArgs e) {
method _ListDocumentFontButton_Click (line 139) | void _ListDocumentFontButton_Click(object sender, EventArgs e) {
method AddFonts (line 146) | internal void AddFonts(IEnumerable<string> fonts) {
method _FontSubstitutionMenu_ItemClicked (line 161) | void _FontSubstitutionMenu_ItemClicked(object sender, ToolStripItemCli...
method _FontSubstitutionMenu_Opening (line 173) | void _FontSubstitutionMenu_Opening(object sender, CancelEventArgs e) {
FILE: App/Functions/DocumentOption/PageLabelEditor.Designer.cs
class PageLabelEditor (line 3) | partial class PageLabelEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentOption/PageLabelEditor.cs
class PageLabelEditor (line 10) | sealed partial class PageLabelEditor : UserControl
method PageLabelEditor (line 21) | public PageLabelEditor() {
method OnLoad (line 43) | void OnLoad() {
method _AddPageLabelButton_Click (line 63) | void _AddPageLabelButton_Click(object sender, EventArgs e) {
method _RemovePageLabelButton_Click (line 75) | void _RemovePageLabelButton_Click(object sender, EventArgs e) {
FILE: App/Functions/DocumentOption/PageSettingsEditor.Designer.cs
class PageSettingsEditor (line 3) | partial class PageSettingsEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/DocumentOption/PageSettingsEditor.cs
class PageSettingsEditor (line 14) | sealed partial class PageSettingsEditor : UserControl
method PageSettingsEditor (line 24) | public PageSettingsEditor() {
method OnLoad (line 66) | void OnLoad() {
method ShowMenuForClickedCell (line 146) | private void ShowMenuForClickedCell(CellClickEventArgs args, ContextMe...
method _AddPageSettingsButton_Click (line 151) | private void _AddPageSettingsButton_Click(object sender, EventArgs e) {
method _RemovePageSettingsButton_Click (line 156) | private void _RemovePageSettingsButton_Click(object sender, EventArgs ...
FILE: App/Functions/DraggableForm.cs
class DraggableForm (line 7) | public class DraggableForm : Form
method OnMouseDown (line 9) | protected override void OnMouseDown(MouseEventArgs args) {
class NativeMethods (line 17) | static class NativeMethods
method SendMessage (line 21) | [DllImport("user32.dll", SetLastError = false)]
method ReleaseCapture (line 25) | [DllImport("user32.dll", SetLastError = false)]
FILE: App/Functions/Editor/ActionEditorForm.Designer.cs
class ActionEditorForm (line 3) | partial class ActionEditorForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/ActionEditorForm.cs
class ActionEditorForm (line 15) | sealed partial class ActionEditorForm : System.Windows.Forms.Form
method ActionEditorForm (line 23) | public ActionEditorForm(BookmarkElement element) {
method OnLoad (line 29) | void OnLoad() {
method InitCoordinateValue (line 111) | void InitCoordinateValue(XmlElement element, string name, NumericUpDow...
method SetValue (line 126) | void SetValue(string name, string value) {
method _OkButton_Click (line 136) | void _OkButton_Click(object source, EventArgs args) {
method _CancelButton_Click (line 189) | void _CancelButton_Click(Object source, EventArgs args) {
method Control_ValueChanged (line 194) | void Control_ValueChanged(object sender, EventArgs e) {
FILE: App/Functions/Editor/AutoBookmarkForm.Designer.cs
class AutoBookmarkForm (line 3) | partial class AutoBookmarkForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/AutoBookmarkForm.cs
class AutoBookmarkForm (line 12) | sealed partial class AutoBookmarkForm : DraggableForm
method AutoBookmarkForm (line 17) | internal AutoBookmarkForm() {
method AutoBookmarkForm (line 21) | internal AutoBookmarkForm(Controller controller) : this() {
method OnLoad (line 26) | void OnLoad() {
method _BookmarkConditionBox_SelectionChanged (line 95) | void _BookmarkConditionBox_SelectionChanged(object sender, EventArgs e) {
method _SetPattern_DropDownItemClicked (line 99) | void _SetPattern_DropDownItemClicked(object sender, ToolStripItemClick...
method SetMatchPatternToSelectedBookmarkStyles (line 125) | void SetMatchPatternToSelectedBookmarkStyles(MatchPattern p) {
method SetValues (line 132) | internal void SetValues(List<EditModel.AutoBookmarkSettings> list) {
method _RemoveButton_Click (line 136) | void _RemoveButton_Click(object sender, EventArgs e) {
method _AutoBookmarkButton_Click (line 141) | void _AutoBookmarkButton_Click(object sender, EventArgs e) {
method _SaveListButton_Click (line 146) | void _SaveListButton_Click(object sender, EventArgs e) {
method Serialize (line 164) | static void Serialize(List<EditModel.AutoBookmarkSettings> list, Syste...
method _LoadListButton_Click (line 182) | void _LoadListButton_Click(object sender, EventArgs e) {
method Deserialize (line 199) | static IEnumerable<EditModel.AutoBookmarkSettings> Deserialize(FilePat...
method SyncList (line 218) | void SyncList() {
FILE: App/Functions/Editor/AutoResizingTextBox.cs
class AutoResizingTextBox (line 7) | sealed class AutoResizingTextBox : TextBox
method AutoResizingTextBox (line 11) | public AutoResizingTextBox(Rectangle bound, string text, Control paren...
method ResizeForText (line 23) | void ResizeForText() {
method OnTextChanged (line 38) | protected override void OnTextChanged(EventArgs e) {
method OnKeyDown (line 43) | protected override void OnKeyDown(KeyEventArgs e) {
FILE: App/Functions/Editor/BookmarkEditorView.Designer.cs
class BookmarkEditorView (line 3) | partial class BookmarkEditorView
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/BookmarkEditorView.cs
class BookmarkEditorView (line 15) | sealed partial class BookmarkEditorView : TreeListView
method BookmarkEditorView (line 33) | public BookmarkEditorView() {
method InitEditorBox (line 38) | void InitEditorBox() {
method FireBookmarkChanged (line 120) | internal void FireBookmarkChanged() {
method GetBookmark (line 124) | public BookmarkElement GetBookmark(int index) {
method OnBeforeSorting (line 128) | protected override void OnBeforeSorting(BeforeSortingEventArgs e) {
method OnCanDrop (line 133) | protected override void OnCanDrop(OlvDropEventArgs args) {
method OnModelCanDrop (line 149) | protected override void OnModelCanDrop(ModelDropEventArgs e) {
method OnModelDropped (line 188) | protected override void OnModelDropped(ModelDropEventArgs args) {
method LoadBookmarks (line 212) | internal void LoadBookmarks(XmlNodeList bookmarks) {
method Mark (line 224) | void Mark(XmlNodeList bookmarks) {
method MarkItems (line 234) | internal void MarkItems(List<BookmarkElement> items, Color color) {
method SelectMarkedItems (line 241) | internal List<BookmarkElement> SelectMarkedItems(Color color) {
method UnmarkItems (line 266) | internal void UnmarkItems(List<BookmarkElement> items) {
method ClearMarks (line 273) | internal void ClearMarks(bool refresh) {
method MakeItemVisible (line 289) | internal void MakeItemVisible(XmlElement item) {
method EnsureItemsVisible (line 303) | internal void EnsureItemsVisible(ICollection<BookmarkElement> items) {
method SelectPreviousBookmark (line 325) | internal void SelectPreviousBookmark() {
method SelectNextBookmark (line 339) | internal void SelectNextBookmark() {
method IsAncestorOrSelf (line 357) | static bool IsAncestorOrSelf(XmlElement source, XmlElement target) {
method CopyOrMoveElement (line 375) | internal void CopyOrMoveElement(List<BookmarkElement> source, XmlEleme...
method CopySelectedBookmark (line 461) | internal void CopySelectedBookmark() {
method PasteBookmarks (line 465) | internal void PasteBookmarks(XmlElement target, bool asChild) {
method GetSelectedElements (line 487) | internal List<BookmarkElement> GetSelectedElements() { return GetSelec...
method GetSelectedElements (line 488) | internal List<BookmarkElement> GetSelectedElements(bool selectChildren...
method GetSelectedElements (line 489) | static List<BookmarkElement> GetSelectedElements(TreeListView treeList...
method OnCellClick (line 513) | protected override void OnCellClick(CellClickEventArgs args) {
method OnBeforeLabelEdit (line 526) | protected override void OnBeforeLabelEdit(LabelEditEventArgs e) {
method OnItemActivate (line 532) | protected override void OnItemActivate(EventArgs e) {
method OnCellEditStarting (line 537) | protected override void OnCellEditStarting(CellEditEventArgs e) {
method OnCellEditFinishing (line 544) | protected override void OnCellEditFinishing(CellEditEventArgs e) {
method OnCellEditFinished (line 555) | protected override void OnCellEditFinished(CellEditEventArgs e) {
method OnHyperlinkClicked (line 576) | protected override void OnHyperlinkClicked(HyperlinkClickedEventArgs e) {
method OnHotItemChanged (line 585) | protected override void OnHotItemChanged(HotItemChangedEventArgs e) {
method OnMouseMove (line 596) | protected override void OnMouseMove(MouseEventArgs e) {
method OnFormatRow (line 609) | protected override void OnFormatRow(FormatRowEventArgs args) {
method OnMouseDown (line 640) | protected override void OnMouseDown(MouseEventArgs e) {
method OnMouseUp (line 647) | protected override void OnMouseUp(MouseEventArgs e) {
method ShowBookmarkProperties (line 655) | internal void ShowBookmarkProperties(BookmarkElement bookmark) {
method SearchBookmark (line 667) | internal BookmarkElement SearchBookmark(BookmarkMatcher matcher) {
method SearchBookmarks (line 689) | internal List<BookmarkElement> SearchBookmarks(BookmarkMatcher matcher) {
method SearchBookmarks (line 708) | void SearchBookmarks(BookmarkMatcher matcher, List<BookmarkElement> ma...
FILE: App/Functions/Editor/Commands/BookmarkActionCommand.cs
class BookmarkActionCommand (line 11) | sealed class BookmarkActionCommand : IEditorCommand
method BookmarkActionCommand (line 15) | public BookmarkActionCommand(string viewType) {
method Process (line 19) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/BookmarkLevelCommand.cs
class BookmarkLevelCommand (line 6) | sealed class BookmarkLevelCommand : IEditorCommand
method BookmarkLevelCommand (line 9) | public BookmarkLevelCommand(bool levelUp) {
method Process (line 12) | public void Process(Controller controller, params string[] parameters) {
method BookmarkLevel (line 16) | internal void BookmarkLevel(Controller controller, bool levelUp) {
FILE: App/Functions/Editor/Commands/BookmarkMarkerCommand.cs
class BookmarkMarkerCommand (line 7) | sealed class BookmarkMarkerCommand : IEditorCommand
method RegisterCommands (line 25) | internal static void RegisterCommands(CommandRegistry<Controller> regi...
method BookmarkMarkerCommand (line 33) | public BookmarkMarkerCommand(string command) {
method Process (line 37) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/BookmarkPageCommand.cs
class BookmarkPageCommand (line 7) | sealed class BookmarkPageCommand : IEditorCommand
method BookmarkPageCommand (line 12) | public BookmarkPageCommand(int number, bool takeFollowing = false) {
method Process (line 17) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/BookmarkSelectionCommand.cs
class BookmarkSelectionCommand (line 8) | sealed class BookmarkSelectionCommand : IEditorCommand
method BookmarkSelectionCommand (line 12) | public BookmarkSelectionCommand(string command) {
method Process (line 16) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/BookmarkStyleCommand.cs
class BookmarkStyleCommand (line 7) | sealed class BookmarkStyleCommand : IEditorCommand
method BookmarkStyleCommand (line 11) | public BookmarkStyleCommand(SetTextStyleProcessor.Style style) {
method Process (line 15) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/CopyBookmarkItemCommand.cs
class CopyBookmarkItemCommand (line 9) | sealed class CopyBookmarkItemCommand : IEditorCommand
method Process (line 11) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/DeleteBookmarkItemCommand.cs
class DeleteBookmarkItemCommand (line 9) | sealed class DeleteBookmarkItemCommand : IEditorCommand
method Process (line 11) | public void Process(Controller controller, params string[] parameters) {
method RemoveItems (line 15) | static void RemoveItems(Controller controller, System.Collections.ILis...
FILE: App/Functions/Editor/Commands/DocumentPropertyCommand.cs
class DocumentPropertyCommand (line 3) | sealed class DocumentPropertyCommand : IEditorCommand
method Process (line 5) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/InsertBookmarkCommand.cs
class InsertBookmarkCommand (line 11) | sealed class InsertBookmarkCommand : IEditorCommand
method Process (line 17) | public void Process(Controller controller, params string[] parameters) {
method BookmarkAtClientPoint (line 22) | static void BookmarkAtClientPoint(Controller controller, Point cp) {
method ShowInsertBookmarkDialog (line 36) | static void ShowInsertBookmarkDialog(Controller controller, Point mous...
method GetDialog (line 78) | static InsertBookmarkForm GetDialog(Controller controller) {
FILE: App/Functions/Editor/Commands/InsertPageLabelCommand.cs
class InsertPageLabelCommand (line 7) | sealed class InsertPageLabelCommand : IEditorCommand
method Process (line 9) | public void Process(Controller context, params string[] parameters) {
method InsertPageLabelFormClosed (line 30) | static void InsertPageLabelFormClosed(object sender, EventArgs e) {
FILE: App/Functions/Editor/Commands/LoadDocumentCommand.cs
class LoadDocumentCommand (line 7) | sealed class LoadDocumentCommand : IEditorCommand
method LoadDocumentCommand (line 10) | public LoadDocumentCommand(bool showDialog, bool importBookmark) {
method Process (line 15) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/OcrPageCommand.cs
class OcrPageCommand (line 11) | sealed class OcrPageCommand : IEditorCommand
method Process (line 13) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/PagePropertiesCommand.cs
class PagePropertiesCommand (line 7) | sealed class PagePropertiesCommand : IEditorCommand
method Process (line 12) | public void Process(Controller controller, params string[] parameters) {
method GetDialog (line 24) | private static PagePropertyForm GetDialog() {
FILE: App/Functions/Editor/Commands/PasteBookmarkItemCommand.cs
class PasteBookmarkItemCommand (line 9) | sealed class PasteBookmarkItemCommand : IEditorCommand
method Process (line 11) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/QuickSelectCommand.cs
class QuickSelectCommand (line 9) | sealed class QuickSelectCommand : IEditorCommand
method RegisterCommands (line 32) | internal static void RegisterCommands(CommandRegistry<Controller> regi...
method RegisterMenuItems (line 37) | internal static void RegisterMenuItems(ToolStripItemCollection contain...
method RegisterMenuItemsWithPattern (line 43) | internal static void RegisterMenuItemsWithPattern(ToolStripItemCollect...
method QuickSelectCommand (line 51) | public QuickSelectCommand(MatchPattern command) {
method Process (line 55) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/SaveDocumentCommand.cs
class SaveDocumentCommand (line 11) | sealed class SaveDocumentCommand : IEditorCommand
method SaveDocumentCommand (line 14) | public SaveDocumentCommand(bool showDialog, bool saveAsBookmark) {
method Process (line 18) | public void Process(Controller controller, params string[] parameters) {
method SaveBookmark (line 27) | static void SaveBookmark(Controller controller, bool showDialog) {
method SaveBookmarkDocument (line 83) | static void SaveBookmarkDocument(Model.PdfInfoXmlDocument infoDoc, MuP...
method SavePdf (line 92) | static void SavePdf(Controller controller) {
FILE: App/Functions/Editor/Commands/SavePageImageCommand.cs
class SavePageImageCommand (line 8) | sealed class SavePageImageCommand : IEditorCommand
method Process (line 12) | public void Process(Controller controller, params string[] parameters) {
method InitDialog (line 25) | static SaveFileDialog InitDialog() {
FILE: App/Functions/Editor/Commands/SimpleBookmarkCommand.cs
class SimpleBookmarkCommand (line 11) | sealed class SimpleBookmarkCommand<T> : IEditorCommand where T : IPdfInf...
method Process (line 13) | public void Process(Controller controller, params string[] parameters) {
method SimpleBookmarkCommand (line 26) | public SimpleBookmarkCommand(P parameter) {
method Process (line 30) | public void Process(Controller controller, params string[] parameters) {
class SimpleBookmarkCommand (line 22) | sealed class SimpleBookmarkCommand<T, P> : IEditorCommand where T : IPdf...
method Process (line 13) | public void Process(Controller controller, params string[] parameters) {
method SimpleBookmarkCommand (line 26) | public SimpleBookmarkCommand(P parameter) {
method Process (line 30) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/ViewerCommand.cs
class ViewerCommand (line 7) | sealed class ViewerCommand : IEditorCommand
method RegisterCommands (line 32) | internal static void RegisterCommands(CommandRegistry<Controller> regi...
method ViewerCommand (line 40) | public ViewerCommand(string command) {
method Process (line 44) | public void Process(Controller controller, params string[] parameters) {
FILE: App/Functions/Editor/Commands/ViewerScrollToBookmarkCommand.cs
class ViewerScrollToBookmarkCommand (line 11) | sealed class ViewerScrollToBookmarkCommand : IEditorCommand
method Process (line 13) | public void Process(Controller context, params string[] parameters) {
FILE: App/Functions/Editor/Controller.cs
class Controller (line 18) | sealed class Controller
method Controller (line 25) | public Controller(IEditView view) {
method ExecuteCommand (line 33) | public void ExecuteCommand(string command, params string[] parameters) {
method ProcessBookmarks (line 37) | internal IEnumerable<XmlNode> ProcessBookmarks(IPdfInfoXmlProcessor pr...
method ProcessBookmarks (line 47) | internal IEnumerable<XmlNode> ProcessBookmarks(bool includeDescendant,...
method ProcessBookmarks (line 67) | HashSet<XmlNode> ProcessBookmarks(IList si, HashSet<XmlElement> proces...
method ProcessItem (line 81) | static void ProcessItem(bool includeDescendant, IPdfInfoXmlProcessor p...
method ClearBookmarks (line 94) | internal void ClearBookmarks() {
method LoadPdfDocument (line 99) | void LoadPdfDocument() {
method Uninitialize (line 122) | internal void Uninitialize(ViewerControl v) {
method Destroy (line 130) | internal void Destroy() {
method InitBookmarkEditor (line 139) | internal void InitBookmarkEditor() {
method LoadDocument (line 147) | internal void LoadDocument(string path, bool importMode) {
method _LoadBookmarkWorker_DoWork (line 188) | void _LoadBookmarkWorker_DoWork(object sender, DoWorkEventArgs e) {
method _LoadBookmarkWorker_RunWorkerCompleted (line 220) | void _LoadBookmarkWorker_RunWorkerCompleted(object sender, RunWorkerCo...
method LoadInfoDocument (line 257) | internal void LoadInfoDocument(PdfInfoXmlDocument document, bool impor...
method LoadBookmarks (line 284) | void LoadBookmarks(BookmarkEditorView view, XmlNodeList bookmarks) {
method ImportBookmarks (line 289) | void ImportBookmarks(BookmarkEditorView editView, XmlNodeList bookmark...
method CopyText (line 317) | internal EditModel.Region CopyText(Point cp, PagePosition pp) {
method InsertBookmark (line 401) | internal void InsertBookmark(InsertBookmarkPositionType position = Ins...
method InsertBookmark (line 419) | internal void InsertBookmark(string title, int pageNumber, float posit...
method Undo (line 507) | internal void Undo(int step) {
method MergeBookmark (line 539) | internal void MergeBookmark(IList<BookmarkElement> es) {
method ConfigAutoBookmarkTextStyles (line 599) | internal void ConfigAutoBookmarkTextStyles(int level, Editor.TextInfo ...
method ShowAutoBookmarkForm (line 625) | internal void ShowAutoBookmarkForm() {
method AutoBookmark (line 634) | internal void AutoBookmark(IEnumerable<EditModel.AutoBookmarkSettings>...
method NewBookmark (line 782) | static BookmarkContainer NewBookmark(BookmarkContainer bm, BookmarkCon...
method GetLineText (line 790) | static string GetLineText(MuPDF.TextLine line, MuPDF.TextBlock block, ...
method TrimBookmarkText (line 805) | static bool TrimBookmarkText(BookmarkContainer bm) {
FILE: App/Functions/Editor/CustomPatternForm.Designer.cs
class CustomPatternForm (line 3) | partial class CustomPatternForm
method Dispose (line 14) | protected override void Dispose(bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent() {
FILE: App/Functions/Editor/CustomPatternForm.cs
class CustomPatternForm (line 13) | public partial class CustomPatternForm : Form
method CustomPatternForm (line 15) | public CustomPatternForm() {
method _OkButton_Click (line 23) | void _OkButton_Click(object sender, EventArgs e) {
method _CancelButton_Click (line 35) | void _CancelButton_Click(object sender, EventArgs e) {
FILE: App/Functions/Editor/DocumentInfoForm.Designer.cs
class DocumentInfoForm (line 3) | partial class DocumentInfoForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/DocumentInfoForm.cs
class DocumentInfoForm (line 8) | sealed partial class DocumentInfoForm : Form
method DocumentInfoForm (line 13) | public DocumentInfoForm() {
method OnLoad (line 18) | void OnLoad() {
method SetText (line 61) | static void SetText(Control control, string value) {
FILE: App/Functions/Editor/DoubleClickableRadioButton.cs
class DoubleClickableRadioButton (line 8) | sealed class DoubleClickableRadioButton : RadioButton
method DoubleClickableRadioButton (line 10) | public DoubleClickableRadioButton() {
method OnMouseDoubleClick (line 16) | protected override void OnMouseDoubleClick(MouseEventArgs e) {
FILE: App/Functions/Editor/EditModel.cs
class EditModel (line 9) | internal sealed class EditModel
method EditModel (line 11) | public EditModel() {
method GetPdfFilePath (line 44) | internal string GetPdfFilePath() {
class Region (line 61) | internal sealed class Region
method Region (line 79) | public Region(PagePosition position, string text, TextSource source) {
type TextSource (line 86) | internal enum TextSource
class AutoBookmarkSettings (line 90) | internal sealed class AutoBookmarkSettings
method AutoBookmarkSettings (line 99) | public AutoBookmarkSettings(int level, string fontName, int fontSize) {
FILE: App/Functions/Editor/EditorCommands.cs
class EditorCommands (line 7) | static class EditorCommands
method InitCommands (line 12) | static CommandRegistry<Controller> InitCommands() {
method Execute (line 67) | public static void Execute(string command, Controller controller, para...
FILE: App/Functions/Editor/IEditView.cs
type IEditView (line 5) | internal interface IEditView
FILE: App/Functions/Editor/IEditorCommand.cs
type IEditorCommand (line 7) | interface IEditorCommand : Common.ICommand<Controller>
FILE: App/Functions/Editor/InsertBookmarkForm.Designer.cs
class InsertBookmarkForm (line 3) | partial class InsertBookmarkForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/InsertBookmarkForm.cs
class InsertBookmarkForm (line 8) | sealed partial class InsertBookmarkForm : DraggableForm
method InsertBookmarkForm (line 40) | public InsertBookmarkForm() {
method SetInsertMode (line 44) | public void SetInsertMode(InsertBookmarkPositionType positionType) {
method OnLoad (line 54) | void OnLoad() {
method InsertModeBox_DoubleClick (line 66) | void InsertModeBox_DoubleClick(object sender, EventArgs e) {
method OkButtonClicked (line 70) | void OkButtonClicked(object sender, EventArgs args) {
method OnVisibleChanged (line 81) | protected override void OnVisibleChanged(EventArgs e) {
method FocusTitleBox (line 89) | public void FocusTitleBox() {
method OnActivated (line 94) | protected override void OnActivated(EventArgs e) {
method OnDeactivate (line 99) | protected override void OnDeactivate(EventArgs e) {
FILE: App/Functions/Editor/InsertPageLabelForm.Designer.cs
class InsertPageLabelForm (line 3) | partial class InsertPageLabelForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/InsertPageLabelForm.cs
class InsertPageLabelForm (line 7) | sealed partial class InsertPageLabelForm : DraggableForm
method InsertPageLabelForm (line 19) | public InsertPageLabelForm() {
method OnLoad (line 24) | void OnLoad() {
method OnFormClosed (line 32) | protected override void OnFormClosed(FormClosedEventArgs e) {
method HandleCommandButtonClick (line 38) | void HandleCommandButtonClick(object sender, EventArgs e) {
method SetValues (line 46) | internal void SetValues(MuPDF.PageLabel label) {
method OnDeactivate (line 54) | protected override void OnDeactivate(EventArgs e) {
FILE: App/Functions/Editor/NewCoordinateEntryForm.Designer.cs
class NewCoordinateEntryForm (line 3) | partial class NewCoordinateEntryForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/NewCoordinateEntryForm.cs
class NewCoordinateEntryForm (line 7) | sealed partial class NewCoordinateEntryForm : Form
method NewCoordinateEntryForm (line 14) | public NewCoordinateEntryForm() {
method OnLoad (line 20) | void OnLoad() {
method _OkButton_Click (line 25) | void _OkButton_Click(object sender, EventArgs e) {
method _CancelButton_Click (line 30) | void _CancelButton_Click(object sender, EventArgs e) {
FILE: App/Functions/Editor/PagePropertyForm.Designer.cs
class PagePropertyForm (line 3) | partial class PagePropertyForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/PagePropertyForm.cs
class PagePropertyForm (line 11) | sealed partial class PagePropertyForm : DraggableForm
method PagePropertyForm (line 15) | public PagePropertyForm() {
method OnLoad (line 19) | void OnLoad() {
method LoadPage (line 27) | public void LoadPage(Page page) {
method AddBox (line 50) | void AddBox(Page page, MuRectangle rect, string title) {
method _PageDimensionBox_SelectedIndexChanged (line 56) | void _PageDimensionBox_SelectedIndexChanged(object sender, EventArgs a...
method OnDeactivate (line 69) | protected override void OnDeactivate(EventArgs e) {
class Box (line 74) | sealed class Box
method Box (line 78) | public Box(MuRectangle rect, string title) {
method ToString (line 82) | public override string ToString() {
class MuFontAndSize (line 87) | sealed class MuFontAndSize
method MuFontAndSize (line 92) | public MuFontAndSize(string fontName, float size) {
class FontAndSizeComparer (line 97) | sealed class FontAndSizeComparer : IEqualityComparer<MuFontAndSize>
method Equals (line 99) | public bool Equals(MuFontAndSize x, MuFontAndSize y) {
method GetHashCode (line 103) | public int GetHashCode(MuFontAndSize obj) {
FILE: App/Functions/Editor/Parts/BookmarkInViewSynchronizer.cs
class BookmarkInViewSynchronizer (line 8) | internal sealed class BookmarkInViewSynchronizer
method BookmarkInViewSynchronizer (line 18) | public BookmarkInViewSynchronizer(BookmarkEditorView bookmark, ViewerC...
method HandleBookmarkChange (line 27) | void HandleBookmarkChange(object sender, EventArgs e) {
method SyncBookmarkPosition (line 49) | void SyncBookmarkPosition(object sender, ViewerControl.PageChangedEven...
method SyncView (line 53) | void SyncView() {
method FindNearestBookmark (line 65) | BookmarkElement FindNearestBookmark(int itemCount, PagePosition p) {
method HighlightInViewRow (line 140) | void HighlightInViewRow(object sender, FormatRowEventArgs e) {
FILE: App/Functions/Editor/Parts/BookmarkTitleEditHandler.cs
class BookmarkTitleEditHandler (line 10) | sealed class BookmarkTitleEditHandler
method BookmarkTitleEditHandler (line 16) | public BookmarkTitleEditHandler(Controller controller) {
method BookmarkBoxBeforeLabelEdit (line 25) | void BookmarkBoxBeforeLabelEdit(object sender, LabelEditEventArgs e) {
method BookmarkBoxCellClick (line 30) | void BookmarkBoxCellClick(object sender, CellClickEventArgs e) {
method BookmarkBoxCellEditStarting (line 37) | void BookmarkBoxCellEditStarting(object sender, CellEditEventArgs e) {
method ScrollToSelectedBookmarkLocation (line 43) | void ScrollToSelectedBookmarkLocation() {
FILE: App/Functions/Editor/SavePdfForm.Designer.cs
class SavePdfForm (line 3) | partial class SavePdfForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/SavePdfForm.cs
class SavePdfForm (line 8) | sealed partial class SavePdfForm : Form
method SavePdfForm (line 17) | SavePdfForm() {
method SavePdfForm (line 23) | public SavePdfForm(string sourcePath, string targetPath, PdfInfoXmlDoc...
method ImportBookmarkForm_Load (line 50) | void ImportBookmarkForm_Load(object sender, EventArgs e) {
method _OkButton_Click (line 55) | void _OkButton_Click(object source, EventArgs args) {
method _CancelButton_Click (line 84) | void _CancelButton_Click(Object source, EventArgs args) {
FILE: App/Functions/Editor/SearchBookmarkForm.Designer.cs
class SearchBookmarkForm (line 3) | partial class SearchBookmarkForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/SearchBookmarkForm.cs
class SearchBookmarkForm (line 11) | sealed partial class SearchBookmarkForm : Form
method SearchBookmarkForm (line 18) | internal SearchBookmarkForm(Editor.Controller controller) {
method OnLoad (line 24) | void OnLoad() {
method _SearchTextBox_TextChanged (line 29) | void _SearchTextBox_TextChanged(object sender, EventArgs e) {
method SearchBookmarkForm_Load (line 33) | private void SearchBookmarkForm_Load(object sender, EventArgs e) {
method CreateMatcher (line 61) | BookmarkMatcher CreateMatcher() {
method _SearchButton_Click (line 70) | private void _SearchButton_Click(Object sender, EventArgs args) {
method _ReplaceButton_Click (line 106) | private void _ReplaceButton_Click(object sender, EventArgs e) {
method _CloseButton_Click (line 121) | private void _CloseButton_Click(Object source, EventArgs args) {
method MatchModeChanged (line 126) | private void MatchModeChanged(object sender, EventArgs e) {
method ReplaceModeChanged (line 139) | private void ReplaceModeChanged(object sender, EventArgs e) {
method ReplaceBookmarks (line 143) | private int ReplaceBookmarks(bool replaceInSelection, BookmarkMatcher ...
FILE: App/Functions/Editor/ShiftPageNumberEntryForm.Designer.cs
class ShiftPageNumberEntryForm (line 3) | partial class ShiftPageNumberEntryForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/ShiftPageNumberEntryForm.cs
class ShiftPageNumberEntryForm (line 7) | sealed partial class ShiftPageNumberEntryForm : Form
method ShiftPageNumberEntryForm (line 15) | public ShiftPageNumberEntryForm() {
method OnLoad (line 20) | void OnLoad() {
method _OkButton_Click (line 28) | void _OkButton_Click(Object source, EventArgs args) {
method _CancelButton_Click (line 33) | void _CancelButton_Click(Object source, EventArgs args) {
FILE: App/Functions/Editor/ViewerControl.cs
class ViewerControl (line 19) | internal sealed class ViewerControl : ImageBoxEx {
type ZoomMode (line 20) | enum ZoomMode {
class PageChangedEventArgs (line 31) | internal sealed class PageChangedEventArgs(int pageNumber) : EventArgs {
class SelectionChangedEventArgs (line 34) | internal sealed class SelectionChangedEventArgs(Editor.Selection selec...
method ViewerControl (line 338) | public ViewerControl() {
method OnCreateControl (line 407) | protected override void OnCreateControl() {
method OnMouseMove (line 414) | protected override void OnMouseMove(MouseEventArgs e) {
method OnSelectionRegionChanged (line 421) | protected override void OnSelectionRegionChanged(EventArgs e) {
method OnClientSizeChanged (line 428) | protected override void OnClientSizeChanged(EventArgs e) {
method LimitSelectionInPage (line 438) | void LimitSelectionInPage(DrawingPoint location) {
method ProcessCmdKey (line 479) | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) {
method OnMouseWheel (line 518) | protected override void OnMouseWheel(MouseEventArgs e) {
method CloseFile (line 544) | internal void CloseFile() {
method Reopen (line 550) | internal void Reopen() {
method OnVirtualDraw (line 557) | protected override void OnVirtualDraw(PaintEventArgs e) {
method GetPageLabel (line 627) | string GetPageLabel(int pageNumber) {
method GetDisplayingPageRange (line 636) | Model.PageRange GetDisplayingPageRange() {
method DrawTextBorders (line 647) | void DrawTextBorders(Graphics g, int pageNumber, DrawingPoint offset, ...
method GetSelection (line 680) | internal Editor.Selection GetSelection() {
method GetSelectionPageRegion (line 696) | internal Editor.PageRegion GetSelectionPageRegion() {
method FindTextLines (line 714) | internal Editor.TextInfo FindTextLines(Editor.PagePosition position) {
method FindTextLines (line 779) | internal List<TextLine> FindTextLines(Editor.PageRegion region) {
method GetZoomFactorForPage (line 804) | float GetZoomFactorForPage(Box bound) {
method OcrPage (line 808) | public List<Model.TextLine> OcrPage(int pageNumber, bool cached) {
method CleanUpOcrResult (line 815) | public string[] CleanUpOcrResult(List<Model.TextLine> result) {
method Ocr (line 819) | List<Model.TextLine> Ocr(int pageNumber) {
method GetPageImage (line 842) | public Bitmap GetPageImage(int pageNumber) {
method LoadPage (line 848) | public Page LoadPage(int pageNumber) {
method GetPageBound (line 851) | public Box GetPageBound(int pageNumber) {
method RenderPage (line 855) | Bitmap RenderPage(int pageNumber, int width, int height) {
method GetPageNumberFromOffset (line 878) | int GetPageNumberFromOffset(int offsetX, int offsetY) {
method ChangeZoom (line 901) | bool ChangeZoom(string zoomMode) {
method CalculateZoomFactor (line 937) | bool CalculateZoomFactor(string zoomMode) {
method UpdateDisplay (line 976) | void UpdateDisplay() { UpdateDisplay(false); }
method UpdateDisplay (line 977) | void UpdateDisplay(bool resized) {
method GetCurrentScrollPosition (line 1002) | internal Editor.PagePosition GetCurrentScrollPosition() {
method IsClientPointInSelection (line 1006) | internal bool IsClientPointInSelection(DrawingPoint point) {
method MuRectangleToImageRegion (line 1010) | internal RectangleF MuRectangleToImageRegion(int pageNumber, Box box) {
method TransposeClientToPagePosition (line 1031) | internal Editor.PagePosition TransposeClientToPagePosition(int clientX...
method TransposeVirtualImageToClient (line 1045) | internal DrawingPoint TransposeVirtualImageToClient(float imageX, floa...
method GetVirtualImageOffset (line 1055) | internal DrawingPoint GetVirtualImageOffset(int pageNumber) {
method TransposeVirtualImageToPagePosition (line 1068) | internal Editor.PagePosition TransposeVirtualImageToPagePosition(int i...
method TransposeClientToPageImage (line 1079) | internal Editor.PagePoint TransposeClientToPageImage(int clientX, int ...
method TransposeVirtualImageToPagePosition (line 1096) | internal Editor.PagePosition TransposeVirtualImageToPagePosition(int p...
method TransposePageImageToPagePosition (line 1108) | internal Editor.PagePosition TransposePageImageToPagePosition(int page...
method GetPageFullWidth (line 1120) | int GetPageFullWidth(float pageWidth) {
method GetPageFullHeight (line 1123) | int GetPageFullHeight(float pageHeight) {
method ScrollToPage (line 1127) | bool ScrollToPage(int pageNumber) {
method ScrollToPosition (line 1153) | internal void ScrollToPosition(Editor.PagePosition position) {
method Next (line 1180) | bool Next(int deltaPageNumber) {
method LoadPageBounds (line 1189) | void LoadPageBounds() {
method CalculateDocumentVirtualSize (line 1200) | void CalculateDocumentVirtualSize() {
method ExecuteCommand (line 1249) | public void ExecuteCommand(string cmd) {
method InitViewer (line 1264) | public void InitViewer() {
method Dispose (line 1288) | protected override void Dispose(bool disposing) {
FILE: App/Functions/Editor/ViewerStructures.cs
type ContentDirection (line 14) | public enum ContentDirection
type MouseMode (line 20) | public enum MouseMode
type PagePoint (line 25) | public readonly struct PagePoint(int pageNumber, float imageX, float ima...
method Equals (line 32) | public override bool Equals(object obj) {
method Equals (line 36) | public bool Equals(PagePoint other) {
method GetHashCode (line 42) | public override int GetHashCode() {
type PagePosition (line 59) | readonly struct PagePosition
method PagePosition (line 79) | internal PagePosition(int page, PointF position, DrawingPoint imagePos...
method PagePosition (line 82) | internal PagePosition(int page, float x, float y, int imageX, int imag...
method ToPageCoordinate (line 93) | public MuPoint ToPageCoordinate(Page page) {
type PageRegion (line 99) | readonly struct PageRegion
method PageRegion (line 106) | internal PageRegion(PagePosition p1, PagePosition p2) {
method ToPageCoordinate (line 117) | public MuRectangle ToPageCoordinate(Page page) {
type TextInfo (line 127) | readonly struct TextInfo
method TextInfo (line 137) | public TextInfo(Page page, MuRectangle bbox, List<TextLine> textLines,...
method GetFonts (line 146) | public IEnumerable<TextFont> GetFonts() {
method GetFontNames (line 158) | public IEnumerable<string> GetFontNames() {
method ToString (line 171) | public override string ToString() {
class TextSpan (line 196) | [DebuggerDisplay("Point={Point}; Font={Font}; Size={Size}; Color={Color}...
method GetTextSpans (line 207) | public static IEnumerable<TextSpan> GetTextSpans(TextLine line) {
type Selection (line 247) | readonly struct Selection(RenderResultCache cache, int page, MuRectangle...
method GetSelectedBitmap (line 265) | public Bitmap GetSelectedBitmap() {
FILE: App/Functions/Editor/ZoomRateEntryForm.Designer.cs
class ZoomRateEntryForm (line 3) | partial class ZoomRateEntryForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/Editor/ZoomRateEntryForm.cs
class ZoomRateEntryForm (line 7) | sealed partial class ZoomRateEntryForm : Form
method ZoomRateEntryForm (line 11) | public ZoomRateEntryForm() {
method OnLoad (line 16) | void OnLoad() {
method _OkButton_Click (line 21) | void _OkButton_Click(Object source, EventArgs args) {
method _CancelButton_Click (line 26) | void _CancelButton_Click(Object source, EventArgs args) {
FILE: App/Functions/EditorControl.Designer.cs
class EditorControl (line 3) | partial class EditorControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/EditorControl.cs
class EditorControl (line 14) | public sealed partial class EditorControl : FunctionControl, IDocumentEd...
method EditorControl (line 23) | public EditorControl() {
method OnLoad (line 45) | void OnLoad() {
method CreateChangeZoomRateItems (line 185) | private void CreateChangeZoomRateItems() {
method _ViewerBoxInitializeAfterDocumentLoad (line 196) | void _ViewerBoxInitializeAfterDocumentLoad(object sender, EventArgs e) {
method OnDeselected (line 208) | internal override void OnDeselected() {
method _ViewBox_MouseClick (line 213) | void _ViewBox_MouseClick(object sender, MouseEventArgs args) {
method _MainToolbar_ItemClicked (line 234) | void _MainToolbar_ItemClicked(object sender, ToolStripItemClickedEvent...
method ButtonClicked (line 239) | void ButtonClicked(object sender, EventArgs e) {
method SetupCommand (line 248) | public override void SetupCommand(ToolStripItem item) {
method ExecuteCommand (line 324) | public override void ExecuteCommand(string cmd, params string[] parame...
method CloseDocument (line 378) | public void CloseDocument() {
method Reopen (line 382) | public void Reopen() {
method _BookmarkColorButton_SelectedColorChanged (line 386) | void _BookmarkColorButton_SelectedColorChanged(object sender, EventArg...
method _OpenButton_DropDownOpening (line 391) | void _OpenButton_DropDownOpening(object sender, EventArgs e) {
method _OpenButton_DropDownItemClicked (line 402) | void _OpenButton_DropDownItemClicked(object sender, ToolStripItemClick...
method ProcessCmdKey (line 407) | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermiss...
method _BookmarkBox_DragEnter (line 518) | void _BookmarkBox_DragEnter(object sender, DragEventArgs e) {
method _BookmarkBox_DragDrop (line 522) | void _BookmarkBox_DragDrop(object sender, DragEventArgs e) {
FILE: App/Functions/ExtractImageControl.Designer.cs
class ExtractImageControl (line 3) | partial class ExtractImageControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/ExtractImageControl.cs
class ExtractImageControl (line 9) | [ToolboxItem(false)]
method ExtractImageControl (line 16) | public ExtractImageControl() {
method OnLoad (line 23) | void OnLoad() {
method ExecuteCommand (line 51) | public override void ExecuteCommand(string commandName, params string[...
method Reset (line 62) | public void Reset() {
method Reload (line 67) | public void Reload() {
method _BrowseTargetPdfButton_Click (line 86) | void _BrowseTargetPdfButton_Click(object sender, EventArgs e) {
method _ExtractButton_Click (line 99) | void _ExtractButton_Click(object sender, EventArgs e) {
method _FileNameMaskBox_TextChanged (line 169) | void _FileNameMaskBox_TextChanged(object sender, EventArgs e) {
method ShowFileMaskPreview (line 173) | void ShowFileMaskPreview() {
method Control_Show (line 191) | void Control_Show(object sender, EventArgs e) {
FILE: App/Functions/ExtractPageControl.Designer.cs
class ExtractPageControl (line 3) | partial class ExtractPageControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/ExtractPageControl.cs
class ExtractPageControl (line 9) | [ToolboxItem(false)]
method ExtractPageControl (line 16) | public ExtractPageControl() {
method OnLoad (line 23) | void OnLoad() {
method ExecuteCommand (line 43) | public override void ExecuteCommand(string commandName, params string[...
method _ExtractButton_Click (line 54) | void _ExtractButton_Click(object sender, EventArgs e) {
method _ExtractPageRangeBox_TextChanged (line 112) | void _ExtractPageRangeBox_TextChanged(object sender, EventArgs e) {
method Reset (line 125) | void IResettableControl.Reset() {
method Reload (line 130) | void IResettableControl.Reload() {
FILE: App/Functions/FileListHelper.cs
class FileListHelper (line 11) | sealed class FileListHelper
method FileListHelper (line 16) | public FileListHelper(ObjectListView fileList) {
method SetupDragAndDrop (line 24) | public void SetupDragAndDrop(AddFilesCallback addFilesCallback) {
method OpenPdfButtonDropDownOpeningHandler (line 55) | public static void OpenPdfButtonDropDownOpeningHandler(object sender, ...
method RefreshInfo (line 71) | public void RefreshInfo(Encoding encoding) {
method SetupCommonPdfColumns (line 87) | public static void SetupCommonPdfColumns(params OLVColumn[] columns) {
method SetupAuthorColumn (line 101) | static void SetupAuthorColumn(OLVColumn column) {
method SetupKeywordsColumn (line 107) | static void SetupKeywordsColumn(OLVColumn column) {
method SetupSubjectColumn (line 113) | static void SetupSubjectColumn(OLVColumn column) {
method SetupTitleColumn (line 119) | static void SetupTitleColumn(OLVColumn column) {
method SetupPageCountColumn (line 125) | static void SetupPageCountColumn(OLVColumn column) {
method SetupFileNameColumn (line 128) | static void SetupFileNameColumn(OLVColumn column) {
method SetupFolderNameColumn (line 134) | static void SetupFolderNameColumn(OLVColumn column) {
method SetupFileTimeColumn (line 137) | static void SetupFileTimeColumn(OLVColumn column) {
method SetupHotkeys (line 142) | public void SetupHotkeys() {
method ProcessCommonMenuCommand (line 155) | public bool ProcessCommonMenuCommand(string commandID) {
method GetSourceItems (line 207) | public List<T> GetSourceItems<T>(bool selectedOnly) where T : SourceIt...
method PrepareSourceFiles (line 222) | public void PrepareSourceFiles() {
method ResizeItemListColumns (line 238) | public void ResizeItemListColumns() {
FILE: App/Functions/FormState.cs
class FormState (line 9) | public sealed class FormState
method Maximize (line 17) | public void Maximize(Form targetForm) {
method Save (line 32) | void Save(Form targetForm) {
method Restore (line 38) | public void Restore(Form targetForm) {
FILE: App/Functions/FrontPageControl.Designer.cs
class FrontPageControl (line 3) | partial class FrontPageControl
method Dispose (line 13) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 26) | private void InitializeComponent () {
FILE: App/Functions/FrontPageControl.cs
class FrontPageControl (line 10) | [ToolboxItem(false)]
method ExecuteCommand (line 21) | public override void ExecuteCommand(string commandName, params string[...
method FrontPageControl (line 39) | public FrontPageControl() {
method OnDragEnter (line 47) | protected override void OnDragEnter(DragEventArgs drgevent) {
method OnDragDrop (line 51) | protected override void OnDragDrop(DragEventArgs drgevent) {
method OnSelected (line 57) | internal override void OnSelected() {
method SetupCommand (line 61) | public override void SetupCommand(ToolStripItem item) {
method RefreshContent (line 71) | void RefreshContent() {
method GetLastFileList (line 81) | string GetLastFileList() {
method _FrontPageBox_LinkClicked (line 88) | void _FrontPageBox_LinkClicked(object sender, HtmlLinkClickedEventArgs...
method _FrontPageBox_ImageLoad (line 93) | void _FrontPageBox_ImageLoad(object sender, HtmlImageLoadEventArgs e) {
FILE: App/Functions/FunctionControl.cs
class FunctionControl (line 8) | public class FunctionControl : UserControl
method ExecuteCommand (line 21) | public void ExecuteCommand(ToolStripItem item) {
method ExecuteCommand (line 26) | public virtual void ExecuteCommand(string commandName, params string[]...
method SetupCommand (line 44) | public virtual void SetupCommand(ToolStripItem item) { }
method OnSelected (line 45) | internal virtual void OnSelected() { }
method OnDeselected (line 46) | internal virtual void OnDeselected() { }
method FunctionControl (line 48) | protected FunctionControl() {
method SetupMenu (line 57) | internal void SetupMenu(ToolStripMenuItem menu) {
method SetupMenu (line 60) | internal void SetupMenu(ToolStripItemCollection items) {
method EnableCommand (line 104) | internal void EnableCommand(ToolStripItem item, bool enabled, bool vis...
FILE: App/Functions/FunctionTabContainer.cs
class FunctionTabContainer (line 9) | sealed class FunctionTabContainer : CustomTabControl
method SafeCloseTab (line 23) | public bool SafeCloseTab(TabPage tabPage = null) {
method GetPrimaryControlsInTabs (line 49) | public IEnumerable<TObject> GetPrimaryControlsInTabs<TObject>() {
method OnMouseClick (line 57) | protected override void OnMouseClick(MouseEventArgs e) {
method OnMouseDoubleClick (line 63) | protected override void OnMouseDoubleClick(MouseEventArgs e) {
method CloseTabOnMouseEvent (line 70) | void CloseTabOnMouseEvent(MouseEventArgs args) {
FILE: App/Functions/HistoryComboBox.cs
class HistoryComboBox (line 8) | public class HistoryComboBox : ComboBox
method HistoryComboBox (line 13) | public HistoryComboBox() {
method AddHistoryItem (line 24) | internal void AddHistoryItem() {
method AddHistoryItem (line 28) | internal void AddHistoryItem(string text) {
method IndexOf (line 46) | int IndexOf(string o) {
method RemoveAt (line 56) | void RemoveAt(int i) {
method Insert (line 66) | void Insert(int i, string o) {
FILE: App/Functions/HtmlPageControl.cs
class HtmlPageControl (line 6) | class HtmlPageControl : FunctionControl
method HandleLinkClicked (line 8) | protected void HandleLinkClicked(string link) {
method LoadResourceImage (line 31) | protected void LoadResourceImage(TheArtOfDev.HtmlRenderer.Core.Entitie...
FILE: App/Functions/IDocumentEditor.cs
type IDocumentSource (line 5) | interface IDocumentSource
type IDocumentEditor (line 10) | interface IDocumentEditor : IDocumentSource
method CloseDocument (line 15) | void CloseDocument();
method Reopen (line 16) | void Reopen();
class DocumentChangedEventArgs (line 19) | public sealed class DocumentChangedEventArgs : EventArgs
method DocumentChangedEventArgs (line 22) | internal DocumentChangedEventArgs(string path) {
FILE: App/Functions/IResettableControl.cs
type IResettableControl (line 6) | interface IResettableControl
method Reset (line 8) | void Reset();
method Reload (line 9) | void Reload();
FILE: App/Functions/ITextInfoFilterEditor.cs
type IFilterConditionEditor (line 5) | interface IFilterConditionEditor
FILE: App/Functions/InfoExchangerControl.Designer.cs
class InfoExchangerControl (line 3) | partial class InfoExchangerControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/InfoExchangerControl.cs
class InfoExchangerControl (line 13) | [ToolboxItem(false)]
method InfoExchangerControl (line 22) | public InfoExchangerControl() {
method OnLoad (line 27) | void OnLoad() {
method ExecuteCommand (line 85) | public override void ExecuteCommand(string commandName, params string[...
method SetupCommand (line 103) | public override void SetupCommand(ToolStripItem item) {
method FileControl_BrowseForFile (line 124) | void FileControl_BrowseForFile(object sender, EventArgs e) {
method AddFiles (line 128) | void AddFiles(string[] files, bool alertInvalidFiles) {
method _ImportButton_Click (line 144) | void _ImportButton_Click(object sender, EventArgs e) {
method _ExportBookmarkButton_Click (line 199) | void _ExportBookmarkButton_Click(object sender, EventArgs e) {
method GetSourceItemList (line 242) | List<SourceItem> GetSourceItemList() {
method _SortMenu_ItemClicked (line 256) | void _SortMenu_ItemClicked(object sender, ToolStripItemClickedEventArg...
method _ImageList_ColumnClick (line 267) | void _ImageList_ColumnClick(object sender, ColumnClickEventArgs e) {
method _MainToolbar_ButtonClick (line 274) | void _MainToolbar_ButtonClick(object sender, EventArgs e) {
method _MainToolbar_ItemClicked (line 284) | void _MainToolbar_ItemClicked(object sender, ToolStripItemClickedEvent...
method _AddDocumentWorker_DoWork (line 289) | void _AddDocumentWorker_DoWork(object sender, DoWorkEventArgs e) {
method _AddDocumentWorker_RunWorkerCompleted (line 294) | void _AddDocumentWorker_RunWorkerCompleted(object sender, RunWorkerCom...
method _AddDocumentWorker_ProgressChanged (line 299) | void _AddDocumentWorker_ProgressChanged(object sender, ProgressChanged...
method AddItem (line 304) | void AddItem(SourceItem item) {
method AddItems (line 311) | void AddItems(System.Collections.ICollection items) {
FILE: App/Functions/InfoFileOptionControl.Designer.cs
class InfoFileOptionControl (line 3) | partial class InfoFileOptionControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/InfoFileOptionControl.cs
class InfoFileOptionControl (line 8) | [ToolboxItem(false)]
method InfoFileOptionControl (line 15) | public InfoFileOptionControl() {
method OnLoad (line 20) | void OnLoad() {
method Reset (line 52) | public void Reset() {
method Reload (line 60) | public void Reload() {
method OptionChanged (line 92) | void OptionChanged(object sender, EventArgs e) {
method _EncodingBox_Leave (line 156) | void _EncodingBox_Leave(object sender, EventArgs e) {
method _ExtractPageRangeBox_Leave (line 167) | void _ExtractPageRangeBox_Leave(object sender, EventArgs e) {
method ExportOptionControl_VisibleChanged (line 171) | private void ExportOptionControl_VisibleChanged(object sender, EventAr...
FILE: App/Functions/ListViewItemComparer.cs
class ListViewItemComparer (line 7) | sealed class ListViewItemComparer : System.Collections.IComparer
method ListViewItemComparer (line 16) | public ListViewItemComparer() {
method ListViewItemComparer (line 19) | public ListViewItemComparer(int column) {
method ListViewItemComparer (line 22) | public ListViewItemComparer(int column, bool useSmartSort) {
method ListViewItemComparer (line 27) | public ListViewItemComparer(int column, bool useSmartSort, SortOrder s...
method Compare (line 35) | int System.Collections.IComparer.Compare(object x, object y) {
class OlvColumnSmartComparer (line 49) | sealed class OlvColumnSmartComparer(BrightIdeasSoftware.OLVColumn column...
method Compare (line 58) | int System.Collections.IComparer.Compare(object x, object y) {
FILE: App/Functions/MacroMenu.cs
class MacroMenu (line 5) | internal sealed class MacroMenu : ContextMenuStrip
method MacroMenu (line 11) | public MacroMenu() : base() { }
method MacroMenu (line 12) | public MacroMenu(System.ComponentModel.IContainer container) : base(co...
method AddInsertMacroMenuItem (line 14) | internal void AddInsertMacroMenuItem(string text) {
method LoadStandardSourceFileMacros (line 18) | internal void LoadStandardSourceFileMacros() {
method LoadStandardInfoMacros (line 26) | internal void LoadStandardInfoMacros() {
method ProcessInsertMacroCommand (line 36) | internal void ProcessInsertMacroCommand(object sender, ToolStripItemCl...
FILE: App/Functions/MergerControl.Designer.cs
class MergerControl (line 3) | partial class MergerControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/MergerControl.cs
class MergerControl (line 15) | [ToolboxItem(false)]
method MergerControl (line 26) | public MergerControl() {
method OnLoad (line 32) | void OnLoad() {
method ProcessCmdKey (line 149) | [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermiss...
method ItemList_CanDropFile (line 170) | void ItemList_CanDropFile(object sender, OlvDropEventArgs e) {
method ItemList_FileDropped (line 195) | void ItemList_FileDropped(object sender, OlvDropEventArgs e) {
method ItemList_CanDropModel (line 218) | void ItemList_CanDropModel(object sender, ModelDropEventArgs e) {
method ItemList_Dropped (line 257) | void ItemList_Dropped(object sender, ModelDropEventArgs e) {
method SetupCommand (line 276) | public override void SetupCommand(ToolStripItem item) {
method FileControl_BrowseForFile (line 293) | void FileControl_BrowseForFile(object sender, EventArgs e) {
method CopyOrMoveElement (line 305) | internal void CopyOrMoveElement(List<SourceItem> source, SourceItem ta...
method GetParentSourceItem (line 351) | SourceItem GetParentSourceItem(SourceItem item) {
method AddFiles (line 357) | void AddFiles(string[] files) {
method _AddFolder_DropDownOpening (line 371) | void _AddFolder_DropDownOpening(object sender, EventArgs e) {
method _AddFolderButton_DropDownItemClicked (line 381) | void _AddFolderButton_DropDownItemClicked(object sender, ToolStripItem...
method _ImportButton_Click (line 391) | void _ImportButton_Click(object sender, EventArgs e) {
method _SortMenu_ItemClicked (line 457) | void _SortMenu_ItemClicked(object sender, ToolStripItemClickedEventArg...
method _MainToolbar_ButtonClick (line 483) | void _MainToolbar_ButtonClick(object sender, EventArgs e) {
method _MainToolbar_ItemClicked (line 510) | void _MainToolbar_ItemClicked(object sender, ToolStripItemClickedEvent...
method ExecuteCommand (line 514) | public override void ExecuteCommand(string commandName, params string[...
method CopySelectedItems (line 733) | void CopySelectedItems(Converter<SourceItem, string> converter) {
method RefreshBookmarkColor (line 749) | void RefreshBookmarkColor() {
method SelectItemsByType (line 761) | void SelectItemsByType(SourceItem.ItemType type) {
method SelectItemsByType (line 767) | void SelectItemsByType(SourceItem.ItemType type, List<SourceItem> resu...
method _ItemList_ItemActivate (line 779) | void _ItemList_ItemActivate(object sender, EventArgs e) {
method SetImageCropping (line 793) | void SetImageCropping() {
method GetFocusedPdfItem (line 835) | ListViewItem GetFocusedPdfItem() {
method _ItemListMenu_Opening (line 844) | void _ItemListMenu_Opening(object sender, CancelEventArgs e) {
method GetSourceItems (line 856) | List<T> GetSourceItems<T>(bool selectedOnly) where T : SourceItem {
method SelectItems (line 866) | static void SelectItems<T>(System.Collections.IEnumerable list, List<T...
method _AddDocumentWorker_DoWork (line 879) | void _AddDocumentWorker_DoWork(object sender, DoWorkEventArgs e) {
method _AddDocumentWorker_RunWorkerCompleted (line 884) | void _AddDocumentWorker_RunWorkerCompleted(object sender, RunWorkerCom...
method _AddDocumentWorker_ProgressChanged (line 888) | void _AddDocumentWorker_ProgressChanged(object sender, ProgressChanged...
method AddItem (line 892) | void AddItem(SourceItem item) {
method AddItems (line 900) | void AddItems(SourceItem[] items) {
method _ItemList_FormatRow (line 934) | void _ItemList_FormatRow(object sender, FormatRowEventArgs e) {
FILE: App/Functions/MergerOptionForm.Designer.cs
class MergerOptionForm (line 3) | partial class MergerOptionForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/MergerOptionForm.cs
class MergerOptionForm (line 9) | [ToolboxItem(false)]
method MergerOptionForm (line 15) | public MergerOptionForm() {
method OnLoad (line 20) | void OnLoad() {
method Reset (line 39) | public void Reset() {
method Reload (line 44) | public void Reload() {
method OnClosed (line 109) | protected override void OnClosed(EventArgs e) {
method CmToPoint (line 148) | float CmToPoint(NumericUpDown box) {
method _PageSizeBox_SelectedIndexChanged (line 152) | void _PageSizeBox_SelectedIndexChanged(object sender, EventArgs e) {
method MarginBox_ValueChanged (line 195) | void MarginBox_ValueChanged(object sender, EventArgs e) {
method CheckBoxChanged (line 204) | void CheckBoxChanged(object sender, EventArgs e) {
FILE: App/Functions/OcrControl.Designer.cs
class OcrControl (line 3) | partial class OcrControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/OcrControl.cs
class OcrControl (line 10) | [ToolboxItem(false)]
method OcrControl (line 21) | public OcrControl() {
method OnLoad (line 26) | void OnLoad() {
method SetupCommand (line 67) | public override void SetupCommand(ToolStripItem item) {
method ExecuteCommand (line 78) | public override void ExecuteCommand(string commandName, params string[...
method Reset (line 87) | public void Reset() {
method Reload (line 92) | public void Reload() {
method Button_Click (line 111) | void Button_Click(object sender, EventArgs e) {
method Worker_Completed (line 164) | void Worker_Completed(object sender, RunWorkerCompletedEventArgs e) {
method SyncOptions (line 171) | void SyncOptions() {
method OcrExport (line 188) | void OcrExport(object sender, DoWorkEventArgs e) {
method ImportOcr (line 208) | void ImportOcr(object sender, DoWorkEventArgs e) {
method _ImportLink_LinkClicked (line 228) | void _ImportLink_LinkClicked(object sender, LinkLabelLinkClickedEventA...
method ControlEvent (line 232) | void ControlEvent(object sender, EventArgs e) {
FILE: App/Functions/PasswordEntryForm.Designer.cs
class PasswordEntryForm (line 3) | partial class PasswordEntryForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/PasswordEntryForm.cs
class PasswordEntryForm (line 6) | public partial class PasswordEntryForm : Form
method PasswordEntryForm (line 8) | public PasswordEntryForm(string sourceFile) {
method _OkButton_Click (line 21) | private void _OkButton_Click(object sender, EventArgs e) {
method _CancelButton_Click (line 26) | private void _CancelButton_Click(object sender, EventArgs e) {
FILE: App/Functions/PatcherControl.Designer.cs
class PatcherControl (line 3) | partial class PatcherControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/PatcherControl.cs
class PatcherControl (line 14) | [ToolboxItem(false)]
method PatcherControl (line 25) | public PatcherControl() {
method OnLoad (line 30) | void OnLoad() {
method ExecuteCommand (line 92) | public override void ExecuteCommand(string commandName, params string[...
method SetupCommand (line 107) | public override void SetupCommand(ToolStripItem item) {
method FileControl_BrowseForFile (line 121) | void FileControl_BrowseForFile(object sender, EventArgs e) {
method AddFiles (line 125) | void AddFiles(string[] files, bool alertInvalidFiles) {
method _ImportButton_Click (line 141) | void _ImportButton_Click(object sender, EventArgs e) {
method GetSourceItemList (line 215) | List<SourceItem> GetSourceItemList() {
method _SortMenu_ItemClicked (line 229) | void _SortMenu_ItemClicked(object sender, ToolStripItemClickedEventArg...
method _ImageList_ColumnClick (line 240) | void _ImageList_ColumnClick(object sender, ColumnClickEventArgs e) {
method _MainToolbar_ItemClicked (line 247) | void _MainToolbar_ItemClicked(object sender, ToolStripItemClickedEvent...
method _AddDocumentWorker_DoWork (line 252) | void _AddDocumentWorker_DoWork(object sender, DoWorkEventArgs e) {
method _AddDocumentWorker_RunWorkerCompleted (line 259) | void _AddDocumentWorker_RunWorkerCompleted(object sender, RunWorkerCom...
method _AddDocumentWorker_ProgressChanged (line 264) | void _AddDocumentWorker_ProgressChanged(object sender, ProgressChanged...
method AddItem (line 269) | void AddItem(SourceItem item) {
method AddItems (line 275) | void AddItems(System.Collections.ICollection items) {
FILE: App/Functions/PatcherOptionForm.Designer.cs
class PatcherOptionForm (line 3) | partial class PatcherOptionForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/PatcherOptionForm.cs
class PatcherOptionForm (line 8) | [ToolboxItem(false)]
method PatcherOptionForm (line 11) | public PatcherOptionForm() {
method OnLoad (line 16) | void OnLoad() {
method Reset (line 23) | public void Reset() {
method Reload (line 27) | public void Reload() {
method OnClosing (line 31) | protected override void OnClosing(CancelEventArgs e) {
FILE: App/Functions/PatcherOptionsControl.Designer.cs
class PatcherOptionsControl (line 3) | partial class PatcherOptionsControl
method Dispose (line 14) | protected override void Dispose(bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent() {
FILE: App/Functions/PatcherOptionsControl.cs
class PatcherOptionsControl (line 8) | public partial class PatcherOptionsControl : UserControl
method PatcherOptionsControl (line 13) | public PatcherOptionsControl() {
method Apply (line 20) | public PatcherOptions Apply() {
method Reset (line 59) | public void Reset() {
method Reload (line 69) | public void Reload() {
method OnLoad (line 131) | internal void OnLoad() {
method _ThresholdBinaryBox_CheckedChanged (line 159) | void _ThresholdBinaryBox_CheckedChanged(object sender, EventArgs e) {
method _RecompressToBinaryImageBox_CheckStateChanged (line 163) | void _RecompressToBinaryImageBox_CheckStateChanged(object sender, Even...
method _RecompressWithJbig2Box_CheckStateChanged (line 170) | void _RecompressWithJbig2Box_CheckStateChanged(object sender, EventArg...
method CmToPoint (line 178) | static float CmToPoint(NumericUpDown box) {
method _PageSizeBox_SelectedIndexChanged (line 182) | void _PageSizeBox_SelectedIndexChanged(object sender, EventArgs e) {
method MarginBox_ValueChanged (line 257) | void MarginBox_ValueChanged(object sender, EventArgs e) {
FILE: App/Functions/RecentFileMenuHelper.cs
class RecentFileMenuHelper (line 7) | static class RecentFileMenuHelper
method AddRecentHistoryFile (line 9) | public static void AddRecentHistoryFile(string path) {
method AddSourcePdfFiles (line 21) | public static void AddSourcePdfFiles(this ToolStripItemCollection list) {
method AddInfoFiles (line 31) | public static void AddInfoFiles(this ToolStripItemCollection list) {
FILE: App/Functions/RenameControl.Designer.cs
class RenameControl (line 3) | partial class RenameControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/RenameControl.cs
class RenameControl (line 13) | [ToolboxItem(false)]
method RenameControl (line 23) | public RenameControl() {
method OnLoad (line 28) | void OnLoad() {
method SetupCommand (line 79) | public override void SetupCommand(ToolStripItem item) {
method ExecuteCommand (line 87) | public override void ExecuteCommand(string commandName, params string[...
method FileControl_BrowseForFile (line 108) | void FileControl_BrowseForFile(object sender, EventArgs e) {
method _RenameButton_Click (line 112) | void _RenameButton_Click(object sender, EventArgs e) {
method AddFiles (line 136) | void AddFiles(string[] files, bool alertInvalidFiles) {
method GetSourceItemList (line 152) | List<SourceItem> GetSourceItemList() {
method _SortMenu_ItemClicked (line 166) | void _SortMenu_ItemClicked(object sender, ToolStripItemClickedEventArg...
method _ImageList_ColumnClick (line 177) | void _ImageList_ColumnClick(object sender, ColumnClickEventArgs e) {
method _MainToolbar_ButtonClick (line 184) | void _MainToolbar_ButtonClick(object sender, EventArgs e) {
method _MainToolbar_ItemClicked (line 190) | void _MainToolbar_ItemClicked(object sender, ToolStripItemClickedEvent...
method _TestRenameButton_Click (line 194) | void _TestRenameButton_Click(object sender, EventArgs e) {
method PreviewRename (line 208) | void PreviewRename(List<SourceItem.Pdf> items, string template) {
method _AddDocumentWorker_DoWork (line 244) | void _AddDocumentWorker_DoWork(object sender, DoWorkEventArgs e) {
method _AddDocumentWorker_RunWorkerCompleted (line 249) | void _AddDocumentWorker_RunWorkerCompleted(object sender, RunWorkerCom...
method _AddDocumentWorker_ProgressChanged (line 253) | void _AddDocumentWorker_ProgressChanged(object sender, ProgressChanged...
method AddItem (line 258) | void AddItem(SourceItem item) {
method AddItems (line 265) | void AddItems(System.Collections.ICollection items) {
FILE: App/Functions/RenamePreviewForm.Designer.cs
class RenamePreviewForm (line 3) | partial class RenamePreviewForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/RenamePreviewForm.cs
class RenamePreviewForm (line 8) | public partial class RenamePreviewForm : Form
method RenamePreviewForm (line 10) | public RenamePreviewForm() {
method RenamePreviewForm (line 13) | public RenamePreviewForm(string[] sourceFiles, string[] targetFiles) :...
method _OKButton_Click (line 47) | private void _OKButton_Click(object sender, EventArgs e) {
FILE: App/Functions/RenderImageControl.Designer.cs
class RenderImageControl (line 3) | partial class RenderImageControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/RenderImageControl.cs
class RenderImageControl (line 11) | [ToolboxItem(false)]
method RenderImageControl (line 18) | public RenderImageControl() {
method OnLoad (line 25) | void OnLoad() {
method ExecuteCommand (line 62) | public override void ExecuteCommand(string commandName, params string[...
method Reset (line 73) | public void Reset() {
method Reload (line 78) | public void Reload() {
method _BrowseTargetPdfButton_Click (line 104) | void _BrowseTargetPdfButton_Click(object sender, EventArgs e) {
method _ExtractButton_Click (line 117) | void _ExtractButton_Click(object sender, EventArgs e) {
method GetRenderedPdfFileName (line 207) | static string GetRenderedPdfFileName(string target) {
method _GoToImportImageLink_LinkClicked (line 226) | void _GoToImportImageLink_LinkClicked(object sender, LinkLabelLinkClic...
method _FileNameMaskBox_TextChanged (line 230) | void _FileNameMaskBox_TextChanged(object sender, EventArgs e) {
method ShowFileMaskPreview (line 234) | void ShowFileMaskPreview() {
method Control_Show (line 252) | void Control_Show(object sender, EventArgs e) {
FILE: App/Functions/ReportControl.Designer.cs
class ReportControl (line 3) | partial class ReportControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/ReportControl.cs
class ReportControl (line 7) | public partial class ReportControl : UserControl
method ReportControl (line 9) | public ReportControl() {
method OnVisibleChanged (line 13) | protected override void OnVisibleChanged(EventArgs e) {
method _CancelButton_Click (line 21) | void _CancelButton_Click(object sender, EventArgs e) {
method SetGoal (line 31) | internal void SetGoal(int goalValue) {
method SetTotalGoal (line 35) | internal void SetTotalGoal(int goalValue) {
method SetProgress (line 39) | internal void SetProgress(int p) {
method IncrementProgress (line 42) | internal void IncrementProgress(int progress) {
method IncrementTotalProgress (line 45) | internal void IncrementTotalProgress() {
method PrintMessage (line 53) | internal void PrintMessage(string text, Tracker.Category category) {
method Reset (line 87) | internal void Reset() {
method Complete (line 96) | internal void Complete() {
method _LogBox_LinkClicked (line 103) | void _LogBox_LinkClicked(object sender, LinkClickedEventArgs e) {
FILE: App/Functions/RichTextBoxEx.cs
class RichTextBoxEx (line 9) | public class RichTextBoxEx : RichTextBox
type CHARFORMAT2_STRUCT (line 12) | [StructLayout(LayoutKind.Sequential)]
method SendMessage (line 38) | [DllImport("user32.dll", CharSet = CharSet.Auto)]
method RichTextBoxEx (line 111) | public RichTextBoxEx() {
method InsertLink (line 127) | public void InsertLink(string text) {
method InsertLink (line 136) | public void InsertLink(string text, int position) {
method InsertLink (line 156) | public void InsertLink(string text, string hyperlink) {
method InsertLink (line 169) | public void InsertLink(string text, string hyperlink, int position) {
method SetSelectionLink (line 184) | public void SetSelectionLink(bool link) {
method GetSelectionLink (line 191) | public int GetSelectionLink() {
method SetSelectionFontSize (line 195) | public void SetSelectionFontSize(float size) {
method SetSelectionBold (line 209) | public void SetSelectionBold(bool bold) {
method SetSelectionUnderline (line 212) | public void SetSelectionUnderline(bool underline) {
method SetSelectionStyle (line 216) | void SetSelectionStyle(UInt32 mask, UInt32 effect) {
method GetSelectionStyle (line 231) | int GetSelectionStyle(UInt32 mask, UInt32 effect) {
FILE: App/Functions/SourceFileControl.Designer.cs
class SourceFileControl (line 3) | partial class SourceFileControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/SourceFileControl.cs
class SourceFileControl (line 8) | public partial class SourceFileControl : UserControl
method SourceFileControl (line 11) | public SourceFileControl() {
method BrowseFile (line 39) | public void BrowseFile() {
method _BrowseSourcePdfButton_Click (line 43) | void _BrowseSourcePdfButton_Click(object sender, EventArgs e) {
method SelectFiles (line 58) | void SelectFiles(string[] files) {
method _SourcePdfBox_TextChanged (line 69) | void _SourcePdfBox_TextChanged(object sender, EventArgs e) {
method _SourcePdfBox_DragEnter (line 78) | void _SourcePdfBox_DragEnter(object sender, DragEventArgs e) {
method _SourcePdfBox_DragDrop (line 82) | void _SourcePdfBox_DragDrop(object sender, DragEventArgs e) {
method SourceFileControl_Show (line 87) | void SourceFileControl_Show(object sender, EventArgs e) {
FILE: App/Functions/SourceImageOptionForm.Designer.cs
class SourceImageOptionForm (line 3) | partial class SourceImageOptionForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/SourceImageOptionForm.cs
class SourceImageOptionForm (line 7) | internal sealed partial class SourceImageOptionForm : Form
method SourceImageOptionForm (line 11) | SourceImageOptionForm() {
method SourceImageOptionForm (line 14) | internal SourceImageOptionForm(SourceItem.Image image) : this() {
method _OkButton_Click (line 27) | void _OkButton_Click(Object source, EventArgs args) {
method _CancelButton_Click (line 39) | void _CancelButton_Click(Object source, EventArgs args) {
FILE: App/Functions/SourcePdfOptionForm.Designer.cs
class SourcePdfOptionForm (line 3) | partial class SourcePdfOptionForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/SourcePdfOptionForm.cs
class SourcePdfOptionForm (line 7) | internal sealed partial class SourcePdfOptionForm : Form
method SourcePdfOptionForm (line 11) | SourcePdfOptionForm() {
method SourcePdfOptionForm (line 14) | internal SourcePdfOptionForm(SourceItem.Pdf pdf) : this() {
method _OkButton_Click (line 27) | void _OkButton_Click(Object source, EventArgs args) {
method _CancelButton_Click (line 39) | void _CancelButton_Click(Object source, EventArgs args) {
method _ImportImagesOnlyBox_CheckedChanged (line 44) | void _ImportImagesOnlyBox_CheckedChanged(object sender, EventArgs e) {
FILE: App/Functions/TargetFileControl.Designer.cs
class TargetFileControl (line 3) | partial class TargetFileControl
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/TargetFileControl.cs
class TargetFileControl (line 9) | public partial class TargetFileControl : UserControl
method TargetFileControl (line 14) | public TargetFileControl() {
method BrowseTargetFile (line 25) | public string BrowseTargetFile() {
method _BrowseTargetPdfButton_Click (line 47) | void _BrowseTargetPdfButton_Click(object sender, EventArgs e) {
method _TargetPdfBox_TextChanged (line 70) | void _TargetPdfBox_TextChanged(object sender, EventArgs e) {
method _TargetPdfBox_DragEnter (line 74) | void _TargetPdfBox_DragEnter(object sender, DragEventArgs e) {
method _TargetPdfBox_DragDrop (line 78) | void _TargetPdfBox_DragDrop(object sender, DragEventArgs e) {
method TargetFileControl_Show (line 82) | void TargetFileControl_Show(object sender, EventArgs e) {
FILE: App/Functions/UpdateForm.Designer.cs
class UpdateForm (line 3) | partial class UpdateForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/UpdateForm.cs
class UpdateForm (line 10) | public partial class UpdateForm : Form
method UpdateForm (line 14) | public UpdateForm() {
method CheckNewVersion (line 45) | private void CheckNewVersion() {
method UpdateChecker_DownloadDataCompleted (line 52) | void UpdateChecker_DownloadDataCompleted(object sender, DownloadDataCo...
method CheckResult (line 71) | void CheckResult(XmlDocument x) {
FILE: App/Functions/ViewerPreferenceEditor.Designer.cs
class ViewerPreferenceEditor (line 3) | partial class ViewerPreferenceEditor
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/Functions/ViewerPreferenceEditor.cs
class ViewerPreferenceEditor (line 8) | public partial class ViewerPreferenceEditor : UserControl
method ViewerPreferenceEditor (line 39) | public ViewerPreferenceEditor() {
method DocumentInfoChanged (line 56) | void DocumentInfoChanged(object sender, EventArgs e) {
FILE: App/MainForm.Designer.cs
class MainForm (line 3) | partial class MainForm
method Dispose (line 14) | protected override void Dispose (bool disposing) {
method InitializeComponent (line 27) | private void InitializeComponent () {
FILE: App/MainForm.cs
class MainForm (line 11) | public partial class MainForm : Form
method SetTooltip (line 44) | internal void SetTooltip(Control control, string text) {
method GetWorker (line 58) | internal BackgroundWorker GetWorker() {
method Worker_DoWork (line 73) | void Worker_DoWork(object sender, DoWorkEventArgs e) {
method Worker_RunWorkerCompleted (line 79) | void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventA...
method ResetWorker (line 89) | public void ResetWorker() {
method Worker_ProgressChanged (line 99) | void Worker_ProgressChanged(object sender, ProgressChangedEventArgs e) {
method GetFunctionControl (line 132) | internal FunctionControl GetFunctionControl(Function functionName) {
method OnDocumentChanged (line 172) | void OnDocumentChanged(object sender, DocumentChangedEventArgs args) {
method MainForm (line 194) | public MainForm() {
method WndProc (line 199) | protected override void WndProc(ref Message m) {
method OnFormClosing (line 207) | protected override void OnFormClosing(FormClosingEventArgs e) {
method OnLoad (line 225) | void OnLoad() {
method OpenFiles (line 303) | void OpenFiles(string[] files) {
method CheckUpdate (line 312) | void CheckUpdate() {
method MenuCommand (line 339) | void MenuCommand(object sender, ToolStripItemClickedEventArgs e) {
method ExecuteCommand (line 356) | internal void ExecuteCommand(string commandName) {
method SetupCustomizeToolbar (line 421) | void SetupCustomizeToolbar() {
method ScaleToolbar (line 434) | void ScaleToolbar() {
method GetActiveFunctionControl (line 438) | Control GetActiveFunctionControl() {
method OpenFileWithEditor (line 442) | internal void OpenFileWithEditor(FilePath path) {
method GetOpenedDocumentEditors (line 461) | IEnumerable<IDocumentEditor> GetOpenedDocumentEditors() {
method SelectFunctionList (line 469) | internal FunctionControl SelectFunctionList(Function func) {
method FunctionDeselected (line 526) | void FunctionDeselected(object sender, TabControlEventArgs args) {
method SelectedFunctionChanged (line 532) | void SelectedFunctionChanged(object sender, TabControlEventArgs args) {
method ShowPdfFileDialog (line 540) | internal string ShowPdfFileDialog() {
method MainForm_FormClosed (line 544) | void MainForm_FormClosed(object sender, FormClosedEventArgs e) {
method HideLogControl (line 548) | void HideLogControl() {
method ShowLogControl (line 551) | void ShowLogControl() {
method MenuOpening (line 555) | void MenuOpening(object sender, EventArgs e) {
method RecentFileMenuOpening (line 561) | void RecentFileMenuOpening(object sender, EventArgs e) {
FILE: App/Model/AutoBookmarkCondition.cs
class AutoBookmarkCondition (line 11) | public abstract class AutoBookmarkCondition : ICloneable
method Clone (line 19) | public abstract object Clone();
method CreateFilter (line 20) | internal abstract AutoBookmarkFilter CreateFilter();
class MultiCondition (line 23) | [JsonTypeAlias(ThisName)]
method MultiCondition (line 36) | public MultiCondition() { }
method MultiCondition (line 38) | public MultiCondition(AutoBookmarkCondition condition) {
method Clone (line 72) | public override object Clone() {
method CreateFilter (line 80) | internal override AutoBookmarkFilter CreateFilter() {
class FontNameCondition (line 84) | [JsonTypeAlias(ThisName)]
method FontNameCondition (line 106) | public FontNameCondition() { }
method FontNameCondition (line 108) | internal FontNameCondition(string fontName, bool matchFullName) {
method CreateFilter (line 113) | internal override AutoBookmarkFilter CreateFilter() {
method Clone (line 116) | public override object Clone() {
class TextSizeCondition (line 121) | [JsonTypeAlias(ThisName)]
method TextSizeCondition (line 159) | public TextSizeCondition() { }
method TextSizeCondition (line 161) | internal TextSizeCondition(float size) {
method TextSizeCondition (line 165) | internal TextSizeCondition(float minSize, float maxSize) {
method UpdateRangeDescription (line 169) | private void UpdateRangeDescription() {
method Clone (line 173) | public override object Clone() {
method SetRange (line 179) | internal void SetRange(float a, float b) {
method CreateFilter (line 192) | internal override AutoBookmarkFilter CreateFilter() {
class TextPositionCondition (line 196) | [JsonTypeAlias(ThisName)]
method TextPositionCondition (line 245) | public TextPositionCondition() { }
method TextPositionCondition (line 247) | internal TextPositionCondition(byte position, float value) {
method TextPositionCondition (line 251) | internal TextPositionCondition(byte position, float value1, float va...
method UpdateRangeDescription (line 255) | private void UpdateRangeDescription() {
method Clone (line 265) | public override object Clone() {
method SetRange (line 275) | internal void SetRange(byte position, float value1, float value2) {
method CreateFilter (line 289) | internal override AutoBookmarkFilter CreateFilter() {
class PageRangeCondition (line 293) | [JsonTypeAlias(ThisName)]
method Clone (line 307) | public override object Clone() {
method CreateFilter (line 311) | internal override AutoBookmarkFilter CreateFilter() {
class TextCondition (line 315) | [JsonTypeAlias(ThisName)]
method Clone (line 333) | public override object Clone() {
method CreateFilter (line 337) | internal override AutoBookmarkFilter CreateFilter() {
method TextCondition (line 341) | public TextCondition() {
method TextCondition (line 344) | private TextCondition(MatchPattern pattern) {
FILE: App/Model/AutoBookmarkContext.cs
class AutoBookmarkContext (line 5) | sealed class AutoBookmarkContext
FILE: App/Model/BookmarkSettings.cs
class BookmarkSettings (line 12) | public class BookmarkSettings : ICloneable, IXmlSerializable
method BookmarkSettings (line 21) | public BookmarkSettings() {
method BookmarkSettings (line 25) | public BookmarkSettings(string title) {
method Clone (line 29) | public BookmarkSettings Clone() {
method BookmarkSettings (line 33) | public BookmarkSettings(BookmarkElement element) {
method Clone (line 43) | object ICloneable.Clone() {
method GetSchema (line 51) | public System.Xml.Schema.XmlSchema GetSchema() {
method ReadXml (line 55) | public void ReadXml(XmlReader reader) {
method WriteXml (line 68) | public void WriteXml(XmlWriter writer) {
FILE: App/Model/BookmarkStatus.cs
type BookmarkStatus (line 6) | public enum BookmarkStatus
FILE: App/Model/Bound.cs
class Bound (line 6) | [DebuggerDisplay("T={Top},L={Left},B={Bottom},R={Right}; H={Height},W={W...
method Bound (line 29) | private Bound() {
method Bound (line 34) | public Bound(float left, float bottom, float right, float top) {
method Bound (line 52) | public Bound(float x, float y) : this(x, y, x, y) {
method Bound (line 59) | public Bound(Bound source) : this(source.Left, source.Bottom, source.R...
method RecalculateSize (line 62) | private void RecalculateSize() {
method Merge (line 71) | internal Bound Merge(Bound source) {
method GetDistance (line 105) | internal DistanceInfo GetDistance(Bound other, WritingDirection writin...
method IsAlignedWith (line 193) | internal bool IsAlignedWith(Bound other, WritingDirection direction) {
method IntersectWith (line 204) | internal bool IntersectWith(Bound other) {
method Contains (line 211) | internal bool Contains(float x, float y) {
method Equals (line 232) | public override bool Equals(object obj) {
method GetHashCode (line 235) | public override int GetHashCode() {
FILE: App/Model/ColorSpaces/CIELab.cs
type CIELab (line 9) | public struct CIELab
method CIELab (line 69) | public CIELab(double l, double a, double b) {
method Equals (line 76) | public override bool Equals(Object obj) {
method GetHashCode (line 82) | public override int GetHashCode() {
FILE: App/Model/ColorSpaces/CIEXYZ.cs
type CIEXYZ (line 9) | public struct CIEXYZ
method CIEXYZ (line 73) | public CIEXYZ(double x, double y, double z) {
method Equals (line 80) | public override bool Equals(Object obj) {
method GetHashCode (line 86) | public override int GetHashCode() {
FILE: App/Model/ColorSpaces/CMYK.cs
type CMYK (line 8) | public struct CMYK
method CMYK (line 81) | public CMYK(double c, double m, double y, double k) {
method Equals (line 89) | public override bool Equals(Object obj) {
method GetHashCode (line 95) | public override int GetHashCode() {
FILE: App/Model/ColorSpaces/ColorSpaceHelper.cs
class ColorSpaceHelper (line 9) | public static class ColorSpaceHelper
method GetColorDistance (line 22) | public static double GetColorDistance(double r1, double g1, double b1,...
method GetColorDistance (line 37) | public static double GetColorDistance(double[] color1, double[] color2) {
method GetColorDistance (line 47) | public static double GetColorDistance(Color c1, Color c2) {
method GetWheelColors (line 73) | public static Color[] GetWheelColors(int alpha) {
method GetSpectrumColors (line 91) | public static Color[] GetSpectrumColors(int alpha) {
method GetSpectrumColors (line 109) | public static Color[] GetSpectrumColors() {
method GetIntFromHex (line 120) | private static int GetIntFromHex(string strHex) {
method HexToColor (line 151) | public static Color HexToColor(string hexColor) {
method RGBToHex (line 178) | public static string RGBToHex(int r, int g, int b) {
method RGBToHex (line 187) | public static string RGBToHex(Color c) {
method HSBtoRGB (line 198) | public static RGB HSBtoRGB(HSB hsb) {
method HSBtoRGB (line 266) | public static RGB HSBtoRGB(double h, double s, double b) {
method HSBtoColor (line 275) | public static Color HSBtoColor(HSB hsb) {
method HSBtoColor (line 287) | public static Color HSBtoColor(double h, double s, double b) {
method HSBtoColor (line 297) | public static Color HSBtoColor(int h, int s, int b) {
method HSBtoHSL (line 314) | public static HSL HSBtoHSL(double h, double s, double b) {
method HSBtoCMYK (line 323) | public static CMYK HSBtoCMYK(double h, double s, double b) {
method HSBtoYUV (line 332) | public static YUV HSBtoYUV(double h, double s, double b) {
method HSLtoRGB (line 347) | public static RGB HSLtoRGB(double h, double s, double l) {
method HSLtoRGB (line 396) | public static RGB HSLtoRGB(HSL hsl) {
method HSLtoColor (line 405) | public static Color HSLtoColor(double h, double s, double l) {
method HSLtoColor (line 415) | public static Color HSLtoColor(HSL hsl) {
method HSLtoHSB (line 423) | public static HSB HSLtoHSB(double h, double s, double l) {
method HSLtoCMYK (line 432) | public static CMYK HSLtoCMYK(double h, double s, double l) {
method HSLtoYUV (line 441) | public static YUV HSLtoYUV(double h, double s, double l) {
method RGBtoHSL (line 456) | public static HSL RGBtoHSL(int red, int green, int blue) {
method RGBtoHSL (line 508) | public static HSL RGBtoHSL(RGB rgb) {
method RGBtoHSL (line 515) | public static HSL RGBtoHSL(Color c) {
method RGBtoHSB (line 523) | public static HSB RGBtoHSB(int red, int green, int blue) {
method RGBtoHSB (line 554) | public static HSB RGBtoHSB(RGB rgb) {
method RGBtoHSB (line 561) | public static HSB RGBtoHSB(Color c) {
method RGBtoCMYK (line 572) | public static CMYK RGBtoCMYK(int red, int green, int blue) {
method RGBtoCMYK (line 589) | public static CMYK RGBtoCMYK(Color c) {
method RGBtoCMYK (line 596) | public static CMYK RGBtoCMYK(RGB rgb) {
method RGBtoYUV (line 607) | public static YUV RGBtoYUV(int red, int green, int blue) {
method RGBtoYUV (line 626) | public static YUV RGBtoYUV(Color c) {
method RGBtoYUV (line 632) | public static YUV RGBtoYUV(RGB rgb) {
method RGBtoXYZ (line 643) | public static CIEXYZ RGBtoXYZ(int red, int green, int blue) {
method RGBtoXYZ (line 664) | public static CIEXYZ RGBtoXYZ(RGB rgb) {
method RGBtoXYZ (line 670) | public static CIEXYZ RGBtoXYZ(Color c) {
method RGBtoLab (line 678) | public static CIELab RGBtoLab(int red, int green, int blue) {
method RGBtoLab (line 685) | public static CIELab RGBtoLab(RGB rgb) {
method RGBtoLab (line 691) | public static CIELab RGBtoLab(System.Drawing.Color color) {
method CMYKtoColor (line 707) | public static Color CMYKtoColor(float c, float m, float y, float k) {
method CMYKtoColor (line 719) | public static Color CMYKtoColor(double c, double m, double y, double k) {
method CMYKtoColor (line 727) | public static Color CMYKtoColor(CMYK cmyk) {
method CMYKtoRGB (line 743) | public static RGB CMYKtoRGB(double c, double m, double y, double k) {
method CMYKtoRGB (line 755) | public static RGB CMYKtoRGB(CMYK cmyk) {
method CMYKtoHSL (line 763) | public static HSL CMYKtoHSL(double c, double m, double y, double k) {
method CMYKtoHSB (line 772) | public static HSB CMYKtoHSB(double c, double m, double y, double k) {
method CMYKtoYUV (line 781) | public static YUV CMYKtoYUV(double c, double m, double y, double k) {
method YUVtoRGB (line 796) | public static RGB YUVtoRGB(double y, double u, double v) {
method YUVtoRGB (line 807) | public static RGB YUVtoRGB(YUV yuv) {
method YUVtoColor (line 818) | public static Color YUVtoColor(double y, double u, double v) {
method YUVtoColor (line 827) | public static Color YUVtoColor(YUV yuv) {
method YUVtoHSL (line 840) | public static HSL YUVtoHSL(double y, double u, double v) {
method YUVtoHSB (line 852) | public static HSB YUVtoHSB(double y, double u, double v) {
method YUVtoCMYK (line 864) | public static CMYK YUVtoCMYK(double y, double u, double v) {
method XYZtoRGB (line 876) | public static RGB XYZtoRGB(double x, double y, double z) {
method XYZtoRGB (line 896) | public static RGB XYZtoRGB(CIEXYZ xyz) {
method Fxyz (line 906) | private static double Fxyz(double t) {
method XYZtoLab (line 913) | public static CIELab XYZtoLab(double x, double y, double z) {
method XYZtoLab (line 926) | public static CIELab XYZtoLab(CIEXYZ xyz) {
method LabtoXYZ (line 937) | public static CIEXYZ LabtoXYZ(double l, double a, double b) {
method LabtoXYZ (line 954) | public static CIEXYZ LabtoXYZ(CIELab lab) {
method LabtoRGB (line 962) | public static RGB LabtoRGB(double l, double a, double b) {
method LabtoRGB (line 968) | public static RGB LabtoRGB(CIELab lab) {
FILE: App/Model/ColorSpaces/HSB.cs
type HSB (line 9) | public struct HSB
method HSB (line 76) | public HSB(double h, double s, double b) {
method Equals (line 83) | public override bool Equals(Object obj) {
method GetHashCode (line 89) | public override int GetHashCode() {
FILE: App/Model/ColorSpaces/HSL.cs
type HSL (line 9) | public struct HSL
method HSL (line 77) | public HSL(double h, double s, double l) {
method Equals (line 84) | public override bool Equals(Object obj) {
method GetHashCode (line 90) | public override int GetHashCode() {
FILE: App/Model/ColorSpaces/RGB.cs
type RGB (line 9) | public struct RGB
method RGB (line 62) | public RGB(int R, int G, int B) {
method Equals (line 69) | public override bool Equals(Object obj) {
method GetHashCode (line 75) | public override int GetHashCode() {
FILE: App/Model/ColorSpaces/YUV.cs
type YUV (line 8) | public struct YUV
method YUV (line 70) | public YUV(double y, double u, double v) {
method Equals (line 77) | public override bool Equals(Object obj) {
method GetHashCode (line 83) | public override int GetHashCode() {
FILE: App/Model/CoordinateTranslationSettings.cs
class CoordinateTranslationSettings (line 5) | internal sealed class CoordinateTranslationSettings
method CoordinateTranslationSettings (line 12) | public CoordinateTranslationSettings() {
method CoordinateTranslationSettings (line 16) | public CoordinateTranslationSettings(float xScale, float yScale, float...
method GetMatrix (line 23) | internal iTextSharp.text.pdf.parser.Matrix GetMatrix() {
FILE: App/Model/DistanceInfo.cs
class DistanceInfo (line 5) | [System.Diagnostics.DebuggerDisplay("{Location}={Distance}")]
type Placement (line 8) | [Flags]
method DistanceInfo (line 38) | internal DistanceInfo(Placement location, float distanceX, float dista...
FILE: App/Model/DocumentObject.cs
class DocumentObject (line 10) | [System.Diagnostics.DebuggerDisplay("Name = {Name}({FriendlyName}); Valu...
method DocumentObject (line 83) | internal DocumentObject(PdfPathDocument ownerDocument, DocumentObject ...
method DocumentObject (line 86) | internal DocumentObject(PdfPathDocument ownerDocument, DocumentObject ...
method RemoveChildByName (line 131) | internal bool RemoveChildByName(string name) {
method FindReferenceAncestor (line 159) | internal DocumentObject FindReferenceAncestor() {
method UpdateDocumentObject (line 169) | internal bool UpdateDocumentObject(object value) {
method GetPageObject (line 208) | DocumentObject GetPageObject() {
method GetItemValueText (line 216) | private static string GetItemValueText(PdfObject po, PdfObject eo) {
method GetContextName (line 242) | internal string GetContextName() {
method PopulateChildren (line 260) | internal IList<DocumentObject> PopulateChildren(bool refresh) {
method PopulateChildrenForNormalObject (line 278) | private void PopulateChildrenForNormalObject() {
method PopulateChildrenForSpecialObject (line 360) | private void PopulateChildrenForSpecialObject() {
method PopulatePageCommand (line 419) | private void PopulatePageCommand(PdfPageCommand item) {
method CreateChildrenList (line 499) | static void CreateChildrenList(ref IList<DocumentObject> list) {
class CompositePdfDictionary (line 505) | sealed class CompositePdfDictionary(PdfDictionary primary, PdfDictiona...
method GetDirectObject (line 509) | public override PdfObject GetDirectObject(PdfName key) {
method Contains (line 522) | public override bool Contains(PdfName key) {
method GetEnumerator (line 525) | public new IEnumerator<KeyValuePair<PdfName, PdfObject>> GetEnumerat...
method GetKeyValues (line 528) | public IEnumerable<KeyValuePair<PdfName, PdfObject>> GetKeyValues() {
FILE: App/Model/FontInfo.cs
class FontInfo (line 8) | sealed class FontInfo : CMapAwareDocumentFont
type CjkFontType (line 10) | [Flags]
method InitCjkFontType (line 85) | private void InitCjkFontType() {
method FontInfo (line 106) | public FontInfo(PdfDictionary font, int refNumber)
method FontInfo (line 111) | public FontInfo(PRIndirectReference refFont) : base(refFont) {
method DecodeCidToUnicode (line 117) | internal int DecodeCidToUnicode(iTextSharp.text.pdf.fonts.cmaps.CMapCi...
method DecodeTextBytes (line 138) | internal string DecodeTextBytes(byte[] bytes) {
method DecodeText (line 147) | internal string DecodeText(PdfString text) {
FILE: App/Model/GeneralInfo.cs
class GeneralInfo (line 6) | [XmlRoot(Constants.Info.ThisName)]
FILE: App/Model/GraphicsState.cs
class GraphicsState (line 6) | internal sealed class GraphicsState
method GraphicsState (line 23) | public GraphicsState() {
method Copy (line 36) | public GraphicsState Copy() {
FILE: App/Model/IHierarchicalObject.cs
type IHierarchicalObject (line 6) | interface IHierarchicalObject<T>
FILE: App/Model/ITextRegion.cs
type ITextRegion (line 5) | interface ITextRegion
type IDirectionalBoundObject (line 11) | interface IDirectionalBoundObject : ITextRegion
FILE: App/Model/InsertBookmarkPositionType.cs
type InsertBookmarkPositionType (line 5) | public enum InsertBookmarkPositionType
FILE: App/Model/Margins.cs
class Margins (line 6) | public class Margins
method Margins (line 21) | public Margins() {
method Margins (line 24) | public Margins(float left, float top, float right, float bottom) {
FILE: App/Model/MatchPattern.cs
class MatchPattern (line 9) | public sealed class MatchPattern : ICloneable, IXmlSerializable
method MatchPattern (line 26) | public MatchPattern() {
method MatchPattern (line 29) | public MatchPattern(string text, bool matchCase, bool fullMatch, bool ...
method CreateMatcher (line 36) | public IMatcher CreateMatcher() {
method ToString (line 43) | public override string ToString() {
method Clone (line 51) | public object Clone() {
method GetSchema (line 59) | public System.Xml.Schema.XmlSchema GetSchema() {
method ReadXml (line 63) | public void ReadXml(XmlReader reader) {
method WriteXml (line 74) | public void WriteXml(XmlWriter writer) {
type IMatcher (line 86) | public interface IMatcher
method Matches (line 88) | bool Matches(string text);
method Replace (line 89) | string Replace(string text, string replacement);
class RegexMatcher (line 91) | sealed class RegexMatcher(MatchPattern pattern) : IMatcher
method Matches (line 97) | public bool Matches(string text) {
method Replace (line 101) | public string Replace(string text, string replacement) {
class SimpleMatcher (line 105) | sealed class SimpleMatcher(MatchPattern pattern) : IMatcher
method Matches (line 111) | public bool Matches(string text) {
method Replace (line 121) | public string Replace(string text, string replacement) {
method Replace (line 124) | static string Replace(string original, string pattern, string replac...
method Replace (line 128) | static string Replace(string original, string pattern, string replac...
FILE: App/Model/PageBoxSettings.cs
class PageBoxSettings (line 6) | public class PageBoxSettings
method PageBoxSettings (line 34) | public PageBoxSettings() {
type VerticalAlignment (line 42) | public enum VerticalAlignment
type HorizontalAlignment (line 46) | public enum HorizontalAlignment
FILE: App/Model/PageFilterFlag.cs
type PageFilterFlag (line 5) | [Flags]
FILE: App/Model/PageLabel.cs
class PageLabel (line 6) | public class PageLabel
FILE: App/Model/PageRange.cs
type PageRange (line 7) | internal struct PageRange : IEnumerable<int>
method PageRange (line 10) | public PageRange(int startValue, int endValue) {
method Contains (line 14) | public bool Contains(int value) {
method ToString (line 19) | public override string ToString() {
method GetEnumerator (line 32) | IEnumerator<int> IEnumerable<int>.GetEnumerator() {
method GetEnumerator (line 40) | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnume...
class PageRangeEnumerator (line 46) | sealed class PageRangeEnumerator : IEnumerator<int>
method PageRangeEnumerator (line 52) | public PageRangeEnumerator(int start, int end) {
method Dispose (line 66) | public void Dispose() { }
method MoveNext (line 74) | public bool MoveNext() {
method Reset (line 86) | public void Reset() {
FILE: App/Model/PageRangeCollection.cs
class PageRangeCollection (line 7) | internal sealed class PageRangeCollection : List<PageRange>
method PageRangeCollection (line 9) | private PageRangeCollection() { }
method IsInRange (line 21) | public bool IsInRange(int value) {
method Collapse (line 31) | internal void Collapse(int minValue, int maxValue) {
method CreateSingle (line 73) | internal static PageRangeCollection CreateSingle(int minValue, int max...
method Parse (line 80) | internal static PageRangeCollection Parse(string rangeText, int minVal...
method SetReverseNumber (line 123) | static void SetReverseNumber(ref int refNum, int maxNum) {
method ToString (line 129) | public override string ToString() {
FILE: App/Model/PageResizing.cs
type PageResizing (line 6) | public enum PageResizing
type ResizingMode (line 16) | public enum ResizingMode
FILE: App/Model/PageSettings.cs
class PageSettings (line 9) | [XmlRoot(Constants.Content.Page)]
method FromReader (line 38) | static internal PageSettings FromReader(PdfReader reader, int pageInde...
method ConvertPageSize (line 55) | private static string ConvertPageSize(iTextSharp.text.Rectangle b, Uni...
method HavingSameDimension (line 64) | static internal bool HavingSameDimension(PageSettings s1, PageSettings...
method WriteXml (line 76) | internal void WriteXml(System.Xml.XmlWriter writer) {
FILE: App/Model/PaperSize.cs
class PaperSize (line 6) | public class PaperSize
method PaperSize (line 66) | public PaperSize() { }
method PaperSize (line 68) | public PaperSize(float width, float height) : this(null, width, height) {
method PaperSize (line 71) | public PaperSize(string paperName, float width, float height) {
method Scale (line 77) | internal PaperSize Scale(float xFactor, float yFactor) {
method Scale (line 80) | internal PaperSize Scale(float factor) {
method Clone (line 84) | internal PaperSize Clone() {
method ToString (line 88) | public override string ToString() {
type SpecialPaperSize (line 94) | public enum SpecialPaperSize
FILE: App/Model/PdfDocumentFont.cs
class PdfDocumentFont (line 7) | static class PdfDocumentFont
method RemoveSubsetPrefix (line 13) | internal static string RemoveSubsetPrefix(string name) {
method HasEmbeddedFont (line 17) | internal static bool HasEmbeddedFont(PdfDictionary font) {
method IsEmbeddedFont (line 34) | static bool IsEmbeddedFont(PdfDictionary font) {
method GetPageFontReferences (line 46) | public static IEnumerable<ResourceReference> GetPageFontReferences(Pdf...
FILE: App/Model/PdfImageData.cs
class PdfImageData (line 6) | internal sealed class PdfImageData : PdfDictionary
method PdfImageData (line 12) | public PdfImageData(PRStream stream) {
method PdfImageData (line 20) | public PdfImageData(PdfIndirectReference pdfRef) {
method PdfImageData (line 30) | public PdfImageData(PdfDictionary source, byte[] bytes) {
method ToString (line 38) | public override string ToString() {
FILE: App/Model/PdfInfoXmlDocument.cs
class PdfInfoXmlDocument (line 9) | public sealed class PdfInfoXmlDocument : XmlDocument
method PdfInfoXmlDocument (line 12) | public PdfInfoXmlDocument() {
method CreateBookmark (line 39) | public BookmarkElement CreateBookmark() {
method CreateBookmark (line 43) | public BookmarkElement CreateBookmark(BookmarkSettings settings) {
method CreatePageLabel (line 57) | public PageLabelElement CreatePageLabel(MuPDF.PageLabel label) {
method CreateElement (line 63) | public override XmlElement CreateElement(string prefix, string localNa...
class DocumentInfoElement (line 82) | public sealed class DocumentInfoElement : XmlElement
method DocumentInfoElement (line 84) | internal DocumentInfoElement(XmlDocument doc)
class BookmarkContainer (line 112) | public abstract class BookmarkContainer(string name, XmlDocument doc) : ...
method AppendBookmark (line 125) | public BookmarkElement AppendBookmark() {
method AppendBookmark (line 130) | public BookmarkElement AppendBookmark(BookmarkSettings settings) {
class BookmarkRootElement (line 136) | public sealed class BookmarkRootElement : BookmarkContainer
method BookmarkRootElement (line 138) | internal BookmarkRootElement(XmlDocument doc)
class BookmarkElement (line 144) | [DebuggerDisplay(Constants.Bookmark + ":{Title}")]
method BookmarkElement (line 293) | internal BookmarkElement(XmlDocument doc)
method SetTitleAndGotoPagePosition (line 302) | public void SetTitleAndGotoPagePosition(string title, int pageNumber, ...
class PageLabelRootElement (line 314) | public sealed class PageLabelRootElement : XmlElement
method PageLabelRootElement (line 316) | internal PageLabelRootElement(XmlDocument doc)
method Add (line 322) | public void Add(MuPDF.PageLabel label) {
class PageLabelElement (line 334) | public sealed class PageLabelElement : XmlElement
method PageLabelElement (line 356) | internal PageLabelElement(XmlDocument doc)
method SetAttributes (line 360) | public void SetAttributes(MuPDF.PageLabel label) {
method ToPageLabel (line 367) | public MuPDF.PageLabel ToPageLabel() {
FILE: App/Model/PdfModelHelper.cs
class PdfModelHelper (line 9) | static class PdfModelHelper
method Locate (line 11) | internal static T Locate<T>(this PdfDictionary source, params object[]...
method Locate (line 40) | internal static T Locate<T>(this PdfDictionary source, params PdfName[...
method Locate (line 43) | internal static T Locate<T>(this PdfDictionary source, bool resolveRef...
method Locate (line 54) | internal static T Locate<T>(this PdfArray source, int index) where T :...
method Locate (line 57) | internal static T Locate<T>(this PdfArray source, bool resolveRef, int...
method CastAs (line 63) | internal static T CastAs<T>(this PdfIndirectReference pdfRef) where T ...
method ValueAsFloat (line 66) | internal static float ValueAsFloat(this PdfObject obj) {
method ValueAsInt (line 71) | internal static float ValueAsInt(this PdfObject obj) {
method ValueIs (line 77) | internal static bool ValueIs(this PdfNumber obj, double value) {
method ValueIs (line 80) | internal static bool ValueIs(this PdfBoolean obj, bool value) {
method ValueIs (line 83) | internal static bool ValueIs(this PdfObject obj, PdfName value) {
method TryGetInt32 (line 87) | internal static int TryGetInt32(this PdfDictionary source, PdfName key...
method TryGetBoolean (line 91) | internal static bool TryGetBoolean(this PdfDictionary source, PdfName ...
method Decode (line 96) | internal static string Decode(this PdfString text, Encoding encoding) {
method ToPdfString (line 130) | internal static PdfString ToPdfString(this string text) {
method GetReferencedResources (line 144) | internal static IEnumerable<ResourceReference> GetReferencedResources(...
FILE: App/Model/PdfNavigator.cs
class PdfNavigator (line 10) | sealed class PdfNavigator : XPathNavigator
class HtmlNameTable (line 12) | sealed class HtmlNameTable : XmlNameTable
method Add (line 15) | public override string Add(string array) {
method Add (line 19) | public override string Add(char[] array, int offset, int length) {
method Get (line 23) | public override string Get(string array) {
method Get (line 27) | public override string Get(char[] array, int offset, int length) {
method GetOrAdd (line 31) | internal string GetOrAdd(string array) {
method PdfNavigator (line 41) | public PdfNavigator(PdfPathDocument document) {
method PdfNavigator (line 45) | public PdfNavigator(PdfNavigator source) {
method Clone (line 55) | public override XPathNavigator Clone() {
method IsSamePosition (line 61) | public override bool IsSamePosition(XPathNavigator other) {
method MoveTo (line 67) | public override bool MoveTo(XPathNavigator other) {
method MoveToFirstAttribute (line 78) | public override bool MoveToFirstAttribute() {
method MoveToFirstChild (line 82) | public override bool MoveToFirstChild() {
method MoveToFirstNamespace (line 92) | public override bool MoveToFirstNamespace(XPathNamespaceScope namespac...
method MoveToId (line 96) | public override bool MoveToId(string id) {
method MoveToNext (line 101) | public override bool MoveToNext() {
method MoveToNextAttribute (line 113) | public override bool MoveToNextAttribute() {
method MoveToNextNamespace (line 117) | public override bool MoveToNextNamespace(XPathNamespaceScope namespace...
method MoveToParent (line 121) | public override bool MoveToParent() {
method MoveToPrevious (line 130) | public override bool MoveToPrevious() {
method DeleteSelf (line 183) | public override void DeleteSelf() {
FILE: App/Model/PdfObjectType.cs
type PdfObjectType (line 3) | internal enum PdfObjectType
FILE: App/Model/PdfPageCommand.cs
type PdfPageCommandType (line 10) | enum PdfPageCommandType
type IPdfPageCommandContainer (line 20) | interface IPdfPageCommandContainer
class PdfPageCommand (line 25) | abstract class PdfPageCommand
method Init (line 29) | static Dictionary<string, string> Init() {
method PdfPageCommand (line 115) | protected PdfPageCommand(PdfLiteral oper, List<PdfObject> operands) {
method PdfPageCommand (line 122) | protected PdfPageCommand(string oper, params PdfObject[] operands) : t...
method WriteToPdf (line 125) | internal virtual void WriteToPdf(Stream target) {
method WriteOperand (line 134) | protected static void WriteOperand(PdfObject operand, Stream target) {
method WriteOperator (line 139) | protected static void WriteOperator(PdfLiteral opName, Stream target) {
method GetFriendlyCommandName (line 144) | internal static bool GetFriendlyCommandName(string oper, out string fr...
method GetOperandsText (line 148) | internal string GetOperandsText() {
class EnclosingCommand (line 153) | sealed class EnclosingCommand(PdfLiteral oper, List<PdfObject> operands)...
method Create (line 191) | internal static EnclosingCommand Create(string name, IEnumerable<PdfOb...
method WriteToPdf (line 199) | internal override void WriteToPdf(Stream target) {
method IsStartingCommand (line 209) | internal static bool IsStartingCommand(string oper) {
method IsEndingCommand (line 212) | internal static bool IsEndingCommand(string oper) {
class OutputCommand (line 217) | class OutputCommand : PdfPageCommand
method OutputCommand (line 221) | public OutputCommand(PdfLiteral oper, List<PdfObject> operands) : base...
method OutputCommand (line 223) | public OutputCommand(string oper, params PdfObject[] operands) : base(...
class AdjustCommand (line 227) | class AdjustCommand : PdfPageCommand
method AdjustCommand (line 231) | public AdjustCommand(PdfLiteral oper, List<PdfObject> operands) : base...
method AdjustCommand (line 233) | public AdjustCommand(string oper, params PdfObject[] operands) : base(...
class TextCommand (line 237) | class TextCommand(PdfLiteral oper, List<PdfObject> operands, TextInfo te...
class PaceAndTextCommand (line 243) | sealed class PaceAndTextCommand : TextCommand
method PaceAndTextCommand (line 247) | public PaceAndTextCommand(PdfLiteral oper, List<PdfObject> operands, T...
class MatrixCommand (line 262) | sealed class MatrixCommand : AdjustCommand
method MatrixCommand (line 268) | public MatrixCommand(PdfLiteral oper, List<PdfObject> operands)
method MatrixCommand (line 271) | public MatrixCommand(PdfLiteral oper, float a, float b, float c, float...
method Multiply (line 278) | public void Multiply(double[] matrix) {
class FontCommand (line 289) | sealed class FontCommand(PdfLiteral oper, List<PdfObject> operands, stri...
class InlineImageCommand (line 304) | sealed class InlineImageCommand(PdfLiteral oper, List<PdfObject> operand...
method WriteToPdf (line 314) | internal override void WriteToPdf(Stream target) {
class InvalidCommand (line 330) | sealed class InvalidCommand(PdfLiteral oper, List<PdfObject> operands) :...
method WriteToPdf (line 336) | internal override void WriteToPdf(Stream target) {
FILE: App/Model/PdfPath/Context.cs
class Context (line 7) | sealed class Context
method Context (line 12) | public Context(DocumentObject currentObject, int position) {
FILE: App/Model/PdfPath/IPathAxis.cs
type IPathAxis (line 7) | public interface IPathAxis
method SelectObject (line 10) | DocumentObject SelectObject(DocumentObject source, string name, IEnume...
method SelectObjects (line 11) | IList<DocumentObject> SelectObjects(DocumentObject source, string name...
FILE: App/Model/PdfPath/IPathExpression.cs
type IPathExpression (line 8) | public interface IPathExpression : IPathValue
method SelectObject (line 13) | DocumentObject SelectObject(DocumentObject source);
method SelectObjects (line 14) | IList<DocumentObject> SelectObjects(DocumentObject source);
class PathExpression (line 17) | public class PathExpression : IPathExpression
method SelectObject (line 37) | public DocumentObject SelectObject(DocumentObject source) {
method SelectObjects (line 41) | public IList<DocumentObject> SelectObjects(DocumentObject source) {
method PathExpression (line 47) | public PathExpression(PathAxisType axis) {
method PathExpression (line 50) | public PathExpression(PathAxisType axis, string name) {
FILE: App/Model/PdfPath/IPathFunction.cs
type IPathFunction (line 7) | interface IPathFunction
method Evaluate (line 9) | object Evaluate(DocumentObject source);
class CurrentPosition (line 12) | sealed class CurrentPosition : IPathFunction
method Evaluate (line 16) | public object Evaluate(DocumentObject source) {
FILE: App/Model/PdfPath/IPathPredicate.cs
type IPathPredicate (line 7) | public interface IPathPredicate
method Match (line 12) | bool Match(DocumentObject source, IPathValue value1, IPathValue value2);
class PathPredicate (line 15) | abstract class PathPredicate : IPathPredicate
method Match (line 25) | public abstract bool Match(DocumentObject source, IPathValue value1, I...
method PathPredicate (line 29) | protected PathPredicate(IPathExpression operand1, IPathExpression oper...
class ContainmentPredicate (line 34) | sealed class ContainmentPredicate : PathPredicate
method ContainmentPredicate (line 36) | public ContainmentPredicate(IPathExpression operand1, IPathExpressio...
method Match (line 42) | public override bool Match(DocumentObject source, IPathValue value1,...
class EqualityPredicate (line 51) | class EqualityPredicate : PathPredicate
method EqualityPredicate (line 55) | public EqualityPredicate(IPathExpression operand1, IPathExpression o...
method Match (line 59) | public override bool Match(DocumentObject source, IPathValue value1,...
class InequalityPredicate (line 89) | sealed class InequalityPredicate : EqualityPredicate
method InequalityPredicate (line 91) | public InequalityPredicate(IPathExpression operand1, IPathExpression...
method Match (line 95) | public override bool Match(DocumentObject source, IPathValue value1,...
FILE: App/Model/PdfPath/IPathValue.cs
type IPathValue (line 7) | public interface IPathValue
type IConstantPathValue (line 12) | public interface IConstantPathValue : IPathValue
FILE: App/Model/PdfPath/PathAxes.cs
class PathAxes (line 7) | static class PathAxes
method MatchesPredicate (line 9) | static bool MatchesPredicate(DocumentObject source, string name, IEnum...
method CompriseSingleObjectCollection (line 26) | static IList<DocumentObject> CompriseSingleObjectCollection(DocumentOb...
method GetLiteralValue (line 30) | private static string GetLiteralValue(object operand) {
class SelfAxis (line 48) | sealed class SelfAxis : IPathAxis
method SelectObject (line 54) | public DocumentObject SelectObject(DocumentObject source, string nam...
method SelectObjects (line 58) | public IList<DocumentObject> SelectObjects(DocumentObject source, st...
class ParentAxis (line 65) | sealed class ParentAxis : IPathAxis
method SelectObject (line 71) | public DocumentObject SelectObject(DocumentObject source, string nam...
method SelectObjects (line 75) | public IList<DocumentObject> SelectObjects(DocumentObject source, st...
class ChildrenAxis (line 82) | sealed class ChildrenAxis : IPathAxis
method SelectObject (line 88) | public DocumentObject SelectObject(DocumentObject source, string nam...
method SelectObjects (line 102) | public IList<DocumentObject> SelectObjects(DocumentObject source, st...
class RootAxis (line 120) | sealed class RootAxis : IPathAxis
method SelectObject (line 126) | public DocumentObject SelectObject(DocumentObject source, string nam...
method SelectObjects (line 139) | public IList<DocumentObject> SelectObjects(DocumentObject source, st...
class AncestorsAxis (line 146) | sealed class AncestorsAxis : IPathAxis
method SelectObject (line 152) | public DocumentObject SelectObject(DocumentObject source, string nam...
method SelectObjects (line 166) | public IList<DocumentObject> SelectObjects(DocumentObject source, st...
class DescendantsAxis (line 183) | sealed class DescendantsAxis : IPathAxis
method SelectObjects (line 185) | void SelectObjects(DocumentObject source, string name, IEnumerable<I...
method SelectObject (line 201) | public DocumentObject SelectObject(DocumentObject source, string nam...
method SelectObjects (line 217) | public IList<DocumentObject> SelectObjects(DocumentObject source, st...
method Create (line 234) | public static IPathAxis Create(PathAxisType axisType) {
FILE: App/Model/PdfPath/PathAxisType.cs
type PathAxisType (line 3) | public enum PathAxisType
FILE: App/Model/PdfPath/PathCompiler.cs
class PathCompiler (line 7) | static class PathCompiler
class Context (line 17) | sealed class Context
method Compile (line 23) | public static IEnumerable<IPathExpression> Compile(string path) {
method ExtractAxis (line 45) | private static PathAxisType ExtractAxis(string path, int length, bool ...
method ExtractName (line 77) | private static string ExtractName(string path, int length, ref int ind...
method MatchNextChar (line 99) | private static bool MatchNextChar(string path, int length, int index, ...
FILE: App/Model/PdfPath/PathValue.cs
class PathValue (line 6) | public static class PathValue
method ToNumber (line 8) | public static double ToNumber(DocumentObject source, IPathValue value) {
method ToString (line 28) | public static string ToString(DocumentObject source, IPathValue value) {
method ToBoolean (line 47) | public static bool ToBoolean(DocumentObject source, IPathValue value) {
class PathStringValue (line 57) | sealed class PathStringValue(string value) : IConstantPathValue
class PathNumberValue (line 66) | sealed class PathNumberValue(double value) : IConstantPathValue
class PathBooleanValue (line 75) | sealed class PathBooleanValue(bool value) : IConstantPathValue
FILE: App/Model/PdfPath/PathValueType.cs
type PathValueType (line 7) | public enum PathValueType
FILE: App/Model/PdfPath/PredicateOperatorType.cs
type PredicateOperatorType (line 7) | public enum PredicateOperatorType
FILE: App/Model/PdfPathDocument.cs
class PdfPathDocument (line 8) | sealed class PdfPathDocument : IHierarchicalObject<DocumentObject>
method PdfPathDocument (line 17) | public PdfPathDocument(string pdfPath) {
method Close (line 53) | public void Close() {
method GetPageNumber (line 57) | public int GetPageNumber(PdfIndirectReference pdfRef) {
FILE: App/Model/PdfStructInfo.cs
type PdfStructInfo (line 8) | readonly struct PdfStructInfo(string name, bool isKeyObject, bool isRequ...
method PdfStructInfo (line 18) | public PdfStructInfo(string name, bool isKeyObject) : this(name, isKey...
method GetInfo (line 21) | internal static PdfStructInfo GetInfo(string context, string name) {
method InitStructInfo (line 29) | static Dictionary<string, PdfStructInfo> InitStructInfo() {
method AddSubItems (line 40) | static void AddSubItems(Dictionary<string, PdfStructInfo> d, XmlElemen...
method AddItem (line 63) | static void AddItem(Dictionary<string, PdfStructInfo> d, string key, P...
FILE: App/Model/ResourceReference.cs
type ResourceReference (line 6) | readonly struct ResourceReference(PdfIndirectReference resourceRef, PdfN...
FILE: App/Model/SourceItem.cs
class SourceItem (line 10) | public abstract class SourceItem
method SortFileList (line 27) | public static void SortFileList(string[] fileList) {
method SortItems (line 40) | public void SortItems(SortType options, bool recursive) {
method Clone (line 73) | public abstract SourceItem Clone();
method ToString (line 75) | public override string ToString() {
type ItemType (line 79) | public enum ItemType
type SortType (line 83) | public enum SortType {
method Create (line 96) | internal static Empty Create() {
method Create (line 100) | internal static SourceItem Create(string path) {
method Create (line 110) | internal static SourceItem Create(FilePath path, bool refresh) {
method GetInfoFileName (line 142) | internal string GetInfoFileName() {
method GetTargetPdfFileName (line 159) | internal string GetTargetPdfFileName(string targetPath) {
class Empty (line 165) | internal sealed class Empty : SourceItem
method SetPageCount (line 174) | public void SetPageCount(int pageCount) {
method ToString (line 178) | public override string ToString() {
method Clone (line 182) | public override SourceItem Clone() {
method Empty (line 188) | internal Empty() : base(null, 1) { }
method Empty (line 189) | internal Empty(int pageCount) : base(null, pageCount) { }
class CropOptions (line 192) | internal sealed class CropOptions
method Equals (line 203) | public bool Equals(CropOptions i) {
method Clone (line 207) | public CropOptions Clone() {
class Image (line 212) | internal sealed class Image : SourceItem
method Image (line 217) | public Image(FilePath path)
method Clone (line 229) | public override SourceItem Clone() {
class Pdf (line 236) | internal sealed class Pdf : SourceItem
method Pdf (line 241) | public Pdf(FilePath path, string pageRanges, int pageCount, Model.Ge...
method Pdf (line 256) | public Pdf(FilePath path) : base(path, 0) {
method Refresh (line 269) | public void Refresh(Encoding encoding) {
method ToString (line 273) | public override string ToString() {
method Clone (line 279) | public override SourceItem Clone() {
method Refresh (line 287) | private void Refresh(string path, Encoding encoding) {
class Folder (line 305) | internal sealed class Folder : SourceItem
method Folder (line 309) | public Folder(string path) : base(path, 0) {
method Folder (line 315) | public Folder(string path, bool loadSubItems)
method Reload (line 327) | public void Reload() {
method Clone (line 349) | public override SourceItem Clone() {
method AddSubDirectoriesAndFiles (line 355) | static void AddSubDirectoriesAndFiles(string folderPath, List<Source...
method AddFiles (line 376) | static void AddFiles(string folderPath, List<SourceItem> list) {
method AddSubDirectories (line 392) | static void AddSubDirectories(string folderPath, List<SourceItem> li...
method SourceItem (line 404) | protected SourceItem(FilePath path, int pageCount) {
method GetFileInfo (line 422) | protected static void GetFileInfo(FilePath fileName, out int kilobytes...
method CopyProperties (line 434) | protected virtual void CopyProperties(SourceItem target) {
method CreateBookmarkSettings (line 446) | static BookmarkSettings CreateBookmarkSettings(string t) {
method CajSort (line 480) | static bool CajSort(string[] fileList) {
method CopyItem (line 531) | static int CopyItem(string[] fileList, List<string> list, int position) {
method MatchCajPatternAddPath (line 537) | static bool MatchCajPatternAddPath(string path, string text, string pa...
method CajSort (line 545) | static bool CajSort(List<SourceItem> fileList) {
method MatchCajPatternAddPath (line 596) | static bool MatchCajPatternAddPath(SourceItem item, string text, strin...
method CompareFilePath (line 604) | static int CompareFilePath(SourceItem x, SourceItem y) {
method MatchCajPattern (line 608) | static bool MatchCajPattern(string text, string pattern) {
FILE: App/Model/TextInfo.cs
class TextInfo (line 6) | [DebuggerDisplay("Region={Region.Bottom},{Region.Left}; Size={Size}; Tex...
method CompareRegionX (line 17) | internal static int CompareRegionX(ITextRegion a, ITextRegion b) {
method CompareRegionX (line 23) | static int CompareRegionX(ITextRegion a, ITextRegion b, bool checkAlig...
method CompareRegionY (line 34) | internal static int CompareRegionY(ITextRegion a, ITextRegion b) {
method CompareRegionY (line 40) | static int CompareRegionY(ITextRegion a, ITextRegion b, bool checkAlig...
FILE: App/Model/TextLine.cs
class TextLine (line 7) | [System.Diagnostics.DebuggerDisplay("{Direction}({Region.Middle},{Region...
method TextLine (line 35) | private TextLine() {
method TextLine (line 40) | internal TextLine(TextInfo text) : this() {
method AddText (line 48) | internal void AddText(TextInfo text) {
method InferWritingDirection (line 62) | private static WritingDirection InferWritingDirection(DistanceInfo d) {
method Merge (line 68) | internal void Merge(TextLine source) {
method GetDistance (line 79) | internal DistanceInfo GetDistance(Bound other) {
method GetConcatenatedText (line 86) | private string GetConcatenatedText() {
method GetAverageCharSize (line 141) | internal float GetAverageCharSize() {
FILE: App/Model/TextRegion.cs
class TextRegion (line 6) | [System.Diagnostics.DebuggerDisplay("{Direction}({Region.Top},{Region.Le...
method TextRegion (line 18) | internal TextRegion(TextLine text) {
method AddLine (line 23) | internal void AddLine(TextLine line) {
FILE: App/Model/UnitConverter.cs
class UnitConverter (line 7) | public class UnitConverter
method UnitConverter (line 48) | public UnitConverter() {
method FromPoint (line 53) | internal float FromPoint(float point) {
method ToPoint (line 59) | internal float ToPoint(float value) {
method FromPoint (line 65) | internal static string FromPoint(string point, float unitFactor) {
method FromPoint (line 80) | internal static string FromPoint(float point, float unitFactor) {
method ToPoint (line 86) | internal static string ToPoint(string value, float unitFactor) {
method ToPoint (line 98) | internal static float ToPoint(float value, float unitFactor) {
method ConvertUnit (line 104) | internal static float[] ConvertUnit(float[] source, float factor) {
FILE: App/Model/WritingDirection.cs
type WritingDirection (line 5) | public enum WritingDirection
FILE: App/Options/AutoBookmarkOptions.cs
class AutoBookmarkOptions (line 9) | public class AutoBookmarkOptions
method AutoBookmarkOptions (line 124) | public AutoBookmarkOptions() {
class LevelAdjustmentOption (line 140) | public class LevelAdjustmentOption
method Clone (line 162) | internal LevelAdjustmentOption Clone() {
FILE: App/Options/DocumentOptions.cs
class DocumentOptions (line 7) | public abstract class DocumentOptions
method DocumentOptions (line 36) | protected DocumentOptions() {
FILE: App/Options/EncodingOptions.cs
class EncodingOptions (line 8) | public class EncodingOptions
method SetEncoding (line 71) | public static void SetEncoding(ref string encodingName, ref Encoding e...
method GetEncoding (line 75) | static void GetEncoding(string encodingName, ref Encoding encoding) {
FILE: App/Options/ExporterOptions.cs
class ExporterOptions (line 9) | public class ExporterOptions
method GetEncoding (line 101) | public Encoding GetEncoding() {
FILE: App/Options/ExtractPageOptions.cs
class ExtractPageOptions (line 5) | public class ExtractPageOptions
method ExtractPageOptions (line 29) | public ExtractPageOptions() {
FILE: App/Options/ImageExtracterOptions.cs
class ImageExtracterOptions (line 7) | public class ImageExtracterOptions
method ImageExtracterOptions (line 62) | public ImageExtracterOptions() {
FILE: App/Options/ImporterOptions.cs
class ImporterOptions (line 5) | public class ImporterOptions
method ImporterOptions (line 31) | public ImporterOptions() {
FILE: App/Options/MergerOptions.cs
class MergerOptions (line 9) | public class MergerOptions : DocumentOptions
method MergerOptions (line 11) | public MergerOptions() {
type SubFolderPosition (line 120) | public enum SubFolderPosition
FILE: App/Options/OcrOptions.cs
class OcrOptions (line 9) | public class OcrOptions
method OcrOptions (line 44) | public OcrOptions() {
FILE: App/Options/PatcherOptions.cs
class PatcherOptions (line 8) | [XmlRoot("文档设置")]
method PatcherOptions (line 71) | public PatcherOptions() {
class FontSubstitution (line 78) | public class FontSubstitution
FILE: App/Options/ReaderOptions.cs
class ReaderOptions (line 7) | public class ReaderOptions
FILE: App/Options/ToolbarOptions.cs
class ToolbarOptions (line 9) | public class ToolbarOptions
method ToolbarOptions (line 19) | public ToolbarOptions() {
method Reset (line 23) | public void Reset() {
method RemoveInvalidButtons (line 30) | internal void RemoveInvalidButtons() {
method AddMissedButtons (line 42) | internal void AddMissedButtons() {
class ButtonOption (line 55) | public class ButtonOption
method ButtonOption (line 67) | public ButtonOption() {
method ButtonOption (line 69) | public ButtonOption(string id, string name, bool showText, bool visi...
method GetToolkit (line 76) | internal Toolkit GetToolkit() {
method CreateButton (line 79) | internal ToolStripButton CreateButton() {
FILE: App/Options/ViewerOptions.cs
class ViewerOptions (line 9) | public class ViewerOptions
FILE: App/Options/WindowStatus.cs
class WindowStatus (line 7) | public class WindowStatus
method WindowStatus (line 30) | public WindowStatus() {}
method WindowStatus (line 32) | public WindowStatus(Form form) {
method Position (line 42) | public void Position(Form form) {
FILE: App/Processor/AutoBookmarkCreator.cs
class AutoBookmarkCreator (line 12) | sealed class AutoBookmarkCreator
class SizeOccurrence (line 14) | sealed class SizeOccurrence(float size, int page, string instance)
class FontOccurrence (line 22) | sealed class FontOccurrence
method GetOccurrence
Condensed preview — 513 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (9,231K chars).
[
{
"path": ".gitattributes",
"chars": 2897,
"preview": "###############################################################################\n# Set default behavior to automatically "
},
{
"path": ".github/ISSUE_TEMPLATE/其它问题.md",
"chars": 102,
"preview": "---\nname: 其它问题\nabout: 对于其它事项,例如使用方法求助等,建议在 Discussion 中发起讨论\ntitle: ''\nlabels: 讨论\nassignees: ''\n\n---\n\n\n"
},
{
"path": ".github/ISSUE_TEMPLATE/新功能需求.md",
"chars": 133,
"preview": "---\nname: 新功能需求\nabout: 告诉我们你希望增加的功能\ntitle: ''\nlabels: 改进\nassignees: ''\n\n---\n\n**使用场景**\n例如:在什么场合下会用到这个功能\n\n**类似软件**\n是否有类似软件"
},
{
"path": ".github/ISSUE_TEMPLATE/缺陷问题报告.md",
"chars": 223,
"preview": "---\nname: 缺陷问题报告\nabout: 告诉我们你遇到的问题\ntitle: ''\nlabels: 缺陷\nassignees: ''\n\n---\n\n**PDF补丁丁的版本**\n请写明使用的版本\n\n**请简要描述你遇到的问题**\n本来应该"
},
{
"path": ".gitignore",
"chars": 4370,
"preview": "*.snk\n*.pld\nCopyReleasedFiles.js\nILRepack.targets\n7za.exe\nmisc/\n\n## Ignore Visual Studio temporary files, build results,"
},
{
"path": ".textlintrc",
"chars": 134,
"preview": "{\n \"filters\": {},\n \"rules\": {\n \"ja-space-between-half-and-full-width\": {\n \"space\": \"always\"\n "
},
{
"path": "App/.editorconfig",
"chars": 11979,
"preview": "# Remove the line below if you want to inherit .editorconfig settings from higher directories\nroot = true\n\n# C# files\n[*"
},
{
"path": "App/AppContext.cs",
"chars": 9904,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.IO;\r\nusing System.Text;\r\nusing System.Xml;\r\nusing MuPDF;"
},
{
"path": "App/Commands.cs",
"chars": 4891,
"preview": "using System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace PDFPatcher\r\n{\r\n\tstatic class Commands\r\n\t{\r\n\t\tinternal con"
},
{
"path": "App/Common/CommandRegistry.cs",
"chars": 1396,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace PDFPatcher.Common\r\n{\r\n\t/// <summary>\r"
},
{
"path": "App/Common/DualKeyDictionary.cs",
"chars": 2500,
"preview": "using System;\r\nusing System.Collections.Generic;\r\n\r\nnamespace PDFPatcher.Common\r\n{\r\n\tpublic class DualKeyDictionary<K, "
},
{
"path": "App/Common/FileHelper.cs",
"chars": 7626,
"preview": "using System;\r\nusing System.IO;\r\n\r\nnamespace PDFPatcher.Common\r\n{\r\n\tstatic class FileHelper\r\n\t{\r\n\t\tenum OverwriteType\r\n"
},
{
"path": "App/Common/FilePath.cs",
"chars": 35718,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.IO;\r\nusing System.Reflection;"
},
{
"path": "App/Common/FontHelper.cs",
"chars": 3564,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing iTextSharp.text.pdf;\r\nusing Microsoft.Win32;\r\nusing CharSet = S"
},
{
"path": "App/Common/FontUtility.cs",
"chars": 2043,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text.RegularExpressions;\r\n\r\nnamespace PDFPatcher.Common\r"
},
{
"path": "App/Common/FormHelper.cs",
"chars": 13907,
"preview": "using System;\r\nusing System.Drawing;\r\nusing System.Runtime.InteropServices;\r\nusing System.Windows.Forms;\r\n\r\nnamespace P"
},
{
"path": "App/Common/ImageBox/DragHandle.cs",
"chars": 900,
"preview": "using System.Drawing;\r\n\r\nnamespace Cyotek.Windows.Forms.Demo\r\n{\r\n\t// Cyotek ImageBox\r\n\t// Copyright (c) 2010-2015 Cyote"
},
{
"path": "App/Common/ImageBox/DragHandleAnchor.cs",
"chars": 535,
"preview": "namespace Cyotek.Windows.Forms.Demo\r\n{\r\n\t// Cyotek ImageBox\r\n\t// Copyright (c) 2010-2015 Cyotek Ltd.\r\n\t// http://cyotek"
},
{
"path": "App/Common/ImageBox/DragHandleCollection.cs",
"chars": 2703,
"preview": "using System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Drawing;\r\n\r\nnamespace Cyotek.Windows.Forms.D"
},
{
"path": "App/Common/ImageBox/ImageBoxEx.cs",
"chars": 24431,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Drawing;\r\nusing System.Windows.Forms;\r\n\r\nnamespace Cyotek.Win"
},
{
"path": "App/Common/ObjectListViewHelper.cs",
"chars": 7801,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Drawing;\r\nusing System.Drawing.Drawing2D;\r\n\r\nnamespace B"
},
{
"path": "App/Common/PInvokeHelper.cs",
"chars": 549,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Runtime.InteropServices;\r\n\r\nnamespace PDFPatcher.Common\r"
},
{
"path": "App/Common/ShortcutFile.cs",
"chars": 4177,
"preview": "using System;\r\nusing System.Runtime.InteropServices;\r\nusing System.Text;\r\n\r\nnamespace PDFPatcher.Common\r\n{\r\n\t/// <summa"
},
{
"path": "App/Common/StringBuilderCache.cs",
"chars": 1079,
"preview": "using System;\r\nusing System.Text;\r\n\r\nnamespace PDFPatcher.Common\r\n{\r\n\tinternal static class StringBuilderCache\r\n\t{\r\n\t\ti"
},
{
"path": "App/Common/StringHelper.cs",
"chars": 1947,
"preview": "using System;\r\nusing System.Diagnostics;\r\n\r\nnamespace PDFPatcher.Common\r\n{\r\n\tstatic class StringHelper\r\n\t{\r\n\t\t[Debugger"
},
{
"path": "App/Common/ValueHelper.cs",
"chars": 16628,
"preview": "using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Gl"
},
{
"path": "App/Common/XmlHelper.cs",
"chars": 9137,
"preview": "using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Xm"
},
{
"path": "App/Common/app.manifest",
"chars": 743,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<assembly xmlns=\"urn:schemas-microsoft-com:asm.v1\" manifestVersion=\"1.0\" xmlns:"
},
{
"path": "App/Configuration.Designer.cs",
"chars": 8941,
"preview": "//------------------------------------------------------------------------------\r\n// <auto-generated>\r\n// This code"
},
{
"path": "App/Configuration.resx",
"chars": 7623,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/ConfigurationSerialization.cs",
"chars": 1862,
"preview": "using System;\r\nusing System.Xml.Serialization;\r\nusing PowerJson;\r\n\r\nnamespace PDFPatcher\r\n{\r\n\t[XmlRoot(\"处理选项\")]\r\n\tpubli"
},
{
"path": "App/Constants.cs",
"chars": 22822,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing iTextSharp.text.pdf;\r\nusing E = System.Text.Encoding;\r\n\r\nnamesp"
},
{
"path": "App/Functions/AboutControl.Designer.cs",
"chars": 2081,
"preview": "namespace PDFPatcher\r\n{\r\n\tpartial class AboutControl\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary>\r\n\t\tprivate"
},
{
"path": "App/Functions/AboutControl.cs",
"chars": 3773,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Drawing;\r\nusing System.Lin"
},
{
"path": "App/Functions/AboutControl.resx",
"chars": 5815,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/AboutPage.html",
"chars": 2840,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<html>\r\n\t<head>\r\n\t\t<title>关于 $AppName</title>\r\n\t\t<style>\r\nbody {\r\n\tmargin: 0;\r"
},
{
"path": "App/Functions/AppOptionForm.Designer.cs",
"chars": 11885,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class AppOptionForm\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary"
},
{
"path": "App/Functions/AppOptionForm.cs",
"chars": 3543,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatc"
},
{
"path": "App/Functions/AppOptionForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmark/EditAdjustmentForm.Designer.cs",
"chars": 8949,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class EditAdjustmentForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </sum"
},
{
"path": "App/Functions/AutoBookmark/EditAdjustmentForm.cs",
"chars": 5390,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\nusing PDFPatch"
},
{
"path": "App/Functions/AutoBookmark/EditAdjustmentForm.resx",
"chars": 6014,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmark/FontFilterForm.Designer.cs",
"chars": 9978,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class FontFilterForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary"
},
{
"path": "App/Functions/AutoBookmark/FontFilterForm.cs",
"chars": 6783,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Drawing;\r\nusing System.Windows.Forms;\r\nusing System.Xml;\r\nusi"
},
{
"path": "App/Functions/AutoBookmark/FontFilterForm.resx",
"chars": 6017,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmark/FontNameConditionEditor.Designer.cs",
"chars": 2772,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class FontNameConditionEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t///"
},
{
"path": "App/Functions/AutoBookmark/FontNameConditionEditor.cs",
"chars": 1097,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatch"
},
{
"path": "App/Functions/AutoBookmark/FontNameConditionEditor.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmark/PageRangeConditionEditor.Designer.cs",
"chars": 2156,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class PageRangeConditionEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t//"
},
{
"path": "App/Functions/AutoBookmark/PageRangeConditionEditor.cs",
"chars": 876,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tsealed parti"
},
{
"path": "App/Functions/AutoBookmark/PageRangeConditionEditor.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmark/TextConditionEditor.Designer.cs",
"chars": 4022,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class TextConditionEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </s"
},
{
"path": "App/Functions/AutoBookmark/TextConditionEditor.cs",
"chars": 1429,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatch"
},
{
"path": "App/Functions/AutoBookmark/TextConditionEditor.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmark/TextPositionConditionEditor.Designer.cs",
"chars": 7499,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class TextPositionConditionEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t"
},
{
"path": "App/Functions/AutoBookmark/TextPositionConditionEditor.cs",
"chars": 1736,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tsealed parti"
},
{
"path": "App/Functions/AutoBookmark/TextPositionConditionEditor.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmark/TextSizeConditionEditor.Designer.cs",
"chars": 5513,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class TextSizeConditionEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t///"
},
{
"path": "App/Functions/AutoBookmark/TextSizeConditionEditor.cs",
"chars": 1548,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tsealed parti"
},
{
"path": "App/Functions/AutoBookmark/TextSizeConditionEditor.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/AutoBookmarkControl.Designer.cs",
"chars": 42274,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class AutoBookmarkControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </s"
},
{
"path": "App/Functions/AutoBookmarkControl.cs",
"chars": 13215,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\nu"
},
{
"path": "App/Functions/AutoBookmarkControl.resx",
"chars": 7385,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/BookmarkControl.Designer.cs",
"chars": 5712,
"preview": "namespace PDFPatcher\r\n{\r\n\tpartial class BookmarkControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary>\r\n\t\tpri"
},
{
"path": "App/Functions/BookmarkControl.cs",
"chars": 2901,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatc"
},
{
"path": "App/Functions/BookmarkControl.resx",
"chars": 6223,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/CustomButton/GlassButton.cs",
"chars": 43319,
"preview": "/************************************************************************************************\r\n * GlassButton - How"
},
{
"path": "App/Functions/CustomizeToolbarForm.Designer.cs",
"chars": 6628,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class CustomizeToolbarForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// Required designer va"
},
{
"path": "App/Functions/CustomizeToolbarForm.cs",
"chars": 2067,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Drawing;\r\nusing System.Windows.Forms;\r\nusing BrightIdeas"
},
{
"path": "App/Functions/CustomizeToolbarForm.resx",
"chars": 6019,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/DocumentInspector/AddPdfObjectForm.Designer.cs",
"chars": 6882,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class AddPdfObjectForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summa"
},
{
"path": "App/Functions/DocumentInspector/AddPdfObjectForm.cs",
"chars": 2182,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing iTextSharp.text.pdf;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Mode"
},
{
"path": "App/Functions/DocumentInspector/AddPdfObjectForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentInspector/ImageViewerForm.Designer.cs",
"chars": 4397,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class ImageViewerForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summar"
},
{
"path": "App/Functions/DocumentInspector/ImageViewerForm.cs",
"chars": 1937,
"preview": "using System.Windows.Forms;\r\nusing FreeImageAPI;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Processor;\r\nusing PDFPatch"
},
{
"path": "App/Functions/DocumentInspector/ImageViewerForm.resx",
"chars": 6383,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentInspector/TextViewerForm.Designer.cs",
"chars": 4667,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class TextViewerForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary"
},
{
"path": "App/Functions/DocumentInspector/TextViewerForm.cs",
"chars": 1862,
"preview": "using System;\r\nusing System.Text;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher"
},
{
"path": "App/Functions/DocumentInspector/TextViewerForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentInspectorControl.Designer.cs",
"chars": 22063,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class DocumentInspectorControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t//"
},
{
"path": "App/Functions/DocumentInspectorControl.cs",
"chars": 29771,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Drawing;\r\nusing System.IO;"
},
{
"path": "App/Functions/DocumentInspectorControl.resx",
"chars": 33343,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentOption/DocumentFontListForm.Designer.cs",
"chars": 12701,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class DocumentFontListForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </s"
},
{
"path": "App/Functions/DocumentOption/DocumentFontListForm.cs",
"chars": 5104,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Windows.Forms;\r\nusing BrightIdeasSoftware;\r\nusing iTextS"
},
{
"path": "App/Functions/DocumentOption/DocumentFontListForm.resx",
"chars": 6009,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentOption/DocumentInfoEditor.Designer.cs",
"chars": 8904,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class DocumentInfoEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </su"
},
{
"path": "App/Functions/DocumentOption/DocumentInfoEditor.cs",
"chars": 1967,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher.F"
},
{
"path": "App/Functions/DocumentOption/DocumentInfoEditor.resx",
"chars": 6020,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentOption/FontCharSubstitutionForm.Designer.cs",
"chars": 10499,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class FontCharSubstitutionForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// Required designe"
},
{
"path": "App/Functions/DocumentOption/FontCharSubstitutionForm.cs",
"chars": 2718,
"preview": "using System;\r\nusing System.Drawing;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Fun"
},
{
"path": "App/Functions/DocumentOption/FontCharSubstitutionForm.resx",
"chars": 5815,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/DocumentOption/FontSubstitutionsEditor.Designer.cs",
"chars": 13166,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class FontSubstitutionsEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t///"
},
{
"path": "App/Functions/DocumentOption/FontSubstitutionsEditor.cs",
"chars": 6215,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing Brig"
},
{
"path": "App/Functions/DocumentOption/FontSubstitutionsEditor.resx",
"chars": 6023,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentOption/PageLabelEditor.Designer.cs",
"chars": 7354,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class PageLabelEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summa"
},
{
"path": "App/Functions/DocumentOption/PageLabelEditor.cs",
"chars": 2697,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing Brig"
},
{
"path": "App/Functions/DocumentOption/PageLabelEditor.resx",
"chars": 6017,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DocumentOption/PageSettingsEditor.Designer.cs",
"chars": 13092,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class PageSettingsEditor\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </su"
},
{
"path": "App/Functions/DocumentOption/PageSettingsEditor.cs",
"chars": 5791,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Data;\r\nusing System.Drawin"
},
{
"path": "App/Functions/DocumentOption/PageSettingsEditor.resx",
"chars": 6624,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/DraggableForm.cs",
"chars": 890,
"preview": "using System;\r\nusing System.Runtime.InteropServices;\r\nusing System.Windows.Forms;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r"
},
{
"path": "App/Functions/Editor/ActionEditorForm.Designer.cs",
"chars": 26101,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class ActionEditorForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summa"
},
{
"path": "App/Functions/Editor/ActionEditorForm.cs",
"chars": 10281,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Data;\r\nusing System.Drawin"
},
{
"path": "App/Functions/Editor/ActionEditorForm.resx",
"chars": 287418,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/Editor/AutoBookmarkForm.Designer.cs",
"chars": 12490,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class AutoBookmarkForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// Required designer variab"
},
{
"path": "App/Functions/Editor/AutoBookmarkForm.cs",
"chars": 7981,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Drawing;\r\nusing System.Windows.Forms;\r\nusing BrightIdeas"
},
{
"path": "App/Functions/Editor/AutoBookmarkForm.resx",
"chars": 6212,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/Editor/AutoResizingTextBox.cs",
"chars": 1625,
"preview": "using System;\r\nusing System.Drawing;\r\nusing System.Windows.Forms;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tsealed class A"
},
{
"path": "App/Functions/Editor/BookmarkEditorView.Designer.cs",
"chars": 4305,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class BookmarkEditorView\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </su"
},
{
"path": "App/Functions/Editor/BookmarkEditorView.cs",
"chars": 21445,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System"
},
{
"path": "App/Functions/Editor/BookmarkEditorView.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/Editor/Commands/BookmarkActionCommand.cs",
"chars": 2071,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows.Forms;\r\nusing BrightIdeasSof"
},
{
"path": "App/Functions/Editor/Commands/BookmarkLevelCommand.cs",
"chars": 861,
"preview": "using System;\r\nusing PDFPatcher.Processor;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\tsealed class BookmarkLevelComm"
},
{
"path": "App/Functions/Editor/Commands/BookmarkMarkerCommand.cs",
"chars": 2319,
"preview": "using System.Drawing;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n"
},
{
"path": "App/Functions/Editor/Commands/BookmarkPageCommand.cs",
"chars": 905,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Processor;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\ts"
},
{
"path": "App/Functions/Editor/Commands/BookmarkSelectionCommand.cs",
"chars": 1442,
"preview": "using System;\r\nusing System.Linq;\r\nusing System.Xml;\r\nusing BrightIdeasSoftware;\r\n\r\nnamespace PDFPatcher.Functions.Edit"
},
{
"path": "App/Functions/Editor/Commands/BookmarkStyleCommand.cs",
"chars": 672,
"preview": "using System;\r\nusing BrightIdeasSoftware;\r\nusing PDFPatcher.Processor;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\tse"
},
{
"path": "App/Functions/Editor/Commands/CopyBookmarkItemCommand.cs",
"chars": 366,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Xml;\r\nusing PDFPatcher.Processor;\r\n\r"
},
{
"path": "App/Functions/Editor/Commands/DeleteBookmarkItemCommand.cs",
"chars": 1096,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Xml;\r\nusing PDFPatcher.Processor;\r\n\r"
},
{
"path": "App/Functions/Editor/Commands/DocumentPropertyCommand.cs",
"chars": 365,
"preview": "namespace PDFPatcher.Functions.Editor\r\n{\r\n\tsealed class DocumentPropertyCommand : IEditorCommand\r\n\t{\r\n\t\tpublic void Pro"
},
{
"path": "App/Functions/Editor/Commands/InsertBookmarkCommand.cs",
"chars": 3593,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Drawing;\r\nusing System.Text.RegularExpressions;\r\nusing System"
},
{
"path": "App/Functions/Editor/Commands/InsertPageLabelCommand.cs",
"chars": 1589,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\tseal"
},
{
"path": "App/Functions/Editor/Commands/LoadDocumentCommand.cs",
"chars": 1182,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\tseal"
},
{
"path": "App/Functions/Editor/Commands/OcrPageCommand.cs",
"chars": 740,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows.Forms;\r\nusing System.Xml;\r\nu"
},
{
"path": "App/Functions/Editor/Commands/PagePropertiesCommand.cs",
"chars": 1019,
"preview": "using System;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows.Forms;\r\n\r\nnamespace PDFPatcher.Functions.Edi"
},
{
"path": "App/Functions/Editor/Commands/PasteBookmarkItemCommand.cs",
"chars": 536,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Xml;\r\nusing PDFPatcher.Processor;\r\n\r"
},
{
"path": "App/Functions/Editor/Commands/QuickSelectCommand.cs",
"chars": 2907,
"preview": "using System.Drawing;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Model;\r\nusing PDFPatcher"
},
{
"path": "App/Functions/Editor/Commands/SaveDocumentCommand.cs",
"chars": 3441,
"preview": "using System;\r\nusing System.IO;\r\nusing System.Text;\r\nusing System.Windows.Forms;\r\nusing System.Xml;\r\nusing PDFPatcher.C"
},
{
"path": "App/Functions/Editor/Commands/SavePageImageCommand.cs",
"chars": 968,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Processor.Imaging;\r\n\r\nnamespace "
},
{
"path": "App/Functions/Editor/Commands/SimpleBookmarkCommand.cs",
"chars": 1000,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows.Forms;\r\nusing System.Xml;\r\nu"
},
{
"path": "App/Functions/Editor/Commands/ViewerCommand.cs",
"chars": 2654,
"preview": "using System.Drawing;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n"
},
{
"path": "App/Functions/Editor/Commands/ViewerScrollToBookmarkCommand.cs",
"chars": 1125,
"preview": "using System;\r\nusing BrightIdeasSoftware;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher.Fu"
},
{
"path": "App/Functions/Editor/Controller.cs",
"chars": 25422,
"preview": "using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System"
},
{
"path": "App/Functions/Editor/CustomPatternForm.Designer.cs",
"chars": 5090,
"preview": "namespace PDFPatcher.Functions.Editor\r\n{\r\n\tpartial class CustomPatternForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// Required designe"
},
{
"path": "App/Functions/Editor/CustomPatternForm.cs",
"chars": 1040,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Data;\r\nusing System.Drawin"
},
{
"path": "App/Functions/Editor/CustomPatternForm.resx",
"chars": 5815,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/Editor/DocumentInfoForm.Designer.cs",
"chars": 10838,
"preview": "namespace PDFPatcher.Functions.Editor\r\n{\r\n\tpartial class DocumentInfoForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// Required designer"
},
{
"path": "App/Functions/Editor/DocumentInfoForm.cs",
"chars": 1963,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing MuPDF;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions.Ed"
},
{
"path": "App/Functions/Editor/DocumentInfoForm.resx",
"chars": 5815,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/Editor/DoubleClickableRadioButton.cs",
"chars": 524,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows.Forms;\r\n\r\nnamespace PDFPatch"
},
{
"path": "App/Functions/Editor/EditModel.cs",
"chars": 2938,
"preview": "using System.Collections.Generic;\r\nusing System.IO;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Model;\r\nusing PDFPatche"
},
{
"path": "App/Functions/Editor/EditorCommands.cs",
"chars": 5383,
"preview": "using System;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Processor;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n s"
},
{
"path": "App/Functions/Editor/IEditView.cs",
"chars": 465,
"preview": "using System.Windows.Forms;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\tinternal interface IEditView\r\n\t{\r\n\t\tbool Affe"
},
{
"path": "App/Functions/Editor/IEditorCommand.cs",
"chars": 185,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\tinte"
},
{
"path": "App/Functions/Editor/InsertBookmarkForm.Designer.cs",
"chars": 10840,
"preview": "namespace PDFPatcher.Functions.Editor\r\n{\r\n\tpartial class InsertBookmarkForm\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/"
},
{
"path": "App/Functions/Editor/InsertBookmarkForm.cs",
"chars": 3626,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher."
},
{
"path": "App/Functions/Editor/InsertBookmarkForm.resx",
"chars": 5815,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/Editor/InsertPageLabelForm.Designer.cs",
"chars": 7052,
"preview": "namespace PDFPatcher.Functions.Editor\r\n{\r\n\tpartial class InsertPageLabelForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// Required desig"
},
{
"path": "App/Functions/Editor/InsertPageLabelForm.cs",
"chars": 1820,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions.Editor\r\n{\r\n\tseal"
},
{
"path": "App/Functions/Editor/InsertPageLabelForm.resx",
"chars": 5815,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/Editor/NewCoordinateEntryForm.Designer.cs",
"chars": 7371,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class NewCoordinateEntryForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// <"
},
{
"path": "App/Functions/Editor/NewCoordinateEntryForm.cs",
"chars": 868,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tsealed part"
},
{
"path": "App/Functions/Editor/NewCoordinateEntryForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/Editor/PagePropertyForm.Designer.cs",
"chars": 14766,
"preview": "namespace PDFPatcher.Functions.Editor\r\n{\r\n\tpartial class PagePropertyForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// "
},
{
"path": "App/Functions/Editor/PagePropertyForm.cs",
"chars": 3281,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Windows.Forms;\r\nusing BrightIdeasSoftware;\r\nusing MuPDF;"
},
{
"path": "App/Functions/Editor/PagePropertyForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/Editor/Parts/BookmarkInViewSynchronizer.cs",
"chars": 3472,
"preview": "using System;\r\nusing System.Drawing;\r\nusing BrightIdeasSoftware;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher.Funct"
},
{
"path": "App/Functions/Editor/Parts/BookmarkTitleEditHandler.cs",
"chars": 1370,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing BrightIdeasSoftware;\r\n\r\nnamespace PDFPatcher.Functions.Editor.Parts\r\n"
},
{
"path": "App/Functions/Editor/SavePdfForm.Designer.cs",
"chars": 5555,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class SavePdfForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary>\r\n"
},
{
"path": "App/Functions/Editor/SavePdfForm.cs",
"chars": 2855,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\nusing PDFPatcher.Model;\r\n\r\nnamespace PDFPatcher.F"
},
{
"path": "App/Functions/Editor/SavePdfForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/Editor/SearchBookmarkForm.Designer.cs",
"chars": 14184,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class SearchBookmarkForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </sum"
},
{
"path": "App/Functions/Editor/SearchBookmarkForm.cs",
"chars": 5271,
"preview": "using System;\r\nusing System.Collections;\r\nusing System.Collections.Generic;\r\nusing System.Windows.Forms;\r\nusing System."
},
{
"path": "App/Functions/Editor/SearchBookmarkForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/Editor/ShiftPageNumberEntryForm.Designer.cs",
"chars": 4699,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class ShiftPageNumberEntryForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t///"
},
{
"path": "App/Functions/Editor/ShiftPageNumberEntryForm.cs",
"chars": 888,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tsealed part"
},
{
"path": "App/Functions/Editor/ShiftPageNumberEntryForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/Editor/ViewerControl.cs",
"chars": 38018,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Diagnostics;\r\nusing System"
},
{
"path": "App/Functions/Editor/ViewerStructures.cs",
"chars": 7313,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Diagnostics;\r\nusing System.Drawing;\r\nusing MuPDF;\r\nusing"
},
{
"path": "App/Functions/Editor/ZoomRateEntryForm.Designer.cs",
"chars": 4184,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class ZoomRateEntryForm\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summ"
},
{
"path": "App/Functions/Editor/ZoomRateEntryForm.cs",
"chars": 626,
"preview": "using System;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tsealed part"
},
{
"path": "App/Functions/Editor/ZoomRateEntryForm.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/EditorControl.Designer.cs",
"chars": 69988,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class EditorControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary"
},
{
"path": "App/Functions/EditorControl.cs",
"chars": 20241,
"preview": "using System;\r\nusing System.Drawing;\r\nusing System.Linq;\r\nusing System.Security.Permissions;\r\nusing System.Windows.Form"
},
{
"path": "App/Functions/EditorControl.resx",
"chars": 27303,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/ExtractImageControl.Designer.cs",
"chars": 24665,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class ExtractImageControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </s"
},
{
"path": "App/Functions/ExtractImageControl.cs",
"chars": 7531,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r"
},
{
"path": "App/Functions/ExtractImageControl.resx",
"chars": 6363,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/ExtractPageControl.Designer.cs",
"chars": 17706,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class ExtractPageControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </su"
},
{
"path": "App/Functions/ExtractPageControl.cs",
"chars": 5330,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r"
},
{
"path": "App/Functions/ExtractPageControl.resx",
"chars": 6234,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/FileListHelper.cs",
"chars": 7777,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Text;\r\nusing System.Windows.Forms;\r\nusing BrightIdeasSof"
},
{
"path": "App/Functions/FormState.cs",
"chars": 1039,
"preview": "using System.Drawing;\r\nusing System.Windows.Forms;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\t/// <summary>\r\n\t/// 用于保存窗体状态的"
},
{
"path": "App/Functions/FrontPage.html",
"chars": 2011,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\r\n<html>\r\n\t<head>\r\n\t\t<title>$appName</title>\r\n\t\t<style>\r\nbody {\r\n\tmargin: 0;\r\n\tp"
},
{
"path": "App/Functions/FrontPageControl.Designer.cs",
"chars": 2093,
"preview": "namespace PDFPatcher\r\n{\r\n\tpartial class FrontPageControl\r\n\t{\r\n\t\t/// <summary>\r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </summary>\r\n\t\tpri"
},
{
"path": "App/Functions/FrontPageControl.cs",
"chars": 3327,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Text.RegularExpressions;\r\nusing System.Windows.Forms;\r\nusing "
},
{
"path": "App/Functions/FrontPageControl.resx",
"chars": 5815,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n T"
},
{
"path": "App/Functions/FunctionControl.cs",
"chars": 3134,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatc"
},
{
"path": "App/Functions/FunctionTabContainer.cs",
"chars": 2159,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing PDFP"
},
{
"path": "App/Functions/HistoryComboBox.cs",
"chars": 1329,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Windows.Forms;\r\n\r\nnamespace PDFPatch"
},
{
"path": "App/Functions/HtmlPageControl.cs",
"chars": 1032,
"preview": "using System;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tclass HtmlPageControl : FunctionControl\r"
},
{
"path": "App/Functions/IDocumentEditor.cs",
"chars": 528,
"preview": "using System;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tinterface IDocumentSource\r\n\t{\r\n\t\tstring DocumentPath { get; }\r\n\t}\r"
},
{
"path": "App/Functions/IResettableControl.cs",
"chars": 132,
"preview": "using System;\r\n\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tinterface IResettableControl\r\n\t{\r\n\t\tvoid Reset();\r\n\t\tvoid Reload"
},
{
"path": "App/Functions/ITextInfoFilterEditor.cs",
"chars": 221,
"preview": "using System;\r\n\r\nnamespace PDFPatcher.Functions\r\n{\r\n\tinterface IFilterConditionEditor\r\n\t{\r\n\t\tPDFPatcher.Model.AutoBookm"
},
{
"path": "App/Functions/InfoExchangerControl.Designer.cs",
"chars": 32656,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class InfoExchangerControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// </"
},
{
"path": "App/Functions/InfoExchangerControl.cs",
"chars": 11278,
"preview": "using System;\r\nusing System.Collections.Generic;\r\nusing System.ComponentModel;\r\nusing System.IO;\r\nusing System.Linq;\r\nu"
},
{
"path": "App/Functions/InfoExchangerControl.resx",
"chars": 11291,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
},
{
"path": "App/Functions/InfoFileOptionControl.Designer.cs",
"chars": 26074,
"preview": "namespace PDFPatcher.Functions\r\n{\r\n\tpartial class InfoFileOptionControl\r\n\t{\r\n\t\t/// <summary> \r\n\t\t/// 必需的设计器变量。\r\n\t\t/// <"
},
{
"path": "App/Functions/InfoFileOptionControl.cs",
"chars": 7187,
"preview": "using System;\r\nusing System.ComponentModel;\r\nusing System.Windows.Forms;\r\nusing PDFPatcher.Common;\r\n\r\nnamespace PDFPatc"
},
{
"path": "App/Functions/InfoFileOptionControl.resx",
"chars": 5814,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<root>\r\n <!-- \r\n Microsoft ResX Schema \r\n \r\n Version 2.0\r\n \r\n Th"
}
]
// ... and 313 more files (download for full content)
About this extraction
This page contains the full source code of the wmjordan/PDFPatcher GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 513 files (8.2 MB), approximately 2.2M tokens, and a symbol index with 3619 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.