From 70c1d5342a5c81f247d6b3d61fdaf09e14accabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9A=D1=83=D1=80?= =?UTF-8?q?=D0=B4=D1=8E=D0=BA=D0=BE=D0=B2?= Date: Wed, 18 Oct 2017 12:45:08 +0300 Subject: [PATCH 1/4] Project structure refactoring: - added missing resources - external dependencies replaced with NuGet packages - added .gitignore and .editorconfig files --- .editorconfig | 16 + .gitignore | 13 + src/External/..svnbridge/NLog.dll | 8 - src/External/NLog.dll | Bin 365056 -> 0 bytes .../ApplicationRestartRecoveryManager.cs | 158 - .../Core/AppRestartRecovery/RecoveryData.cs | 58 - .../AppRestartRecovery/RecoverySettings.cs | 77 - .../AppRestartRecovery/RestartRestrictions.cs | 38 - .../AppRestartRecovery/RestartSettings.cs | 69 - .../WindowsAPICodePack/Core/Core.csproj | 164 - .../Core/Core.csproj.vspscc | 10 - .../Core/Dialogs/Common/DialogControl.cs | 152 - .../Dialogs/Common/DialogControlCollection.cs | 164 - .../Core/Dialogs/Common/DialogsDefaults.cs | 22 - .../Core/Dialogs/Common/IDialogControlHost.cs | 48 - .../Core/Dialogs/TaskDialogs/TaskDialog.cs | 1262 -- .../Core/Dialogs/TaskDialogs/TaskDialogBar.cs | 43 - .../Dialogs/TaskDialogs/TaskDialogButton.cs | 38 - .../TaskDialogs/TaskDialogButtonBase.cs | 115 - .../TaskDialogs/TaskDialogClosingEventArgs.cs | 34 - .../TaskDialogs/TaskDialogCommandLink.cs | 53 - .../Dialogs/TaskDialogs/TaskDialogControl.cs | 20 - .../Dialogs/TaskDialogs/TaskDialogDefaults.cs | 22 - .../TaskDialogs/TaskDialogExpandedInfoMode.cs | 23 - .../TaskDialogHyperlinkClickedEventArgs.cs | 31 - .../TaskDialogs/TaskDialogProgressBar.cs | 113 - .../TaskDialogs/TaskDialogProgressBarState.cs | 31 - .../TaskDialogs/TaskDialogRadioButton.cs | 24 - .../Dialogs/TaskDialogs/TaskDialogResult.cs | 46 - .../TaskDialogs/TaskDialogStandardButton.cs | 49 - .../TaskDialogs/TaskDialogStandardIcon.cs | 31 - .../TaskDialogs/TaskDialogStartupLocation.cs | 19 - .../TaskDialogs/TaskDialogTickEventArgs.cs | 29 - .../AppRestartRecoveryNativeMethods.cs | 87 - .../Core/Interop/CommonDllNames.cs | 38 - .../Core/Interop/CoreErrorHelper.cs | 168 - .../Core/Interop/CoreHelpers.cs | 120 - .../Core/Interop/CoreNativeMethods.cs | 425 - .../Core/Interop/Dialogs/DialogShowState.cs | 30 - .../Core/Interop/NetworkList/INetwork.cs | 67 - .../Interop/NetworkList/INetworkConnection.cs | 43 - .../NetworkList/INetworkListManager.cs | 46 - .../NetworkList/NetworkListManagerClass.cs | 50 - .../PowerManagementNativeMethods.cs | 137 - .../Interop/TaskDialogs/NativeTaskDialog.cs | 606 - .../TaskDialogs/NativeTaskDialogSettings.cs | 111 - .../TaskDialogs/TaskDialogNativeMethods.cs | 235 - .../Core/Migrated rules for Core.ruleset | 73 - .../Core/NetworkList/Network.cs | 201 - .../Core/NetworkList/NetworkCollection.cs | 60 - .../Core/NetworkList/NetworkConnection.cs | 115 - .../NetworkConnectionCollection.cs | 60 - .../Core/NetworkList/NetworkListEnums.cs | 132 - .../Core/NetworkList/NetworkListManager.cs | 132 - .../Core/PowerManagement/BatteryState.cs | 151 - .../Core/PowerManagement/EventManager.cs | 94 - .../Core/PowerManagement/ExecutionState.cs | 11 - .../Core/PowerManagement/MessageManager.cs | 216 - .../Core/PowerManagement/PersonalityGuids.cs | 25 - .../Core/PowerManagement/Power.cs | 113 - .../Core/PowerManagement/PowerManager.cs | 423 - .../Core/PowerManagement/PowerPersonality.cs | 29 - .../Core/PowerManagement/PowerSource.cs | 34 - .../Core/Properties/AssemblyInfo.cs | 35 - .../Core/PropertySystem/PropVariant.cs | 958 - .../PropVariantNativeMethods.cs | 108 - .../Core/PropertySystem/PropertyKey.cs | 150 - .../Core/SafeHandles/SafeIconHandle.cs | 26 - .../Core/SafeHandles/SafeRegionHandle.cs | 26 - .../Core/SafeHandles/SafeWindowHandle.cs | 31 - .../Core/SafeHandles/ZeroInvalidHandle.cs | 31 - .../Shell/Common/DefaultShellImageSizes.cs | 68 - .../Shell/Common/EnumUnknown.cs | 65 - .../Shell/Common/IconReference.cs | 119 - .../Shell/Common/SearchCondition.cs | 198 - .../Shell/Common/SearchConditionFactory.cs | 445 - .../Shell/Common/ShellEnums.cs | 527 - .../Shell/Common/ShellFile.cs | 64 - .../Shell/Common/ShellFileSystemFolder.cs | 66 - .../Shell/Common/ShellFolder.cs | 13 - .../Shell/Common/ShellFolderItems.cs | 118 - .../Shell/Common/ShellHelper.cs | 96 - .../Shell/Common/ShellItemArray.cs | 70 - .../Shell/Common/ShellLibrary.cs | 927 - .../Shell/Common/ShellLink.cs | 107 - .../Shell/Common/ShellNonFileSystemFolder.cs | 26 - .../Shell/Common/ShellNonFileSystemItem.cs | 15 - .../Shell/Common/ShellObject.cs | 517 - .../Shell/Common/ShellObjectCollection.cs | 397 - .../Shell/Common/ShellObjectContainer.cs | 133 - .../Shell/Common/ShellObjectFactory.cs | 236 - .../Shell/Common/ShellObjectNode.cs | 11 - .../Common/ShellSavedSearchCollection.cs | 18 - .../Shell/Common/ShellSearchCollection.cs | 21 - .../Shell/Common/ShellSearchConnector.cs | 42 - .../Shell/Common/ShellSearchFolder.cs | 285 - .../Shell/Common/ShellThumbnail.cs | 419 - .../Shell/Common/ShellThumbnailEnums.cs | 58 - .../Shell/Common/SortColumn.cs | 38 - .../CommonFileDialogs/CommonFileDialog.cs | 1290 -- .../CommonFileDialogButton.cs | 70 - .../CommonFileDialogCheckBox.cs | 113 - .../CommonFileDialogComboBox.cs | 170 - .../CommonFileDialogControl.cs | 121 - .../CommonFileDialogControlCollection.cs | 186 - .../CommonFileDialogFilter.cs | 163 - .../CommonFileDialogFilterCollection.cs | 31 - .../CommonFileDialogFolderChangeEventArgs.cs | 33 - .../CommonFileDialogGroupBox.cs | 93 - .../CommonFileDialogLabel.cs | 53 - .../CommonFileDialogs/CommonFileDialogMenu.cs | 129 - .../CommonFileDialogProminentControl.cs | 56 - .../CommonFileDialogRadioButtonList.cs | 177 - .../CommonFileDialogResult.cs | 20 - .../CommonFileDialogSeperator.cs | 27 - .../CommonFileDialogStandardFilters.cs | 54 - .../CommonFileDialogTextBox.cs | 113 - .../CommonFileDialogs/CommonOpenFileDialog.cs | 175 - .../CommonFileDialogs/CommonSaveFileDialog.cs | 308 - .../ICommonFileDialogIndexedControls.cs | 27 - .../Shell/Controls/CommandLinkWPF.xaml | 171 - .../Shell/Controls/CommandLinkWPF.xaml.cs | 145 - .../Shell/Controls/CommandLinkWinforms.cs | 156 - .../Shell/Design/ShellObjects.cd | 130 - .../Design/ShellThumbnailClassDiagram.cd | 39 - .../DesktopWindowManagerNativeMethods.cs | 84 - .../Shell/DesktopWindowManager/GlassEvents.cs | 38 - .../Shell/DesktopWindowManager/GlassForm.cs | 142 - .../Shell/DesktopWindowManager/GlassWindow.cs | 156 - .../ExplorerBrowser/ExplorerBrowser.WPF.xaml | 8 - .../ExplorerBrowser.WPF.xaml.cs | 940 - .../Shell/ExplorerBrowser/ExplorerBrowser.cs | 811 - .../ExplorerBrowserContentOptions.cs | 325 - .../ExplorerBrowser/ExplorerBrowserDiagram.cd | 94 - .../ExplorerBrowser/ExplorerBrowserEnums.cs | 159 - .../ExplorerBrowser/ExplorerBrowserEvents.cs | 118 - .../ExplorerBrowserPaneVisibility.cs | 146 - .../ExplorerBrowserViewEvents.cs | 121 - .../Shell/ExplorerBrowser/NavigationLog.cs | 259 - .../ExplorerBrowser/NavigationLogEnums.cs | 22 - .../ExplorerBrowser/NavigationLogEvents.cs | 47 - .../ExplorerBrowser/NavigationOptions.cs | 106 - .../Shell/Interop/Common/ShellCOMClasses.cs | 22 - .../Shell/Interop/Common/ShellCOMGuids.cs | 100 - .../Interop/Common/ShellCOMInterfaces.cs | 929 - .../Interop/Common/ShellNativeMethods.cs | 799 - .../Shell/Interop/Common/WindowUtilities.cs | 45 - .../Interop/Dialogs/DialogsCOMClasses.cs | 51 - .../Interop/Dialogs/DialogsCOMInterfaces.cs | 507 - .../ExplorerBrowserCOMGuids.cs | 62 - .../ExplorerBrowserCOMInterfaces.cs | 678 - .../ExplorerBrowserNativeMethods.cs | 33 - .../KnownFolders/KnownFoldersCOMGuids.cs | 40 - .../KnownFolders/KnownFoldersCOMInterfaces.cs | 184 - .../KnownFolders/KnownFoldersNativeMethods.cs | 43 - .../PropertySystemCOMInterfaces.cs | 258 - .../PropertySystemNativeMethods.cs | 67 - .../StockIcons/StockIconsNativeMethods.cs | 84 - .../Taskbar/TabbedThumbnailNativeMethods.cs | 242 - .../Interop/Taskbar/TaskbarCOMInterfaces.cs | 155 - .../Interop/Taskbar/TaskbarNativeMethods.cs | 212 - .../Shell/KnownFolders/DefinitionOptions.cs | 33 - .../KnownFolders/FileSystemKnownFolder.cs | 280 - .../Shell/KnownFolders/FolderCategory.cs | 45 - .../Shell/KnownFolders/FolderProperties.cs | 43 - .../Shell/KnownFolders/FolderTypes.cs | 226 - .../Shell/KnownFolders/FoldersIdentifiers.cs | 587 - .../Shell/KnownFolders/IKnownFolder.cs | 175 - .../Shell/KnownFolders/KnownFolderHelper.cs | 221 - .../Shell/KnownFolders/KnownFolderSettings.cs | 299 - .../Shell/KnownFolders/KnownFolders.cs | 1335 -- .../KnownFolders/NonFileSystemKnownFolder.cs | 280 - .../KnownFolders/RedirectionCapabilities.cs | 47 - .../Shell/KnownFolders/RetrievalOptions.cs | 21 - .../Shell/Migrated rules for Shell.ruleset | 73 - .../Shell/Properties/AssemblyInfo.cs | 36 - .../Shell/PropertySystem/IShellProperty.cs | 79 - .../Shell/PropertySystem/ShellProperties.cs | 272 - .../Shell/PropertySystem/ShellProperty.cs | 473 - .../PropertySystem/ShellPropertyCollection.cs | 377 - .../ShellPropertyDescription.cs | 680 - .../ShellPropertyDescriptionsCache.cs | 36 - .../PropertySystem/ShellPropertyEnumType.cs | 126 - .../PropertySystem/ShellPropertyEnums.cs | 722 - .../PropertySystem/ShellPropertyWriter.cs | 249 - .../PropertySystem/StronglyTypedProperties.cs | 16348 ---------------- .../Shell/PropertySystem/SystemProperties.cs | 12345 ------------ .../Shell/PropertySystem/WindowProperties.cs | 37 - .../WindowsAPICodePack/Shell/Shell.csproj | 309 - .../Shell/Shell.csproj.vspscc | 10 - .../Shell/StockIcons/StockIcon.cs | 257 - .../Shell/StockIcons/StockIconEnums.cs | 433 - .../Shell/StockIcons/StockIcons.cs | 638 - .../Shell/Taskbar/JumpList.cs | 535 - .../Shell/Taskbar/JumpListCustomCategory.cs | 94 - .../JumpListCustomCategoryCollection.cs | 130 - .../Shell/Taskbar/JumpListItem.cs | 43 - .../Shell/Taskbar/JumpListItemCollection.cs | 126 - .../Shell/Taskbar/JumpListLink.cs | 187 - .../Shell/Taskbar/JumpListSeparator.cs | 109 - .../Shell/Taskbar/ProgressBarStateSettings.cs | 86 - .../Shell/Taskbar/TabbedThumbnail.cs | 568 - ...TabbedThumbnailBitmapRequestedEventArgs.cs | 105 - .../Shell/Taskbar/TabbedThumbnailEventArgs.cs | 67 - .../Shell/Taskbar/TabbedThumbnailManager.cs | 427 - .../Taskbar/TabbedThumbnailProxyWindow.cs | 124 - .../Taskbar/TabbedThumbnailScreenCapture.cs | 169 - .../Shell/Taskbar/TaskbarEnums.cs | 58 - .../Shell/Taskbar/TaskbarInterfaces.cs | 22 - .../Shell/Taskbar/TaskbarManager.cs | 352 - .../Shell/Taskbar/TaskbarWindow.cs | 214 - .../Shell/Taskbar/TaskbarWindowManager.cs | 658 - .../Shell/Taskbar/ThumbnailButton.cs | 365 - .../ThumbnailButtonClickedEventArgs.cs | 67 - .../Shell/Taskbar/ThumbnailToolbarManager.cs | 70 - .../Taskbar/ThumbnailToolbarProxyWindow.cs | 130 - .../UserRemovedJumpListItemsEventArg.cs | 29 - src/External/log4net.dll | Bin 270336 -> 0 bytes src/ICSharpCode.TextEditor/Article1.cd | 247 - src/ICSharpCode.TextEditor/Article2.cd | 492 - .../Configuration/AssemblyInfo.cs | 19 - .../GlobalAssemblyInfo.cs | 34 - .../ICSharpCode.TextEditor.cd | 2447 --- .../ICSharpCode.TextEditor.csproj | 230 - .../..svnbridge/ICSharpCode.TextEditor.snk | 1 - .../Resources/..svnbridge/RightArrow.cur | 1 - .../..svnbridge/TextEditorControl.bmp | 1 - .../Resources/ASPX.xshd | 17 - .../Resources/BAT-Mode.xshd | 32 - src/ICSharpCode.TextEditor/Resources/Boo.xshd | 314 - .../Resources/CPP-Mode.xshd | 206 - .../Resources/CSharp-Mode.xshd | 338 - .../Resources/Coco-Mode.xshd | 97 - .../Resources/HTML-Mode.xshd | 385 - .../Resources/ICSharpCode.TextEditor.snk | Bin 596 -> 0 bytes .../Resources/Java-Mode.xshd | 180 - .../Resources/JavaScript-Mode.xshd | 136 - src/ICSharpCode.TextEditor/Resources/Mode.xsd | 295 - .../Resources/PHP-Mode.xshd | 198 - .../Resources/Patch-Mode.xshd | 37 - .../Resources/RightArrow.cur | Bin 326 -> 0 bytes .../Resources/SyntaxModes.xml | 57 - .../Resources/Tex-Mode.xshd | 108 - .../Resources/TextEditorControl.bmp | Bin 824 -> 0 bytes .../Resources/VBNET-Mode.xshd | 265 - .../Resources/XML-Mode.xshd | 60 - .../Src/Actions/BookmarkActions.cs | 80 - .../Src/Actions/CaretActions.cs | 203 - .../Src/Actions/ClipBoardActions.cs | 42 - .../Src/Actions/FoldActions.cs | 68 - .../Src/Actions/FormatActions.cs | 213 - .../Src/Actions/HomeEndActions.cs | 114 - .../Src/Actions/IEditAction.cs | 58 - .../Src/Actions/MiscActions.cs | 927 - .../Src/Actions/SelectionActions.cs | 176 - .../Src/Document/AbstractSegment.cs | 52 - .../Src/Document/BookmarkManager/Bookmark.cs | 164 - .../BookmarkManager/BookmarkEventHandler.cs | 32 - .../BookmarkManager/BookmarkManager.cs | 246 - .../BookmarkManager/BookmarkManagerMemento.cs | 101 - .../Src/Document/DefaultDocument.cs | 457 - .../Document/DefaultTextEditorProperties.cs | 307 - .../Src/Document/DocumentEventArgs.cs | 103 - .../Src/Document/DocumentFactory.cs | 57 - .../Document/FoldingStrategy/FoldMarker.cs | 174 - .../FoldingStrategy/FoldingManager.cs | 333 - .../FoldingStrategy/IFoldingStrategy.cs | 24 - .../FoldingStrategy/IndentFoldingStrategy.cs | 47 - .../DefaultFormattingStrategy.cs | 218 - .../FormattingStrategy/IFormattingStrategy.cs | 59 - .../DefaultHighlightingStrategy.cs | 905 - .../HighlightingStrategy/FontContainer.cs | 103 - .../HighlightBackground.cs | 51 - .../HighlightingStrategy/HighlightColor.cs | 280 - .../HighlightingStrategy/HighlightInfo.cs | 25 - .../HighlightingStrategy/HighlightRuleSet.cs | 182 - .../HighlightingColorNotFoundException.cs | 32 - .../HighlightingDefinitionInvalidException.cs | 37 - .../HighlightingDefinitionParser.cs | 110 - .../HighlightingManager.cs | 166 - .../HighlightingStrategyFactory.cs | 38 - .../IHighlightingStrategy.cs | 67 - .../HighlightingStrategy/NextMarker.cs | 63 - .../HighlightingStrategy/PrevMarker.cs | 63 - .../Src/Document/HighlightingStrategy/Span.cs | 157 - .../HighlightingStrategy/SpanStack.cs | 118 - .../SyntaxModes/FileSyntaxModeProvider.cs | 84 - .../SyntaxModes/ISyntaxModeFileProvider.cs | 23 - .../SyntaxModes/ResourceSyntaxModeProvider.cs | 48 - .../SyntaxModes/SyntaxMode.cs | 96 - .../Document/HighlightingStrategy/TextWord.cs | 236 - .../Src/Document/IDocument.cs | 315 - .../Src/Document/ISegment.cs | 32 - .../Src/Document/ITextEditorProperties.cs | 171 - .../Document/LineManager/DeferredEventList.cs | 44 - .../Src/Document/LineManager/LineManager.cs | 366 - .../LineManager/LineManagerEventArgs.cs | 97 - .../Src/Document/LineManager/LineSegment.cs | 259 - .../Document/LineManager/LineSegmentTree.cs | 477 - .../Document/MarkerStrategy/MarkerStrategy.cs | 119 - .../Src/Document/MarkerStrategy/TextMarker.cs | 103 - .../Src/Document/Selection/ColumnRange.cs | 66 - .../Document/Selection/DefaultSelection.cs | 133 - .../Src/Document/Selection/ISelection.cs | 64 - .../Document/Selection/SelectionManager.cs | 466 - .../Src/Document/TextAnchor.cs | 118 - .../GapTextBufferStrategy.cs | 179 - .../TextBufferStrategy/ITextBufferStrategy.cs | 85 - .../StringTextBufferStrategy.cs | 85 - .../Src/Document/TextLocation.cs | 128 - .../Src/Document/TextUtilities.cs | 313 - .../Src/Gui/AbstractMargin.cs | 115 - .../Src/Gui/BracketHighlighter.cs | 86 - .../Src/Gui/BrushRegistry.cs | 61 - src/ICSharpCode.TextEditor/Src/Gui/Caret.cs | 491 - .../AbstractCompletionWindow.cs | 214 - .../CodeCompletionListView.cs | 293 - .../CompletionWindow/CodeCompletionWindow.cs | 352 - .../CompletionWindow/DeclarationViewWindow.cs | 101 - .../Gui/CompletionWindow/ICompletionData.cs | 108 - .../ICompletionDataProvider.cs | 62 - .../Src/Gui/DrawableLine.cs | 190 - .../Src/Gui/FoldMargin.cs | 275 - .../Src/Gui/GutterMargin.cs | 159 - src/ICSharpCode.TextEditor/Src/Gui/HRuler.cs | 54 - .../Src/Gui/IconBarMargin.cs | 254 - src/ICSharpCode.TextEditor/Src/Gui/Ime.cs | 177 - .../Gui/InsightWindow/IInsightDataProvider.cs | 53 - .../Src/Gui/InsightWindow/InsightWindow.cs | 199 - .../Src/Gui/TextArea.cs | 946 - .../Src/Gui/TextAreaClipboardHandler.cs | 248 - .../Src/Gui/TextAreaControl.cs | 463 - .../Src/Gui/TextAreaDragDropHandler.cs | 144 - .../Src/Gui/TextAreaMouseHandler.cs | 486 - .../Src/Gui/TextAreaUpdate.cs | 85 - .../Src/Gui/TextEditorControl.cs | 396 - .../Src/Gui/TextEditorControlBase.cs | 758 - .../Src/Gui/TextView.cs | 1088 - .../Src/Gui/ToolTipRequestEventArgs.cs | 62 - .../Src/Undo/IUndoableOperation.cs | 26 - .../Src/Undo/UndoQueue.cs | 53 - .../Src/Undo/UndoStack.cs | 216 - .../Src/Undo/UndoableDelete.cs | 72 - .../Src/Undo/UndoableInsert.cs | 73 - .../Src/Undo/UndoableReplace.cs | 75 - .../Src/Util/AugmentableRedBlackTree.cs | 590 - .../Src/Util/CheckedList.cs | 148 - .../Src/Util/FileReader.cs | 152 - .../Src/Util/LoggingService.cs | 24 - .../Src/Util/LookupTable.cs | 144 - .../Src/Util/MouseWheelHandler.cs | 36 - .../Src/Util/RedBlackTreeIterator.cs | 85 - .../Src/Util/RtfWriter.cs | 164 - .../Src/Util/TextUtility.cs | 81 - .../Src/Util/TipPainter.cs | 124 - .../Src/Util/TipPainterTools.cs | 168 - .../Src/Util/TipSection.cs | 84 - .../Src/Util/TipSpacer.cs | 36 - .../Src/Util/TipSplitter.cs | 99 - .../Src/Util/TipText.cs | 183 - .../Src/Util/WeakCollection.cs | 136 - src/Log2Console/Log2Console.csproj | 26 +- src/Log2Console/MainForm.cs | 20 +- .../Win32ApiCodePack/CommonDllNames.cs | 17 - src/Log2Console/Win32ApiCodePack/Core.cs | 260 - .../TabbedThumbnailNativeMethods.cs | 10 - .../Win32ApiCodePack/TaskbarManager.cs | 151 - .../Win32ApiCodePack/TaskbarNativeMethods.cs | 20 - .../TaskbarProgressBarState.cs | 33 - .../Win32ApiCodePack/TaskbarWindow.cs | 82 - .../Win32ApiCodePack/TaskbarWindowManager.cs | 112 - .../ThumbnailToolbarButton.cs | 188 - .../ThumbnailToolbarManager.cs | 25 - .../ThumbnailToolbarProxyWindow.cs | 82 - src/Log2Console/packages.config | 6 + src/Log2Console/res/collapse_all.png | Bin 0 -> 211 bytes src/Log2Console/res/pin.png | Bin 0 -> 726 bytes src/Log2Console/res/unselect.png | Bin 0 -> 315 bytes src/LogFmwk.sln | 61 +- src/LogFmwk.vssscc | 10 - src/Test/..svnbridge/.svnbridge | 8 - src/Test/Test.csproj | 5 +- src/Test/packages.config | 4 + src/TestNLog/..svnbridge/.svnbridge | 8 - src/TestNLog/TestNLog.csproj | 7 +- src/TestNLog/packages.config | 4 + 386 files changed, 77 insertions(+), 96147 deletions(-) create mode 100644 .editorconfig create mode 100644 .gitignore delete mode 100644 src/External/..svnbridge/NLog.dll delete mode 100644 src/External/NLog.dll delete mode 100644 src/External/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs delete mode 100644 src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoveryData.cs delete mode 100644 src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoverySettings.cs delete mode 100644 src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartRestrictions.cs delete mode 100644 src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartSettings.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Core.csproj delete mode 100644 src/External/WindowsAPICodePack/Core/Core.csproj.vspscc delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControl.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControlCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogsDefaults.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/Common/IDialogControlHost.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialog.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogBar.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButton.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButtonBase.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogClosingEventArgs.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogCommandLink.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogControl.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogDefaults.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogExpandedInfoMode.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogHyperlinkClickedEventArgs.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBar.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBarState.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogRadioButton.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogResult.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardButton.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardIcon.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStartupLocation.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogTickEventArgs.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/AppRestartRecovery/AppRestartRecoveryNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/CommonDllNames.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/CoreErrorHelper.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/CoreHelpers.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/CoreNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/Dialogs/DialogShowState.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetwork.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkConnection.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkListManager.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/NetworkList/NetworkListManagerClass.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/PowerManagement/PowerManagementNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialog.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialogSettings.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/TaskDialogNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Migrated rules for Core.ruleset delete mode 100644 src/External/WindowsAPICodePack/Core/NetworkList/Network.cs delete mode 100644 src/External/WindowsAPICodePack/Core/NetworkList/NetworkCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnection.cs delete mode 100644 src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnectionCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Core/NetworkList/NetworkListEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Core/NetworkList/NetworkListManager.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/BatteryState.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/EventManager.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/ExecutionState.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/MessageManager.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/PersonalityGuids.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/Power.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/PowerManager.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/PowerPersonality.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PowerManagement/PowerSource.cs delete mode 100644 src/External/WindowsAPICodePack/Core/Properties/AssemblyInfo.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PropertySystem/PropVariantNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Core/PropertySystem/PropertyKey.cs delete mode 100644 src/External/WindowsAPICodePack/Core/SafeHandles/SafeIconHandle.cs delete mode 100644 src/External/WindowsAPICodePack/Core/SafeHandles/SafeRegionHandle.cs delete mode 100644 src/External/WindowsAPICodePack/Core/SafeHandles/SafeWindowHandle.cs delete mode 100644 src/External/WindowsAPICodePack/Core/SafeHandles/ZeroInvalidHandle.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/DefaultShellImageSizes.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/EnumUnknown.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/IconReference.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/SearchCondition.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellFile.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellFileSystemFolder.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellFolder.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellFolderItems.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellHelper.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellItemArray.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellLibrary.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellLink.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemFolder.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemItem.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellObject.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellObjectContainer.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellObjectNode.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellSavedSearchCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellSearchCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellSearchConnector.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/ShellThumbnailEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Common/SortColumn.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogButton.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogCheckBox.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogComboBox.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControl.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControlCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilterCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFolderChangeEventArgs.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogGroupBox.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogLabel.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogMenu.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogProminentControl.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogRadioButtonList.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogResult.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogSeperator.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogStandardFilters.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogTextBox.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonOpenFileDialog.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/CommonFileDialogs/ICommonFileDialogIndexedControls.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml delete mode 100644 src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWinforms.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Design/ShellObjects.cd delete mode 100644 src/External/WindowsAPICodePack/Shell/Design/ShellThumbnailClassDiagram.cd delete mode 100644 src/External/WindowsAPICodePack/Shell/DesktopWindowManager/DesktopWindowManagerNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassEvents.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassWindow.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserContentOptions.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserDiagram.cd delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEvents.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserPaneVisibility.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserViewEvents.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLog.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEvents.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationOptions.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMClasses.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMGuids.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMInterfaces.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Common/ShellNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Common/WindowUtilities.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMClasses.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMInterfaces.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMGuids.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMInterfaces.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMGuids.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMInterfaces.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemCOMInterfaces.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/StockIcons/StockIconsNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TabbedThumbnailNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarCOMInterfaces.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarNativeMethods.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/DefinitionOptions.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/FileSystemKnownFolder.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/FolderCategory.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/FolderProperties.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/FolderTypes.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/FoldersIdentifiers.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/IKnownFolder.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderSettings.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolders.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/NonFileSystemKnownFolder.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/RedirectionCapabilities.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/KnownFolders/RetrievalOptions.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Migrated rules for Shell.ruleset delete mode 100644 src/External/WindowsAPICodePack/Shell/Properties/AssemblyInfo.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/IShellProperty.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperties.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescription.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescriptionsCache.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnumType.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/StronglyTypedProperties.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/SystemProperties.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/PropertySystem/WindowProperties.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Shell.csproj delete mode 100644 src/External/WindowsAPICodePack/Shell/Shell.csproj.vspscc delete mode 100644 src/External/WindowsAPICodePack/Shell/StockIcons/StockIcon.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/StockIcons/StockIconEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/StockIcons/StockIcons.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/JumpList.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategory.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItem.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItemCollection.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/JumpListSeparator.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/ProgressBarStateSettings.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailBitmapRequestedEventArgs.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailEventArgs.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailProxyWindow.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailScreenCapture.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarEnums.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarInterfaces.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButton.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButtonClickedEventArgs.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs delete mode 100644 src/External/WindowsAPICodePack/Shell/Taskbar/UserRemovedJumpListItemsEventArg.cs delete mode 100644 src/External/log4net.dll delete mode 100644 src/ICSharpCode.TextEditor/Article1.cd delete mode 100644 src/ICSharpCode.TextEditor/Article2.cd delete mode 100644 src/ICSharpCode.TextEditor/Configuration/AssemblyInfo.cs delete mode 100644 src/ICSharpCode.TextEditor/GlobalAssemblyInfo.cs delete mode 100644 src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.cd delete mode 100644 src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj delete mode 100644 src/ICSharpCode.TextEditor/Resources/..svnbridge/ICSharpCode.TextEditor.snk delete mode 100644 src/ICSharpCode.TextEditor/Resources/..svnbridge/RightArrow.cur delete mode 100644 src/ICSharpCode.TextEditor/Resources/..svnbridge/TextEditorControl.bmp delete mode 100644 src/ICSharpCode.TextEditor/Resources/ASPX.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/BAT-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/Boo.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/CPP-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/CSharp-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/Coco-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/HTML-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/ICSharpCode.TextEditor.snk delete mode 100644 src/ICSharpCode.TextEditor/Resources/Java-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/JavaScript-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/Mode.xsd delete mode 100644 src/ICSharpCode.TextEditor/Resources/PHP-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/Patch-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/RightArrow.cur delete mode 100644 src/ICSharpCode.TextEditor/Resources/SyntaxModes.xml delete mode 100644 src/ICSharpCode.TextEditor/Resources/Tex-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/TextEditorControl.bmp delete mode 100644 src/ICSharpCode.TextEditor/Resources/VBNET-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Resources/XML-Mode.xshd delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/BookmarkActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/CaretActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/ClipBoardActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/FoldActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/FormatActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/HomeEndActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/IEditAction.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/MiscActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Actions/SelectionActions.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/AbstractSegment.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/Bookmark.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkEventHandler.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManager.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManagerMemento.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/DefaultDocument.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/DefaultTextEditorProperties.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/DocumentEventArgs.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/DocumentFactory.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldMarker.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldingManager.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IFoldingStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IndentFoldingStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/DefaultFormattingStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/IFormattingStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/DefaultHighlightingStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/FontContainer.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightBackground.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightColor.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightInfo.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightRuleSet.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingColorNotFoundException.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionInvalidException.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionParser.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingManager.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingStrategyFactory.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/IHighlightingStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/NextMarker.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/PrevMarker.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/Span.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SpanStack.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/FileSyntaxModeProvider.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ISyntaxModeFileProvider.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ResourceSyntaxModeProvider.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/SyntaxMode.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/TextWord.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/IDocument.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/ISegment.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/ITextEditorProperties.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/LineManager/DeferredEventList.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManagerEventArgs.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegment.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegmentTree.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/MarkerStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/TextMarker.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/Selection/ColumnRange.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/Selection/DefaultSelection.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/Selection/ISelection.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/Selection/SelectionManager.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/TextAnchor.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/ITextBufferStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/StringTextBufferStrategy.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/TextLocation.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Document/TextUtilities.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/AbstractMargin.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/BracketHighlighter.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/BrushRegistry.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/Caret.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionListView.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/DeclarationViewWindow.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionData.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionDataProvider.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/DrawableLine.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/FoldMargin.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/GutterMargin.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/HRuler.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/IconBarMargin.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/Ime.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/IInsightDataProvider.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/InsightWindow.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextArea.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextAreaClipboardHandler.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextAreaControl.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextAreaDragDropHandler.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextAreaMouseHandler.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextAreaUpdate.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextEditorControl.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextEditorControlBase.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/TextView.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Gui/ToolTipRequestEventArgs.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Undo/IUndoableOperation.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Undo/UndoQueue.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Undo/UndoStack.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Undo/UndoableDelete.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Undo/UndoableInsert.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Undo/UndoableReplace.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/AugmentableRedBlackTree.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/CheckedList.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/FileReader.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/LoggingService.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/LookupTable.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/MouseWheelHandler.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/RedBlackTreeIterator.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/RtfWriter.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/TextUtility.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/TipPainter.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/TipPainterTools.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/TipSection.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/TipSpacer.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/TipSplitter.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/TipText.cs delete mode 100644 src/ICSharpCode.TextEditor/Src/Util/WeakCollection.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/CommonDllNames.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/Core.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/TabbedThumbnailNativeMethods.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/TaskbarManager.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/TaskbarNativeMethods.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/TaskbarProgressBarState.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/TaskbarWindow.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/TaskbarWindowManager.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/ThumbnailToolbarButton.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/ThumbnailToolbarManager.cs delete mode 100644 src/Log2Console/Win32ApiCodePack/ThumbnailToolbarProxyWindow.cs create mode 100644 src/Log2Console/packages.config create mode 100644 src/Log2Console/res/collapse_all.png create mode 100644 src/Log2Console/res/pin.png create mode 100644 src/Log2Console/res/unselect.png delete mode 100644 src/LogFmwk.vssscc delete mode 100644 src/Test/..svnbridge/.svnbridge create mode 100644 src/Test/packages.config delete mode 100644 src/TestNLog/..svnbridge/.svnbridge create mode 100644 src/TestNLog/packages.config diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7f4ad8b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# EditorConfig is awesome: http://EditorConfig.org + +# top-most EditorConfig file +root = true + +[*] +indent_style = space +tab_width = 4 +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false + +[*.{xml,html,config}] +indent_style = space +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d88e4ff --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +bin +obj +StyleCop.Cache +_ReSharper* +_TeamCity.* +*.user +*.suo +*.~* +.* + +!.gitignore + +src/packages diff --git a/src/External/..svnbridge/NLog.dll b/src/External/..svnbridge/NLog.dll deleted file mode 100644 index 51d3842..0000000 --- a/src/External/..svnbridge/NLog.dll +++ /dev/null @@ -1,8 +0,0 @@ -svn:ignore[Bb]in -obj -[Dd]ebug -[Rr]elease -*.user -*.aps -*.eto -svn:mime-typeapplication/octet-stream \ No newline at end of file diff --git a/src/External/NLog.dll b/src/External/NLog.dll deleted file mode 100644 index 8a74ad4f784343c650e9bdb1bcf3d77b851dc316..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 365056 zcmcG%2Vh*qwf}#0@9J)oWUnRf%Ce1wjm<^7lCe#(=@20F4zW#%X-Oc!g}ayp3kd@u z1#ChJB%uXNNJ#IE6d=9FBzfskLV9^AFE4p%@0tJSd*B zfBkV;Za?z;UCUhs&%3GH^FoL1do%C|@FTe5PO$Iz1~UHTS_1Hg{;8XC9de`R&9?vB zZt8WBz4txX?LA8{bhk+mJO2Aox7P#iaN;f4G3@F5Bc4YITK@|8k81fmZ~V#&Uw9?{ zftRJ_Qd!}<^WTW)tshUC$@w6SHyzRg){)G> zKTt0H6K}rP?fvP!zIW1}e6MI&@Ne$&-csuFP8#vNO)2i_oIk(k+Eae}k?YQW!&Q$C zu7Ay^&pPXb-TvPF_wRoAm9PKX_+zuiPdoa8u`^Cu_mX7(2ku(b_x_Dv{qX70?|$_B z{r3FJuO2SF^c%O{^x1*$omieOe_`Xiy&wI7pIiF;Z{PI0Gq>M+)9w3T@$N;n&p)=u zne{#X_F&h2rv}UJ9K7zT7q0E!R$E%VdGX}@@4n-rg(Y2<%Jus9^t}od4e3gAS5W1A5D((!OUN~7zO2g& zqx)e38M&M?*Ykos121dLL8I57*oEwZcyAH*Cx-FFBYeivkbx|OY)WbPA_EumjSeDN zjJYU{_V1aqwu0&eu`9%bqlZ@c3}M;WA|jz zW$aFzg2$f_s)HMkIu1OLk?3IPJMHSC8}PlQUf*6` z9(KHY{E3yso1pweh9X}>>;u@LbK?Jp#3xau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W+UQW%~3%!F|d!1a19?(%3db`3?|wF@{oea{&io2&5ANf?1^l!=-lvC!Bdmp&n08kTMXlj&`sZjJ z$bFfQF|a+fmd>!_jN+Xez`bOkX>PiMGP4v*u=ftN6+^MXdoDa(r0@gef^V`E9yKu! zS1zc%jpH@oqZb5Qk6XBN9al6}PA^s~z|Ziq$um7OFg+T%=JS%KrH7F|4G-ph!8wn- zTLbE}3Qu2D$JLdKGP=$Z2{tffaI7&zR k{50B4FJ~@V{9w%;evj$>=kUcawq0W4gs%Vp@aR$CZ{`4^%>V!Z diff --git a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs b/src/External/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs deleted file mode 100644 index fd6277a..0000000 --- a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/ApplicationRestartRecoveryManager.cs +++ /dev/null @@ -1,158 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using System.Diagnostics; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// Provides access to the Application Restart and Recovery - /// features available in Windows Vista or higher. Application Restart and Recovery lets an - /// application do some recovery work to save data before the process exits. - /// - public static class ApplicationRestartRecoveryManager - { - /// - /// Registers an application for recovery by Application Restart and Recovery. - /// - /// An object that specifies - /// the callback method, an optional parameter to pass to the callback - /// method and a time interval. - /// - /// The registration failed due to an invalid parameter. - /// - /// - /// The registration failed. - /// The time interval is the period of time within - /// which the recovery callback method - /// calls the method to indicate - /// that it is still performing recovery work. - public static void RegisterForApplicationRecovery(RecoverySettings settings) - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - if (settings == null) - throw new ArgumentNullException("settings"); - - GCHandle handle = GCHandle.Alloc(settings.RecoveryData); - - HRESULT hr = AppRestartRecoveryNativeMethods.RegisterApplicationRecoveryCallback(AppRestartRecoveryNativeMethods.internalCallback, (IntPtr)handle, settings.PingInterval, (uint)0); - - if (!CoreErrorHelper.Succeeded((int)hr)) - { - if (hr == HRESULT.E_INVALIDARG) - throw new ArgumentException("Application was not registered for recovery due to bad parameters."); - else - throw new ExternalException("Application failed to register for recovery."); - } - } - - /// - /// Removes an application's recovery registration. - /// - /// - /// The attempt to unregister for recovery failed. - public static void UnregisterApplicationRecovery() - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - HRESULT hr = AppRestartRecoveryNativeMethods.UnregisterApplicationRecoveryCallback(); - - if (hr == HRESULT.E_FAIL) - throw new ExternalException("Unregister for recovery failed."); - } - - /// - /// Removes an application's restart registration. - /// - /// - /// The attempt to unregister for restart failed. - public static void UnregisterApplicationRestart() - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - HRESULT hr = AppRestartRecoveryNativeMethods.UnregisterApplicationRestart(); - - if (hr == HRESULT.E_FAIL) - throw new ExternalException("Unregister for restart failed."); - } - - /// - /// Called by an application's method - /// to indicate that it is still performing recovery work. - /// - /// A value indicating whether the user - /// canceled the recovery. - /// - /// This method must be called from a registered callback method. - public static bool ApplicationRecoveryInProgress() - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - bool canceled = false; - - HRESULT hr = AppRestartRecoveryNativeMethods.ApplicationRecoveryInProgress(out canceled); - - if (hr == HRESULT.E_FAIL) - throw new InvalidOperationException("This method must be called from the registered callback method."); - - return canceled; - } - - /// - /// Called by an application's method to - /// indicate that the recovery work is complete. - /// - /// - /// This should - /// be the last call made by the method because - /// Windows Error Reporting will terminate the application - /// after this method is invoked. - /// - /// true to indicate the the program was able to complete its recovery - /// work before terminating; otherwise false. - public static void ApplicationRecoveryFinished(bool success) - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - AppRestartRecoveryNativeMethods.ApplicationRecoveryFinished(success); - } - - /// - /// Registers an application for automatic restart if - /// the application - /// is terminated by Windows Error Reporting. - /// - /// An object that specifies - /// the command line arguments used to restart the - /// application, and - /// the conditions under which the application should not be - /// restarted. - /// Registration failed due to an invalid parameter. - /// The attempt to register failed. - /// A registered application will not be restarted if it executed for less than 60 seconds before terminating. - public static void RegisterForApplicationRestart(RestartSettings settings) - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - HRESULT hr = AppRestartRecoveryNativeMethods.RegisterApplicationRestart(settings.Command, settings.Restrictions); - - if (hr == HRESULT.E_FAIL) - throw new InvalidOperationException("Application failed to registered for restart."); - - if (hr == HRESULT.E_INVALIDARG) - throw new ArgumentException("Failed to register application for restart due to bad parameters."); - } - - } -} - diff --git a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoveryData.cs b/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoveryData.cs deleted file mode 100644 index d1a9756..0000000 --- a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoveryData.cs +++ /dev/null @@ -1,58 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// The that represents the callback method invoked - /// by the system when an application has registered for - /// application recovery. - /// - /// An application-defined state object that is passed to the callback method. - /// The callback method will be invoked - /// prior to the application being terminated by Windows Error Reporting (WER). To keep WER from terminating the application before - /// the callback method completes, the callback method must - /// periodically call the method. - /// - public delegate int RecoveryCallback(object state); - - /// - /// Defines a class that contains a callback delegate and properties of the application - /// as defined by the user. - /// - public class RecoveryData - { - /// - /// Initializes a recovery data wrapper with a callback method and the current - /// state of the application. - /// - /// The callback delegate. - /// The current state of the application. - public RecoveryData(RecoveryCallback callback, object state) - { - Callback = callback; - State = state; - } - - /// - /// Gets or sets a value that determines the recovery callback function. - /// - public RecoveryCallback Callback { get; set; } - - /// - /// Gets or sets a value that determines the application state. - /// - public object State { get; set; } - - /// - /// Invokes the recovery callback function. - /// - public void Invoke() - { - if(Callback != null) - Callback(State); - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoverySettings.cs b/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoverySettings.cs deleted file mode 100644 index 579b576..0000000 --- a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RecoverySettings.cs +++ /dev/null @@ -1,77 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// Defines methods and properties for recovery settings, and specifies options for an application that attempts - /// to perform final actions after a fatal event, such as an - /// unhandled exception. - /// - /// This class is used to register for application recovery. - /// See the class. - /// - public class RecoverySettings - { - private RecoveryData recoveryData; - private uint pingInterval; - - /// - /// Initializes a new instance of the RecoverySettings class. - /// - /// A recovery data object that contains the callback method (invoked by the system - /// before Windows Error Reporting terminates the application) and an optional state object. - /// The time interval within which the - /// callback method must invoke to - /// prevent WER from terminating the application. - /// - public RecoverySettings(RecoveryData data, uint interval) - { - this.recoveryData = data; - this.pingInterval = interval; - } - - /// - /// Gets the recovery data object that contains the callback method and an optional - /// parameter (usually the state of the application) to be passed to the - /// callback method. - /// - /// A object. - public RecoveryData RecoveryData - { - get { return recoveryData; } - } - - /// - /// Gets the time interval for notifying Windows Error Reporting. - /// The method must invoke - /// within this interval to prevent WER from terminating the application. - /// - /// - /// The recovery ping interval is specified in milliseconds. - /// By default, the interval is 5 seconds. - /// If you specify zero, the default interval is used. - /// - public uint PingInterval - { - get { return pingInterval; } - } - - /// - /// Returns a string representation of the current state - /// of this object. - /// - /// A object. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object,System.Object)", - Justification = "We are not currently handling globalization or localization")] - public override string ToString() - { - return String.Format("delegate: {0}, state: {1}, ping: {2}", - this.recoveryData.Callback.Method.ToString(), - this.recoveryData.State.ToString(), - this.PingInterval); - } - } -} - diff --git a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartRestrictions.cs b/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartRestrictions.cs deleted file mode 100644 index 7ea35b1..0000000 --- a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartRestrictions.cs +++ /dev/null @@ -1,38 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// Specifies the conditions when Windows Error Reporting - /// should not restart an application that has registered - /// for automatic restart. - /// - [Flags] - public enum RestartRestrictions - { - /// - /// Always restart the application. - /// - None = 0, - /// - /// Do not restart when the application has crashed. - /// - NotOnCrash = 1, - /// - /// Do not restart when the application is hung. - /// - NotOnHang = 2, - /// - /// Do not restart when the application is terminated - /// due to a system update. - /// - NotOnPatch = 4, - /// - /// Do not restart when the application is terminated - /// because of a system reboot. - /// - NotOnReboot = 8 - } -} diff --git a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartSettings.cs b/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartSettings.cs deleted file mode 100644 index f3ce68a..0000000 --- a/src/External/WindowsAPICodePack/Core/AppRestartRecovery/RestartSettings.cs +++ /dev/null @@ -1,69 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// Specifies the options for an application to be automatically - /// restarted by Windows Error Reporting. - /// - /// Regardless of these - /// settings, the application - /// will not be restarted if it executed for less than 60 seconds before - /// terminating. - public class RestartSettings - { - private string command; - private RestartRestrictions restrictions; - - /// - /// Creates a new instance of the RestartSettings class. - /// - /// The command line arguments - /// used to restart the application. - /// A bitwise combination of the RestartRestrictions - /// values that specify - /// when the application should not be restarted. - /// - public RestartSettings(string commandLine, RestartRestrictions restrict) - { - command = commandLine; - restrictions = restrict; - } - - /// - /// Gets the command line arguments used to restart the application. - /// - /// A object. - public string Command - { - get { return command; } - } - - /// - /// Gets the set of conditions when the application - /// should not be restarted. - /// - /// A set of values. - public RestartRestrictions Restrictions - { - get { return restrictions; } - } - - /// - /// Returns a string representation of the current state - /// of this object. - /// - /// A that displays - /// the command line arguments - /// and restrictions for restarting the application. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object)", - Justification = "We are not currently handling globalization or localization")] - public override string ToString() - { - return String.Format("command: {0} restrictions: {1}", command, restrictions.ToString()); - } - } -} - diff --git a/src/External/WindowsAPICodePack/Core/Core.csproj b/src/External/WindowsAPICodePack/Core/Core.csproj deleted file mode 100644 index bc82f06..0000000 --- a/src/External/WindowsAPICodePack/Core/Core.csproj +++ /dev/null @@ -1,164 +0,0 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57} - Library - Properties - Microsoft.WindowsAPICodePack - Microsoft.WindowsAPICodePack - v4.0 - 512 - SAK - SAK - SAK - SAK - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Microsoft.WindowsAPICodePack.XML - - - Migrated rules for Core.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/Core.csproj.vspscc b/src/External/WindowsAPICodePack/Core/Core.csproj.vspscc deleted file mode 100644 index feffdec..0000000 --- a/src/External/WindowsAPICodePack/Core/Core.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"FILE_VERSION" = "9237" -"ENLISTMENT_CHOICE" = "NEVER" -"PROJECT_FILE_RELATIVE_PATH" = "" -"NUMBER_OF_EXCLUDED_FILES" = "0" -"ORIGINAL_PROJECT_FILE_PATH" = "" -"NUMBER_OF_NESTED_PROJECTS" = "0" -"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControl.cs b/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControl.cs deleted file mode 100644 index bc283fc..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControl.cs +++ /dev/null @@ -1,152 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Abstract base class for all dialog controls - /// - public abstract class DialogControl - { - private static int nextId = DialogsDefaults.MinimumDialogControlId; - - /// - /// Creates a new instance of a dialog control - /// - protected DialogControl() - { - this.id = nextId; - - // Support wrapping of control IDs in case you create a lot of custom controls - if (nextId == Int32.MaxValue) - nextId = DialogsDefaults.MinimumDialogControlId; - else - nextId++; - } - - /// - /// Creates a new instance of a dialog control with the specified name. - /// - /// The name for this dialog. - protected DialogControl(string name) : this() - { - this.Name = name; - } - - private IDialogControlHost hostingDialog; - /// - /// The native dialog that is hosting this control. This property is null is - /// there is not associated dialog - /// - public IDialogControlHost HostingDialog - { - get { return hostingDialog; } - set { hostingDialog = value; } - } - - private string name; - /// - /// Gets or sets the name for this control. - /// - /// A value. - /// - /// The name of the control should not be modified once set - /// - /// The name cannot be null or a zero-length string. - /// The name has already been set. - public string Name - { - get { return name; } - set - { - // Names for controls need to be quite stable, - // as we are going to maintain a mapping between - // the names and the underlying Win32/COM control IDs. - if (String.IsNullOrEmpty(value)) - throw new ArgumentException( - "Dialog control name cannot be empty or null."); - - if (!String.IsNullOrEmpty(name)) - throw new InvalidOperationException( - "Dialog controls cannot be renamed."); - - // Note that we don't notify the hosting dialog of - // the change, as the initial set of name is (must be) - // always legal, and renames are always illegal. - name = value; - } - } - - private int id; - /// - /// Gets the identifier for this control. - /// - /// An value. - public int Id - { - get { return id; } - } - - /// - /// Calls the hosting dialog, if it exists, to check whether the - /// property can be set in the dialog's current state. - /// The host should throw an exception if the change is not supported. - /// Note that if the dialog isn't set yet, - /// there are no restrictions on setting the property. - /// - /// The name of the property that is changing - protected void CheckPropertyChangeAllowed(string propName) - { - Debug.Assert(!String.IsNullOrEmpty(propName), "Property to change was not specified"); - - if (hostingDialog != null) - hostingDialog.IsControlPropertyChangeAllowed(propName, this); - } - - /// - /// Calls the hosting dialog, if it exists, to - /// to indicate that a property has changed, and that - /// the dialog should do whatever is necessary - /// to propagate the change to the native control. - /// Note that if the dialog isn't set yet, - /// there are no restrictions on setting the property. - /// - /// The name of the property that is changing. - protected void ApplyPropertyChange(string propName) - { - Debug.Assert(!String.IsNullOrEmpty(propName), "Property changed was not specified"); - - if (hostingDialog != null) - hostingDialog.ApplyControlPropertyChange(propName, this); - } - - /// - /// Compares two objects to determine whether they are equal - /// - /// The object to compare against. - /// A value. - public override bool Equals(object obj) - { - DialogControl control = obj as DialogControl; - - if (control != null) - return (this.Id == control.Id); - - return false; - } - - /// - /// Serves as a hash function for a particular type. - /// - /// An hash code for this control. - public override int GetHashCode() - { - if (name == null) - return this.ToString().GetHashCode(); - - return name.GetHashCode(); - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControlCollection.cs b/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControlCollection.cs deleted file mode 100644 index 413a9bb..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogControlCollection.cs +++ /dev/null @@ -1,164 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Strongly typed collection for dialog controls. - /// - /// DialogControl - public sealed class DialogControlCollection : Collection where T : DialogControl - { - private IDialogControlHost hostingDialog; - - internal DialogControlCollection(IDialogControlHost host) - { - hostingDialog = host; - } - - /// - /// Inserts an dialog control at the specified index. - /// - /// The location to insert the control. - /// The item to insert. - /// A control with - /// the same name already exists in this collection -or- - /// the control is being hosted by another dialog -or- the associated dialog is - /// showing and cannot be modified. - protected override void InsertItem(int index, T control) - { - // Check for duplicates, lack of host, - // and during-show adds. - if (Items.Contains(control)) - throw new InvalidOperationException( - "Dialog cannot have more than one control with the same name."); - if (control.HostingDialog != null) - throw new InvalidOperationException( - "Dialog control must be removed from current collections first."); - if (!hostingDialog.IsCollectionChangeAllowed()) - throw new InvalidOperationException( - "Modifying controls collection while dialog is showing is not supported."); - - // Reparent, add control. - control.HostingDialog = hostingDialog; - base.InsertItem(index, control); - - // Notify that we've added a control. - hostingDialog.ApplyCollectionChanged(); - } - - /// - /// Removes the control at the specified index. - /// - /// The location of the control to remove. - /// - /// The associated dialog is - /// showing and cannot be modified. - protected override void RemoveItem(int index) - { - // Notify that we're about to remove a control. - // Throw if dialog showing. - if (!hostingDialog.IsCollectionChangeAllowed()) - throw new InvalidOperationException( - "Modifying controls collection while dialog is showing is not supported."); - - DialogControl control = (DialogControl)Items[index]; - - // Unparent and remove. - control.HostingDialog = null; - base.RemoveItem(index); - - hostingDialog.ApplyCollectionChanged(); - } - - /// - /// Defines the indexer that supports accessing controls by name. - /// - /// - /// Control names are case sensitive. - /// This indexer is useful when the dialog is created in XAML - /// rather than constructed in code. - /// - /// The name cannot be null or a zero-length string. - /// If there is more than one control with the same name, only the first control will be returned. - public T this[string name] - { - get - { - if (String.IsNullOrEmpty(name)) - throw new ArgumentException( - "Control name must not be null or zero length."); - - foreach (T control in base.Items) - { - // NOTE: we don't ToLower() the strings - casing effects - // hash codes, so we are case-sensitive. - if (control.Name == name) - return control; - } - return null; - } - } - - /// - /// Recursively searches for the control who's id matches the value - /// passed in the parameter. - /// - /// - /// An integer containing the identifier of the - /// control being searched for. - /// - /// A DialogControl who's id matches the value of the - /// parameter. - /// - internal DialogControl GetControlbyId(int id) - { - //return ( Items.Count == 0 ? null : - // GetSubControlbyId(Items as IEnumerable, - // id) - //); - return GetSubControlbyId( - Items as IEnumerable, - id); - } - - - /// - /// Recursively searches for a given control id in the - /// collection passed via the parameter. - /// - /// - /// A Collection<CommonFileDialogControl> - /// An int containing the identifier of the control - /// being searched for. - /// - /// A DialogControl who's Id matches the value of the - /// parameter. - /// - internal DialogControl GetSubControlbyId( IEnumerable ctrlColl, - int id ) - { - // if ctrlColl is null, it will throw in the foreach. - if (ctrlColl == null) - return null; - - foreach (DialogControl control in ctrlColl) - { - // Match? - if (control.Id == id) - { - return control; - } - } - - // Control id not found - likely an error, but the calling - // function should ultimately decide. - return null; - - } - - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogsDefaults.cs b/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogsDefaults.cs deleted file mode 100644 index 67a72c5..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/Common/DialogsDefaults.cs +++ /dev/null @@ -1,22 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - internal static class DialogsDefaults - { - internal const string Caption = "Application"; - internal const string MainInstruction = ""; - internal const string Content = ""; - - internal const int ProgressBarStartingValue = 0; - internal const int ProgressBarMinimumValue = 0; - internal const int ProgressBarMaximumValue = 100; - - internal const int IdealWidth = 0; - - // For generating control ID numbers that won't - // collide with the standard button return IDs. - internal const int MinimumDialogControlId = - (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDCLOSE + 1; - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/Common/IDialogControlHost.cs b/src/External/WindowsAPICodePack/Core/Dialogs/Common/IDialogControlHost.cs deleted file mode 100644 index 5433343..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/Common/IDialogControlHost.cs +++ /dev/null @@ -1,48 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Indicates that the implementing class is a dialog that can host - /// customizable dialog controls (subclasses of DialogControl). - /// - public interface IDialogControlHost - { - /// - /// Handle notifications of pseudo-controls being added - /// or removed from the collection. - /// PreFilter should throw if a control cannot - /// be added/removed in the dialog's current state. - /// PostProcess should pass on changes to native control, - /// if appropriate. - /// - /// true if collection change is allowed. - bool IsCollectionChangeAllowed(); - - /// - /// Applies changes to the collection. - /// - void ApplyCollectionChanged(); - - /// - /// Handle notifications of individual child - /// pseudo-controls' properties changing.. - /// Prefilter should throw if the property - /// cannot be set in the dialog's current state. - /// PostProcess should pass on changes to native control, - /// if appropriate. - /// - /// The name of the property. - /// The control propertyName applies to. - /// true if the property change is allowed. - bool IsControlPropertyChangeAllowed(string propertyName, DialogControl control); - - /// - /// Called when a control currently in the collection - /// has a property changed. - /// - /// The name of the property changed. - /// The control whose property has changed. - void ApplyControlPropertyChange(string propertyName, DialogControl control); - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialog.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialog.cs deleted file mode 100644 index 73596de..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialog.cs +++ /dev/null @@ -1,1262 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Security.Permissions; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Encapsulates a new-to-Vista Win32 TaskDialog window - /// - a powerful successor to the MessageBox available - /// in previous versions of Windows. - /// - [SecurityPermissionAttribute(SecurityAction.InheritanceDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] - public class TaskDialog : IDialogControlHost, IDisposable - { - // Global instance of TaskDialog, to be used by static Show() method. - // As most parameters of a dialog created via static Show() will have - // identical parameters, we'll create one TaskDialog and treat it - // as a NativeTaskDialog generator for all static Show() calls. - private static TaskDialog staticDialog; - - // Main current native dialog. - private NativeTaskDialog nativeDialog; - - private List buttons; - private List radioButtons; - private List commandLinks; - private IntPtr ownerWindow; - - #region Public Properties - /// - /// Occurs when a progress bar changes. - /// - public event EventHandler Tick; - - /// - /// Occurs when a user clicks a hyperlink. - /// - public event EventHandler HyperlinkClick; - - /// - /// Occurs when the TaskDialog is closing. - /// - public event EventHandler Closing; - - /// - /// Occurs when a user clicks on Help. - /// - public event EventHandler HelpInvoked; - - /// - /// Occurs when the TaskDialog is opened. - /// - public event EventHandler Opened; - - /// - /// Gets or sets a value that contains the owner window's handle. - /// - public IntPtr OwnerWindowHandle - { - get { return ownerWindow; } - set - { - ThrowIfDialogShowing("Dialog owner cannot be modified while dialog is showing."); - ownerWindow = value; - } - } - - // Main content (maps to MessageBox's "message"). - private string text; - /// - /// Gets or sets a value that contains the message text. - /// - public string Text - { - get { return text; } - set - { - // Set local value, then update native dialog if showing. - text = value; - if (NativeDialogShowing) - nativeDialog.UpdateText(text); - } - } - - private string instructionText; - /// - /// Gets or sets a value that contains the instruction text. - /// - public string InstructionText - { - get { return instructionText; } - set - { - // Set local value, then update native dialog if showing. - instructionText = value; - if (NativeDialogShowing) - nativeDialog.UpdateInstruction(instructionText); - } - } - - private string caption; - /// - /// Gets or sets a value that contains the caption text. - /// - public string Caption - { - get { return caption; } - set - { - ThrowIfDialogShowing("Dialog caption can't be set while dialog is showing."); - caption = value; - } - } - - private string footerText; - /// - /// Gets or sets a value that contains the footer text. - /// - public string FooterText - { - get { return footerText; } - set - { - // Set local value, then update native dialog if showing. - footerText = value; - if (NativeDialogShowing) - nativeDialog.UpdateFooterText(footerText); - } - } - - private string checkBoxText; - /// - /// Gets or sets a value that contains the footer check box text. - /// - public string FooterCheckBoxText - { - get { return checkBoxText; } - set - { - ThrowIfDialogShowing("Checkbox text can't be set while dialog is showing."); - checkBoxText = value; - } - } - - private string detailsExpandedText; - /// - /// Gets or sets a value that contains the expanded text in the details section. - /// - public string DetailsExpandedText - { - get { return detailsExpandedText; } - set - { - // Set local value, then update native dialog if showing. - detailsExpandedText = value; - if (NativeDialogShowing) - nativeDialog.UpdateExpandedText(detailsExpandedText); - } - } - - private bool detailsExpanded; - /// - /// Gets or sets a value that determines if the details section is expanded. - /// - public bool DetailsExpanded - { - get { return detailsExpanded; } - set - { - ThrowIfDialogShowing("Expanded state of the dialog can't be modified while dialog is showing."); - detailsExpanded = value; - } - } - - private string detailsExpandedLabel; - /// - /// Gets or sets a value that contains the expanded control text. - /// - public string DetailsExpandedLabel - { - get { return detailsExpandedLabel; } - set - { - ThrowIfDialogShowing("Expanded control label can't be set while dialog is showing."); - detailsExpandedLabel = value; - } - } - - private string detailsCollapsedLabel; - /// - /// Gets or sets a value that contains the collapsed control text. - /// - public string DetailsCollapsedLabel - { - get { return detailsCollapsedLabel; } - set - { - ThrowIfDialogShowing("Collapsed control text can't be set while dialog is showing."); - detailsCollapsedLabel = value; - } - } - - private bool cancelable; - /// - /// Gets or sets a value that determines if Cancelable is set. - /// - public bool Cancelable - { - get { return cancelable; } - set - { - ThrowIfDialogShowing("Cancelable can't be set while dialog is showing."); - cancelable = value; - } - } - - private TaskDialogStandardIcon icon; - /// - /// Gets or sets a value that contains the TaskDialog main icon. - /// - public TaskDialogStandardIcon Icon - { - get { return icon; } - set - { - // Set local value, then update native dialog if showing. - icon = value; - if (NativeDialogShowing) - nativeDialog.UpdateMainIcon(icon); - } - } - - private TaskDialogStandardIcon footerIcon; - /// - /// Gets or sets a value that contains the footer icon. - /// - public TaskDialogStandardIcon FooterIcon - { - get { return footerIcon; } - set - { - // Set local value, then update native dialog if showing. - footerIcon = value; - if (NativeDialogShowing) - nativeDialog.UpdateFooterIcon(footerIcon); - } - } - - private TaskDialogStandardButtons standardButtons = TaskDialogStandardButtons.None; - /// - /// Gets or sets a value that contains the standard buttons. - /// - public TaskDialogStandardButtons StandardButtons - { - get { return standardButtons; } - set - { - ThrowIfDialogShowing("Standard buttons can't be set while dialog is showing."); - standardButtons = value; - } - } - - private DialogControlCollection controls; - /// - /// Gets a value that contains the TaskDialog controls. - /// - public DialogControlCollection Controls - { - // "Show protection" provided by collection itself, - // as well as individual controls. - get { return controls; } - } - - private bool hyperlinksEnabled; - /// - /// Gets or sets a value that determines if hyperlinks are enabled. - /// - public bool HyperlinksEnabled - { - get { return hyperlinksEnabled; } - set - { - ThrowIfDialogShowing("Hyperlinks can't be enabled/disabled while dialog is showing."); - hyperlinksEnabled = value; - } - } - - private bool? footerCheckBoxChecked = null; - /// - /// Gets or sets a value that indicates if the footer checkbox is checked. - /// - public bool? FooterCheckBoxChecked - { - get - { - if (!footerCheckBoxChecked.HasValue) - return false; - else - return footerCheckBoxChecked; - } - set - { - // Set local value, then update native dialog if showing. - footerCheckBoxChecked = value; - if (NativeDialogShowing) - nativeDialog.UpdateCheckBoxChecked(footerCheckBoxChecked.Value); - } - } - - private TaskDialogExpandedDetailsLocation expansionMode; - /// - /// Gets or sets a value that contains the expansion mode for this dialog. - /// - public TaskDialogExpandedDetailsLocation ExpansionMode - { - get { return expansionMode; } - set - { - ThrowIfDialogShowing("Expanded information mode can't be set while dialog is showing."); - expansionMode = value; - } - } - - private TaskDialogStartupLocation startupLocation; - - /// - /// Gets or sets a value that contains the startup location. - /// - public TaskDialogStartupLocation StartupLocation - { - get { return startupLocation; } - set - { - ThrowIfDialogShowing("Startup location can't be changed while dialog is showing."); - startupLocation = value; - } - } - - private TaskDialogProgressBar progressBar; - /// - /// Gets or sets the progress bar on the taskdialog. ProgressBar a visual representation - /// of the progress of a long running operation. - /// - public TaskDialogProgressBar ProgressBar - { - get { return progressBar; } - set - { - ThrowIfDialogShowing("Progress bar can't be changed while dialog is showing"); - if (value != null) - { - if (value.HostingDialog != null) - throw new InvalidOperationException("Progress bar cannot be hosted in multiple dialogs."); - - value.HostingDialog = this; - } - progressBar = value; - } - } - - #endregion - - #region Constructors - - // Constructors. - - - /// - /// Creates a basic TaskDialog window - /// - public TaskDialog() - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - // Initialize various data structs. - controls = new DialogControlCollection(this); - buttons = new List(); - radioButtons = new List(); - commandLinks = new List(); - } - - - - #endregion - - #region Static Show Methods - - /// - /// Creates and shows a task dialog with the specified message text. - /// - /// The text to display. - /// The dialog result. - public static TaskDialogResult Show(string text) - { - return ShowCoreStatic( - text, - TaskDialogDefaults.MainInstruction, - TaskDialogDefaults.Caption); - } - - /// - /// Creates and shows a task dialog with the specified supporting text and main instruction. - /// - /// The supporting text to display. - /// The main instruction text to display. - /// The dialog result. - public static TaskDialogResult Show(string text, string instructionText) - { - return ShowCoreStatic( - text, instructionText, - TaskDialogDefaults.Caption); - } - - /// - /// Creates and shows a task dialog with the specified supporting text, main instruction, and dialog caption. - /// - /// The supporting text to display. - /// The main instruction text to display. - /// The caption for the dialog. - /// The dialog result. - public static TaskDialogResult Show(string text, string instructionText, string caption) - { - return ShowCoreStatic(text, instructionText, caption); - } - #endregion - - #region Instance Show Methods - - /// - /// Creates and shows a task dialog. - /// - /// The dialog result. - public TaskDialogResult Show() - { - return ShowCore(); - } - #endregion - - #region Core Show Logic - - // CORE SHOW METHODS: - // All static Show() calls forward here - - // it is responsible for retrieving - // or creating our cached TaskDialog instance, getting it configured, - // and in turn calling the appropriate instance Show. - - private static TaskDialogResult ShowCoreStatic( - string text, - string instructionText, - string caption) - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - // If no instance cached yet, create it. - if (staticDialog == null) - { - // New TaskDialog will automatically pick up defaults when - // a new config structure is created as part of ShowCore(). - staticDialog = new TaskDialog(); - } - - // Set the few relevant properties, - // and go with the defaults for the others. - staticDialog.text = text; - staticDialog.instructionText = instructionText; - staticDialog.caption = caption; - - return staticDialog.Show(); - } - - private TaskDialogResult ShowCore() - { - TaskDialogResult result; - - try - { - // Populate control lists, based on current - // contents - note we are somewhat late-bound - // on our control lists, to support XAML scenarios. - SortDialogControls(); - - // First, let's make sure it even makes - // sense to try a show. - ValidateCurrentDialogSettings(); - - // Create settings object for new dialog, - // based on current state. - NativeTaskDialogSettings settings = - new NativeTaskDialogSettings(); - ApplyCoreSettings(settings); - ApplySupplementalSettings(settings); - - // Show the dialog. - // NOTE: this is a BLOCKING call; the dialog proc callbacks - // will be executed by the same thread as the - // Show() call before the thread of execution - // contines to the end of this method. - nativeDialog = new NativeTaskDialog(settings, this); - nativeDialog.NativeShow(); - - // Build and return dialog result to public API - leaving it - // null after an exception is thrown is fine in this case - result = ConstructDialogResult(nativeDialog); - footerCheckBoxChecked = nativeDialog.CheckBoxChecked; - } - finally - { - CleanUp(); - nativeDialog = null; - } - - return result; - } - - // Helper that looks at the current state of the TaskDialog and verifies - // that there aren't any abberant combinations of properties. - // NOTE that this method is designed to throw - // rather than return a bool. - private void ValidateCurrentDialogSettings() - { - if (footerCheckBoxChecked.HasValue && - footerCheckBoxChecked.Value == true && - String.IsNullOrEmpty(checkBoxText)) - throw new InvalidOperationException( - "Checkbox text must be provided to enable the dialog checkbox."); - - // Progress bar validation. - // Make sure the progress bar values are valid. - // the Win32 API will valiantly try to rationalize - // bizarre min/max/value combinations, but we'll save - // it the trouble by validating. - if (progressBar != null) - if (!progressBar.HasValidValues) - throw new ArgumentException( - "Progress bar must have a value between the minimum and maxium values."); - - // Validate Buttons collection. - // Make sure we don't have buttons AND - // command-links - the Win32 API treats them as different - // flavors of a single button struct. - if (buttons.Count > 0 && commandLinks.Count > 0) - throw new NotSupportedException( - "Dialog cannot display both non-standard buttons and command links."); - if (buttons.Count > 0 && standardButtons != TaskDialogStandardButtons.None) - throw new NotSupportedException( - "Dialog cannot display both non-standard buttons and standard buttons."); - } - - // Analyzes the final state of the NativeTaskDialog instance and creates the - // final TaskDialogResult that will be returned from the public API - private TaskDialogResult ConstructDialogResult(NativeTaskDialog native) - { - Debug.Assert(native.ShowState == DialogShowState.Closed, "dialog result being constructed for unshown dialog."); - - TaskDialogResult result = TaskDialogResult.Cancel; - - TaskDialogStandardButtons standardButton = MapButtonIdToStandardButton(native.SelectedButtonID); - - // If returned ID isn't a standard button, let's fetch - if (standardButton == TaskDialogStandardButtons.None) - result = TaskDialogResult.CustomButtonClicked; - else - result = (TaskDialogResult)standardButton; - - return result; - } - - /// - /// Close TaskDialog - /// - /// if TaskDialog is not showing. - public void Close() - { - if (!NativeDialogShowing) - throw new InvalidOperationException( - "Attempting to close a non-showing dialog."); - - nativeDialog.NativeClose(TaskDialogResult.Cancel); - // TaskDialog's own cleanup code - - // which runs post show - will handle disposal of native dialog. - } - - /// - /// Close TaskDialog with a given TaskDialogResult - /// - /// TaskDialogResult to return from the TaskDialog.Show() method - /// if TaskDialog is not showing. - public void Close(TaskDialogResult closingResult) - { - if (!NativeDialogShowing) - throw new InvalidOperationException( - "Attempting to close a non-showing dialog."); - - nativeDialog.NativeClose(closingResult); - // TaskDialog's own cleanup code - - // which runs post show - will handle disposal of native dialog. - } - - #endregion - - #region Configuration Construction - - private void ApplyCoreSettings(NativeTaskDialogSettings settings) - { - ApplyGeneralNativeConfiguration(settings.NativeConfiguration); - ApplyTextConfiguration(settings.NativeConfiguration); - ApplyOptionConfiguration(settings.NativeConfiguration); - ApplyControlConfiguration(settings); - } - - private void ApplyGeneralNativeConfiguration(TaskDialogNativeMethods.TASKDIALOGCONFIG dialogConfig) - { - // If an owner wasn't specifically specified, - // we'll use the app's main window. - if (ownerWindow != IntPtr.Zero) - dialogConfig.hwndParent = ownerWindow; - - // Other miscellaneous sets. - dialogConfig.MainIcon = - new TaskDialogNativeMethods.TASKDIALOGCONFIG_ICON_UNION((int)icon); - dialogConfig.FooterIcon = - new TaskDialogNativeMethods.TASKDIALOGCONFIG_ICON_UNION((int)footerIcon); - dialogConfig.dwCommonButtons = - (TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_FLAGS)standardButtons; - } - - /// - /// Sets important text properties. - /// - /// An instance of a object. - private void ApplyTextConfiguration(TaskDialogNativeMethods.TASKDIALOGCONFIG dialogConfig) - { - // note that nulls or empty strings are fine here. - dialogConfig.pszContent = text; - dialogConfig.pszWindowTitle = caption; - dialogConfig.pszMainInstruction = instructionText; - dialogConfig.pszExpandedInformation = detailsExpandedText; - dialogConfig.pszExpandedControlText = detailsExpandedLabel; - dialogConfig.pszCollapsedControlText = detailsCollapsedLabel; - dialogConfig.pszFooter = footerText; - dialogConfig.pszVerificationText = checkBoxText; - } - - private void ApplyOptionConfiguration(TaskDialogNativeMethods.TASKDIALOGCONFIG dialogConfig) - { - // Handle options - start with no options set. - TaskDialogNativeMethods.TASKDIALOG_FLAGS options = TaskDialogNativeMethods.TASKDIALOG_FLAGS.NONE; - if (cancelable) - options |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_ALLOW_DIALOG_CANCELLATION; - if (footerCheckBoxChecked.HasValue && footerCheckBoxChecked.Value) - options |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_VERIFICATION_FLAG_CHECKED; - if (hyperlinksEnabled) - options |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_ENABLE_HYPERLINKS; - if (detailsExpanded) - options |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_EXPANDED_BY_DEFAULT; - if (Tick != null) - options |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_CALLBACK_TIMER; - if (startupLocation == TaskDialogStartupLocation.CenterOwner) - options |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_POSITION_RELATIVE_TO_WINDOW; - - // Note: no validation required, as we allow this to - // be set even if there is no expanded information - // text because that could be added later. - // Default for Win32 API is to expand into (and after) - // the content area. - if (expansionMode == TaskDialogExpandedDetailsLocation.ExpandFooter) - options |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_EXPAND_FOOTER_AREA; - - // Finally, apply options to config. - dialogConfig.dwFlags = options; - } - - // Builds the actual configuration - // that the NativeTaskDialog (and underlying Win32 API) - // expects, by parsing the various control - // lists, marshalling to the unmanaged heap, etc. - - private void ApplyControlConfiguration(NativeTaskDialogSettings settings) - { - // Deal with progress bars/marquees. - if (progressBar != null) - { - if (progressBar.State == TaskDialogProgressBarState.Marquee) - settings.NativeConfiguration.dwFlags |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_SHOW_MARQUEE_PROGRESS_BAR; - else - settings.NativeConfiguration.dwFlags |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_SHOW_PROGRESS_BAR; - } - - // Build the native struct arrays that NativeTaskDialog - // needs - though NTD will handle - // the heavy lifting marshalling to make sure - // all the cleanup is centralized there. - if (buttons.Count > 0 || commandLinks.Count > 0) - { - // These are the actual arrays/lists of - // the structs that we'll copy to the - // unmanaged heap. - List sourceList = ( - buttons.Count > 0 ? buttons : commandLinks); - settings.Buttons = BuildButtonStructArray(sourceList); - - // Apply option flag that forces all - // custom buttons to render as command links. - if (commandLinks.Count > 0) - settings.NativeConfiguration.dwFlags |= - TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_USE_COMMAND_LINKS; - - // Set default button and add elevation icons - // to appropriate buttons. - settings.NativeConfiguration.nDefaultButton = - FindDefaultButtonId(sourceList); - - ApplyElevatedIcons(settings, sourceList); - } - if (radioButtons.Count > 0) - { - settings.RadioButtons = BuildButtonStructArray(radioButtons); - - // Set default radio button - radio buttons don't support. - int defaultRadioButton = FindDefaultButtonId(radioButtons); - settings.NativeConfiguration.nDefaultRadioButton = - defaultRadioButton; - - if (defaultRadioButton == - TaskDialogNativeMethods.NO_DEFAULT_BUTTON_SPECIFIED) - settings.NativeConfiguration.dwFlags |= TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_NO_DEFAULT_RADIO_BUTTON; - } - } - - private static TaskDialogNativeMethods.TASKDIALOG_BUTTON[] BuildButtonStructArray(List controls) - { - TaskDialogNativeMethods.TASKDIALOG_BUTTON[] buttonStructs; - TaskDialogButtonBase button; - - int totalButtons = controls.Count; - buttonStructs = new TaskDialogNativeMethods.TASKDIALOG_BUTTON[totalButtons]; - for (int i = 0; i < totalButtons; i++) - { - button = controls[i]; - buttonStructs[i] = new TaskDialogNativeMethods.TASKDIALOG_BUTTON(button.Id, button.ToString()); - } - return buttonStructs; - } - - // Searches list of controls and returns the ID of - // the default control, or null if no default was specified. - private static int FindDefaultButtonId(List controls) - { - int found = TaskDialogNativeMethods.NO_DEFAULT_BUTTON_SPECIFIED; - foreach (TaskDialogButtonBase control in controls) - { - if (control.Default) - { - // Check if we've found a default in this list already. - if (found != TaskDialogNativeMethods.NO_DEFAULT_BUTTON_SPECIFIED) - throw new InvalidOperationException("Can't have more than one default button of a given type."); - return control.Id; - } - } - return found; - } - - private static void ApplyElevatedIcons(NativeTaskDialogSettings settings, List controls) - { - foreach (TaskDialogButton control in controls) - { - if (control.ShowElevationIcon) - { - if (settings.ElevatedButtons == null) - settings.ElevatedButtons = new List(); - settings.ElevatedButtons.Add(control.Id); - } - } - } - - private void ApplySupplementalSettings(NativeTaskDialogSettings settings) - { - if (progressBar != null) - { - if (progressBar.State != TaskDialogProgressBarState.Marquee) - { - settings.ProgressBarMinimum = progressBar.Minimum; - settings.ProgressBarMaximum = progressBar.Maximum; - settings.ProgressBarValue = progressBar.Value; - settings.ProgressBarState = progressBar.State; - } - } - - if (HelpInvoked != null) - settings.InvokeHelp = true; - } - - // Here we walk our controls collection and - // sort the various controls by type. - private void SortDialogControls() - { - foreach (TaskDialogControl control in controls) - { - if (control is TaskDialogButtonBase && String.IsNullOrEmpty(((TaskDialogButtonBase)control).Text)) - { - if (control is TaskDialogCommandLink && String.IsNullOrEmpty(((TaskDialogCommandLink)control).Instruction)) - throw new InvalidOperationException( - "Button text must be non-empty"); - } - - // Loop through child controls - // and sort the controls based on type. - if (control is TaskDialogCommandLink) - { - commandLinks.Add((TaskDialogCommandLink)control); - } - else if (control is TaskDialogRadioButton) - { - if (radioButtons == null) - radioButtons = new List(); - radioButtons.Add((TaskDialogRadioButton)control); - } - else if (control is TaskDialogButtonBase) - { - if (buttons == null) - buttons = new List(); - buttons.Add((TaskDialogButtonBase)control); - } - else if (control is TaskDialogProgressBar) - { - progressBar = (TaskDialogProgressBar)control; - } - else - { - throw new ArgumentException("Unknown dialog control type."); - } - } - } - - #endregion - - #region Helpers - - // Helper to map the standard button IDs returned by - // TaskDialogIndirect to the standard button ID enum - - // note that we can't just cast, as the Win32 - // typedefs differ incoming and outgoing. - - private static TaskDialogStandardButtons MapButtonIdToStandardButton(int id) - { - switch ((TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID)id) - { - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDOK: - return TaskDialogStandardButtons.Ok; - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDCANCEL: - return TaskDialogStandardButtons.Cancel; - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDABORT: - // Included for completeness in API - - // we can't pass in an Abort standard button. - return TaskDialogStandardButtons.None; - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDRETRY: - return TaskDialogStandardButtons.Retry; - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDIGNORE: - // Included for completeness in API - - // we can't pass in an Ignore standard button. - return TaskDialogStandardButtons.None; - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDYES: - return TaskDialogStandardButtons.Yes; - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDNO: - return TaskDialogStandardButtons.No; - case TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDCLOSE: - return TaskDialogStandardButtons.Close; - default: - return TaskDialogStandardButtons.None; - } - } - - private void ThrowIfDialogShowing(string message) - { - if (NativeDialogShowing) - throw new NotSupportedException(message); - } - - private bool NativeDialogShowing - { - get - { - return (nativeDialog != null) - && (nativeDialog.ShowState == DialogShowState.Showing || - nativeDialog.ShowState == DialogShowState.Closing); - } - } - - // NOTE: we are going to require names be unique - // across both buttons and radio buttons, - // even though the Win32 API allows them to be separate. - private TaskDialogButtonBase GetButtonForId(int id) - { - return (TaskDialogButtonBase)controls.GetControlbyId(id); - } - - #endregion - - #region IDialogControlHost Members - - // We're explicitly implementing this interface - // as the user will never need to know about it - // or use it directly - it is only for the internal - // implementation of "pseudo controls" within - // the dialogs. - - // Called whenever controls are being added - // to or removed from the dialog control collection. - bool IDialogControlHost.IsCollectionChangeAllowed() - { - // Only allow additions to collection if dialog is NOT showing. - return !NativeDialogShowing; - } - - // Called whenever controls have been added or removed. - void IDialogControlHost.ApplyCollectionChanged() - { - // If we're showing, we should never get here - - // the changing notification would have thrown and the - // property would not have been changed. - Debug.Assert(!NativeDialogShowing, - "Collection changed notification received despite show state of dialog"); - } - - // Called when a control currently in the collection - // has a property changing - this is - // basically to screen out property changes that - // cannot occur while the dialog is showing - // because the Win32 API has no way for us to - // propagate the changes until we re-invoke the Win32 call. - bool IDialogControlHost.IsControlPropertyChangeAllowed(string propertyName, DialogControl control) - { - Debug.Assert(control is TaskDialogControl, - "Property changing for a control that is not a TaskDialogControl-derived type"); - Debug.Assert(propertyName != "Name", - "Name changes at any time are not supported - public API should have blocked this"); - - bool canChange = false; - - if (!NativeDialogShowing) - { - // Certain properties can't be changed if the dialog is not showing - // we need a handle created before we can set these... - switch(propertyName) - { - case "Enabled": - canChange = false; - break; - default: - canChange = true; - break; - } - } - else - { - // If the dialog is showing, we can only - // allow some properties to change. - switch (propertyName) - { - // Properties that CAN'T be changed while dialog is showing. - case "Text": - case "Default": - canChange = false; - break; - - // Properties that CAN be changed while dialog is showing. - case "ShowElevationIcon": - case "Enabled": - canChange = true; - break; - default: - Debug.Assert(true, "Unknown property name coming through property changing handler"); - break; - } - } - return canChange; - } - - // Called when a control currently in the collection - // has a property changed - this handles propagating - // the new property values to the Win32 API. - // If there isn't a way to change the Win32 value, then we - // should have already screened out the property set - // in NotifyControlPropertyChanging. - void IDialogControlHost.ApplyControlPropertyChange(string propertyName, DialogControl control) - { - // We only need to apply changes to the - // native dialog when it actually exists. - if (NativeDialogShowing) - { - if (control is TaskDialogProgressBar) - { - if (!progressBar.HasValidValues) - throw new ArgumentException( - "Progress bar must have a value between Minimum and Maximum."); - switch (propertyName) - { - case "State": - nativeDialog.UpdateProgressBarState(progressBar.State); - break; - case "Value": - nativeDialog.UpdateProgressBarValue(progressBar.Value); - break; - case "Minimum": - case "Maximum": - nativeDialog.UpdateProgressBarRange(); - break; - default: - Debug.Assert(true, "Unknown property being set"); - break; - } - } - else if (control is TaskDialogButton) - { - TaskDialogButton button = (TaskDialogButton)control; - switch (propertyName) - { - case "ShowElevationIcon": - nativeDialog.UpdateElevationIcon(button.Id, button.ShowElevationIcon); - break; - case "Enabled": - nativeDialog.UpdateButtonEnabled(button.Id, button.Enabled); - break; - default: - Debug.Assert(true, "Unknown property being set"); - break; - } - } - else if (control is TaskDialogRadioButton) - { - TaskDialogRadioButton button = (TaskDialogRadioButton)control; - switch (propertyName) - { - case "Enabled": - nativeDialog.UpdateRadioButtonEnabled(button.Id, button.Enabled); - break; - default: - Debug.Assert(true, "Unknown property being set"); - break; - } - } - else - { - // Do nothing with property change - - // note that this shouldn't ever happen, we should have - // either thrown on the changing event, or we handle above. - Debug.Assert(true, "Control property changed notification not handled properly - being ignored"); - } - } - return; - } - - #endregion - - #region Event Percolation Methods - - // All Raise*() methods are called by the - // NativeTaskDialog when various pseudo-controls - // are triggered. - internal void RaiseButtonClickEvent(int id) - { - // First check to see if the ID matches a custom button. - TaskDialogButtonBase button = GetButtonForId(id); - - // If a custom button was found, - // raise the event - if not, it's a standard button, and - // we don't support custom event handling for the standard buttons - if (button != null) - button.RaiseClickEvent(); - } - - internal void RaiseHyperlinkClickEvent(string link) - { - EventHandler handler = HyperlinkClick; - if (handler != null) - { - handler(this, new TaskDialogHyperlinkClickedEventArgs(link)); - } - } - - // Gives event subscriber a chance to prevent - // the dialog from closing, based on - // the current state of the app and the button - // used to commit. Note that we don't - // have full access at this stage to - // the full dialog state. - internal int RaiseClosingEvent(int id) - { - EventHandler handler = Closing; - if (handler != null) - { - - TaskDialogButtonBase customButton = null; - TaskDialogClosingEventArgs e = new TaskDialogClosingEventArgs(); - - // Try to identify the button - is it a standard one? - TaskDialogStandardButtons buttonClicked = MapButtonIdToStandardButton(id); - - // If not, it had better be a custom button... - if (buttonClicked == TaskDialogStandardButtons.None) - { - customButton = GetButtonForId(id); - - // ... or we have a problem. - if (customButton == null) - throw new InvalidOperationException("Bad button ID in closing event."); - - e.CustomButton = customButton.Name; - - e.TaskDialogResult = TaskDialogResult.CustomButtonClicked; - } - else - e.TaskDialogResult = (TaskDialogResult)buttonClicked; - - // Raise the event and determine how to proceed. - handler(this, e); - if (e.Cancel) - return (int)HRESULT.S_FALSE; - } - - // It's okay to let the dialog close. - return (int)HRESULT.S_OK; - } - - internal void RaiseHelpInvokedEvent() - { - EventHandler handler = HelpInvoked; - if (handler != null) - handler(this, EventArgs.Empty); - } - - internal void RaiseOpenedEvent() - { - EventHandler handler = Opened; - if (handler != null) - handler(this, EventArgs.Empty); - } - - internal void RaiseTickEvent(int ticks) - { - EventHandler handler = Tick; - if (handler != null) - handler(this, new TaskDialogTickEventArgs(ticks)); - } - - #endregion - - #region Cleanup Code - - // Cleans up data and structs from a single - // native dialog Show() invocation. - private void CleanUp() - { - // Reset values that would be considered - // 'volatile' in a given instance. - if (progressBar != null) - { - progressBar.Reset(); - } - - // Clean out sorted control lists - - // though we don't of course clear the main controls collection, - // so the controls are still around; we'll - // resort on next show, since the collection may have changed. - if (buttons != null) - buttons.Clear(); - if (commandLinks != null) - commandLinks.Clear(); - if (radioButtons != null) - radioButtons.Clear(); - progressBar = null; - - // Have the native dialog clean up the rest. - if (nativeDialog != null) - nativeDialog.Dispose(); - } - - - // Dispose pattern - cleans up data and structs for - // a) any native dialog currently showing, and - // b) anything else that the outer TaskDialog has. - private bool disposed; - - /// - /// Dispose TaskDialog Resources - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// TaskDialog Finalizer - /// - ~TaskDialog() - { - Dispose(false); - } - - /// - /// Dispose TaskDialog Resources - /// - /// If true, indicates that this is being called via Dispose rather than via the finalizer. - public virtual void Dispose(bool disposing) - { - if (!disposed) - { - disposed = true; - - if (disposing) - { - // Clean up managed resources. - if (nativeDialog != null && nativeDialog.ShowState == DialogShowState.Showing) - { - nativeDialog.NativeClose(TaskDialogResult.Cancel); - } - - buttons = null; - radioButtons = null; - commandLinks = null; - } - - // Clean up unmanaged resources SECOND, NTD counts on - // being closed before being disposed. - if (nativeDialog != null) - { - nativeDialog.Dispose(); - nativeDialog = null; - } - - if (staticDialog != null) - { - staticDialog.Dispose(); - staticDialog = null; - } - - - } - } - - #endregion - - /// - /// Indicates whether this feature is supported on the current platform. - /// - public static bool IsPlatformSupported - { - get - { - // We need Windows Vista onwards ... - return CoreHelpers.RunningOnVista; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogBar.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogBar.cs deleted file mode 100644 index a0632df..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogBar.cs +++ /dev/null @@ -1,43 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Defines a common class for all task dialog bar controls, such as the progress and marquee bars. - /// - public class TaskDialogBar : TaskDialogControl - { - /// - /// Creates a new instance of this class. - /// - public TaskDialogBar() {} - /// - /// Creates a new instance of this class with the specified name. - /// - /// The name for this control. - protected TaskDialogBar(string name) : base(name) { } - - private TaskDialogProgressBarState state; - /// - /// Gets or sets the state of the progress bar. - /// - public TaskDialogProgressBarState State - { - get { return state; } - set - { - CheckPropertyChangeAllowed("State"); - state = value; - ApplyPropertyChange("State"); - } - } - /// - /// Resets the state of the control to normal. - /// - protected internal virtual void Reset() - { - state = TaskDialogProgressBarState.Normal; - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButton.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButton.cs deleted file mode 100644 index a612f00..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButton.cs +++ /dev/null @@ -1,38 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Implements a button that can be hosted in a task dialog. - /// - public class TaskDialogButton : TaskDialogButtonBase - { - /// - /// Creates a new instance of this class. - /// - public TaskDialogButton() { } - - /// - /// Creates a new instance of this class with the specified property settings. - /// - /// The name of the button. - /// The button label. - public TaskDialogButton(string name, string text) : base(name, text) { } - - private bool showElevationIcon; - /// - /// Gets or sets a value that controls whether the elevation icon is displayed. - /// - public bool ShowElevationIcon - { - get { return showElevationIcon; } - set - { - CheckPropertyChangeAllowed("ShowElevationIcon"); - showElevationIcon = value; - ApplyPropertyChange("ShowElevationIcon"); - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButtonBase.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButtonBase.cs deleted file mode 100644 index 6419dfb..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogButtonBase.cs +++ /dev/null @@ -1,115 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - // ContentProperty allows us to specify the text - // of the button as the child text of - // a button element in XAML, as well as explicitly - // set with 'Text=""' - // Note that this attribute is inherited, so it - // applies to command-links and radio buttons as well. - /// - /// Defines the abstract base class for task dialog buttons. - /// Classes that inherit from this class will inherit - /// the Text property defined in this class. - /// - public abstract class TaskDialogButtonBase : TaskDialogControl - { - - /// - /// Creates a new instance on a task dialog button. - /// - protected TaskDialogButtonBase() { } - /// - /// Creates a new instance on a task dialog button with - /// the specified name and text. - /// - /// The name for this button. - /// The label for this button. - protected TaskDialogButtonBase(string name, string text) : base(name) - { - this.text = text; - } - - // Note that we don't need to explicitly - // implement the add/remove delegate for the Click event; - // the hosting dialog only needs the delegate - // information when the Click event is - // raised (indirectly) by NativeTaskDialog, - // so the latest delegate is always available. - /// - /// Raised when the task dialog button is clicked. - /// - public event EventHandler Click; - internal void RaiseClickEvent() - { - // Only perform click if the button is enabled. - if (!enabled) - return; - - EventHandler handler = Click; - if (handler != null) - handler(this, EventArgs.Empty); - } - - private string text; - /// - /// Gets or sets the button text. - /// - public string Text - { - get { return text; } - set - { - CheckPropertyChangeAllowed("Text"); - text = value; - ApplyPropertyChange("Text"); - } - } - - private bool enabled = true; - /// - /// Gets or sets a value that determines whether the - /// button is enabled. The enabled state can cannot be changed - /// before the dialog is shown. - /// - public bool Enabled - { - get { return enabled; } - set - { - CheckPropertyChangeAllowed("Enabled"); - enabled = value; - ApplyPropertyChange("Enabled"); - } - } - - private bool defaultControl; - /// - /// Gets or sets a value that indicates whether - /// this button is the default button. - /// - public bool Default - { - get { return defaultControl; } - set - { - CheckPropertyChangeAllowed("Default"); - defaultControl = value; - ApplyPropertyChange("Default"); - } - } - /// - /// Returns the Text property value for this button. - /// - /// A . - public override string ToString() - { - if (text == null) - return ""; - return text; - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogClosingEventArgs.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogClosingEventArgs.cs deleted file mode 100644 index 5c3aa76..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogClosingEventArgs.cs +++ /dev/null @@ -1,34 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.ComponentModel; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Data associated with event. - /// - public class TaskDialogClosingEventArgs : CancelEventArgs - { - private TaskDialogResult taskDialogResult; - /// - /// Gets or sets the standard button that was clicked. - /// - public TaskDialogResult TaskDialogResult - { - get { return taskDialogResult; } - set { taskDialogResult = value; } - } - - private string customButton; - /// - /// Gets or sets the text of the custom button that was clicked. - /// - public string CustomButton - { - get { return customButton; } - set { customButton = value; } - } - - - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogCommandLink.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogCommandLink.cs deleted file mode 100644 index 122c160..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogCommandLink.cs +++ /dev/null @@ -1,53 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Represents a command-link. - /// - public class TaskDialogCommandLink : TaskDialogButton - { - /// - /// Creates a new instance of this class. - /// - public TaskDialogCommandLink() { } - /// - /// Creates a new instance of this class with the specified name and label. - /// - /// The name for this button. - /// The label for this button. - public TaskDialogCommandLink(string name, string text) : base(name, text) { } - - /// - /// Creates a new instance of this class with the specified name,label, and instruction. - /// - /// The name for this button. - /// The label for this button. - /// The instruction for this command link. - public TaskDialogCommandLink(string name, string text, string instruction) - : base(name, text) - { - this.instruction = instruction; - } - - private string instruction; - /// - /// Gets or sets the instruction associated with this command link button. - /// - public string Instruction - { - get { return instruction; } - set { instruction = value; } - } - - /// - /// Returns a string representation of this object. - /// - /// A - public override string ToString() - { - string instructionString = (instruction == null ? "" : instruction); - return Text + "\n" + instructionString; - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogControl.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogControl.cs deleted file mode 100644 index 35b5822..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogControl.cs +++ /dev/null @@ -1,20 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Declares the abstract base class for all custom task dialog controls. - /// - public abstract class TaskDialogControl : DialogControl - { - /// - /// Creates a new instance of a task dialog control. - /// - protected TaskDialogControl() {} - /// - /// Creates a new instance of a task dialog control with the specified name. - /// - /// The name for this control. - protected TaskDialogControl(string name) : base(name) {} - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogDefaults.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogDefaults.cs deleted file mode 100644 index d69a53f..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogDefaults.cs +++ /dev/null @@ -1,22 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - internal static class TaskDialogDefaults - { - internal const string Caption = "Application"; - internal const string MainInstruction = ""; - internal const string Content = ""; - - - internal const int ProgressBarMinimumValue = 0; - internal const int ProgressBarMaximumValue = 100; - - internal const int IdealWidth = 0; - - // For generating control ID numbers that won't - // collide with the standard button return IDs. - internal const int MinimumDialogControlId = - (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDCLOSE + 1; - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogExpandedInfoMode.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogExpandedInfoMode.cs deleted file mode 100644 index 67e7f98..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogExpandedInfoMode.cs +++ /dev/null @@ -1,23 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Specifies the options for expand/collapse sections in dialogs. - /// - public enum TaskDialogExpandedDetailsLocation - { - /// - /// Do not show the content. - /// - Hide, - /// - /// Show the content. - /// - ExpandContent, - /// - /// Expand the footer content. - /// - ExpandFooter - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogHyperlinkClickedEventArgs.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogHyperlinkClickedEventArgs.cs deleted file mode 100644 index 6da59f3..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogHyperlinkClickedEventArgs.cs +++ /dev/null @@ -1,31 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Defines event data associated with a HyperlinkClick event. - /// - public class TaskDialogHyperlinkClickedEventArgs : EventArgs - { - /// - /// Creates a new instance of this class with the specified link text. - /// - /// The text of the hyperlink that was clicked. - public TaskDialogHyperlinkClickedEventArgs(string link) - { - linkText = link; - } - - private string linkText; - /// - /// Gets or sets the text of the hyperlink that was clicked. - /// - public string LinkText - { - get { return linkText; } - set { linkText = value; } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBar.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBar.cs deleted file mode 100644 index f08fd21..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBar.cs +++ /dev/null @@ -1,113 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Provides a visual representation of the progress of a long running operation. - /// - public class TaskDialogProgressBar : TaskDialogBar - { - /// - /// Creates a new instance of this class. - /// - public TaskDialogProgressBar() - { - } - /// - /// Creates a new instance of this class with the specified name. - /// And using the default values: Min = 0, Max = 100, Current = 0 - /// - /// The name of the control. - public TaskDialogProgressBar(string name) : base(name) { } - /// - /// Creates a new instance of this class with the specified - /// minimum, maximum and current values. - /// - /// The minimum value for this control. - /// The maximum value for this control. - /// The current value for this control. - public TaskDialogProgressBar(int minimum, int maximum, int value) - { - Minimum = minimum; - Maximum = maximum; - Value = value; - } - - private int minimum = TaskDialogDefaults.ProgressBarMinimumValue; - private int value = TaskDialogDefaults.ProgressBarMinimumValue; - private int maximum = TaskDialogDefaults.ProgressBarMaximumValue; - - /// - /// Gets or sets the minimum value for the control. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1500:VariableNamesShouldNotMatchFieldNames", MessageId = "value", - Justification="Value is standard for progressbar's current value property")] - public int Minimum - { - get { return minimum; } - set - { - CheckPropertyChangeAllowed("Minimum"); - // Check for positive numbers - if (value < 0) - throw new System.ArgumentException("Minimum value provided must be a positive number", "value"); - // Check if min / max differ - if (value >= Maximum) - throw new System.ArgumentException("Minimum value provided must less than the maximum value", "value"); - minimum = value; - ApplyPropertyChange("Minimum"); - } - } - /// - /// Gets or sets the maximum value for the control. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1500:VariableNamesShouldNotMatchFieldNames", MessageId = "value", - Justification="Value is standard for progressbar's current value property")] - public int Maximum - { - get { return maximum; } - set - { - CheckPropertyChangeAllowed("Maximum"); - // Check if min / max differ - if (value < Minimum) - throw new System.ArgumentException("Maximum value provided must be greater than the minimum value", "value"); - maximum = value; - ApplyPropertyChange("Maximum"); - } - } - /// - /// Gets or sets the current value for the control. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Maintainability", "CA1500:VariableNamesShouldNotMatchFieldNames", MessageId = "value", - Justification="Value is standard for progressbar's current value property")] - public int Value - { - get { return this.value; } - set - { - CheckPropertyChangeAllowed("Value"); - // Check for positive numbers - if (value < Minimum) - throw new System.ArgumentException("Value provided must be greater than or equal to minimum value", "value"); - if (value > Maximum) - throw new System.ArgumentException("Value provided must be less than or equal to the maximum value", "value"); - this.value = value; - ApplyPropertyChange("Value"); - } - } - - internal bool HasValidValues - { - get { return (minimum <= value && value <= maximum); } - } - /// - /// Resets the control to its minimum value. - /// - protected internal override void Reset() - { - base.Reset(); - value = minimum; - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBarState.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBarState.cs deleted file mode 100644 index ccd5f3f..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogProgressBarState.cs +++ /dev/null @@ -1,31 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Sets the state of a task dialog progress bar. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")] - public enum TaskDialogProgressBarState - { - /// - /// Normal state. - /// - Normal = TaskDialogNativeMethods.PBST.PBST_NORMAL, - - /// - /// An error occurred. - /// - Error = TaskDialogNativeMethods.PBST.PBST_ERROR, - - /// - /// The progress is paused. - /// - Paused = TaskDialogNativeMethods.PBST.PBST_PAUSED, - - /// - /// Displays marquee (indeterminate) style progress - /// - Marquee, - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogRadioButton.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogRadioButton.cs deleted file mode 100644 index e805e4f..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogRadioButton.cs +++ /dev/null @@ -1,24 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Defines a radio button that can be hosted in by a - /// object. - /// - public class TaskDialogRadioButton : TaskDialogButtonBase - { - /// - /// Creates a new instance of this class. - /// - public TaskDialogRadioButton() { } - /// - /// Creates a new instance of this class with - /// the specified name and text. - /// - /// The name for this control. - /// The value for this controls - /// property. - public TaskDialogRadioButton(string name, string text) : base(name, text) { } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogResult.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogResult.cs deleted file mode 100644 index 48f497e..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogResult.cs +++ /dev/null @@ -1,46 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Indicates the various buttons and options clicked by the user on the task dialog. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue")] - public enum TaskDialogResult - { - /// - /// "OK" button was clicked - /// - Ok = 0x0001, - - /// - /// "Yes" button was clicked - /// - Yes = 0x0002, - - /// - /// "No" button was clicked - /// - No = 0x0004, - - /// - /// "Cancel" button was clicked - /// - Cancel = 0x0008, - - /// - /// "Retry" button was clicked - /// - Retry = 0x0010, - - /// - /// "Close" button was clicked - /// - Close = 0x0020, - - /// - /// A custom button was clicked. - /// - CustomButtonClicked = 0x0100, - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardButton.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardButton.cs deleted file mode 100644 index f371db8..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardButton.cs +++ /dev/null @@ -1,49 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Identifies one of the standard buttons that - /// can be displayed via TaskDialog. - /// - [Flags] - public enum TaskDialogStandardButtons - { - /// - /// No buttons on the dialog. - /// - None = 0x0000, - - /// - /// An "OK" button. - /// - Ok = 0x0001, - - /// - /// A "Yes" button. - /// - Yes = 0x0002, - - /// - /// A "No" button. - /// - No = 0x0004, - - /// - /// A "Cancel" button. - /// - Cancel = 0x0008, - - /// - /// A "Retry" button. - /// - Retry = 0x0010, - - /// - /// A "Close" button. - /// - Close = 0x0020 - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardIcon.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardIcon.cs deleted file mode 100644 index 5246225..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStandardIcon.cs +++ /dev/null @@ -1,31 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Specifies the icon displayed in a task dialog. - /// - public enum TaskDialogStandardIcon - { - /// - /// Displays no icons (default). - /// - None = 0, - /// - /// Displays the warning icon. - /// - Warning = 65535, - /// - /// Displays the error icon. - /// - Error = 65534, - /// - /// Displays the Information icon. - /// - Information = 65533, - /// - /// Displays the User Account Control shield. - /// - Shield = 65532 - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStartupLocation.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStartupLocation.cs deleted file mode 100644 index 5fc144d..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogStartupLocation.cs +++ /dev/null @@ -1,19 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Specifies the initial display location for a task dialog. - /// - public enum TaskDialogStartupLocation - { - /// - /// The window placed in the center of the screen. - /// - CenterScreen, - /// - /// The window centered relative to the window that launched the dialog. - /// - CenterOwner - } -} diff --git a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogTickEventArgs.cs b/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogTickEventArgs.cs deleted file mode 100644 index 93b15f7..0000000 --- a/src/External/WindowsAPICodePack/Core/Dialogs/TaskDialogs/TaskDialogTickEventArgs.cs +++ /dev/null @@ -1,29 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// The event data for a TaskDialogTick event. - /// - public class TaskDialogTickEventArgs : EventArgs - { - private int ticks; - /// - /// Initializes the data associated with the TaskDialog tick event. - /// - /// The total number of ticks since the control was activated. - public TaskDialogTickEventArgs(int totalTicks) - { - ticks = totalTicks; - } - /// - /// Gets a value that determines the current number of ticks. - /// - public int Ticks - { - get { return ticks; } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/AppRestartRecovery/AppRestartRecoveryNativeMethods.cs b/src/External/WindowsAPICodePack/Core/Interop/AppRestartRecovery/AppRestartRecoveryNativeMethods.cs deleted file mode 100644 index e64d375..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/AppRestartRecovery/AppRestartRecoveryNativeMethods.cs +++ /dev/null @@ -1,87 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - internal static class AppRestartRecoveryNativeMethods - { - #region Application Restart and Recovery Definitions - - internal delegate UInt32 InternalRecoveryCallback(IntPtr state); - - internal static InternalRecoveryCallback internalCallback; - - static AppRestartRecoveryNativeMethods() - { - internalCallback = new InternalRecoveryCallback(InternalRecoveryHandler); - } - - private static UInt32 InternalRecoveryHandler(IntPtr parameter) - { - bool cancelled = false; - ApplicationRecoveryInProgress(out cancelled); - - GCHandle handle = GCHandle.FromIntPtr(parameter); - RecoveryData data = handle.Target as RecoveryData; - data.Invoke(); - handle.Free(); - - return (0); - } - - - - [DllImport("kernel32.dll")] - internal static extern void ApplicationRecoveryFinished( - [MarshalAs(UnmanagedType.Bool)] bool success); - - [DllImport("kernel32.dll")] - [PreserveSig] - internal static extern HRESULT ApplicationRecoveryInProgress( - [Out, MarshalAs(UnmanagedType.Bool)] out bool canceled); - - [DllImport("kernel32.dll")] - [PreserveSig] - internal static extern HRESULT GetApplicationRecoveryCallback( - IntPtr processHandle, - out RecoveryCallback recoveryCallback, - out object state, - out uint pingInterval, - out uint flags); - - [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] - [PreserveSig] - internal static extern HRESULT RegisterApplicationRecoveryCallback( - InternalRecoveryCallback callback, IntPtr param, - uint pingInterval, - uint flags); // Unused. - - - [DllImport("kernel32.dll")] - [PreserveSig] - internal static extern HRESULT RegisterApplicationRestart( - [MarshalAs(UnmanagedType.BStr)] string commandLineArgs, - RestartRestrictions flags); - - [DllImport("KERNEL32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - [PreserveSig] - internal static extern HRESULT GetApplicationRestartSettings( - IntPtr process, - IntPtr commandLine, - ref uint size, - out RestartRestrictions flags); - - [DllImport("kernel32.dll")] - [PreserveSig] - internal static extern HRESULT UnregisterApplicationRecoveryCallback(); - - [DllImport("kernel32.dll")] - [PreserveSig] - internal static extern HRESULT UnregisterApplicationRestart(); - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/CommonDllNames.cs b/src/External/WindowsAPICodePack/Core/Interop/CommonDllNames.cs deleted file mode 100644 index e040c1d..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/CommonDllNames.cs +++ /dev/null @@ -1,38 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// Class to hold string references to common interop DLLs. - /// - public sealed class CommonDllNames - { - private CommonDllNames() - { - // Remove the public constructor - } - - /// - /// Comctl32.DLL - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ctl")] - public const string ComCtl32 = "comctl32.dll"; - /// - /// Kernel32.dll - /// - public const string Kernel32 = "kernel32.dll"; - /// - /// Comdlg32.dll - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dlg")] - public const string ComDlg32 = "comdlg32.dll"; - /// - /// User32.dll - /// - public const string User32 = "user32.dll"; - /// - /// Shell32.dll - /// - public const string Shell32 = "shell32.dll"; - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/CoreErrorHelper.cs b/src/External/WindowsAPICodePack/Core/Interop/CoreErrorHelper.cs deleted file mode 100644 index db023ea..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/CoreErrorHelper.cs +++ /dev/null @@ -1,168 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// HRESULT Wrapper - /// This is intended for Library Internal use only. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HRESULT"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32", - Justification="The base type for all of these value is uint")] - public enum HRESULT : uint - { - /// - /// S_FALSE - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "FALSE")] - S_FALSE = 0x0001, - - /// - /// S_OK - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "OK")] - S_OK = 0x0000, - - /// - /// E_INVALIDARG - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "INVALIDARG")] - E_INVALIDARG = 0x80070057, - - /// - /// E_OUTOFMEMORY - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "OUTOFMEMORY")] - E_OUTOFMEMORY = 0x8007000E, - - /// - /// E_NOINTERFACE - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "NOINTERFACE")] - E_NOINTERFACE = 0x80004002, - - /// - /// E_FAIL - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "FAIL")] - E_FAIL = 0x80004005, - - /// - /// E_ELEMENTNOTFOUND - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ELEMENTNOTFOUND")] - E_ELEMENTNOTFOUND = 0x80070490, - - /// - /// TYPE_E_ELEMENTNOTFOUND - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "TYPE")] - TYPE_E_ELEMENTNOTFOUND = 0x8002802B, - - - /// - /// NO_OBJECT - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "NO_OBJECT")] - NO_OBJECT = 0x800401E5, - - /// - /// Win32 Error code: ERROR_CANCELLED - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ERROR")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "CANCELLED")] - ERROR_CANCELLED = 1223, - - /// - /// ERROR_CANCELLED - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1707:IdentifiersShouldNotContainUnderscores" )] - [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ERROR" )] - [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "CANCELLED" )] - E_ERROR_CANCELLED = 0x800704C7, - - /// - /// The requested resource is in use - /// - RESOURCE_IN_USE = 0x800700AA, - } - - /// - /// Provide Error Message Helper Methods. - /// This is intended for Library Internal use only. - /// - public static class CoreErrorHelper - { - /// - /// This is intended for Library Internal use only. - /// - private const int FACILITY_WIN32 = 7; - - /// - /// This is intended for Library Internal use only. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "IGNORED")] - public const int IGNORED = (int)HRESULT.S_OK; - - /// - /// This is intended for Library Internal use only. - /// - /// The Windows API error code. - /// The equivalent HRESULT. - public static int HResultFromWin32(int win32ErrorCode) - { - if (win32ErrorCode > 0) - { - win32ErrorCode = - (int)(((uint)win32ErrorCode & 0x0000FFFF) | (FACILITY_WIN32 << 16) | 0x80000000); - } - return win32ErrorCode; - - } - - /// - /// This is intended for Library Internal use only. - /// - /// The error code. - /// True if the error code indicates success. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "hresult")] - public static bool Succeeded(int hresult) - { - return (hresult >= 0); - } - - /// - /// This is intended for Library Internal use only. - /// - /// The error code. - /// True if the error code indicates failure. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "h")] - public static bool Failed(HRESULT hResult) - { - return ((int)hResult < 0); - } - - /// - /// This is intended for Library Internal use only. - /// - /// The COM error code. - /// The Win32 error code. - /// Inticates that the Win32 error code corresponds to the COM error code. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "hresult")] - public static bool Matches(int hresult, int win32ErrorCode) - { - return (hresult == HResultFromWin32(win32ErrorCode)); - } - - - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/CoreHelpers.cs b/src/External/WindowsAPICodePack/Core/Interop/CoreHelpers.cs deleted file mode 100644 index 2d9a4cb..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/CoreHelpers.cs +++ /dev/null @@ -1,120 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Text; - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// Common Helper methods - /// - static public class CoreHelpers - { - /// - /// Determines if the application is running on XP - /// - public static bool RunningOnXP - { - get - { - return Environment.OSVersion.Version.Major >= 5; - } - } - - /// - /// Throws PlatformNotSupportedException if the application is not running on Windows XP - /// - public static void ThrowIfNotXP() - { - if (!CoreHelpers.RunningOnXP) - { - throw new PlatformNotSupportedException("Only supported on Windows XP or newer."); - } - } - - /// - /// Determines if the application is running on Vista - /// - public static bool RunningOnVista - { - get - { - return Environment.OSVersion.Version.Major >= 6; - } - } - - /// - /// Throws PlatformNotSupportedException if the application is not running on Windows Vista - /// - public static void ThrowIfNotVista() - { - if (!CoreHelpers.RunningOnVista) - { - throw new PlatformNotSupportedException("Only supported on Windows Vista or newer."); - } - } - - /// - /// Determines if the application is running on Windows 7 - /// - public static bool RunningOnWin7 - { - get - { - return (Environment.OSVersion.Version.Major > 6) || - (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor >= 1); - } - } - - /// - /// Throws PlatformNotSupportedException if the application is not running on Windows 7 - /// - public static void ThrowIfNotWin7() - { - if (!CoreHelpers.RunningOnWin7) - { - throw new PlatformNotSupportedException("Only supported on Windows 7 or newer."); - } - } - - /// - /// Get a string resource given a resource Id - /// - /// The resource Id - /// The string resource corresponding to the given resource Id. Returns null if the resource id - /// is invalid or the string cannot be retrieved for any other reason. - public static string GetStringResource(string resourceId) - { - string[] parts; - string library; - int index; - - if (String.IsNullOrEmpty(resourceId)) - { - return String.Empty; - } - // Known folder "Recent" has a malformed resource id - // for its tooltip. This causes the resource id to - // parse into 3 parts instead of 2 parts if we don't fix. - resourceId = resourceId.Replace("shell32,dll", "shell32.dll"); - parts = resourceId.Split(new char[] { ',' }); - - library = parts[0]; - library = library.Replace(@"@", String.Empty); - - parts[1] = parts[1].Replace("-", String.Empty); - index = Int32.Parse(parts[1]); - - library = Environment.ExpandEnvironmentVariables(library); - IntPtr handle = CoreNativeMethods.LoadLibrary(library); - StringBuilder stringValue = new StringBuilder(255); - int retval = CoreNativeMethods.LoadString( - handle, index, stringValue, 255); - - if (retval == 0) - return null; - else - return stringValue.ToString(); - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/CoreNativeMethods.cs b/src/External/WindowsAPICodePack/Core/Interop/CoreNativeMethods.cs deleted file mode 100644 index 9d802f6..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/CoreNativeMethods.cs +++ /dev/null @@ -1,425 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Text; - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// Wrappers for Native Methods and Structs. - /// This type is intended for internal use only - /// - public sealed class CoreNativeMethods - { - private CoreNativeMethods() - { - - } - - #region Common Defintions - - #endregion - - #region General Definitions - - /// - /// Sends the specified message to a window or windows. The SendMessage function calls - /// the window procedure for the specified window and does not return until the window - /// procedure has processed the message. - /// - /// Handle to the window whose window procedure will receive the message. - /// If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, - /// including disabled or invisible unowned windows, overlapped windows, and pop-up windows; - /// but the message is not sent to child windows. - /// - /// Specifies the message to be sent. - /// Specifies additional message-specific information. - /// Specifies additional message-specific information. - /// A return code specific to the message being sent. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "w"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "l"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "h"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Wnd"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Param"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Interoperability", "CA1401:PInvokesShouldNotBeVisible", - Justification="This is used from another assembly, also it's in an internal namespace"), DllImport(CommonDllNames.User32, - CharSet = CharSet.Auto, - SetLastError = true)] - public static extern IntPtr SendMessage( - IntPtr hWnd, - uint msg, - IntPtr wParam, - IntPtr lParam - ); - - /// - /// Sends the specified message to a window or windows. The SendMessage function calls - /// the window procedure for the specified window and does not return until the window - /// procedure has processed the message. - /// - /// Handle to the window whose window procedure will receive the message. - /// If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, - /// including disabled or invisible unowned windows, overlapped windows, and pop-up windows; - /// but the message is not sent to child windows. - /// - /// Specifies the message to be sent. - /// Specifies additional message-specific information. - /// Specifies additional message-specific information. - /// A return code specific to the message being sent. - [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "w" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "l" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "h" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Wnd" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Param" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Interoperability", "CA1401:PInvokesShouldNotBeVisible" ), DllImport( CommonDllNames.User32, - CharSet = CharSet.Auto, - SetLastError = true)] - public static extern IntPtr SendMessage( - IntPtr hWnd, - uint msg, - int wParam, - [MarshalAs(UnmanagedType.LPWStr)] string lParam); - - /// - /// Sends the specified message to a window or windows. The SendMessage function calls - /// the window procedure for the specified window and does not return until the window - /// procedure has processed the message. - /// - /// Handle to the window whose window procedure will receive the message. - /// If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, - /// including disabled or invisible unowned windows, overlapped windows, and pop-up windows; - /// but the message is not sent to child windows. - /// - /// Specifies the message to be sent. - /// Specifies additional message-specific information. - /// Specifies additional message-specific information. - /// A return code specific to the message being sent. - [System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Param" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Wnd" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "h" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "l" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "w" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Interoperability", "CA1401:PInvokesShouldNotBeVisible" ), System.Diagnostics.CodeAnalysis.SuppressMessage( "Microsoft.Design", "CA1045:DoNotPassTypesByReference", MessageId = "2#", - Justification="This is an in/out parameter"), - DllImport(CommonDllNames.User32, CharSet = CharSet.Auto, SetLastError = true)] - public static extern IntPtr SendMessage( - IntPtr hWnd, - uint msg, - ref int wParam, - [MarshalAs(UnmanagedType.LPWStr)] StringBuilder lParam); - - // Various helpers for forcing binding to proper - // version of Comctl32 (v6). - [DllImport(CommonDllNames.Kernel32, SetLastError = true, - ThrowOnUnmappableChar = true, BestFitMapping = false)] - internal static extern IntPtr LoadLibrary( - [MarshalAs(UnmanagedType.LPStr)] string lpFileName); - - [DllImport(CommonDllNames.User32)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool DeleteObject(IntPtr graphicsObjectHandle); - - [DllImport(CommonDllNames.User32, SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern int LoadString(IntPtr hInstance, - int uID, - StringBuilder buffer, - int nBufferMax); - - /// - /// Destroys an icon and frees any memory the icon occupied. - /// - /// Handle to the icon to be destroyed. The icon must not be in use. - /// If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "h"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Interoperability", "CA1401:PInvokesShouldNotBeVisible", Justification = "This is used from other assemblies, also it's in an internal namespace"), - DllImport(CommonDllNames.User32, SetLastError = true)] - [return: MarshalAs(UnmanagedType.Bool)] - public static extern bool DestroyIcon(IntPtr hIcon); - - #endregion - - #region Window Handling - - [DllImport(CommonDllNames.User32, SetLastError = true, EntryPoint = "DestroyWindow", - CallingConvention = CallingConvention.StdCall)] - internal static extern int DestroyWindow(IntPtr handle); - - #endregion - - #region General Declarations - - // Various important window messages - internal const int WM_USER = 0x0400; - internal const int WM_ENTERIDLE = 0x0121; - - // FormatMessage constants and structs. - internal const int FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000; - - // App recovery and restart return codes - internal const uint ResultFailed = 0x80004005; - internal const uint ResultInvalidArgument = 0x80070057; - internal const uint ResultFalse = 1; - internal const uint ResultNotFound = 0x80070490; - - /// - /// Gets the HiWord - /// - /// The value to get the hi word from. - /// Size - /// The upper half of the dword. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "dword"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HIWORD")] - public static int HIWORD(long dword, int size) - { - return (short)(dword >> size); - } - - /// - /// Gets the LoWord - /// - /// The value to get the low word from. - /// The lower half of the dword. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "LOWORD"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "dword")] - public static int LOWORD(long dword) - { - return (short)(dword & 0xFFFF); - } - - #endregion - - #region GDI and DWM Declarations - - /// - /// A Wrapper for a SIZE struct - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "SIZE"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] - [StructLayout(LayoutKind.Sequential)] - public struct SIZE - { - /// - /// Width - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "cx")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int cx; - /// - /// Height - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int cy; - }; - - /// - /// A Wrapper for a RECT struct - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "RECT"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] - [StructLayout(LayoutKind.Sequential)] - public struct RECT - { - /// - /// Position of left edge - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int left; - /// - /// Position of top edge - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int top; - /// - /// Position of right edge - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int right; - /// - /// Position of bottom edge - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int bottom; - }; - - [StructLayout(LayoutKind.Sequential)] - internal struct DWM_THUMBNAIL_PROPERTIES - { - internal DwmThumbnailFlags dwFlags; - internal CoreNativeMethods.RECT rcDestination; - internal CoreNativeMethods.RECT rcSource; - internal byte opacity; - internal bool fVisible; - internal bool fSourceClientAreaOnly; - }; - - // Enable/disable non-client rendering based on window style. - internal const int DWMNCRP_USEWINDOWSTYLE = 0; - // Disabled non-client rendering; window style is ignored. - internal const int DWMNCRP_DISABLED = 1; - // Enabled non-client rendering; window style is ignored. - internal const int DWMNCRP_ENABLED = 2; - // Enable/disable non-client rendering Use DWMNCRP_* values. - internal const int DWMWA_NCRENDERING_ENABLED = 1; - // Non-client rendering policy. - internal const int DWMWA_NCRENDERING_POLICY = 2; - // Potentially enable/forcibly disable transitions 0 or 1. - internal const int DWMWA_TRANSITIONS_FORCEDISABLED = 3; - - [StructLayout(LayoutKind.Sequential)] - internal struct UNSIGNED_RATIO - { - internal UInt32 uiNumerator; - internal UInt32 uiDenominator; - }; - - [StructLayout(LayoutKind.Sequential)] - internal struct DWM_PRESENT_PARAMETERS - { - internal int cbSize; - internal bool fQueue; - internal UInt64 cRefreshStart; - internal uint cBuffer; - internal bool fUseSourceRate; - internal UNSIGNED_RATIO uiNumerator; - }; - - internal const int DWM_BB_ENABLE = 0x00000001; // fEnable has been specified - internal const int DWM_BB_BLURREGION = 0x00000002; // hRgnBlur has been specified - internal const int DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004; // fTransitionOnMaximized has been specified - - internal enum DwmBlurBehindDwFlags : uint - { - DWM_BB_ENABLE = 0x00000001, - DWM_BB_BLURREGION = 0x00000002, - DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004 - } - - internal enum DwmThumbnailFlags : uint - { - DWM_TNP_RECTDESTINATION = 0x00000001, //Indicates a value for rcDestination has been specified. - DWM_TNP_RECTSOURCE = 0x00000002, //Indicates a value for rcSource has been specified. - DWM_TNP_OPACITY = 0x00000004, //Indicates a value for opacity has been specified. - DWM_TNP_VISIBLE = 0x00000008, // Indicates a value for fVisible has been specified. - DWM_TNP_SOURCECLIENTAREAONLY = 0x00000010 //Indicates a value for fSourceClientAreaOnly has been specified. - } - - [StructLayout(LayoutKind.Sequential)] - internal struct DWM_BLURBEHIND - { - public DwmBlurBehindDwFlags dwFlags; - public bool fEnable; - public IntPtr hRgnBlur; - public bool fTransitionOnMaximized; - }; - - [StructLayout(LayoutKind.Sequential)] - internal struct MARGINS - { - public int cxLeftWidth; // width of left border that retains its size - public int cxRightWidth; // width of right border that retains its size - public int cyTopHeight; // height of top border that retains its size - public int cyBottomHeight; // height of bottom border that retains its size - }; - - - #endregion - - #region Elevation COM Object - - [Flags] - internal enum CLSCTX - { - CLSCTX_INPROC_SERVER = 0x1, - CLSCTX_INPROC_HANDLER = 0x2, - CLSCTX_LOCAL_SERVER = 0x4, - CLSCTX_REMOTE_SERVER = 0x10, - CLSCTX_NO_CODE_DOWNLOAD = 0x400, - CLSCTX_NO_CUSTOM_MARSHAL = 0x1000, - CLSCTX_ENABLE_CODE_DOWNLOAD = 0x2000, - CLSCTX_NO_FAILURE_LOG = 0x4000, - CLSCTX_DISABLE_AAA = 0x8000, - CLSCTX_ENABLE_AAA = 0x10000, - CLSCTX_FROM_DEFAULT_CONTEXT = 0x20000, - CLSCTX_INPROC = CLSCTX_INPROC_SERVER | CLSCTX_INPROC_HANDLER, - CLSCTX_SERVER = CLSCTX_INPROC_SERVER | CLSCTX_LOCAL_SERVER | CLSCTX_REMOTE_SERVER, - CLSCTX_ALL = CLSCTX_SERVER | CLSCTX_INPROC_HANDLER - } - - [StructLayout(LayoutKind.Sequential)] - internal struct BIND_OPTS3 - { - internal uint cbStruct; - internal uint grfFlags; - internal uint grfMode; - internal uint dwTickCountDeadline; - internal uint dwTrackFlags; - internal uint dwClassContext; - internal uint locale; - // This will be passed as null, so the type doesn't matter. - object pServerInfo; - internal IntPtr hwnd; - } - - #endregion - - #region Windows OS structs and consts - - // Code for CreateWindowEx, for a windowless message pump. - internal const int HWND_MESSAGE = -3; - - internal const uint STATUS_ACCESS_DENIED = 0xC0000022; - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - internal struct WNDCLASSEX - { - internal uint cbSize; - internal uint style; - [MarshalAs(UnmanagedType.FunctionPtr)] - internal WNDPROC lpfnWndProc; - internal int cbClsExtra; - internal int cbWndExtra; - internal IntPtr hInstance; - internal IntPtr hIcon; - internal IntPtr hCursor; - internal IntPtr hbrBackground; - [MarshalAs(UnmanagedType.LPTStr)] - internal string lpszMenuName; - [MarshalAs(UnmanagedType.LPTStr)] - internal string lpszClassName; - internal IntPtr hIconSm; - } - - /// - /// A Wrapper for a POINT struct - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "POINT"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1034:NestedTypesShouldNotBeVisible")] - [StructLayout(LayoutKind.Sequential)] - public struct POINT - { - /// - /// The X coordinate of the point - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "X")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int X; - - /// - /// The Y coordinate of the point - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Y")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] - public int Y; - - /// - /// Initialize the point - /// - /// The x coordinate of the point. - /// The y coordinate of the point. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "y"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "x")] - public POINT(int x, int y) - { - this.X = x; - this.Y = y; - } - } - - - [StructLayout(LayoutKind.Sequential)] - internal struct MSG - { - internal IntPtr hwnd; - internal uint message; - internal IntPtr wParam; - internal IntPtr lParam; - internal uint time; - internal POINT pt; - } - - internal delegate int WNDPROC(IntPtr hWnd, - uint uMessage, - IntPtr wParam, - IntPtr lParam); - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/Dialogs/DialogShowState.cs b/src/External/WindowsAPICodePack/Core/Interop/Dialogs/DialogShowState.cs deleted file mode 100644 index 5de1fad..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/Dialogs/DialogShowState.cs +++ /dev/null @@ -1,30 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Dialog Show State - /// - public enum DialogShowState - { - /// - /// Pre Show - /// - PreShow, - - /// - /// Currently Showing - /// - Showing, - - /// - /// Currently Closing - /// - Closing, - - /// - /// Closed - /// - Closed - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetwork.cs b/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetwork.cs deleted file mode 100644 index c646de1..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetwork.cs +++ /dev/null @@ -1,67 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Net -{ - [ComImport] - [TypeLibType((short)0x1040)] - [Guid("DCB00002-570F-4A9B-8D69-199FDBA5723B")] - internal interface INetwork - { - [return: MarshalAs(UnmanagedType.BStr)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - string GetName(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetName([In, MarshalAs(UnmanagedType.BStr)] string szNetworkNewName); - - [return: MarshalAs(UnmanagedType.BStr)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - string GetDescription(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDescription([In, MarshalAs(UnmanagedType.BStr)] string szDescription); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - Guid GetNetworkId(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - DomainType GetDomainType(); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - IEnumerable GetNetworkConnections(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetTimeCreatedAndConnected( - out uint pdwLowDateTimeCreated, - out uint pdwHighDateTimeCreated, - out uint pdwLowDateTimeConnected, - out uint pdwHighDateTimeConnected); - - bool IsConnectedToInternet - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - get; - } - - bool IsConnected - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - get; - } - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - Connectivity GetConnectivity(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - NetworkCategory GetCategory(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetCategory([In] NetworkCategory NewCategory); - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkConnection.cs b/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkConnection.cs deleted file mode 100644 index a52f156..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkConnection.cs +++ /dev/null @@ -1,43 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Net -{ - [ComImport] - [TypeLibType((short)0x1040)] - [Guid("DCB00005-570F-4A9B-8D69-199FDBA5723B")] - internal interface INetworkConnection - { - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - INetwork GetNetwork(); - - bool IsConnectedToInternet - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - get; - } - - bool IsConnected - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - get; - } - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - Connectivity GetConnectivity(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - Guid GetConnectionId(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - Guid GetAdapterId(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - DomainType GetDomainType(); - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkListManager.cs b/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkListManager.cs deleted file mode 100644 index 2723c1f..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/INetworkListManager.cs +++ /dev/null @@ -1,46 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Net -{ - [ComImport] - [Guid("DCB00000-570F-4A9B-8D69-199FDBA5723B")] - [TypeLibType((short)0x1040)] - internal interface INetworkListManager - { - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - IEnumerable GetNetworks([In] NetworkConnectivityLevels Flags); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - INetwork GetNetwork([In] Guid gdNetworkId); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - IEnumerable GetNetworkConnections(); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - INetworkConnection GetNetworkConnection([In] Guid gdNetworkConnectionId); - - bool IsConnectedToInternet - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - get; - } - - bool IsConnected - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - get; - } - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - Connectivity GetConnectivity(); - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/NetworkListManagerClass.cs b/src/External/WindowsAPICodePack/Core/Interop/NetworkList/NetworkListManagerClass.cs deleted file mode 100644 index 4cd91bd..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/NetworkList/NetworkListManagerClass.cs +++ /dev/null @@ -1,50 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Net -{ - [ComImport, ClassInterface((short)0), Guid("DCB00C01-570F-4A9B-8D69-199FDBA5723B")] - [ComSourceInterfaces("Microsoft.Windows.NetworkList.Internal.INetworkEvents\0Microsoft.Windows.NetworkList.Internal.INetworkConnectionEvents\0Microsoft.Windows.NetworkList.Internal.INetworkListManagerEvents\0"), TypeLibType((short)2)] - - internal class NetworkListManagerClass : INetworkListManager - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(7)] - public virtual extern Connectivity GetConnectivity(); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(2)] - public virtual extern INetwork GetNetwork([In] Guid gdNetworkId); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(4)] - public virtual extern INetworkConnection GetNetworkConnection([In] Guid gdNetworkConnectionId); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(3)] - public virtual extern IEnumerable GetNetworkConnections(); - - [return: MarshalAs(UnmanagedType.Interface)] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), DispId(1)] - public virtual extern IEnumerable GetNetworks([In] NetworkConnectivityLevels Flags); - - [DispId(6)] - public virtual extern bool IsConnected - { - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime), DispId(6)] - get; - } - - [DispId(5)] - public virtual extern bool IsConnectedToInternet - { - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime), DispId(5)] - get; - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/Interop/PowerManagement/PowerManagementNativeMethods.cs b/src/External/WindowsAPICodePack/Core/Interop/PowerManagement/PowerManagementNativeMethods.cs deleted file mode 100644 index e4dfb27..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/PowerManagement/PowerManagementNativeMethods.cs +++ /dev/null @@ -1,137 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - internal class PowerManagementNativeMethods - { - private PowerManagementNativeMethods() - { - - } - - #region Power Management - - internal const uint WM_POWERBROADCAST = 536; - internal const uint PBT_POWERSETTINGCHANGE = 32787; - internal const uint SPI_SETSCREENSAVEACTIVE = 0x0011; - internal const uint SPIF_UPDATEINIFILE = 0x0001; - internal const uint SPIF_SENDCHANGE = 0x0002; - - // This structure is sent when the PBT_POWERSETTINGSCHANGE message is sent. - // It describes the power setting that has changed and - // contains data about the change. - [StructLayout(LayoutKind.Sequential, Pack = 4)] - internal struct PowerBroadcastSetting - { - internal Guid PowerSetting; - internal Int32 DataLength; - } - - // This structure is used when calling CallNtPowerInformation - // to retrieve SystemPowerCapabilities - [StructLayout(LayoutKind.Sequential)] - internal struct SystemPowerCapabilities - { - [MarshalAs(UnmanagedType.I1)] - internal bool PowerButtonPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool SleepButtonPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool LidPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool SystemS1; - [MarshalAs(UnmanagedType.I1)] - internal bool SystemS2; - [MarshalAs(UnmanagedType.I1)] - internal bool SystemS3; - [MarshalAs(UnmanagedType.I1)] - internal bool SystemS4; - [MarshalAs(UnmanagedType.I1)] - internal bool SystemS5; - [MarshalAs(UnmanagedType.I1)] - internal bool HiberFilePresent; - [MarshalAs(UnmanagedType.I1)] - internal bool FullWake; - [MarshalAs(UnmanagedType.I1)] - internal bool VideoDimPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool ApmPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool UpsPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool ThermalControl; - [MarshalAs(UnmanagedType.I1)] - internal bool ProcessorThrottle; - internal byte ProcessorMinThrottle; - internal byte ProcessorMaxThrottle; - [MarshalAs(UnmanagedType.I1)] - internal bool FastSystemS4; - internal byte spare2_1; - internal byte spare2_2; - internal byte spare2_3; - [MarshalAs(UnmanagedType.I1)] - internal bool DiskSpinDown; - internal byte spare3_1; - internal byte spare3_2; - internal byte spare3_3; - internal byte spare3_4; - internal byte spare3_5; - internal byte spare3_6; - internal byte spare3_7; - internal byte spare3_8; - [MarshalAs(UnmanagedType.I1)] - internal bool SystemBatteriesPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool BatteriesAreShortTerm; - internal int granularity; - internal int capacity; - } - - [StructLayout(LayoutKind.Sequential)] - internal struct SystemBatteryState - { - [MarshalAs(UnmanagedType.I1)] - internal bool AcOnLine; - [MarshalAs(UnmanagedType.I1)] - internal bool BatteryPresent; - [MarshalAs(UnmanagedType.I1)] - internal bool Charging; - [MarshalAs(UnmanagedType.I1)] - internal bool Discharging; - internal byte spare1; - internal byte spare2; - internal byte spare3; - internal byte spare4; - internal uint MaxCapacity; - internal uint RemainingCapacity; - internal uint Rate; - internal uint EstimatedTime; - internal uint DefaultAlert1; - internal uint DefaultAlert2; - } - [DllImport("powrprof.dll", SetLastError = true)] - internal static extern UInt32 CallNtPowerInformation( - Int32 InformationLevel, - IntPtr lpInputBuffer, - UInt32 nInputBufferSize, - IntPtr lpOutputBuffer, - UInt32 nOutputBufferSize - ); - - [DllImport("User32", SetLastError = true, - EntryPoint = "RegisterPowerSettingNotification", - CallingConvention = CallingConvention.StdCall)] - internal static extern int RegisterPowerSettingNotification( - IntPtr hRecipient, - ref Guid PowerSettingGuid, - Int32 Flags); - - [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] - internal static extern ExecutionState SetThreadExecutionState(ExecutionState esFlags); - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialog.cs b/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialog.cs deleted file mode 100644 index ac1d700..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialog.cs +++ /dev/null @@ -1,606 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Encapsulates the native logic required to create, - /// configure, and show a TaskDialog, - /// via the TaskDialogIndirect() Win32 function. - /// - /// A new instance of this class should - /// be created for each messagebox show, as - /// the HWNDs for TaskDialogs do not remain constant - /// across calls to TaskDialogIndirect. - /// - internal class NativeTaskDialog : IDisposable - { - private TaskDialogNativeMethods.TASKDIALOGCONFIG nativeDialogConfig; - private NativeTaskDialogSettings settings; - private IntPtr hWndDialog; - private TaskDialog outerDialog; - - private IntPtr[] updatedStrings = new IntPtr[Enum.GetNames(typeof(TaskDialogNativeMethods.TASKDIALOG_ELEMENTS)).Length]; - private IntPtr buttonArray, radioButtonArray; - - // Flag tracks whether our first radio - // button click event has come through. - private bool firstRadioButtonClicked = true; - - #region Constructors - - // Configuration is applied at dialog creation time. - internal NativeTaskDialog( - NativeTaskDialogSettings settings, - TaskDialog outerDialog) - { - nativeDialogConfig = settings.NativeConfiguration; - this.settings = settings; - - // Wireup dialog proc message loop for this instance. - nativeDialogConfig.pfCallback = - new TaskDialogNativeMethods.PFTASKDIALOGCALLBACK(DialogProc); - - // Keep a reference to the outer shell, so we can notify. - this.outerDialog = outerDialog; - } - - #endregion - - #region Public Properties - - private DialogShowState showState = - DialogShowState.PreShow; - - public DialogShowState ShowState - { - get { return showState; } - } - - private int selectedButtonID; - internal int SelectedButtonID - { - get { return selectedButtonID; } - } - - private int selectedRadioButtonID; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal int SelectedRadioButtonID - { - get { return selectedRadioButtonID; } - } - - private bool checkBoxChecked; - internal bool CheckBoxChecked - { - get { return checkBoxChecked; } - } - - #endregion - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)", - Justification = "We are not currently handling globalization or localization")] - internal void NativeShow() - { - // Applies config struct and other settings, then - // calls main Win32 function. - if (settings == null) - throw new InvalidOperationException( - "An error has occurred in dialog configuration."); - - // Do a last-minute parse of the various dialog control lists, - // and only allocate the memory at the last minute. - - MarshalDialogControlStructs(); - // Make the call and show the dialog. - // NOTE: this call is BLOCKING, though the thread - // WILL re-enter via the DialogProc. - try - { - showState = DialogShowState.Showing; - - // Here is the way we use "vanilla" P/Invoke to call - // TaskDialogIndirect(). - HRESULT hresult = TaskDialogNativeMethods.TaskDialogIndirect( - nativeDialogConfig, - out selectedButtonID, - out selectedRadioButtonID, - out checkBoxChecked); - - if (CoreErrorHelper.Failed(hresult)) - { - string msg; - switch (hresult) - { - case HRESULT.E_INVALIDARG: - msg = "Invalid arguments to Win32 call."; - break; - case HRESULT.E_OUTOFMEMORY: - msg = "Dialog contents too complex."; - break; - default: - msg = String.Format( - - "An unexpected internal error occurred in the Win32 call:{0:x}", - hresult); - break; - } - Exception e = Marshal.GetExceptionForHR((int)hresult); - throw new Win32Exception(msg, e); - } - } - catch (EntryPointNotFoundException) - { - throw new NotSupportedException("TaskDialog feature needs to load version 6 of comctl32.dll but a different version is current loaded in memory."); - } - finally - { - showState = DialogShowState.Closed; - } - } - - // The new task dialog does not support the existing - // Win32 functions for closing (e.g. EndDialog()); instead, - // a "click button" message is sent. In this case, we're - // abstracting out to say that the TaskDialog consumer can - // simply call "Close" and we'll "click" the cancel button. - // Note that the cancel button doesn't actually - // have to exist for this to work. - internal void NativeClose(TaskDialogResult result) - { - showState = DialogShowState.Closing; - - int id = (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDCANCEL; - - if(result == TaskDialogResult.Close) - id = (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDCLOSE; - else if(result == TaskDialogResult.CustomButtonClicked) - id = DialogsDefaults.MinimumDialogControlId; // custom buttons - else if(result == TaskDialogResult.No) - id = (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDNO; - else if(result == TaskDialogResult.Ok) - id = (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDOK; - else if(result == TaskDialogResult.Retry) - id = (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDRETRY; - else if(result == TaskDialogResult.Yes) - id = (int)TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_RETURN_ID.IDYES; - - SendMessageHelper(TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_CLICK_BUTTON, id, 0); - } - - #region Main Dialog Proc - - private int DialogProc( - IntPtr hwnd, - uint msg, - IntPtr wParam, - IntPtr lParam, - IntPtr lpRefData) - { - // Fetch the HWND - it may be the first time we're getting it. - hWndDialog = hwnd; - - // Big switch on the various notifications the - // dialog proc can get. - switch ((TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS)msg) - { - case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_CREATED: - int result = PerformDialogInitialization(); - outerDialog.RaiseOpenedEvent(); - return result; - case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_BUTTON_CLICKED: - return HandleButtonClick((int)wParam); - case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_RADIO_BUTTON_CLICKED: - return HandleRadioButtonClick((int)wParam); - case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_HYPERLINK_CLICKED: - return HandleHyperlinkClick(lParam); - case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_HELP: - return HandleHelpInvocation(); - case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_TIMER: - return HandleTick((int)wParam); - case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_DESTROYED: - return PerformDialogCleanup(); - default: - break; - } - return (int)HRESULT.S_OK; - } - - - // Once the task dialog HWND is open, we need to send - // additional messages to configure it. - private int PerformDialogInitialization() - { - // Initialize Progress or Marquee Bar. - if (IsOptionSet(TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_SHOW_PROGRESS_BAR)) - { - UpdateProgressBarRange(); - - // The order of the following is important - - // state is more important than value, - // and non-normal states turn off the bar value change - // animation, which is likely the intended - // and preferable behavior. - UpdateProgressBarState(settings.ProgressBarState); - UpdateProgressBarValue(settings.ProgressBarValue); - - // Due to a bug that wasn't fixed in time for RTM of Vista, - // second SendMessage is required if the state is non-Normal. - UpdateProgressBarValue(settings.ProgressBarValue); - } - else if (IsOptionSet(TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_SHOW_MARQUEE_PROGRESS_BAR)) - { - // TDM_SET_PROGRESS_BAR_MARQUEE is necessary - // to cause the marquee to start animating. - // Note that this internal task dialog setting is - // round-tripped when the marquee is - // is set to different states, so it never has to - // be touched/sent again. - SendMessageHelper(TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_SET_PROGRESS_BAR_MARQUEE, 1, 0); - UpdateProgressBarState(settings.ProgressBarState); - } - - if (settings.ElevatedButtons != null && settings.ElevatedButtons.Count > 0) - { - foreach (int id in settings.ElevatedButtons) - { - UpdateElevationIcon(id, true); - } - } - - return CoreErrorHelper.IGNORED; - } - - private int HandleButtonClick(int id) - { - // First we raise a Click event, if there is a custom button - // However, we implement Close() by sending a cancel button, so - // we don't want to raise a click event in response to that. - if (showState != DialogShowState.Closing) - outerDialog.RaiseButtonClickEvent(id); - - // Once that returns, we raise a Closing event for the dialog - // The Win32 API handles button clicking-and-closing - // as an atomic action, - // but it is more .NET friendly to split them up. - // Unfortunately, we do NOT have the return values at this stage. - if(id <= 9) - return outerDialog.RaiseClosingEvent(id); - else - return 1; - } - - private int HandleRadioButtonClick(int id) - { - // When the dialog sets the radio button to default, - // it (somewhat confusingly)issues a radio button clicked event - // - we mask that out - though ONLY if - // we do have a default radio button - if (firstRadioButtonClicked && !IsOptionSet(TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_NO_DEFAULT_RADIO_BUTTON)) - firstRadioButtonClicked = false; - else - { - outerDialog.RaiseButtonClickEvent(id); - } - - // Note: we don't raise Closing, as radio - // buttons are non-committing buttons - return CoreErrorHelper.IGNORED; - } - - private int HandleHyperlinkClick(IntPtr pszHREF) - { - string link = Marshal.PtrToStringUni(pszHREF); - outerDialog.RaiseHyperlinkClickEvent(link); - - return CoreErrorHelper.IGNORED; - } - - - private int HandleTick(int ticks) - { - outerDialog.RaiseTickEvent(ticks); - return CoreErrorHelper.IGNORED; - } - - private int HandleHelpInvocation() - { - outerDialog.RaiseHelpInvokedEvent(); - return CoreErrorHelper.IGNORED; - } - - // There should be little we need to do here, - // as the use of the NativeTaskDialog is - // that it is instantiated for a single show, then disposed of. - private int PerformDialogCleanup() - { - firstRadioButtonClicked = true; - - return CoreErrorHelper.IGNORED; - } - - #endregion - - #region Update members - - internal void UpdateProgressBarValue(int i) - { - AssertCurrentlyShowing(); - SendMessageHelper(TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_SET_PROGRESS_BAR_POS, i, 0); - } - - internal void UpdateProgressBarRange() - { - AssertCurrentlyShowing(); - - // Build range LPARAM - note it is in REVERSE intuitive order. - long range = NativeTaskDialog.MakeLongLParam( - settings.ProgressBarMaximum, - settings.ProgressBarMinimum); - - SendMessageHelper(TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_SET_PROGRESS_BAR_RANGE, 0, range); - } - - internal void UpdateProgressBarState(TaskDialogProgressBarState state) - { - AssertCurrentlyShowing(); - SendMessageHelper(TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_SET_PROGRESS_BAR_STATE, (int)state, 0); - } - - internal void UpdateText(string text) - { - UpdateTextCore(text, TaskDialogNativeMethods.TASKDIALOG_ELEMENTS.TDE_CONTENT); - } - - internal void UpdateInstruction(string instruction) - { - UpdateTextCore(instruction, TaskDialogNativeMethods.TASKDIALOG_ELEMENTS.TDE_MAIN_INSTRUCTION); - } - - internal void UpdateFooterText(string footerText) - { - UpdateTextCore(footerText, TaskDialogNativeMethods.TASKDIALOG_ELEMENTS.TDE_FOOTER); - } - - internal void UpdateExpandedText(string expandedText) - { - UpdateTextCore(expandedText, TaskDialogNativeMethods.TASKDIALOG_ELEMENTS.TDE_EXPANDED_INFORMATION); - } - - private void UpdateTextCore(string s, TaskDialogNativeMethods.TASKDIALOG_ELEMENTS element) - { - AssertCurrentlyShowing(); - - FreeOldString(element); - SendMessageHelper( - TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_SET_ELEMENT_TEXT, - (int)element, - (long)MakeNewString(s, element)); - } - - internal void UpdateMainIcon(TaskDialogStandardIcon mainIcon) - { - UpdateIconCore(mainIcon, TaskDialogNativeMethods.TASKDIALOG_ICON_ELEMENT.TDIE_ICON_MAIN); - } - - internal void UpdateFooterIcon(TaskDialogStandardIcon footerIcon) - { - UpdateIconCore(footerIcon, TaskDialogNativeMethods.TASKDIALOG_ICON_ELEMENT.TDIE_ICON_FOOTER); - } - - private void UpdateIconCore(TaskDialogStandardIcon icon, TaskDialogNativeMethods.TASKDIALOG_ICON_ELEMENT element) - { - AssertCurrentlyShowing(); - SendMessageHelper( - TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_UPDATE_ICON, - (int)element, - (long)icon); - } - - internal void UpdateCheckBoxChecked(bool cbc) - { - AssertCurrentlyShowing(); - SendMessageHelper( - TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_CLICK_VERIFICATION, - (cbc ? 1 : 0), - 1); - } - - internal void UpdateElevationIcon(int buttonId, bool showIcon) - { - AssertCurrentlyShowing(); - SendMessageHelper( - TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE, - buttonId, - Convert.ToInt32(showIcon)); - } - - internal void UpdateButtonEnabled(int buttonID, bool enabled) - { - AssertCurrentlyShowing(); - SendMessageHelper( - TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_ENABLE_BUTTON, buttonID, enabled == true ? 1 : 0); - } - internal void UpdateRadioButtonEnabled(int buttonID, bool enabled) - { - AssertCurrentlyShowing(); - SendMessageHelper( - TaskDialogNativeMethods.TASKDIALOG_MESSAGES.TDM_ENABLE_RADIO_BUTTON, buttonID, enabled == true? 1 : 0); - } - - internal void AssertCurrentlyShowing() - { - Debug.Assert(showState == DialogShowState.Showing, "Update*() methods should only be called while native dialog is showing"); - } - - #endregion - - #region Helpers - - private int SendMessageHelper(TaskDialogNativeMethods.TASKDIALOG_MESSAGES msg, int wParam, long lParam) - { - // Be sure to at least assert here - - // messages to invalid handles often just disappear silently - Debug.Assert(hWndDialog != null, - "HWND for dialog is null during SendMessage"); - - return (int)CoreNativeMethods.SendMessage( - hWndDialog, - (uint)msg, - (IntPtr)wParam, - new IntPtr(lParam)); - } - - private bool IsOptionSet(TaskDialogNativeMethods.TASKDIALOG_FLAGS flag) - { - return ((nativeDialogConfig.dwFlags & flag) == flag); - } - - // Allocates a new string on the unmanaged heap, - // and stores the pointer so we can free it later. - - private IntPtr MakeNewString(string s, - TaskDialogNativeMethods.TASKDIALOG_ELEMENTS element) - { - IntPtr newStringPtr = Marshal.StringToHGlobalUni(s); - updatedStrings[(int)element] = newStringPtr; - return newStringPtr; - } - - // Checks to see if the given element already has an - // updated string, and if so, - // frees it. This is done in preparation for a call to - // MakeNewString(), to prevent - // leaks from multiple updates calls on the same element - // within a single native dialog lifetime. - - private void FreeOldString(TaskDialogNativeMethods.TASKDIALOG_ELEMENTS element) - { - int elementIndex = (int)element; - if (updatedStrings[elementIndex] != IntPtr.Zero) - { - Marshal.FreeHGlobal(updatedStrings[elementIndex]); - updatedStrings[elementIndex] = IntPtr.Zero; - } - } - - // Based on the following defines in WinDef.h and WinUser.h: - // #define MAKELPARAM(l, h) ((LPARAM)(DWORD)MAKELONG(l, h)) - // #define MAKELONG(a, b) ((LONG)(((WORD)(((DWORD_PTR)(a)) & 0xffff)) | ((DWORD)((WORD)(((DWORD_PTR)(b)) & 0xffff))) << 16)) - private static long MakeLongLParam(int a, int b) - { - return (a << 16) + b; - } - - // Builds the actual configuration that the - // NativeTaskDialog (and underlying Win32 API) - // expects, by parsing the various control lists, - // marshaling to the unmanaged heap, etc. - - private void MarshalDialogControlStructs() - { - if (settings.Buttons != null && settings.Buttons.Length > 0) - { - buttonArray = AllocateAndMarshalButtons(settings.Buttons); - settings.NativeConfiguration.pButtons = buttonArray; - settings.NativeConfiguration.cButtons = (uint)settings.Buttons.Length; - } - if (settings.RadioButtons != null && settings.RadioButtons.Length > 0) - { - radioButtonArray = AllocateAndMarshalButtons(settings.RadioButtons); - settings.NativeConfiguration.pRadioButtons = radioButtonArray; - settings.NativeConfiguration.cRadioButtons = (uint)settings.RadioButtons.Length; - } - } - - private static IntPtr AllocateAndMarshalButtons(TaskDialogNativeMethods.TASKDIALOG_BUTTON[] structs) - { - IntPtr initialPtr = Marshal.AllocHGlobal( - Marshal.SizeOf(typeof(TaskDialogNativeMethods.TASKDIALOG_BUTTON)) * structs.Length); - - IntPtr currentPtr = initialPtr; - foreach (TaskDialogNativeMethods.TASKDIALOG_BUTTON button in structs) - { - Marshal.StructureToPtr(button, currentPtr, false); - currentPtr = (IntPtr)((int)currentPtr + Marshal.SizeOf(button)); - } - - return initialPtr; - } - - #endregion - - #region IDispose Pattern - - private bool disposed; - - // Finalizer and IDisposable implementation. - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - ~NativeTaskDialog() - { - Dispose(false); - } - - // Core disposing logic. - protected void Dispose(bool disposing) - { - if (!disposed) - { - disposed = true; - - // Single biggest resource - make sure the dialog - // itself has been instructed to close. - - if (showState == DialogShowState.Showing) - NativeClose(TaskDialogResult.Cancel); - - // Clean up custom allocated strings that were updated - // while the dialog was showing. Note that the strings - // passed in the initial TaskDialogIndirect call will - // be cleaned up automagically by the default - // marshalling logic. - - if (updatedStrings != null) - { - for (int i = 0; i < updatedStrings.Length; i++) - { - if (updatedStrings[i] != IntPtr.Zero) - { - Marshal.FreeHGlobal(updatedStrings[i]); - updatedStrings[i] = IntPtr.Zero; - } - } - } - - // Clean up the button and radio button arrays, if any. - if (buttonArray != IntPtr.Zero) - { - Marshal.FreeHGlobal(buttonArray); - buttonArray = IntPtr.Zero; - } - if (radioButtonArray != IntPtr.Zero) - { - Marshal.FreeHGlobal(radioButtonArray); - radioButtonArray = IntPtr.Zero; - } - - if (disposing) - { - // Clean up managed resources - currently there are none - // that are interesting. - } - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialogSettings.cs b/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialogSettings.cs deleted file mode 100644 index 36134e2..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/NativeTaskDialogSettings.cs +++ /dev/null @@ -1,111 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Encapsulates additional configuration needed by NativeTaskDialog - /// that it can't get from the TASKDIALOGCONFIG struct. - /// - internal class NativeTaskDialogSettings - { - internal NativeTaskDialogSettings() - { - nativeConfiguration = new TaskDialogNativeMethods.TASKDIALOGCONFIG(); - - // Apply standard settings. - nativeConfiguration.cbSize = (uint)Marshal.SizeOf(nativeConfiguration); - nativeConfiguration.hwndParent = IntPtr.Zero; - nativeConfiguration.hInstance = IntPtr.Zero; - nativeConfiguration.dwFlags = TaskDialogNativeMethods.TASKDIALOG_FLAGS.TDF_ALLOW_DIALOG_CANCELLATION; - nativeConfiguration.dwCommonButtons = TaskDialogNativeMethods.TASKDIALOG_COMMON_BUTTON_FLAGS.TDCBF_OK_BUTTON; - nativeConfiguration.MainIcon = new TaskDialogNativeMethods.TASKDIALOGCONFIG_ICON_UNION(0); - nativeConfiguration.FooterIcon = new TaskDialogNativeMethods.TASKDIALOGCONFIG_ICON_UNION(0); - nativeConfiguration.cxWidth = TaskDialogDefaults.IdealWidth; - - // Zero out all the custom button fields. - nativeConfiguration.cButtons = 0; - nativeConfiguration.cRadioButtons = 0; - nativeConfiguration.pButtons = IntPtr.Zero; - nativeConfiguration.pRadioButtons = IntPtr.Zero; - nativeConfiguration.nDefaultButton = 0; - nativeConfiguration.nDefaultRadioButton = 0; - - // Various text defaults. - nativeConfiguration.pszWindowTitle = TaskDialogDefaults.Caption; - nativeConfiguration.pszMainInstruction = TaskDialogDefaults.MainInstruction; - nativeConfiguration.pszContent = TaskDialogDefaults.Content; - nativeConfiguration.pszVerificationText = null; - nativeConfiguration.pszExpandedInformation = null; - nativeConfiguration.pszExpandedControlText = null; - nativeConfiguration.pszCollapsedControlText = null; - nativeConfiguration.pszFooter = null; - } - - private int progressBarMinimum; - public int ProgressBarMinimum - { - get { return progressBarMinimum; } - set { progressBarMinimum = value; } - } - - private int progressBarMaximum; - public int ProgressBarMaximum - { - get { return progressBarMaximum; } - set { progressBarMaximum = value; } - } - - private int progressBarValue; - public int ProgressBarValue - { - get { return progressBarValue; } - set { this.progressBarValue = value; } - } - - private TaskDialogProgressBarState progressBarState; - public TaskDialogProgressBarState ProgressBarState - { - get { return progressBarState; } - set { progressBarState = value; } - } - - private bool invokeHelp; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - public bool InvokeHelp - { - get { return invokeHelp; } - set { invokeHelp = value; } - } - - private TaskDialogNativeMethods.TASKDIALOGCONFIG nativeConfiguration; - public TaskDialogNativeMethods.TASKDIALOGCONFIG NativeConfiguration - { - get { return nativeConfiguration; } - } - - private TaskDialogNativeMethods.TASKDIALOG_BUTTON[] buttons; - public TaskDialogNativeMethods.TASKDIALOG_BUTTON[] Buttons - { - get { return buttons; } - set { buttons = value; } - } - - private TaskDialogNativeMethods.TASKDIALOG_BUTTON[] radioButtons; - public TaskDialogNativeMethods.TASKDIALOG_BUTTON[] RadioButtons - { - get { return radioButtons; } - set { radioButtons = value; } - } - - private List elevatedButtons; - public List ElevatedButtons - { - get { return elevatedButtons; } - set { elevatedButtons = value; } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/TaskDialogNativeMethods.cs b/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/TaskDialogNativeMethods.cs deleted file mode 100644 index 70d8685..0000000 --- a/src/External/WindowsAPICodePack/Core/Interop/TaskDialogs/TaskDialogNativeMethods.cs +++ /dev/null @@ -1,235 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - - /// - /// Internal class containing most native interop declarations used - /// throughout the library. - /// Functions that are not performance intensive belong in this class. - /// - - internal static class TaskDialogNativeMethods - { - #region TaskDialog Definitions - - [DllImport(CommonDllNames.ComCtl32, CharSet = CharSet.Auto, - SetLastError = true)] - internal static extern HRESULT TaskDialogIndirect( - [In] TaskDialogNativeMethods.TASKDIALOGCONFIG pTaskConfig, - [Out] out int pnButton, - [Out] out int pnRadioButton, - [MarshalAs(UnmanagedType.Bool)][Out] out bool pVerificationFlagChecked); - - internal delegate HRESULT TDIDelegate( - [In] TaskDialogNativeMethods.TASKDIALOGCONFIG pTaskConfig, - [Out] out int pnButton, - [Out] out int pnRadioButton, - [Out] out bool pVerificationFlagChecked); - - // Main task dialog configuration struct. - // NOTE: Packing must be set to 4 to make this work on 64-bit platforms. - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 4)] - internal class TASKDIALOGCONFIG - { - internal uint cbSize; - internal IntPtr hwndParent; - internal IntPtr hInstance; - internal TASKDIALOG_FLAGS dwFlags; - internal TASKDIALOG_COMMON_BUTTON_FLAGS dwCommonButtons; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszWindowTitle; - internal TASKDIALOGCONFIG_ICON_UNION MainIcon; // NOTE: 32-bit union field, holds pszMainIcon as well - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszMainInstruction; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszContent; - internal uint cButtons; - internal IntPtr pButtons; // Ptr to TASKDIALOG_BUTTON structs - internal int nDefaultButton; - internal uint cRadioButtons; - internal IntPtr pRadioButtons; // Ptr to TASKDIALOG_BUTTON structs - internal int nDefaultRadioButton; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszVerificationText; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszExpandedInformation; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszExpandedControlText; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszCollapsedControlText; - internal TASKDIALOGCONFIG_ICON_UNION FooterIcon; // NOTE: 32-bit union field, holds pszFooterIcon as well - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszFooter; - internal PFTASKDIALOGCALLBACK pfCallback; - internal IntPtr lpCallbackData; - internal uint cxWidth; - } - - internal const int TASKDIALOG_IDEALWIDTH = 0; // Value for TASKDIALOGCONFIG.cxWidth - internal const int TASKDIALOG_BUTTON_SHIELD_ICON = 1; - - // NOTE: We include a "spacer" so that the struct size varies on - // 64-bit architectures. - [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Auto)] - internal struct TASKDIALOGCONFIG_ICON_UNION - { - internal TASKDIALOGCONFIG_ICON_UNION(int i) - { - spacer = IntPtr.Zero; - pszIcon = 0; - hMainIcon = i; - } - - [FieldOffset(0)] - internal int hMainIcon; - [FieldOffset(0)] - internal int pszIcon; - [FieldOffset(0)] - internal IntPtr spacer; - } - - // NOTE: Packing must be set to 4 to make this work on 64-bit platforms. - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto, Pack = 4)] - internal struct TASKDIALOG_BUTTON - { - public TASKDIALOG_BUTTON(int n, string txt) - { - nButtonID = n; - pszButtonText = txt; - } - - internal int nButtonID; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszButtonText; - } - - // Task Dialog - identifies common buttons. - [Flags] - internal enum TASKDIALOG_COMMON_BUTTON_FLAGS - { - TDCBF_OK_BUTTON = 0x0001, // selected control return value IDOK - TDCBF_YES_BUTTON = 0x0002, // selected control return value IDYES - TDCBF_NO_BUTTON = 0x0004, // selected control return value IDNO - TDCBF_CANCEL_BUTTON = 0x0008, // selected control return value IDCANCEL - TDCBF_RETRY_BUTTON = 0x0010, // selected control return value IDRETRY - TDCBF_CLOSE_BUTTON = 0x0020 // selected control return value IDCLOSE - } - - // Identify button *return values* - note that, unfortunately, these are different - // from the inbound button values. - internal enum TASKDIALOG_COMMON_BUTTON_RETURN_ID - { - IDOK = 1, - IDCANCEL = 2, - IDABORT = 3, - IDRETRY = 4, - IDIGNORE = 5, - IDYES = 6, - IDNO = 7, - IDCLOSE = 8 - } - - internal enum TASKDIALOG_ELEMENTS - { - TDE_CONTENT, - TDE_EXPANDED_INFORMATION, - TDE_FOOTER, - TDE_MAIN_INSTRUCTION - } - - internal enum TASKDIALOG_ICON_ELEMENT - { - TDIE_ICON_MAIN, - TDIE_ICON_FOOTER - } - - // Task Dialog - flags - [Flags] - internal enum TASKDIALOG_FLAGS - { - NONE = 0, - TDF_ENABLE_HYPERLINKS = 0x0001, - TDF_USE_HICON_MAIN = 0x0002, - TDF_USE_HICON_FOOTER = 0x0004, - TDF_ALLOW_DIALOG_CANCELLATION = 0x0008, - TDF_USE_COMMAND_LINKS = 0x0010, - TDF_USE_COMMAND_LINKS_NO_ICON = 0x0020, - TDF_EXPAND_FOOTER_AREA = 0x0040, - TDF_EXPANDED_BY_DEFAULT = 0x0080, - TDF_VERIFICATION_FLAG_CHECKED = 0x0100, - TDF_SHOW_PROGRESS_BAR = 0x0200, - TDF_SHOW_MARQUEE_PROGRESS_BAR = 0x0400, - TDF_CALLBACK_TIMER = 0x0800, - TDF_POSITION_RELATIVE_TO_WINDOW = 0x1000, - TDF_RTL_LAYOUT = 0x2000, - TDF_NO_DEFAULT_RADIO_BUTTON = 0x4000 - } - - internal enum TASKDIALOG_MESSAGES - { - TDM_NAVIGATE_PAGE = CoreNativeMethods.WM_USER + 101, - TDM_CLICK_BUTTON = CoreNativeMethods.WM_USER + 102, // wParam = Button ID - TDM_SET_MARQUEE_PROGRESS_BAR = CoreNativeMethods.WM_USER + 103, // wParam = 0 (nonMarque) wParam != 0 (Marquee) - TDM_SET_PROGRESS_BAR_STATE = CoreNativeMethods.WM_USER + 104, // wParam = new progress state - TDM_SET_PROGRESS_BAR_RANGE = CoreNativeMethods.WM_USER + 105, // lParam = MAKELPARAM(nMinRange, nMaxRange) - TDM_SET_PROGRESS_BAR_POS = CoreNativeMethods.WM_USER + 106, // wParam = new position - TDM_SET_PROGRESS_BAR_MARQUEE = CoreNativeMethods.WM_USER + 107, // wParam = 0 (stop marquee), wParam != 0 (start marquee), lparam = speed (milliseconds between repaints) - TDM_SET_ELEMENT_TEXT = CoreNativeMethods.WM_USER + 108, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) - TDM_CLICK_RADIO_BUTTON = CoreNativeMethods.WM_USER + 110, // wParam = Radio Button ID - TDM_ENABLE_BUTTON = CoreNativeMethods.WM_USER + 111, // lParam = 0 (disable), lParam != 0 (enable), wParam = Button ID - TDM_ENABLE_RADIO_BUTTON = CoreNativeMethods.WM_USER + 112, // lParam = 0 (disable), lParam != 0 (enable), wParam = Radio Button ID - TDM_CLICK_VERIFICATION = CoreNativeMethods.WM_USER + 113, // wParam = 0 (unchecked), 1 (checked), lParam = 1 (set key focus) - TDM_UPDATE_ELEMENT_TEXT = CoreNativeMethods.WM_USER + 114, // wParam = element (TASKDIALOG_ELEMENTS), lParam = new element text (LPCWSTR) - TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE = CoreNativeMethods.WM_USER + 115, // wParam = Button ID, lParam = 0 (elevation not required), lParam != 0 (elevation required) - TDM_UPDATE_ICON = CoreNativeMethods.WM_USER + 116 // wParam = icon element (TASKDIALOG_ICON_ELEMENTS), lParam = new icon (hIcon if TDF_USE_HICON_* was set, PCWSTR otherwise) - } - - internal enum TASKDIALOG_NOTIFICATIONS - { - TDN_CREATED = 0, - TDN_NAVIGATED = 1, - TDN_BUTTON_CLICKED = 2, // wParam = Button ID - TDN_HYPERLINK_CLICKED = 3, // lParam = (LPCWSTR)pszHREF - TDN_TIMER = 4, // wParam = Milliseconds since dialog created or timer reset - TDN_DESTROYED = 5, - TDN_RADIO_BUTTON_CLICKED = 6, // wParam = Radio Button ID - TDN_DIALOG_CONSTRUCTED = 7, - TDN_VERIFICATION_CLICKED = 8, // wParam = 1 if checkbox checked, 0 if not, lParam is unused and always 0 - TDN_HELP = 9, - TDN_EXPANDO_BUTTON_CLICKED = 10 // wParam = 0 (dialog is now collapsed), wParam != 0 (dialog is now expanded) - } - - // Used in the various SET_DEFAULT* TaskDialog messages - internal const int NO_DEFAULT_BUTTON_SPECIFIED = 0; - - // Task Dialog config and related structs (for TaskDialogIndirect()) - internal delegate int PFTASKDIALOGCALLBACK( - IntPtr hwnd, - uint msg, - IntPtr wParam, - IntPtr lParam, - IntPtr lpRefData); - - internal enum PBST - { - PBST_NORMAL = 0x0001, - PBST_ERROR = 0x0002, - PBST_PAUSED = 0x0003 - } - - internal enum TD_ICON - { - TD_WARNING_ICON = 65535, - TD_ERROR_ICON = 65534, - TD_INFORMATION_ICON = 65533, - TD_SHIELD_ICON = 65532 - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Core/Migrated rules for Core.ruleset b/src/External/WindowsAPICodePack/Core/Migrated rules for Core.ruleset deleted file mode 100644 index 8f335b7..0000000 --- a/src/External/WindowsAPICodePack/Core/Migrated rules for Core.ruleset +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/NetworkList/Network.cs b/src/External/WindowsAPICodePack/Core/NetworkList/Network.cs deleted file mode 100644 index 79bf369..0000000 --- a/src/External/WindowsAPICodePack/Core/NetworkList/Network.cs +++ /dev/null @@ -1,201 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Net -{ - /// - /// Represents a network on the local machine. - /// It can also represent a collection of network - /// connections with a similar network signature. - /// - /// - /// Instances of this class are obtained by calling - /// methods on the class. - /// - public class Network - { - #region Private Fields - - INetwork network; - - #endregion // Private Fields - - internal Network(INetwork network) - { - this.network = network; - } - - /// - /// Gets or sets the category of a network. The - /// categories are trusted, untrusted, or - /// authenticated. - /// - /// A value. - public NetworkCategory Category - { - get - { - return network.GetCategory(); - } - - set - { - network.SetCategory(value); - } - } - - /// - /// Gets the local date and time when the network - /// was connected. - /// - /// A object. - public DateTime ConnectedTime - { - get - { - uint low, high, dummy1, dummy2; - network.GetTimeCreatedAndConnected(out dummy1, out dummy2, out low, out high); - long time = high; - // Shift the day info into the high order bits. - time <<= 32; - time |= low; - return DateTime.FromFileTimeUtc(time); - } - } - - /// - /// Gets the network connections for the network. - /// - /// A object. - public NetworkConnectionCollection Connections - { - get - { - return new NetworkConnectionCollection(network.GetNetworkConnections()); - } - } - - /// - /// Gets the connectivity state of the network. - /// - /// A value. - /// Connectivity provides information on whether - /// the network is connected, and the protocols - /// in use for network traffic. - public Connectivity Connectivity - { - get - { - return network.GetConnectivity(); - } - } - - /// - /// Gets the local date and time when the - /// network was created. - /// - /// A object. - public DateTime CreatedTime - { - get - { - uint low, high, dummy1, dummy2; - network.GetTimeCreatedAndConnected(out low, out high, out dummy1, out dummy2); - long time = high; - //Shift the value into the high order bits. - time <<= 32; - time |= low; - return DateTime.FromFileTimeUtc(time); - } - } - - /// - /// Gets or sets a description for the network. - /// - /// A value. - public string Description - { - get - { - return network.GetDescription(); - } - - set - { - network.SetDescription(value); - } - } - - /// - /// Gets the domain type of the network. - /// - /// A value. - /// The domain - /// indictates whether the network is an Active - /// Directory Network, and whether the machine - /// has been authenticated by Active Directory. - public DomainType DomainType - { - get - { - return network.GetDomainType(); - } - } - - /// - /// Gets a value that indicates whether there is - /// network connectivity. - /// - /// A value. - public bool IsConnected - { - get - { - return network.IsConnected; - } - } - - /// - /// Gets a value that indicates whether there is - /// Internet connectivity. - /// - /// A value. - public bool IsConnectedToInternet - { - get - { - return network.IsConnectedToInternet; - } - } - - /// - /// Gets or sets the name of the network. - /// - /// A value. - public string Name - { - get - { - return network.GetName(); - } - - set - { - network.SetName(value); - } - } - - /// - /// Gets a unique identifier for the network. - /// - /// A value. - public Guid NetworkId - { - get - { - return network.GetNetworkId(); - } - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkCollection.cs b/src/External/WindowsAPICodePack/Core/NetworkList/NetworkCollection.cs deleted file mode 100644 index dc079a0..0000000 --- a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkCollection.cs +++ /dev/null @@ -1,60 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Net -{ - /// - /// An enumerable collection of objects. - /// - public class NetworkCollection : IEnumerable - { - #region Private Fields - - IEnumerable networkEnumerable; - - #endregion // Private Fields - - internal NetworkCollection(IEnumerable networkEnumerable) - { - this.networkEnumerable = networkEnumerable; - } - - #region IEnumerable Members - - /// - /// Returns the strongly typed enumerator for this collection. - /// - /// An object. - public IEnumerator GetEnumerator() - { - foreach (INetwork network in networkEnumerable) - { - yield return new Network(network); - } - } - - #endregion - - #region IEnumerable Members - - /// - /// Returns the enumerator for this collection. - /// - ///An object. - IEnumerator IEnumerable.GetEnumerator() - { - foreach (INetwork network in networkEnumerable) - { - yield return new Network(network); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnection.cs b/src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnection.cs deleted file mode 100644 index f21027b..0000000 --- a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnection.cs +++ /dev/null @@ -1,115 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Net -{ - /// - /// Represents a connection to a network. - /// - /// A collection containing instances of this class is obtained by calling - /// the property. - public class NetworkConnection - { - #region Private Fields - - INetworkConnection networkConnection; - - #endregion // Private Fields - - internal NetworkConnection(INetworkConnection networkConnection) - { - this.networkConnection = networkConnection; - } - - /// - /// Retrieves an object that represents the network - /// associated with this connection. - /// - /// A object. - public Network Network - { - get - { - return new Network(networkConnection.GetNetwork()); - } - } - - /// - /// Gets the adapter identifier for this connection. - /// - /// A object. - public Guid AdapterId - { - get - { - return networkConnection.GetAdapterId(); - } - } - /// - /// Gets the unique identifier for this connection. - /// - /// A object. - public Guid ConnectionId - { - get - { - return networkConnection.GetConnectionId(); - } - } - /// - /// Gets a value that indicates the connectivity of this connection. - /// - /// A value. - public Connectivity Connectivity - { - get - { - return networkConnection.GetConnectivity(); - } - } - - /// - /// Gets a value that indicates whether the network associated - /// with this connection is - /// an Active Directory network and whether the machine - /// has been authenticated by Active Directory. - /// - /// A value. - public DomainType DomainType - { - get - { - return networkConnection.GetDomainType(); - } - } - /// - /// Gets a value that indicates whether this - /// connection has Internet access. - /// - /// A value. - public bool IsConnectedToInternet - { - get - { - return networkConnection.IsConnectedToInternet; - } - } - - /// - /// Gets a value that indicates whether this connection has - /// network connectivity. - /// - /// A value. - public bool IsConnected - { - get - { - return networkConnection.IsConnected; - } - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnectionCollection.cs b/src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnectionCollection.cs deleted file mode 100644 index 4618e36..0000000 --- a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkConnectionCollection.cs +++ /dev/null @@ -1,60 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Net -{ - /// - /// An enumerable collection of objects. - /// - public class NetworkConnectionCollection : IEnumerable - { - #region Private Fields - - IEnumerable networkConnectionEnumerable; - - #endregion // Private Fields - - internal NetworkConnectionCollection(IEnumerable networkConnectionEnumerable) - { - this.networkConnectionEnumerable = networkConnectionEnumerable; - } - - #region IEnumerable Members - - /// - /// Returns the strongly typed enumerator for this collection. - /// - /// A object. - public IEnumerator GetEnumerator() - { - foreach (INetworkConnection networkConnection in networkConnectionEnumerable) - { - yield return new NetworkConnection(networkConnection); - } - } - - #endregion - - #region IEnumerable Members - - /// - /// Returns the enumerator for this collection. - /// - ///A object. - IEnumerator IEnumerable.GetEnumerator() - { - foreach (INetworkConnection networkConnection in networkConnectionEnumerable) - { - yield return new NetworkConnection(networkConnection); - } - } - - #endregion - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkListEnums.cs b/src/External/WindowsAPICodePack/Core/NetworkList/NetworkListEnums.cs deleted file mode 100644 index 9cda7cb..0000000 --- a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkListEnums.cs +++ /dev/null @@ -1,132 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -namespace Microsoft.WindowsAPICodePack.Net -{ - /// - /// Specifies types of network connectivity. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Justification = "Same name as the native API"), Flags] - public enum Connectivity - { - /// - /// The underlying network interfaces have no - /// connectivity to any network. - /// - Disconnected = 0, - /// - /// There is connectivity to the Internet - /// using the IPv4 protocol. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv4Internet = 0x40, - /// - /// There is connectivity to a routed network - /// using the IPv4 protocol. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv4LocalNetwork = 0x20, - /// - /// There is connectivity to a network, but - /// the service cannot detect any IPv4 - /// network traffic. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv4NoTraffic = 1, - /// - /// There is connectivity to the local - /// subnet using the IPv4 protocol. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv4Subnet = 0x10, - /// - /// There is connectivity to the Internet - /// using the IPv4 protocol. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv6Internet = 0x400, - /// - /// There is connectivity to a local - /// network using the IPv6 protocol. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv6LocalNetwork = 0x200, - /// - /// There is connectivity to a network, - /// but the service cannot detect any - /// IPv6 network traffic - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv6NoTraffic = 2, - /// - /// There is connectivity to the local - /// subnet using the IPv6 protocol. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Pv")] - IPv6Subnet = 0x100 - } - - /// - /// Specifies the domain type of a network. - /// - public enum DomainType - { - /// - /// The network is not an Active Directory network. - /// - NonDomainNetwork = 0, - /// - /// The network is an Active Directory network, but this machine is not authenticated against it. - /// - DomainNetwork = 1, - /// - /// The network is an Active Directory network, and this machine is authenticated against it. - /// - DomainAuthenticated = 2, - } - - /// - /// Specifies the trust level for a - /// network. - /// - public enum NetworkCategory - { - /// - /// The network is a public (untrusted) network. - /// - Public, - /// - /// The network is a private (trusted) network. - /// - Private, - /// - /// The network is authenticated against an Active Directory domain. - /// - Authenticated - } - - /// - /// Specifies the level of connectivity for - /// networks returned by the - /// - /// class. - /// - [Flags] - public enum NetworkConnectivityLevels - { - /// - /// Networks that the machine is connected to. - /// - Connected = 1, - /// - /// Networks that the machine is not connected to. - /// - Disconnected = 2, - /// - /// All networks. - /// - All = 3, - } - - -} diff --git a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkListManager.cs b/src/External/WindowsAPICodePack/Core/NetworkList/NetworkListManager.cs deleted file mode 100644 index 030e8fd..0000000 --- a/src/External/WindowsAPICodePack/Core/NetworkList/NetworkListManager.cs +++ /dev/null @@ -1,132 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Net -{ - /// - /// Provides access to objects that represent networks and network connections. - /// - public static class NetworkListManager - { - #region Private Fields - - static NetworkListManagerClass manager = new NetworkListManagerClass(); - - #endregion // Private Fields - - /// - /// Retrieves a collection of objects that represent the networks defined for this machine. - /// - /// - /// The that specify the connectivity level of the returned objects. - /// - /// - /// A of objects. - /// - public static NetworkCollection GetNetworks(NetworkConnectivityLevels level) - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - return new NetworkCollection(manager.GetNetworks(level)); - } - - /// - /// Retrieves the identified by the specified network identifier. - /// - /// - /// A that specifies the unique identifier for the network. - /// - /// - /// The that represents the network identified by the identifier. - /// - public static Network GetNetwork(Guid networkId) - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - return new Network(manager.GetNetwork(networkId)); - } - - /// - /// Retrieves a collection of objects that represent the connections for this machine. - /// - /// - /// A containing the network connections. - /// - public static NetworkConnectionCollection GetNetworkConnections() - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - return new NetworkConnectionCollection(manager.GetNetworkConnections()); - } - - /// - /// Retrieves the identified by the specified connection identifier. - /// - /// - /// A that specifies the unique identifier for the network connection. - /// - /// - /// The identified by the specified identifier. - /// - public static NetworkConnection GetNetworkConnection(Guid networkConnectionId) - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - return new NetworkConnection(manager.GetNetworkConnection(networkConnectionId)); - } - - /// - /// Gets a value that indicates whether this machine - /// has Internet connectivity. - /// - /// A value. - public static bool IsConnectedToInternet - { - get - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - return manager.IsConnectedToInternet; - } - } - - /// - /// Gets a value that indicates whether this machine - /// has network connectivity. - /// - /// A value. - public static bool IsConnected - { - get - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - return manager.IsConnected; - } - } - - /// - /// Gets the connectivity state of this machine. - /// - /// A value. - public static Connectivity Connectivity - { - get - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - return manager.GetConnectivity(); - } - } - } - -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/BatteryState.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/BatteryState.cs deleted file mode 100644 index 8684967..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/BatteryState.cs +++ /dev/null @@ -1,151 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// A snapshot of the state of the battery. - /// - public class BatteryState - { - private bool acOnline; - private int maxCharge; - private int currentCharge; - private int dischargeRate; - private TimeSpan estimatedTimeRemaining; - private int suggestedCriticalBatteryCharge; - private int suggestedBatteryWarningCharge; - - internal BatteryState() - { - PowerManagementNativeMethods.SystemBatteryState battState = Power.GetSystemBatteryState(); - acOnline = battState.AcOnLine; - maxCharge = (int)battState.MaxCapacity; - currentCharge = (int)battState.RemainingCapacity; - dischargeRate = (int)battState.Rate; - long estimatedTime = (long)battState.EstimatedTime; - int minutes = (int)(estimatedTime/60); - int seconds = (int)(estimatedTime % 60); - estimatedTimeRemaining = new TimeSpan(0, minutes, seconds); - suggestedCriticalBatteryCharge = (int)battState.DefaultAlert1; - suggestedBatteryWarningCharge = (int)battState.DefaultAlert2; - } - - #region Public properties - - /// - /// Gets a value that indicates whether the battery charger is - /// operating on external power. - /// - /// A value. True indicates the battery charger is operating on AC power. - public bool ACOnline - { - get - { - return acOnline; - } - } - - /// - /// Gets the maximum charge of the battery (in mW). - /// - /// An value. - public int MaxCharge - { - get - { - return maxCharge; - } - } - - /// - /// Gets the current charge of the battery (in mW). - /// - /// An value. - public int CurrentCharge - { - get - { - return currentCharge; - } - } - - /// - /// Gets the rate of discharge for the battery (in mW). - /// - /// - /// A negative value indicates the - /// charge rate. Not all batteries support charge rate. - /// - /// An value. - public int DischargeRate - { - get - { - return dischargeRate; - } - } - - /// - /// Gets the estimated time remaining until the battery is empty. - /// - /// A object. - public TimeSpan EstimatedTimeRemaining - { - get - { - return estimatedTimeRemaining; - } - } - - /// - /// Gets the manufacturer's suggested battery charge level - /// that should cause a critical alert to be sent to the user. - /// - /// An value. - public int SuggestedCriticalBatteryCharge - { - get - { - return suggestedCriticalBatteryCharge; - } - } - - /// - /// Gets the manufacturer's suggested battery charge level - /// that should cause a warning to be sent to the user. - /// - /// An value. - public int SuggestedBatteryWarningCharge - { - get - { - return suggestedBatteryWarningCharge; - } - } - - #endregion - - /// - /// Generates a string that represents this BatteryState object. - /// - /// A representation of this object's current state. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object[])" - , Justification = "We are not currently handling globalization or localization")] - public override string ToString() - { - return string.Format( - "ACOnline: {1}{0}Max Charge: {2} mWh{0}Current Charge: {3} mWh{0}Discharge Rate: {4} mWh{0}Estimated Time Remaining: {5}{0}Suggested Critical Battery Charge: {6} mWh{0}Suggested Battery Warning Charge: {7} mWh{0}", - Environment.NewLine, - acOnline, - maxCharge, - currentCharge, - dischargeRate, - estimatedTimeRemaining, - suggestedCriticalBatteryCharge, - suggestedBatteryWarningCharge - ); - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/EventManager.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/EventManager.cs deleted file mode 100644 index 4539e95..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/EventManager.cs +++ /dev/null @@ -1,94 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Threading; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// This class keeps track of the current state of each type of event. - /// The MessageManager class tracks event handlers. - /// This class only deals with each event type (i.e. - /// BatteryLifePercentChanged) as a whole. - /// - internal static class EventManager - { - // Prevents reading from PowerManager members while they are still null. - // MessageManager notifies the PowerManager that the member - // has been set and can be used. - internal static AutoResetEvent personalityReset = new AutoResetEvent(false); - internal static AutoResetEvent powerSrcReset = new AutoResetEvent(false); - internal static AutoResetEvent batteryLifeReset = new AutoResetEvent(false); - internal static AutoResetEvent monitorOnReset = new AutoResetEvent(false); - - #region Hardcoded GUIDS for each event - - internal static readonly Guid PowerPersonalityChange = new Guid(0x245d8541, 0x3943, 0x4422, 0xb0, 0x25, 0x13, 0xA7, 0x84, 0xF6, 0x79, 0xB7); - internal static readonly Guid PowerSourceChange = new Guid(0x5d3e9a59, 0xe9D5, 0x4b00, 0xa6, 0xbd, 0xff, 0x34, 0xff, 0x51, 0x65, 0x48); - internal static readonly Guid BatteryCapacityChange = new Guid(0xa7ad8041, 0xb45a, 0x4cae, 0x87, 0xa3, 0xee, 0xcb, 0xb4, 0x68, 0xa9, 0xe1); - internal static readonly Guid BackgroundTaskNotification = new Guid(0x515c31d8, 0xf734, 0x163d, 0xa0, 0xfd, 0x11, 0xa0, 0x8c, 0x91, 0xe8, 0xf1); - internal static readonly Guid MonitorPowerStatus = new Guid(0x02731015, 0x4510, 0x4526, 0x99, 0xe6, 0xe5, 0xa1, 0x7e, 0xbd, 0x1a, 0xea); - - #endregion - - #region private static members - - // Used to catch the initial message Windows sends when - // you first register for a power notification. - // We do not want to fire any event handlers when this happens. - private static bool personalityCaught; - private static bool powerSrcCaught; - private static bool batteryLifeCaught; - private static bool monitorOnCaught; - - #endregion - - /// - /// Determines if a message should be caught, preventing - /// the event handler from executing. - /// This is needed when an event is initially registered. - /// - /// The event to check. - /// A boolean value. Returns true if the - /// message should be caught. - internal static bool IsMessageCaught(Guid eventGuid) - { - bool isMessageCaught = false; - - if (eventGuid == EventManager.BatteryCapacityChange) - { - if (!batteryLifeCaught) - { - batteryLifeCaught = true; - isMessageCaught = true; - } - } - else if (eventGuid == EventManager.MonitorPowerStatus) - { - if (!monitorOnCaught) - { - monitorOnCaught = true; - isMessageCaught = true; - } - } - else if (eventGuid == EventManager.PowerPersonalityChange) - { - if (!personalityCaught) - { - personalityCaught = true; - isMessageCaught = true; - } - } - else if (eventGuid == EventManager.PowerSourceChange) - { - if (!powerSrcCaught) - { - powerSrcCaught = true; - isMessageCaught = true; - } - } - - return isMessageCaught; - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/ExecutionState.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/ExecutionState.cs deleted file mode 100644 index d2c55c5..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/ExecutionState.cs +++ /dev/null @@ -1,11 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - internal enum ExecutionState : uint - { - SystemRequired = 0x00000001, - DisplayRequired = 0x00000002, - Continuous = 0x80000000, - } -} diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/MessageManager.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/MessageManager.cs deleted file mode 100644 index 6acf994..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/MessageManager.cs +++ /dev/null @@ -1,216 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Runtime.InteropServices; -using System.Threading; -using System.Windows.Forms; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// This class generates .NET events based on Windows messages. - /// The PowerRegWindow class processes the messages from Windows. - /// - internal static class MessageManager - { - private static object lockObject = new object(); - private static PowerRegWindow window; - - #region Internal static methods - - /// - /// Registers a callback for a power event. - /// - /// Guid for the event. - /// Event handler for the specified event. - internal static void RegisterPowerEvent(Guid eventId, EventHandler eventToRegister) - { - EnsureInitialized(); - window.RegisterPowerEvent(eventId, eventToRegister); - } - - /// - /// Unregisters an event handler for a power event. - /// - /// Guid for the event. - /// Event handler to unregister. - internal static void UnregisterPowerEvent(Guid eventId, EventHandler eventToUnregister) - { - EnsureInitialized(); - window.UnregisterPowerEvent(eventId, eventToUnregister); - } - - #endregion - - /// - /// Ensures that the hidden window is initialized and - /// listening for messages. - /// - private static void EnsureInitialized() - { - if (window == null) - { - lock (lockObject) - { - if (window == null) - { - // Create a new hidden window to listen - // for power management related window messages. - window = new PowerRegWindow(); - } - } - } - } - - /// - /// Catch Windows messages and generates events for power specific - /// messages. - /// - internal class PowerRegWindow : Form - { - private Hashtable eventList = new Hashtable(); - private ReaderWriterLock readerWriterLock = new ReaderWriterLock(); - - internal PowerRegWindow() - : base() - { - - } - - #region Internal Methods - - /// - /// Adds an event handler to call when Windows sends - /// a message for an evebt. - /// - /// Guid for the event. - /// Event handler for the event. - internal void RegisterPowerEvent(Guid eventId, EventHandler eventToRegister) - { - readerWriterLock.AcquireWriterLock(Timeout.Infinite); - if (!eventList.Contains(eventId)) - { - Power.RegisterPowerSettingNotification(this.Handle, eventId); - ArrayList newList = new ArrayList(); - newList.Add(eventToRegister); - eventList.Add(eventId, newList); - } - else - { - ArrayList currList = (ArrayList)eventList[eventId]; - currList.Add(eventToRegister); - } - readerWriterLock.ReleaseWriterLock(); - } - - /// - /// Removes an event handler. - /// - /// Guid for the event. - /// Event handler to remove. - /// Cannot unregister - /// a function that is not registered. - internal void UnregisterPowerEvent(Guid eventId, EventHandler eventToUnregister) - { - readerWriterLock.AcquireWriterLock(Timeout.Infinite); - if (eventList.Contains(eventId)) - { - ArrayList currList = (ArrayList)eventList[eventId]; - currList.Remove(eventToUnregister); - } - else - { - throw new InvalidOperationException( - "The specified event handler has not been registered."); - } - readerWriterLock.ReleaseWriterLock(); - } - - #endregion - - /// - /// Executes any registered event handlers. - /// - /// ArrayList of event handlers. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")] - private static void ExecuteEvents(ArrayList eventHandlerList) - { - ArrayList tempList = (ArrayList)eventHandlerList.Clone(); - foreach (EventHandler handler in tempList) - { - try - { - if (handler != null) - handler.Invoke(null, new EventArgs()); - } - // Don't crash if an event handler throws an exception. - catch { ;} - } - } - - /// - /// This method is called when a Windows message - /// is sent to this window. - /// The method calls the registered event handlers. - /// - protected override void WndProc(ref Message m) - { - // Make sure it is a Power Management message. - if (m.Msg == PowerManagementNativeMethods.WM_POWERBROADCAST && (int)m.WParam == PowerManagementNativeMethods.PBT_POWERSETTINGCHANGE) - { - PowerManagementNativeMethods.PowerBroadcastSetting ps = - (PowerManagementNativeMethods.PowerBroadcastSetting)Marshal.PtrToStructure( - m.LParam, typeof(PowerManagementNativeMethods.PowerBroadcastSetting)); - IntPtr pData = new IntPtr(m.LParam.ToInt64() + Marshal.SizeOf(ps)); - Guid currentEvent = ps.PowerSetting; - - // Update the appropriate Property. - // Power Personality - if (ps.PowerSetting == EventManager.PowerPersonalityChange && - ps.DataLength == Marshal.SizeOf(typeof(Guid))) - { - Guid newPersonality = - (Guid)Marshal.PtrToStructure(pData, typeof(Guid)); - - PowerManager.powerPersonality = PersonalityGuids.GuidToEnum(newPersonality); - // Tell PowerManager that is now safe to - // read the powerPersonality member. - EventManager.personalityReset.Set(); - } - // Power Source - else if (ps.PowerSetting == EventManager.PowerSourceChange && - ps.DataLength == Marshal.SizeOf(typeof(Int32))) - { - Int32 powerSrc = (Int32)Marshal.PtrToStructure(pData, typeof(Int32)); - PowerManager.powerSource = (PowerSource)powerSrc; - EventManager.powerSrcReset.Set(); - } - // Battery capacity - else if (ps.PowerSetting == EventManager.BatteryCapacityChange && - ps.DataLength == Marshal.SizeOf(typeof(Int32))) - { - Int32 battCapacity = (Int32)Marshal.PtrToStructure(pData, typeof(Int32)); - PowerManager.batteryLifePercent = battCapacity; - EventManager.batteryLifeReset.Set(); - } - // IsMonitorOn - else if (ps.PowerSetting == EventManager.MonitorPowerStatus && - ps.DataLength == Marshal.SizeOf(typeof(Int32))) - { - Int32 monitorStatus = (Int32)Marshal.PtrToStructure(pData, typeof(Int32)); - PowerManager.isMonitorOn = monitorStatus == 0 ? false : true; - EventManager.monitorOnReset.Set(); - } - - if (!EventManager.IsMessageCaught(currentEvent)) - ExecuteEvents((ArrayList)eventList[currentEvent]); - } - else - base.WndProc(ref m); - - } - - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/PersonalityGuids.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/PersonalityGuids.cs deleted file mode 100644 index 5707b54..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/PersonalityGuids.cs +++ /dev/null @@ -1,25 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - internal static class PersonalityGuids - { - internal static readonly Guid HighPerformance = new Guid(0x8c5e7fda, 0xe8bf, 0x4a96, 0x9a, 0x85, 0xa6, 0xe2, 0x3a, 0x8c, 0x63, 0x5c); - internal static readonly Guid PowerSaver = new Guid(0xa1841308, 0x3541, 0x4fab, 0xbc, 0x81, 0xf7, 0x15, 0x56, 0xf2, 0x0b, 0x4a); - internal static readonly Guid Automatic = new Guid(0x381b4222, 0xf694, 0x41f0, 0x96, 0x85, 0xff, 0x5b, 0xb2, 0x60, 0xdf, 0x2e); - - internal static PowerPersonality GuidToEnum(Guid convertee) - { - if (convertee == HighPerformance) - return PowerPersonality.HighPerformance; - else if (convertee == PowerSaver) - return PowerPersonality.PowerSaver; - else if (convertee == Automatic) - return PowerPersonality.Automatic; - - throw new ArgumentOutOfRangeException("convertee"); - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/Power.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/Power.cs deleted file mode 100644 index 5f891d2..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/Power.cs +++ /dev/null @@ -1,113 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.ComponentModel; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - internal static class Power - { - internal static PowerManagementNativeMethods.SystemPowerCapabilities - GetSystemPowerCapabilities() - { - IntPtr status = IntPtr.Zero; - PowerManagementNativeMethods.SystemPowerCapabilities powerCap; - - try - { - status = Marshal.AllocCoTaskMem( - Marshal.SizeOf(typeof(PowerManagementNativeMethods.SystemPowerCapabilities))); - - uint retval = PowerManagementNativeMethods.CallNtPowerInformation( - 4, // SystemPowerCapabilities - (IntPtr)null, - 0, - status, - (UInt32)Marshal.SizeOf(typeof(PowerManagementNativeMethods.SystemPowerCapabilities)) - ); - - if (retval == CoreNativeMethods.STATUS_ACCESS_DENIED) - { - throw new UnauthorizedAccessException("The caller had insufficient access rights to get the system power capabilities."); - } - - powerCap = (PowerManagementNativeMethods.SystemPowerCapabilities)Marshal.PtrToStructure(status, typeof(PowerManagementNativeMethods.SystemPowerCapabilities)); - } - finally - { - Marshal.FreeCoTaskMem(status); - } - - return powerCap; - } - - internal static PowerManagementNativeMethods.SystemBatteryState GetSystemBatteryState() - { - IntPtr status = IntPtr.Zero; - PowerManagementNativeMethods.SystemBatteryState batt_status; - - try - { - status = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(PowerManagementNativeMethods.SystemBatteryState))); - uint retval = PowerManagementNativeMethods.CallNtPowerInformation( - 5, // SystemBatteryState - (IntPtr)null, - 0, - status, - (UInt32)Marshal.SizeOf(typeof(PowerManagementNativeMethods.SystemBatteryState)) - ); - - if (retval == CoreNativeMethods.STATUS_ACCESS_DENIED) - { - throw new UnauthorizedAccessException("The caller had insufficient access rights to get the system battery state."); - } - - batt_status = (PowerManagementNativeMethods.SystemBatteryState)Marshal.PtrToStructure(status, typeof(PowerManagementNativeMethods.SystemBatteryState)); - } - finally - { - Marshal.FreeCoTaskMem(status); - } - - return batt_status; - } - - /// - /// Registers the application to receive power setting notifications - /// for the specific power setting event. - /// - /// Handle indicating where the power setting - /// notifications are to be sent. - /// The GUID of the power setting for - /// which notifications are to be sent. - /// Returns a notification handle for unregistering - /// power notifications. - internal static int RegisterPowerSettingNotification( - IntPtr handle, Guid powerSetting) - { - int outHandle = PowerManagementNativeMethods.RegisterPowerSettingNotification( - handle, - ref powerSetting, - 0); - - return outHandle; - } - - /// - /// Allows an application to inform the system that it - /// is in use, thereby preventing the system from entering - /// the sleeping power state or turning off the display - /// while the application is running. - /// - /// The thread's execution requirements. - /// Thrown if the SetThreadExecutionState call fails. - internal static void SetThreadExecutionState(ExecutionState flags) - { - ExecutionState? ret = PowerManagementNativeMethods.SetThreadExecutionState(flags); - if (ret == null) - throw new Win32Exception("SetThreadExecutionState call failed."); - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/PowerManager.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/PowerManager.cs deleted file mode 100644 index a80d73b..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/PowerManager.cs +++ /dev/null @@ -1,423 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// Enables registration for - /// power-related event notifications and provides access to power settings. - /// - public static class PowerManager - { - internal static PowerPersonality? powerPersonality; - internal static PowerSource? powerSource; - internal static int? batteryLifePercent; - internal static bool? isMonitorOn; - internal static bool monitorRequired; - internal static bool requestBlockSleep; - - private static readonly object personalitylock = new object(); - private static readonly object powersrclock = new object(); - private static readonly object batterylifelock = new object(); - private static readonly object monitoronlock = new object(); - - - #region Notifications - - /// - /// Raised each time the active power scheme changes. - /// - /// The event handler specified for removal was not registered. - /// Requires Vista/Windows Server 2008. - public static event EventHandler PowerPersonalityChanged - { - add - { - - - MessageManager.RegisterPowerEvent( - EventManager.PowerPersonalityChange, value); - } - - remove - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.UnregisterPowerEvent( - EventManager.PowerPersonalityChange, value); - } - } - - /// - /// Raised when the power source changes. - /// - /// The event handler specified for removal was not registered. - /// Requires Vista/Windows Server 2008. - public static event EventHandler PowerSourceChanged - { - add - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.RegisterPowerEvent( - EventManager.PowerSourceChange, value); - } - - remove - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.UnregisterPowerEvent( - EventManager.PowerSourceChange, value); - } - } - - /// - /// Raised when the remaining battery life changes. - /// - /// The event handler specified for removal was not registered. - /// Requires Vista/Windows Server 2008. - public static event EventHandler BatteryLifePercentChanged - { - add - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.RegisterPowerEvent( - EventManager.BatteryCapacityChange, value); - } - remove - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.UnregisterPowerEvent( - EventManager.BatteryCapacityChange, value); - } - } - - /// - /// Raised when the monitor status changes. - /// - /// The event handler specified for removal was not registered. - /// Requires Vista/Windows Server 2008. - public static event EventHandler IsMonitorOnChanged - { - add - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.RegisterPowerEvent( - EventManager.MonitorPowerStatus, value); - } - remove - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.UnregisterPowerEvent( - EventManager.MonitorPowerStatus, value); - } - } - - /// - /// Raised when the system will not be moving into an idle - /// state in the near future so applications should - /// perform any tasks that - /// would otherwise prevent the computer from entering an idle state. - /// - /// The event handler specified for removal was not registered. - /// Requires Vista/Windows Server 2008. - public static event EventHandler SystemBusyChanged - { - add - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.RegisterPowerEvent( - EventManager.BackgroundTaskNotification, value); - } - remove - { - CoreHelpers.ThrowIfNotVista(); - - MessageManager.UnregisterPowerEvent( - EventManager.BackgroundTaskNotification, value); - } - } - #endregion - - /// - /// Gets a snapshot of the current battery state. - /// - /// A instance that represents - /// the state of the battery at the time this method was called. - /// The system does not have a battery. - /// Requires XP/Windows Server 2003 or higher. - - public static BatteryState GetCurrentBatteryState() - { - CoreHelpers.ThrowIfNotXP(); - - if (!Power.GetSystemBatteryState().BatteryPresent) - throw new InvalidOperationException( - "Battery is not present on this system."); - - return new BatteryState(); - } - - #region Power System Properties - - /// - /// Gets or sets a value that indicates whether the monitor is - /// set to remain active. - /// - /// Requires XP/Windows Server 2003 or higher. - /// The caller does not have sufficient privileges to set this property. - /// - /// This information is typically used by applications - /// that display information but do not require - /// user interaction. For example, video playback applications. - /// to set this property. Demand value: ; Named Permission Sets: FullTrust. - /// A value. True if the monitor - /// is required to remain on. - public static bool MonitorRequired - { - get - { - CoreHelpers.ThrowIfNotXP(); - return monitorRequired; - } - [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] - set - { - CoreHelpers.ThrowIfNotXP(); - - if (value) - { - Power.SetThreadExecutionState(ExecutionState.Continuous | ExecutionState.DisplayRequired); - } - else - { - Power.SetThreadExecutionState(ExecutionState.Continuous); - } - - monitorRequired = value; - } - } - - /// - /// Gets or sets a value that indicates whether the system - /// is required to be in the working state. - /// - /// Requires XP/Windows Server 2003 or higher. - /// The caller does not have sufficient privileges to set this property. - /// - /// to set this property. Demand value: ; Named Permission Sets: FullTrust. - /// A value. - public static bool RequestBlockSleep - { - get - { - CoreHelpers.ThrowIfNotXP(); - - return requestBlockSleep; - } - [System.Security.Permissions.PermissionSetAttribute(System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")] - set - { - CoreHelpers.ThrowIfNotXP(); - - if (value) - Power.SetThreadExecutionState(ExecutionState.Continuous | ExecutionState.SystemRequired); - else - Power.SetThreadExecutionState(ExecutionState.Continuous); - - requestBlockSleep = value; - } - } - - /// - /// Gets a value that indicates whether a battery is present. - /// The battery can be a short term battery. - /// - /// Requires XP/Windows Server 2003 or higher. - /// A value. - public static bool IsBatteryPresent - { - get - { - CoreHelpers.ThrowIfNotXP(); - - return Power.GetSystemBatteryState().BatteryPresent; - } - } - - /// - /// Gets a value that indicates whether the battery is a short term battery. - /// - /// Requires XP/Windows Server 2003 or higher. - /// A value. - public static bool IsBatteryShortTerm - { - get - { - CoreHelpers.ThrowIfNotXP(); - return Power.GetSystemPowerCapabilities().BatteriesAreShortTerm; - } - } - - /// - /// Gets a value that indicates a UPS is present to prevent - /// sudden loss of power. - /// - /// Requires XP/Windows Server 2003 or higher. - /// A value. - public static bool IsUpsPresent - { - get - { - CoreHelpers.ThrowIfNotXP(); - - // Because the native method doesn't return the correct value for .UpsPresent, - // use .BatteriesAreShortTerm and .SystemBatteriesPresent to check for UPS - PowerManagementNativeMethods.SystemPowerCapabilities batt = Power.GetSystemPowerCapabilities(); - - return (batt.BatteriesAreShortTerm && batt.SystemBatteriesPresent); - } - } - - /// - /// Gets a value that indicates the current power scheme. - /// - /// Requires Vista/Windows Server 2008. - /// A value. - public static PowerPersonality PowerPersonality - { - get - { - CoreHelpers.ThrowIfNotVista(); - - // The only way to get the current power personality is - // to register for an event so if the - // personality value has not been set yet, - // a dummy event needs to be registered. All - // subsequent calls to this property get the value from memory. - if (powerPersonality == null) - { - lock (personalitylock) - { - if (powerPersonality == null) - { - EventHandler dummy = delegate(object sender, EventArgs args) { }; - PowerPersonalityChanged += dummy; - // Wait until Windows updates the personality - // (through RegisterPowerSettingNotification). - EventManager.personalityReset.WaitOne(); - } - } - } - return (PowerPersonality)powerPersonality; - } - } - - /// - /// Gets a value that indicates the remaining battery life - /// (as a percentage of the full battery charge). - /// This value is in the range 0-100, - /// where 0 is not charged and 100 is fully charged. - /// - /// The system does not have a battery. - /// Requires Vista/Windows Server 2008. - /// An value. - public static int BatteryLifePercent - { - get - { - if (!Power.GetSystemBatteryState().BatteryPresent) - throw new InvalidOperationException( - "Battery is not present on the system."); - - CoreHelpers.ThrowIfNotVista(); - - if (batteryLifePercent == null) - { - lock (batterylifelock) - { - if (batteryLifePercent == null) - { - EventHandler dummy = delegate(object sender, EventArgs args) { }; - BatteryLifePercentChanged += dummy; - // Wait until Windows updates the personality - // (through RegisterPowerSettingNotification). - EventManager.batteryLifeReset.WaitOne(); - } - } - } - return (int)batteryLifePercent; - } - } - - /// - /// Gets a value that indictates whether the monitor is on. - /// - /// Requires Vista/Windows Server 2008. - /// A value. - public static bool IsMonitorOn - { - get - { - CoreHelpers.ThrowIfNotVista(); - - if (isMonitorOn == null) - { - lock (monitoronlock) - { - if (isMonitorOn == null) - { - EventHandler dummy = delegate(object sender, EventArgs args) { }; - IsMonitorOnChanged += dummy; - // Wait until Windows updates the power source - // (through RegisterPowerSettingNotification) - EventManager.monitorOnReset.WaitOne(); - } - } - } - - return (bool)isMonitorOn; - } - } - - /// - /// Gets the current power source. - /// - /// Requires Vista/Windows Server 2008. - /// A value. - public static PowerSource PowerSource - { - get - { - CoreHelpers.ThrowIfNotVista(); - - if (powerSource == null) - { - lock (powersrclock) - { - if (powerSource == null) - { - EventHandler dummy = delegate(object sender, EventArgs args) { ;}; - PowerSourceChanged += dummy; - // Wait until Windows updates the power source - // (through RegisterPowerSettingNotification). - EventManager.powerSrcReset.WaitOne(); - } - } - } - - return (PowerSource)powerSource; - } - } - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/PowerPersonality.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/PowerPersonality.cs deleted file mode 100644 index 421a45d..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/PowerPersonality.cs +++ /dev/null @@ -1,29 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// Specifies the supported power personalities. - /// - public enum PowerPersonality - { - /// - /// Power settings designed to deliver maximum performance - /// at the expense of power consumption savings. - /// - HighPerformance, - - /// - /// Power settings designed consume minimum power - /// at the expense of system performance and responsiveness. - /// - PowerSaver, - - /// - /// Power settings designed to balance performance - /// and power consumption. - /// - Automatic - } - -} diff --git a/src/External/WindowsAPICodePack/Core/PowerManagement/PowerSource.cs b/src/External/WindowsAPICodePack/Core/PowerManagement/PowerSource.cs deleted file mode 100644 index ca93f25..0000000 --- a/src/External/WindowsAPICodePack/Core/PowerManagement/PowerSource.cs +++ /dev/null @@ -1,34 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.ApplicationServices -{ - /// - /// Specifies the power source currently supplying power to the system. - /// - /// Application should be aware of the power source because - /// some power sources provide a finite power supply. - /// An application might take steps to conserve power while - /// the system is using such a source. - /// - public enum PowerSource - { - /// - /// The computer is powered by an AC power source - /// or a similar device, such as a laptop powered - /// by a 12V automotive adapter. - /// - AC = 0, - /// - /// The computer is powered by a built-in battery. - /// A battery has a limited - /// amount of power; applications should conserve resources - /// where possible. - /// - Battery = 1, - /// - /// The computer is powered by a short-term power source - /// such as a UPS device. - /// - Ups = 2 - } -} diff --git a/src/External/WindowsAPICodePack/Core/Properties/AssemblyInfo.cs b/src/External/WindowsAPICodePack/Core/Properties/AssemblyInfo.cs deleted file mode 100644 index b1554a8..0000000 --- a/src/External/WindowsAPICodePack/Core/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Microsoft.WindowsAPICodePack")] -[assembly: AssemblyDescription("WindowsAPICodePack Core")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Microsoft Windows API Code Pack for .NET Framework")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("ac9740bc-3035-43ee-9a68-1dde36ab1f5e")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/External/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs b/src/External/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs deleted file mode 100644 index a9224c4..0000000 --- a/src/External/WindowsAPICodePack/Core/PropertySystem/PropVariant.cs +++ /dev/null @@ -1,958 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace MS.WindowsAPICodePack.Internal -{ - using System; - using System.Runtime.InteropServices; - using System.Diagnostics; - using Microsoft.WindowsAPICodePack.Shell.PropertySystem; - - /// - /// Represents the OLE struct PROPVARIANT. - /// This class is intended for internal use only. - /// - /// - /// Must call Clear when finished to avoid memory leaks. If you get the value of - /// a VT_UNKNOWN prop, an implicit AddRef is called, thus your reference will - /// be active even after the PropVariant struct is cleared. - /// Correct usage: - /// - /// PropVariant propVar; - /// GetProp(out propVar); - /// try - /// { - /// object value = propVar.Value; - /// } - /// finally { propVar.Clear(); } - /// - /// Originally sourced from http://blogs.msdn.com/adamroot/pages/interop-with-propvariants-in-net.aspx - /// and modified to support additional types inculding vectors and ability to set values - /// - [StructLayout(LayoutKind.Sequential)] - public struct PropVariant - { - #region Fields - - // The layout of these elements needs to be maintained. - // - // NOTE: We could use LayoutKind.Explicit, but we want - // to maintain that the IntPtr may be 8 bytes on - // 64-bit architectures, so we'll let the CLR keep - // us aligned. - // - - // This is actually a VarEnum value, but the VarEnum type - // requires 4 bytes instead of the expected 2. - ushort valueType; - - // Reserved Fields - ushort wReserved1; - ushort wReserved2; - ushort wReserved3; - - - // In order to allow x64 compat, we need to allow for - // expansion of the IntPtr. However, the BLOB struct - // uses a 4-byte int, followed by an IntPtr, so - // although the valueData field catches most pointer values, - // we need an additional 4-bytes to get the BLOB - // pointer. The valueDataExt field provides this, as well as - // the last 4-bytes of an 8-byte value on 32-bit - // architectures. - IntPtr valueData; - Int32 valueDataExt; - #endregion // struct fields - - #region public Methods - - /// - /// Creates a PropVariant from an object - /// - /// The object containing the data. - /// An initialized PropVariant - public static PropVariant FromObject( object value ) - { - PropVariant propVar = new PropVariant( ); - - if( value == null ) - { - propVar.Clear( ); - return propVar; - } - - if( value.GetType( ) == typeof( string ) ) - { - //Strings require special consideration, because they cannot be empty as well - if( String.IsNullOrEmpty( value as string ) || String.IsNullOrEmpty( (value as string).Trim( ) ) ) - throw new ArgumentException( "String argument cannot be null or empty." ); - propVar.SetString( value as string ); - } - else if( value.GetType( ) == typeof( bool? ) ) - { - propVar.SetBool( (value as bool?).Value ); - } - else if( value.GetType( ) == typeof( bool ) ) - { - propVar.SetBool( (bool)value ); - } - else if( value.GetType( ) == typeof( byte? ) ) - { - propVar.SetByte( (value as byte?).Value ); - } - else if( value.GetType( ) == typeof( byte ) ) - { - propVar.SetByte( (byte)value ); - } - else if( value.GetType( ) == typeof( sbyte? ) ) - { - propVar.SetSByte( (value as sbyte?).Value ); - } - else if( value.GetType( ) == typeof( sbyte ) ) - { - propVar.SetSByte( (sbyte)value ); - } - else if( value.GetType( ) == typeof( short? ) ) - { - propVar.SetShort( (value as short?).Value ); - } - else if( value.GetType( ) == typeof( short ) ) - { - propVar.SetShort( (short)value ); - } - else if( value.GetType( ) == typeof( ushort? ) ) - { - propVar.SetUShort( (value as ushort?).Value ); - } - else if( value.GetType( ) == typeof( ushort ) ) - { - propVar.SetUShort( (ushort)value ); - } - else if( value.GetType( ) == typeof( int? ) ) - { - propVar.SetInt( (value as int?).Value ); - } - else if( value.GetType( ) == typeof( int ) ) - { - propVar.SetInt( (int)value ); - } - else if( value.GetType( ) == typeof( uint? ) ) - { - propVar.SetUInt( (value as uint?).Value ); - } - else if( value.GetType( ) == typeof( uint ) ) - { - propVar.SetUInt( (uint)value ); - } - else if( value.GetType( ) == typeof( long? ) ) - { - propVar.SetLong( (value as long?).Value ); - } - else if( value.GetType( ) == typeof( long ) ) - { - propVar.SetLong( (long)value ); - } - else if( value.GetType( ) == typeof( ulong? ) ) - { - propVar.SetULong( (value as ulong?).Value ); - } - else if( value.GetType( ) == typeof( ulong ) ) - { - propVar.SetULong( (ulong)value ); - } - else if( value.GetType( ) == typeof( double? ) ) - { - propVar.SetDouble( (value as double?).Value ); - } - else if( value.GetType( ) == typeof( double ) ) - { - propVar.SetDouble( (double)value ); - } - else if( value.GetType( ) == typeof( float? ) ) - { - propVar.SetDouble( (double)((value as float?).Value) ); - } - else if( value.GetType( ) == typeof( float ) ) - { - propVar.SetDouble( (double)(float)value ); - } - else if( value.GetType( ) == typeof( DateTime? ) ) - { - propVar.SetDateTime( (value as DateTime?).Value ); - } - else if( value.GetType( ) == typeof( DateTime ) ) - { - propVar.SetDateTime( (DateTime)value ); - } - else if( value.GetType( ) == typeof( string[ ] ) ) - { - propVar.SetStringVector( (value as string[ ]) ); - } - else if( value.GetType( ) == typeof( short[ ] ) ) - { - propVar.SetShortVector( (value as short[ ]) ); - } - else if( value.GetType( ) == typeof( ushort[ ] ) ) - { - propVar.SetUShortVector( (value as ushort[ ]) ); - } - else if( value.GetType( ) == typeof( int[ ] ) ) - { - propVar.SetIntVector( (value as int[ ]) ); - } - else if( value.GetType( ) == typeof( uint[ ] ) ) - { - propVar.SetUIntVector( (value as uint[ ]) ); - } - else if( value.GetType( ) == typeof( long[ ] ) ) - { - propVar.SetLongVector( (value as long[ ]) ); - } - else if( value.GetType( ) == typeof( ulong[ ] ) ) - { - propVar.SetULongVector( (value as ulong[ ]) ); - } - else if( value.GetType( ) == typeof( DateTime[ ] ) ) - { - propVar.SetDateTimeVector( (value as DateTime[ ]) ); - } - else if( value.GetType( ) == typeof( bool[ ] ) ) - { - propVar.SetBoolVector( (value as bool[ ]) ); - } - else - { - throw new ArgumentException( "This Value type is not supported." ); - } - - return propVar; - } - - - /// - /// Called to clear the PropVariant's referenced and local memory. - /// - /// - /// You must call Clear to avoid memory leaks. - /// - public void Clear() - { - // Can't pass "this" by ref, so make a copy to call PropVariantClear with - PropVariant var = this; - PropVariantNativeMethods.PropVariantClear(ref var); - - // Since we couldn't pass "this" by ref, we need to clear the member fields manually - // NOTE: PropVariantClear already freed heap data for us, so we are just setting - // our references to null. - valueType = (ushort)VarEnum.VT_EMPTY; - wReserved1 = wReserved2 = wReserved3 = 0; - valueData = IntPtr.Zero; - valueDataExt = 0; - } - - /// - /// Set a string value - /// - /// The new value to set. - public void SetString(string value) - { - valueType = (ushort)VarEnum.VT_LPWSTR; - valueData = Marshal.StringToCoTaskMemUni(value); - } - - /// - /// Set a string vector - /// - /// The new value to set. - public void SetStringVector(string[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromStringVector(value, (uint) value.Length, out propVar); - CopyData(propVar); - - } - - /// - /// Set a bool vector - /// - /// The new value to set. - public void SetBoolVector(bool[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromBooleanVector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set a short vector - /// - /// The new value to set. - public void SetShortVector(short[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromInt16Vector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set a short vector - /// - /// The new value to set. - public void SetUShortVector(ushort[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromUInt16Vector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set an int vector - /// - /// The new value to set. - public void SetIntVector(int[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromInt32Vector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set an uint vector - /// - /// The new value to set. - public void SetUIntVector(uint[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromUInt32Vector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set a long vector - /// - /// The new value to set. - public void SetLongVector(long[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromInt64Vector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set a ulong vector - /// - /// The new value to set. - public void SetULongVector(ulong[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromUInt64Vector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set a double vector - /// - /// The new value to set. - public void SetDoubleVector(double[] value) - { - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromDoubleVector(value, (uint)value.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set a DateTime vector - /// - /// The new value to set. - public void SetDateTimeVector(DateTime[] value) - { - System.Runtime.InteropServices.ComTypes.FILETIME[] fileTimeArr = - new System.Runtime.InteropServices.ComTypes.FILETIME[value.Length]; - - for (int i = 0; i < value.Length; i++ ) - { - fileTimeArr[i] = DateTimeTotFileTime(value[i]); - } - - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromFileTimeVector(fileTimeArr, (uint)fileTimeArr.Length, out propVar); - CopyData(propVar); - } - - /// - /// Set an IUnknown value - /// - /// The new value to set. - public void SetIUnknown(object value) - { - valueType = (ushort)VarEnum.VT_UNKNOWN; - valueData = Marshal.GetIUnknownForObject(value); - } - - /// - /// Set a bool value - /// - /// The new value to set. - public void SetBool(bool value) - { - valueType = (ushort)VarEnum.VT_BOOL; - valueData = (value == true) ? (IntPtr)(-1) : (IntPtr)0; - } - - /// - /// Set a DateTime value - /// - /// The new value to set. - public void SetDateTime(DateTime value) - { - valueType = (ushort)VarEnum.VT_FILETIME; - - PropVariant propVar; - System.Runtime.InteropServices.ComTypes.FILETIME ft = DateTimeTotFileTime(value); - PropVariantNativeMethods.InitPropVariantFromFileTime(ref ft, out propVar); - CopyData(propVar); - } - - /// - /// Set a safe array value - /// - /// The new value to set. - public void SetSafeArray(Array array) - { - const ushort vtUnknown = 13; - IntPtr psa = PropVariantNativeMethods.SafeArrayCreateVector(vtUnknown, 0, (uint)array.Length); - - IntPtr pvData = PropVariantNativeMethods.SafeArrayAccessData(psa); - try // to remember to release lock on data - { - for (int i = 0; i < array.Length; ++i) - { - object obj = array.GetValue(i); - IntPtr punk = (obj != null) ? Marshal.GetIUnknownForObject(obj) : IntPtr.Zero; - Marshal.WriteIntPtr(pvData, i * IntPtr.Size, punk); - } - } - finally - { - PropVariantNativeMethods.SafeArrayUnaccessData(psa); - } - - this.valueType = (ushort)VarEnum.VT_ARRAY | (ushort)VarEnum.VT_UNKNOWN; - this.valueData = psa; - } - - /// - /// Set a byte value - /// - /// The new value to set. - public void SetByte(byte value) - { - valueType = (ushort)VarEnum.VT_UI1; - valueData = (IntPtr)value; - } - - /// - /// Set a sbyte value - /// - /// The new value to set. - public void SetSByte(sbyte value) - { - valueType = (ushort)VarEnum.VT_I1; - valueData = (IntPtr)value; - } - - /// - /// Set a short value - /// - /// The new value to set. - public void SetShort(short value) - { - valueType = (ushort)VarEnum.VT_I2; - valueData = (IntPtr)value; - } - - /// - /// Set an unsigned short value - /// - /// The new value to set. - public void SetUShort(ushort value) - { - valueType = (ushort)VarEnum.VT_UI2; - valueData = (IntPtr)value; - } - - /// - /// Set an int value - /// - /// The new value to set. - public void SetInt(int value) - { - valueType = (ushort)VarEnum.VT_I4; - valueData = (IntPtr)value; - } - - /// - /// Set an unsigned int value - /// - /// The new value to set. - public void SetUInt(uint value) - { - valueType = (ushort)VarEnum.VT_UI4; - valueData = (IntPtr)(int)value; - } - - /// - /// Set a decimal value - /// - /// The new value to set. - public void SetDecimal(decimal value) - { - int[] bits = Decimal.GetBits(value); - valueData = (IntPtr)bits[0]; - valueDataExt = bits[1]; - wReserved3 = (ushort)(bits[2] >> 16); - wReserved2 = (ushort)(bits[2] & 0x0000FFFF); - wReserved1 = (ushort)(bits[3] >> 16); - valueType = (ushort)VarEnum.VT_DECIMAL; - } - - /// - /// Set a long - /// - /// The new value to set. - public void SetLong(long value) - { - long[] valueArr = new long[] { value }; - - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromInt64Vector(valueArr, 1, out propVar); - - CreatePropVariantFromVectorElement(propVar); - } - - /// - /// Set a ulong - /// - /// The new value to set. - public void SetULong(ulong value) - { - PropVariant propVar; - ulong[] valueArr = new ulong[] { value }; - PropVariantNativeMethods.InitPropVariantFromUInt64Vector(valueArr, 1, out propVar); - - CreatePropVariantFromVectorElement(propVar); - } - - /// - /// Set a double - /// - /// The new value to set. - public void SetDouble(double value) - { - double[] valueArr = new double[] { value }; - - PropVariant propVar; - PropVariantNativeMethods.InitPropVariantFromDoubleVector(valueArr, 1, out propVar); - - CreatePropVariantFromVectorElement(propVar); - } - - /// - /// Sets the value type to empty - /// - public void SetEmptyValue() - { - valueType = (ushort) VarEnum.VT_EMPTY; - } - - /// - /// Checks if this has an empty or null value - /// - /// - public bool IsNullOrEmpty - { - get - { - return (valueType == (ushort)VarEnum.VT_EMPTY || valueType == (ushort)VarEnum.VT_NULL); - } - } - - #endregion - - #region public Properties - - /// - /// Gets or sets the variant type. - /// - public VarEnum VarType - { - get { return (VarEnum)valueType; } - set { valueType = (ushort) value; } - } - - /// - /// Gets the variant value. - /// - public object Value - { - get - { - switch ((VarEnum)valueType) - { - case VarEnum.VT_I1: - return cVal; - case VarEnum.VT_UI1: - return bVal; - case VarEnum.VT_I2: - return iVal; - case VarEnum.VT_UI2: - return uiVal; - case VarEnum.VT_I4: - case VarEnum.VT_INT: - return lVal; - case VarEnum.VT_UI4: - case VarEnum.VT_UINT: - return ulVal; - case VarEnum.VT_I8: - return hVal; - case VarEnum.VT_UI8: - return uhVal; - case VarEnum.VT_R4: - return fltVal; - case VarEnum.VT_R8: - return dblVal; - case VarEnum.VT_BOOL: - return boolVal; - case VarEnum.VT_ERROR: - return scode; - case VarEnum.VT_CY: - return cyVal; - case VarEnum.VT_DATE: - return date; - case VarEnum.VT_FILETIME: - return DateTime.FromFileTime(hVal); - case VarEnum.VT_BSTR: - return Marshal.PtrToStringBSTR(valueData); - case VarEnum.VT_BLOB: - return GetBlobData(); - case VarEnum.VT_LPSTR: - return Marshal.PtrToStringAnsi(valueData); - case VarEnum.VT_LPWSTR: - return Marshal.PtrToStringUni(valueData); - case VarEnum.VT_UNKNOWN: - return Marshal.GetObjectForIUnknown(valueData); - case VarEnum.VT_DISPATCH: - return Marshal.GetObjectForIUnknown(valueData); - case VarEnum.VT_DECIMAL: - return decVal; - case VarEnum.VT_ARRAY | VarEnum.VT_UNKNOWN: - return CrackSingleDimSafeArray(valueData); - case (VarEnum.VT_VECTOR | VarEnum.VT_LPWSTR): - return GetStringVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_I2): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_UI2): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_I4): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_UI4): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_I8): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_UI8): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_R8): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_BOOL): - return GetVector(); - case (VarEnum.VT_VECTOR | VarEnum.VT_FILETIME): - return GetVector(); - default: - // if the value cannot be marshaled - return null; - } - } - } - - #endregion - - #region PropVariant Simple Data types - - sbyte cVal // CHAR cVal; - { - get { return (sbyte)GetDataBytes()[0]; } - } - - byte bVal // UCHAR bVal; - { - get { return GetDataBytes()[0]; } - } - - short iVal // SHORT iVal; - { - get { return BitConverter.ToInt16(GetDataBytes(), 0); } - } - - ushort uiVal // USHORT uiVal; - { - get { return BitConverter.ToUInt16(GetDataBytes(), 0); } - } - - int lVal // LONG lVal; - { - get { return BitConverter.ToInt32(GetDataBytes(), 0); } - } - - uint ulVal // ULONG ulVal; - { - get { return BitConverter.ToUInt32(GetDataBytes(), 0); } - } - - long hVal // LARGE_INTEGER hVal; - { - get { return BitConverter.ToInt64(GetDataBytes(), 0); } - } - - ulong uhVal // ULARGE_INTEGER uhVal; - { - get { return BitConverter.ToUInt64(GetDataBytes(), 0); } - } - - float fltVal // FLOAT fltVal; - { - get { return BitConverter.ToSingle(GetDataBytes(), 0); } - } - - double dblVal // DOUBLE dblVal; - { - get { return BitConverter.ToDouble(GetDataBytes(), 0); } - } - - bool boolVal // VARIANT_BOOL boolVal; - { - get { return (iVal == 0 ? false : true); } - } - - int scode // SCODE scode; - { - get { return lVal; } - } - - decimal cyVal // CY cyVal; - { - get { return decimal.FromOACurrency(hVal); } - } - - DateTime date // DATE date; - { - get { return DateTime.FromOADate(dblVal); } - } - - Decimal decVal // Decimal value - { - get - { - int[] bits = new int[4]; - bits[0] = (int)valueData; - bits[1] = valueDataExt; - bits[2] = (wReserved3 << 16) | wReserved2; - bits[3] = (wReserved1 << 16); - return new decimal(bits); - } - } - - #endregion - - #region Private Methods - - private void CopyData(PropVariant propVar) - { - this.valueType = propVar.valueType; - this.valueData = propVar.valueData; - this.valueDataExt = propVar.valueDataExt; - } - - private void CreatePropVariantFromVectorElement(PropVariant propVar) - { - //Copy the first vector element to a new PropVariant - CopyData(propVar); - PropVariantNativeMethods.InitPropVariantFromPropVariantVectorElem(ref this, 0, out propVar); - - //Overwrite the existing data - CopyData(propVar); - } - - private static long FileTimeToDateTime(ref System.Runtime.InteropServices.ComTypes.FILETIME val) - { - return (((long)val.dwHighDateTime) << 32) + val.dwLowDateTime; - } - - private static System.Runtime.InteropServices.ComTypes.FILETIME DateTimeTotFileTime(DateTime value) - { - long hFT = value.ToFileTime(); - System.Runtime.InteropServices.ComTypes.FILETIME ft = - new System.Runtime.InteropServices.ComTypes.FILETIME(); - ft.dwLowDateTime = (int)(hFT & 0xFFFFFFFF); - ft.dwHighDateTime = (int)(hFT >> 32); - return ft; - } - - private object GetBlobData() - { - byte[] blobData = new byte[lVal]; - IntPtr pBlobData; - if (IntPtr.Size == 4) - { - pBlobData = new IntPtr(valueDataExt); - } - else if( IntPtr.Size == 8 ) - { - // In this case, we need to derive a pointer at offset 12, - // because the size of the blob is represented as a 4-byte int - // but the pointer is immediately after that. - pBlobData = new IntPtr( - (Int64)(BitConverter.ToInt32( GetDataBytes( ), sizeof( int ) )) + - (Int64)(BitConverter.ToInt32( GetDataBytes( ), 2 * sizeof( int ) ) << 32) ); - } - else - { - throw new NotSupportedException( ); - } - Marshal.Copy(pBlobData, blobData, 0, lVal); - - return blobData; - } - - private Array GetVector() where T : struct - { - int count = PropVariantNativeMethods.PropVariantGetElementCount(ref this); - if (count <= 0) - return null; - - Array arr = new T[count]; - - for (uint i = 0; i < count; i++) - { - if (typeof(T) == typeof(Int16)) - { - short val; - PropVariantNativeMethods.PropVariantGetInt16Elem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(UInt16)) - { - ushort val; - PropVariantNativeMethods.PropVariantGetUInt16Elem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(Int32)) - { - int val; - PropVariantNativeMethods.PropVariantGetInt32Elem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(UInt32)) - { - uint val; - PropVariantNativeMethods.PropVariantGetUInt32Elem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(Int64)) - { - long val; - PropVariantNativeMethods.PropVariantGetInt64Elem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(UInt64)) - { - ulong val; - PropVariantNativeMethods.PropVariantGetUInt64Elem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(DateTime)) - { - System.Runtime.InteropServices.ComTypes.FILETIME val; - PropVariantNativeMethods.PropVariantGetFileTimeElem(ref this, i, out val); - - long fileTime = FileTimeToDateTime(ref val); - - - arr.SetValue(DateTime.FromFileTime(fileTime), i); - } - else if (typeof(T) == typeof(Boolean)) - { - bool val; - PropVariantNativeMethods.PropVariantGetBooleanElem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(Double)) - { - double val; - PropVariantNativeMethods.PropVariantGetDoubleElem(ref this, i, out val); - arr.SetValue(val, i); - } - else if (typeof(T) == typeof(String)) - { - string val; - PropVariantNativeMethods.PropVariantGetStringElem(ref this, i, out val); - arr.SetValue(val, i); - } - } - - return arr; - } - - // A string requires a special case because it's not a struct or value type - private string[] GetStringVector() - { - int count = PropVariantNativeMethods.PropVariantGetElementCount(ref this); - if (count <= 0) - return null; - - string[] strArr = new string[count]; - for (uint i = 0; i < count; i++) - { - PropVariantNativeMethods.PropVariantGetStringElem(ref this, i, out strArr[i]); - } - - return strArr; - } - - /// - /// Gets a byte array containing the data bits of the struct. - /// - /// A byte array that is the combined size of the data bits. - private byte[] GetDataBytes() - { - byte[] ret = new byte[IntPtr.Size + sizeof(int)]; - if (IntPtr.Size == 4) - BitConverter.GetBytes(valueData.ToInt32()).CopyTo(ret, 0); - else if (IntPtr.Size == 8) - BitConverter.GetBytes(valueData.ToInt64()).CopyTo(ret, 0); - BitConverter.GetBytes(valueDataExt).CopyTo(ret, IntPtr.Size); - return ret; - } - - Array CrackSingleDimSafeArray(IntPtr psa) - { - uint cDims = PropVariantNativeMethods.SafeArrayGetDim(psa); - if (cDims != 1) - throw new ArgumentException("Multi-dimensional SafeArrays not supported."); - - int lBound = PropVariantNativeMethods.SafeArrayGetLBound(psa, 1U); - int uBound = PropVariantNativeMethods.SafeArrayGetUBound(psa, 1U); - - int n = uBound - lBound + 1; // uBound is inclusive - - object[] array = new object[n]; - for (int i = lBound; i <= uBound; ++i) - { - array[i] = PropVariantNativeMethods.SafeArrayGetElement(psa, ref i); - } - - return array; - } - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Core/PropertySystem/PropVariantNativeMethods.cs b/src/External/WindowsAPICodePack/Core/PropertySystem/PropVariantNativeMethods.cs deleted file mode 100644 index e197fee..0000000 --- a/src/External/WindowsAPICodePack/Core/PropertySystem/PropVariantNativeMethods.cs +++ /dev/null @@ -1,108 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - internal static class PropVariantNativeMethods - { - [DllImport("Ole32.dll", PreserveSig = false)] // returns hresult - internal extern static void PropVariantClear([In, Out] ref PropVariant pvar); - - [DllImport("OleAut32.dll", PreserveSig = true)] // psa is actually returned, not hresult - internal extern static IntPtr SafeArrayCreateVector(ushort vt, int lowerBound, uint cElems); - - [DllImport("OleAut32.dll", PreserveSig = false)] // returns hresult - internal extern static IntPtr SafeArrayAccessData(IntPtr psa); - - [DllImport("OleAut32.dll", PreserveSig = false)] // returns hresult - internal extern static void SafeArrayUnaccessData(IntPtr psa); - - [DllImport("OleAut32.dll", PreserveSig = true)] // retuns uint32 - internal extern static uint SafeArrayGetDim(IntPtr psa); - - [DllImport("OleAut32.dll", PreserveSig = false)] // returns hresult - internal extern static int SafeArrayGetLBound(IntPtr psa, uint nDim); - - [DllImport("OleAut32.dll", PreserveSig = false)] // returns hresult - internal extern static int SafeArrayGetUBound(IntPtr psa, uint nDim); - - // This decl for SafeArrayGetElement is only valid for cDims==1! - [DllImport("OleAut32.dll", PreserveSig = false)] // returns hresult - [return: MarshalAs(UnmanagedType.IUnknown)] - internal extern static object SafeArrayGetElement(IntPtr psa, ref int rgIndices); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int InitPropVariantFromPropVariantVectorElem([In] ref PropVariant propvarIn, uint iElem, [Out] out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern uint InitPropVariantFromFileTime([In] ref System.Runtime.InteropServices.ComTypes.FILETIME pftIn, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - [return: MarshalAs(UnmanagedType.I4)] - internal static extern int PropVariantGetElementCount([In] ref PropVariant propVar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetBooleanElem([In] ref PropVariant propVar, [In]uint iElem, [Out, MarshalAs(UnmanagedType.Bool)] out bool pfVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetInt16Elem([In] ref PropVariant propVar, [In] uint iElem, [Out] out short pnVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetUInt16Elem([In] ref PropVariant propVar, [In] uint iElem, [Out] out ushort pnVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetInt32Elem([In] ref PropVariant propVar, [In] uint iElem, [Out] out int pnVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetUInt32Elem([In] ref PropVariant propVar, [In] uint iElem, [Out] out uint pnVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetInt64Elem([In] ref PropVariant propVar, [In] uint iElem, [Out] out Int64 pnVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetUInt64Elem([In] ref PropVariant propVar, [In] uint iElem, [Out] out UInt64 pnVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetDoubleElem([In] ref PropVariant propVar, [In] uint iElem, [Out] out double pnVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetFileTimeElem([In] ref PropVariant propVar, [In] uint iElem, [Out, MarshalAs(UnmanagedType.Struct)] out System.Runtime.InteropServices.ComTypes.FILETIME pftVal); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void PropVariantGetStringElem([In] ref PropVariant propVar, [In] uint iElem, [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszVal); - - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromBooleanVector([In, Out] bool [] prgf, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromInt16Vector([In, Out] Int16 [] prgn, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromUInt16Vector([In, Out] UInt16[] prgn, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromInt32Vector([In, Out] Int32[] prgn, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromUInt32Vector([In, Out] UInt32[] prgn, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromInt64Vector([In, Out] Int64[] prgn, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromUInt64Vector([In,Out] UInt64[] prgn, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromDoubleVector([In, Out] double[] prgn, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromFileTimeVector([In, Out] System.Runtime.InteropServices.ComTypes.FILETIME[] prgft, uint cElems, out PropVariant ppropvar); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern void InitPropVariantFromStringVector([In, Out] string[] prgsz, uint cElems, out PropVariant ppropvar); - } -} diff --git a/src/External/WindowsAPICodePack/Core/PropertySystem/PropertyKey.cs b/src/External/WindowsAPICodePack/Core/PropertySystem/PropertyKey.cs deleted file mode 100644 index 526c961..0000000 --- a/src/External/WindowsAPICodePack/Core/PropertySystem/PropertyKey.cs +++ /dev/null @@ -1,150 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Defines a unique key for a Shell Property - /// - [StructLayout(LayoutKind.Sequential, Pack = 4)] - public struct PropertyKey : IEquatable - { - #region Private Fields - - private Guid formatId; - private Int32 propertyId; - - #endregion - - #region Public Properties - /// - /// A unique GUID for the property - /// - public Guid FormatId - { - get - { - return formatId; - } - } - - /// - /// Property identifier (PID) - /// - public Int32 PropertyId - { - get - { - return propertyId; - } - } - - #endregion - - #region Public Construction - - /// - /// PropertyKey Constructor - /// - /// A unique GUID for the property - /// Property identifier (PID) - public PropertyKey( Guid formatId, Int32 propertyId ) - { - this.formatId = formatId; - this.propertyId = propertyId; - } - - /// - /// PropertyKey Constructor - /// - /// A string represenstion of a GUID for the property - /// Property identifier (PID) - public PropertyKey( string formatId, Int32 propertyId ) - { - this.formatId = new Guid( formatId ); - this.propertyId = propertyId; - } - - #endregion - - #region IEquatable Members - - /// - /// Returns whether this object is equal to another. This is vital for performance of value types. - /// - /// The object to compare against. - /// Equality result. - public bool Equals( PropertyKey other ) - { - return other.Equals((object)this); - } - - #endregion - - #region equality and hashing - - /// - /// Returns the hash code of the object. This is vital for performance of value types. - /// - /// - public override int GetHashCode( ) - { - return formatId.GetHashCode( ) ^ propertyId; - } - - /// - /// Returns whether this object is equal to another. This is vital for performance of value types. - /// - /// The object to compare against. - /// Equality result. - public override bool Equals( object obj ) - { - if( obj == null ) - return false; - - if( !( obj is PropertyKey ) ) - return false; - - PropertyKey other = (PropertyKey)obj; - return other.formatId.Equals( formatId ) && ( other.propertyId == propertyId ); - } - - /// - /// Implements the == (equality) operator. - /// - /// Object a. - /// Object b. - /// true if object a equals object b. false otherwise. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "b"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "a")] - public static bool operator ==( PropertyKey a, PropertyKey b ) - { - return a.Equals( b ); - } - - /// - /// Implements the != (inequality) operator. - /// - /// Object a. - /// Object b. - /// true if object a does not equal object b. false otherwise. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "b"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "a")] - public static bool operator !=( PropertyKey a, PropertyKey b ) - { - return !a.Equals( b ); - } - - /// - /// Override ToString() to provide a user friendly string representation - /// - /// String representing the property key - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object)")] - public override string ToString() - { - return String.Format("{0}, {1}", formatId.ToString("B"), propertyId); - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Core/SafeHandles/SafeIconHandle.cs b/src/External/WindowsAPICodePack/Core/SafeHandles/SafeIconHandle.cs deleted file mode 100644 index 33c9122..0000000 --- a/src/External/WindowsAPICodePack/Core/SafeHandles/SafeIconHandle.cs +++ /dev/null @@ -1,26 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// Safe Icon Handle - /// - public class SafeIconHandle : ZeroInvalidHandle - { - /// - /// Release the handle - /// - /// true if handled is release successfully, false otherwise - protected override bool ReleaseHandle() - { - if (CoreNativeMethods.DestroyIcon(handle)) - { - return true; - } - else - { - return false; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/SafeHandles/SafeRegionHandle.cs b/src/External/WindowsAPICodePack/Core/SafeHandles/SafeRegionHandle.cs deleted file mode 100644 index 93e283f..0000000 --- a/src/External/WindowsAPICodePack/Core/SafeHandles/SafeRegionHandle.cs +++ /dev/null @@ -1,26 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// Safe Region Handle - /// - public class SafeRegionHandle : ZeroInvalidHandle - { - /// - /// Release the handle - /// - /// true if handled is release successfully, false otherwise - protected override bool ReleaseHandle() - { - if (CoreNativeMethods.DeleteObject(handle)) - { - return true; - } - else - { - return false; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/SafeHandles/SafeWindowHandle.cs b/src/External/WindowsAPICodePack/Core/SafeHandles/SafeWindowHandle.cs deleted file mode 100644 index b2b8298..0000000 --- a/src/External/WindowsAPICodePack/Core/SafeHandles/SafeWindowHandle.cs +++ /dev/null @@ -1,31 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// Safe Window Handle - /// - public class SafeWindowHandle : ZeroInvalidHandle - { - /// - /// Release the handle - /// - /// true if handled is release successfully, false otherwise - protected override bool ReleaseHandle() - { - if (IsInvalid) - { - return true; - } - - if (CoreNativeMethods.DestroyWindow(handle) != 0) - { - return true; - } - else - { - return false; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Core/SafeHandles/ZeroInvalidHandle.cs b/src/External/WindowsAPICodePack/Core/SafeHandles/ZeroInvalidHandle.cs deleted file mode 100644 index 33d6a31..0000000 --- a/src/External/WindowsAPICodePack/Core/SafeHandles/ZeroInvalidHandle.cs +++ /dev/null @@ -1,31 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// Base class for Safe handles with Null IntPtr as invalid - /// - public abstract class ZeroInvalidHandle : SafeHandle - { - /// - /// Default constructor - /// - protected ZeroInvalidHandle() - : base(IntPtr.Zero, true) - { - } - - /// - /// Determines if this is a valid handle - /// - public override bool IsInvalid - { - get { return handle == IntPtr.Zero; } - } - - } -} - diff --git a/src/External/WindowsAPICodePack/Shell/Common/DefaultShellImageSizes.cs b/src/External/WindowsAPICodePack/Shell/Common/DefaultShellImageSizes.cs deleted file mode 100644 index 8c94f47..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/DefaultShellImageSizes.cs +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Defines the read-only properties for default shell icon sizes. - /// - public static class DefaultIconSize - { - /// - /// The small size property for a 16x16 pixel Shell Icon. - /// - public static readonly System.Windows.Size Small = new System.Windows.Size(16, 16); - - /// - /// The medium size property for a 32x32 pixel Shell Icon. - /// - public static readonly System.Windows.Size Medium = new System.Windows.Size(32, 32); - - /// - /// The large size property for a 48x48 pixel Shell Icon. - /// - public static readonly System.Windows.Size Large = new System.Windows.Size(48, 48); - - /// - /// The extra-large size property for a 256x256 pixel Shell Icon. - /// - public static readonly System.Windows.Size ExtraLarge = new System.Windows.Size(256, 256); - - /// - /// The maximum size for a Shell Icon, 256x256 pixels. - /// - public static readonly System.Windows.Size Maximum = new System.Windows.Size(256, 256); - - } - - /// - /// Defines the read-only properties for default shell thumbnail sizes. - /// - public static class DefaultThumbnailSize - { - /// - /// Gets the small size property for a 32x32 pixel Shell Thumbnail. - /// - public static readonly System.Windows.Size Small = new System.Windows.Size(32, 32); - - /// - /// Gets the medium size property for a 96x96 pixel Shell Thumbnail. - /// - public static readonly System.Windows.Size Medium = new System.Windows.Size(96, 96); - - /// - /// Gets the large size property for a 256x256 pixel Shell Thumbnail. - /// - public static readonly System.Windows.Size Large = new System.Windows.Size(256, 256); - - /// - /// Gets the extra-large size property for a 1024x1024 pixel Shell Thumbnail. - /// - public static readonly System.Windows.Size ExtraLarge = new System.Windows.Size(1024, 1024); - - /// - /// Maximum size for the Shell Thumbnail, 1024x1024 pixels. - /// - public static readonly System.Windows.Size Maximum = new System.Windows.Size(1024, 1024); - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/EnumUnknown.cs b/src/External/WindowsAPICodePack/Shell/Common/EnumUnknown.cs deleted file mode 100644 index 6773db0..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/EnumUnknown.cs +++ /dev/null @@ -1,65 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal class EnumUnknownClass : IEnumUnknown - { - List conditionList = new List(); - int current = -1; - - internal EnumUnknownClass(ICondition[] conditions) - { - conditionList.AddRange(conditions); - } - - #region IEnumUnknown Members - - public HRESULT Next(uint requestedNumber, ref IntPtr buffer, ref uint fetchedNumber) - { - current++; - - if (current < conditionList.Count) - { - buffer = Marshal.GetIUnknownForObject(conditionList[current]); - fetchedNumber = 1; - return HRESULT.S_OK; - } - else - { - return HRESULT.S_FALSE; - } - } - - public HRESULT Skip(uint number) - { - int temp = current + (int)number; - - if (temp > (conditionList.Count - 1)) - return HRESULT.S_FALSE; - else - { - current = temp; - return HRESULT.S_OK; - } - } - - public HRESULT Reset() - { - current = -1; - return HRESULT.S_OK; - } - - public HRESULT Clone(out IEnumUnknown result) - { - result = new EnumUnknownClass(this.conditionList.ToArray()); - return HRESULT.S_OK; - } - - #endregion - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Common/IconReference.cs b/src/External/WindowsAPICodePack/Shell/Common/IconReference.cs deleted file mode 100644 index 85a7b42..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/IconReference.cs +++ /dev/null @@ -1,119 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// A refence to an icon resource - /// - public struct IconReference - { - #region Private members - - private string moduleName; - private int resourceId; - private string referencePath; - static private char[] commaSeparator = new char[] { ',' }; - - #endregion - - /// - /// Overloaded constructor takes in the module name and resource id for the icon reference. - /// - /// String specifying the name of an executable file, DLL, or icon file - /// Zero-based index of the icon - public IconReference(string moduleName, int resourceId) - { - if (string.IsNullOrEmpty(moduleName)) - throw new ArgumentNullException("moduleName", "Module name cannot be null or empty string"); - - this.moduleName = moduleName; - this.resourceId = resourceId; - referencePath = moduleName + "," + resourceId; - } - - /// - /// Overloaded constructor takes in the module name and resource id separated by a comma. - /// - /// Reference path for the icon consiting of the module name and resource id. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.Parse(System.String)", Justification = "We are not currently handling globalization or localization")] - public IconReference(string refPath) - { - if (string.IsNullOrEmpty(refPath)) - throw new ArgumentNullException("refPath", "Reference path cannot be null or empty string"); - - string[] refParams = refPath.Split(commaSeparator); - - if (refParams.Length != 2 || string.IsNullOrEmpty(refParams[0]) || string.IsNullOrEmpty(refParams[1])) - throw new ArgumentException("Reference path is invalid."); - - moduleName = refParams[0]; - resourceId = int.Parse(refParams[1]); - - this.referencePath = refPath; - } - - /// - /// String specifying the name of an executable file, DLL, or icon file - /// - public string ModuleName - { - get - { - return moduleName; - } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value", "Module name cannot be null or empty string"); - - moduleName = value; - } - } - - /// - /// Zero-based index of the icon - /// - public int ResourceId - { - get - { - return resourceId; - } - set - { - resourceId = value; - } - } - - /// - /// Reference to a specific icon within a EXE, DLL or icon file. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.Int32.Parse(System.String)", Justification = "We are not currently handling globalization or localization")] - public string ReferencePath - { - get - { - return referencePath; - } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value", "Reference path cannot be null or empty string"); - - string[] refParams = value.Split(commaSeparator); - - if (refParams.Length != 2 || string.IsNullOrEmpty(refParams[0]) || string.IsNullOrEmpty(refParams[1])) - throw new ArgumentException("Reference path is invalid."); - - ModuleName = refParams[0]; - ResourceId = int.Parse(refParams[1]); - - referencePath = value; - } - } - - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/SearchCondition.cs b/src/External/WindowsAPICodePack/Shell/Common/SearchCondition.cs deleted file mode 100644 index 230c149..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/SearchCondition.cs +++ /dev/null @@ -1,198 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Exposes properties and methods for retrieving information about a search condition. - /// - public class SearchCondition : IDisposable - { - internal SearchCondition(ICondition nativeSearchCondition) - { - if (nativeSearchCondition == null) - throw new ArgumentNullException("nativeSearchCondition"); - - NativeSearchCondition = nativeSearchCondition; - - HRESULT hr = NativeSearchCondition.GetConditionType(out conditionType); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - if (ConditionType == SearchConditionType.Leaf) - { - PropVariant propVar; - hr = NativeSearchCondition.GetComparisonInfo(out canonicalName, out conditionOperation, out propVar); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - try - { - propertyValue = propVar.Value.ToString(); - } - finally - { - propVar.Clear(); - } - - } - } - - private ICondition searchCondition = null; - internal ICondition NativeSearchCondition - { - get - { - return searchCondition; - } - set - { - searchCondition = value; - } - } - - private string canonicalName; - /// - /// The name of a property to be compared or NULL for an unspecified property. - /// - public string PropertyCanonicalName - { - get { return canonicalName; } - internal set { canonicalName = value; } - } - - private PropertyKey propertyKey; - private PropertyKey emptyPropertyKey = new PropertyKey(); - /// - /// The property key for the property that is to be compared. - /// - public PropertyKey PropertyKey - { - get - { - if (propertyKey == emptyPropertyKey) - { - int hr = PropertySystemNativeMethods.PSGetPropertyKeyFromName(PropertyCanonicalName, out propertyKey); - - if (!CoreErrorHelper.Succeeded(hr)) - Marshal.ThrowExceptionForHR(hr); - } - - return propertyKey; - } - internal set { propertyKey = value; } - } - - private string propertyValue; - /// - /// A value (in format) to which the property is compared. - /// - public string PropertyValue - { - get { return propertyValue; } - internal set { propertyValue = value; } - } - - private SearchConditionOperation conditionOperation = SearchConditionOperation.Implicit; - /// - /// Search condition operation to be performed on the property/value combination. - /// See for more details. - /// - public SearchConditionOperation ConditionOperation - { - get { return conditionOperation; } - internal set { conditionOperation = value; } - } - - private SearchConditionType conditionType = SearchConditionType.Leaf; - /// - /// Represents the condition type for the given node. - /// - public SearchConditionType ConditionType - { - get { return conditionType; } - internal set { conditionType = value; } - } - - /// - /// Retrieves an array of the sub-conditions. - /// - public IEnumerable GetSubConditions() - { - // Our list that we'll return - List subConditionsList = new List(); - - // Get the sub-conditions from the native API - object subConditionObj; - Guid guid = new Guid(ShellIIDGuid.IEnumUnknown); - - HRESULT hr = NativeSearchCondition.GetSubConditions(ref guid, out subConditionObj); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - // Convert each ICondition to SearchCondition - if (subConditionObj != null) - { - IEnumUnknown enumUnknown = subConditionObj as IEnumUnknown; - - IntPtr buffer = IntPtr.Zero; - uint fetched = 0; - - while (hr == HRESULT.S_OK) - { - hr = enumUnknown.Next(1, ref buffer, ref fetched); - - if (hr == HRESULT.S_OK && fetched == 1) - { - subConditionsList.Add(new SearchCondition((ICondition)Marshal.GetObjectForIUnknown(buffer))); - } - } - } - - return subConditionsList; - } - - #region IDisposable Members - - /// - /// - /// - ~SearchCondition() - { - Dispose(false); - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Release the native objects. - /// - /// - public void Dispose(bool disposing) - { - if (NativeSearchCondition != null) - { - Marshal.ReleaseComObject(NativeSearchCondition); - NativeSearchCondition = null; - } - } - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs b/src/External/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs deleted file mode 100644 index a29a5a5..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/SearchConditionFactory.cs +++ /dev/null @@ -1,445 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Provides methods for creating or resolving a condition tree - /// that was obtained by parsing a query string. - /// - public static class SearchConditionFactory - { - /// - /// Creates a leaf condition node that represents a comparison of property value and constant value. - /// - /// The name of a property to be compared, or null for an unspecified property. - /// The locale name of the leaf node is LOCALE_NAME_USER_DEFAULT. - /// The constant value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(string propertyName, string value, SearchConditionOperation operation) - { - PropVariant propVar = new PropVariant(); - propVar.SetString(value); - - return CreateLeafCondition(propertyName, propVar, null, operation); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and constant value. - /// Overload method takes a DateTime parameter for the comparison value. - /// - /// The name of a property to be compared, or null for an unspecified property. - /// The locale name of the leaf node is LOCALE_NAME_USER_DEFAULT. - /// The DateTime value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(string propertyName, DateTime value, SearchConditionOperation operation) - { - PropVariant propVar = new PropVariant(); - propVar.SetDateTime(value); - - return CreateLeafCondition(propertyName, propVar, "System.StructuredQuery.CustomProperty.DateTime", operation); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and Integer value. - /// - /// The name of a property to be compared, or null for an unspecified property. - /// The locale name of the leaf node is LOCALE_NAME_USER_DEFAULT. - /// The Integer value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(string propertyName, int value, SearchConditionOperation operation) - { - PropVariant propVar = new PropVariant(); - propVar.SetInt(value); - - return CreateLeafCondition(propertyName, propVar, "System.StructuredQuery.CustomProperty.Integer", operation); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and Boolean value. - /// - /// The name of a property to be compared, or null for an unspecified property. - /// The locale name of the leaf node is LOCALE_NAME_USER_DEFAULT. - /// The Boolean value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(string propertyName, bool value, SearchConditionOperation operation) - { - PropVariant propVar = new PropVariant(); - propVar.SetBool(value); - - return CreateLeafCondition(propertyName, propVar, "System.StructuredQuery.CustomProperty.Boolean", operation); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and Floating Point value. - /// - /// The name of a property to be compared, or null for an unspecified property. - /// The locale name of the leaf node is LOCALE_NAME_USER_DEFAULT. - /// The Floating Point value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(string propertyName, double value, SearchConditionOperation operation) - { - PropVariant propVar = new PropVariant(); - propVar.SetDouble(value); - - return CreateLeafCondition(propertyName, propVar, "System.StructuredQuery.CustomProperty.FloatingPoint", operation); - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.String.ToLower")] - private static SearchCondition CreateLeafCondition(string propertyName, PropVariant propVar, string valueType, SearchConditionOperation operation) - { - IConditionFactory nativeConditionFactory = null; - SearchCondition condition = null; - - try - { - // Same as the native "IConditionFactory:MakeLeaf" method - nativeConditionFactory = (IConditionFactory)new ConditionFactoryCoClass(); - - ICondition nativeCondition = null; - - if (string.IsNullOrEmpty(propertyName) || propertyName.ToLower() == "system.null") - propertyName = null; - - HRESULT hr = HRESULT.E_FAIL; - - hr = nativeConditionFactory.MakeLeaf(propertyName, operation, valueType, - ref propVar, null, null, null, false, out nativeCondition); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - // Create our search condition and set the various properties. - condition = new SearchCondition(nativeCondition); - } - finally - { - if (nativeConditionFactory != null) - Marshal.ReleaseComObject(nativeConditionFactory); - } - - return condition; - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and constant value. - /// - /// The property to be compared. - /// The constant value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(PropertyKey propertyKey, string value, SearchConditionOperation operation) - { - string canonicalName; - PropertySystemNativeMethods.PSGetNameFromPropertyKey(ref propertyKey, out canonicalName); - - if (!string.IsNullOrEmpty(canonicalName)) - return CreateLeafCondition(canonicalName, value, operation); - else - throw new ArgumentException("Given property key is invalid", "propertyKey"); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and constant value. - /// Overload method takes a DateTime parameter for the comparison value. - /// - /// The property to be compared. - /// The DateTime value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(PropertyKey propertyKey, DateTime value, SearchConditionOperation operation) - { - string canonicalName; - PropertySystemNativeMethods.PSGetNameFromPropertyKey(ref propertyKey, out canonicalName); - - if (!string.IsNullOrEmpty(canonicalName)) - return CreateLeafCondition(canonicalName, value, operation); - else - throw new ArgumentException("Given property key is invalid", "propertyKey"); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and Boolean value. - /// Overload method takes a DateTime parameter for the comparison value. - /// - /// The property to be compared. - /// The boolean value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(PropertyKey propertyKey, bool value, SearchConditionOperation operation) - { - string canonicalName; - PropertySystemNativeMethods.PSGetNameFromPropertyKey(ref propertyKey, out canonicalName); - - if (!string.IsNullOrEmpty(canonicalName)) - return CreateLeafCondition(canonicalName, value, operation); - else - throw new ArgumentException("Given property key is invalid", "propertyKey"); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and Floating Point value. - /// Overload method takes a DateTime parameter for the comparison value. - /// - /// The property to be compared. - /// The Floating Point value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(PropertyKey propertyKey, double value, SearchConditionOperation operation) - { - string canonicalName; - PropertySystemNativeMethods.PSGetNameFromPropertyKey(ref propertyKey, out canonicalName); - - if (!string.IsNullOrEmpty(canonicalName)) - return CreateLeafCondition(canonicalName, value, operation); - else - throw new ArgumentException("Given property key is invalid", "propertyKey"); - } - - /// - /// Creates a leaf condition node that represents a comparison of property value and Integer value. - /// Overload method takes a DateTime parameter for the comparison value. - /// - /// The property to be compared. - /// The Integer value against which the property value should be compared. - /// Specific condition to be used when comparing the actual value and the expected value of the given property - /// SearchCondition based on the given parameters - /// - /// The search will only work for files that are indexed, as well as the specific properties are indexed. To find - /// the properties that are indexed, look for the specific property's property description and - /// property for IsQueryable flag. - /// - public static SearchCondition CreateLeafCondition(PropertyKey propertyKey, int value, SearchConditionOperation operation) - { - string canonicalName; - PropertySystemNativeMethods.PSGetNameFromPropertyKey(ref propertyKey, out canonicalName); - - if (!string.IsNullOrEmpty(canonicalName)) - return CreateLeafCondition(canonicalName, value, operation); - else - throw new ArgumentException("Given property key is invalid", "propertyKey"); - } - - /// - /// Creates a condition node that is a logical conjunction ("AND") or disjunction ("OR") - /// of a collection of subconditions. - /// - /// The SearchConditionType of the condition node. - /// Must be either AndCondition or OrCondition. - /// TRUE to logically simplify the result, if possible; - /// then the result will not necessarily to be of the specified kind. FALSE if the result should - /// have exactly the prescribed structure. An application that plans to execute a query based on the - /// condition tree would typically benefit from setting this parameter to TRUE. - /// Array of subconditions - /// New SearchCondition based on the operation - public static SearchCondition CreateAndOrCondition(SearchConditionType conditionType, bool simplyfy, params SearchCondition[] conditionNodes) - { - // Same as the native "IConditionFactory:MakeAndOr" method - IConditionFactory nativeConditionFactory = (IConditionFactory)new ConditionFactoryCoClass(); - ICondition result = null; - - try - { - // - List conditionList = new List(); - foreach (SearchCondition c in conditionNodes) - conditionList.Add(c.NativeSearchCondition); - - IEnumUnknown subConditions = new EnumUnknownClass(conditionList.ToArray()); - - HRESULT hr = nativeConditionFactory.MakeAndOr(conditionType, subConditions, simplyfy, out result); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - finally - { - if (nativeConditionFactory != null) - Marshal.ReleaseComObject(nativeConditionFactory); - } - - return new SearchCondition(result); - } - - /// - /// Creates a condition node that is a logical negation (NOT) of another condition - /// (a subnode of this node). - /// - /// SearchCondition node to be negated. - /// True to logically simplify the result if possible; False otherwise. - /// In a query builder scenario, simplyfy should typically be set to false. - /// New SearchCondition - public static SearchCondition CreateNotCondition(SearchCondition conditionToBeNegated, bool simplyfy) - { - // Same as the native "IConditionFactory:MakeNot" method - IConditionFactory nativeConditionFactory = (IConditionFactory)new ConditionFactoryCoClass(); - ICondition result; - - try - { - HRESULT hr = nativeConditionFactory.MakeNot(conditionToBeNegated.NativeSearchCondition, simplyfy, out result); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - finally - { - if (nativeConditionFactory != null) - Marshal.ReleaseComObject(nativeConditionFactory); - } - - return new SearchCondition(result); - } - - /// - /// Parses an input string that contains Structured Query keywords (using Advanced Query Syntax - /// or Natural Query Syntax) and produces a SearchCondition object. - /// - /// The query to be parsed - /// Search condition resulting from the query - /// For more information on structured query syntax, visit http://msdn.microsoft.com/en-us/library/bb233500.aspx and - /// http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/advquery.mspx - public static SearchCondition ParseStructuredQuery(string query) - { - return ParseStructuredQuery(query, null); - } - - /// - /// Parses an input string that contains Structured Query keywords (using Advanced Query Syntax - /// or Natural Query Syntax) and produces a SearchCondition object. - /// - /// The query to be parsed - /// The culture used to select the localized language for keywords. - /// Search condition resulting from the query - /// For more information on structured query syntax, visit http://msdn.microsoft.com/en-us/library/bb233500.aspx and - /// http://www.microsoft.com/windows/products/winfamily/desktopsearch/technicalresources/advquery.mspx - public static SearchCondition ParseStructuredQuery(string query, CultureInfo cultureInfo) - { - if (string.IsNullOrEmpty(query)) - throw new ArgumentNullException("query"); - else - { - IQueryParserManager nativeQueryParserManager = (IQueryParserManager)new QueryParserManagerCoClass(); - IQueryParser queryParser = null; - IQuerySolution querySolution = null; - ICondition result = null; - - IEntity mainType = null; - - try - { - // First, try to create a new IQueryParser using IQueryParserManager - Guid guid = new Guid(ShellIIDGuid.IQueryParser); - HRESULT hr = nativeQueryParserManager.CreateLoadedParser( - "SystemIndex", - cultureInfo == null ? (ushort)0 : (ushort)cultureInfo.LCID, - ref guid, - out queryParser); - - if (!CoreErrorHelper.Succeeded((int)hr)) - throw Marshal.GetExceptionForHR((int)hr); - - if (queryParser != null) - { - // If user specified natural query, set the option on the query parser - PropVariant optionValue = new PropVariant(); - optionValue.SetBool(true); - hr = queryParser.SetOption(StructuredQuerySingleOption.NaturalSyntax, ref optionValue); - - if (!CoreErrorHelper.Succeeded((int)hr)) - throw Marshal.GetExceptionForHR((int)hr); - - // Next, try to parse the query. - // Result would be IQuerySolution that we can use for getting the ICondition and other - // details about the parsed query. - hr = queryParser.Parse(query, null, out querySolution); - - if (!CoreErrorHelper.Succeeded((int)hr)) - throw Marshal.GetExceptionForHR((int)hr); - - if (querySolution != null) - { - // Lastly, try to get the ICondition from this parsed query - hr = querySolution.GetQuery(out result, out mainType); - - if (!CoreErrorHelper.Succeeded((int)hr)) - throw Marshal.GetExceptionForHR((int)hr); - } - } - - return new SearchCondition(result); - } - finally - { - if (nativeQueryParserManager != null) - Marshal.ReleaseComObject(nativeQueryParserManager); - - if (queryParser != null) - Marshal.ReleaseComObject(queryParser); - - if (querySolution != null) - Marshal.ReleaseComObject(querySolution); - - if (mainType != null) - Marshal.ReleaseComObject(mainType); - } - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellEnums.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellEnums.cs deleted file mode 100644 index fb2f19c..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellEnums.cs +++ /dev/null @@ -1,527 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// CommonFileDialog AddPlace locations - /// - public enum FileDialogAddPlaceLocation - { - /// - /// At the bottom of the Favorites or Places list. - /// - Bottom = 0x00000000, - - /// - /// At the top of the Favorites or Places list. - /// - Top = 0x00000001, - } - - /// - /// One of the values that indicates how the ShellObject DisplayName should look. - /// - public enum DisplayNameType : uint - { - /// - /// Returns the display name relative to the desktop. - /// - Default = 0x00000000, - - /// - /// Returns the parsing name relative to the parent folder. - /// - RelativeToParent = 0x80018001, - - /// - /// Returns the path relative to the parent folder in a - /// friendly format as displayed in an address bar. - /// - RelativeToParentAddressBar = 0x8007c001, - - /// - /// Returns the parsing name relative to the desktop. - /// - RelativeToDesktop = 0x80028000, - - /// - /// Returns the editing name relative to the parent folder. - /// - RelativeToParentEditing = 0x80031001, - - /// - /// Returns the editing name relative to the desktop. - /// - RelativeToDesktopEditing = 0x8004c000, - - /// - /// Returns the display name relative to the file system path. - /// - FileSystemPath = 0x80058000, - - /// - /// Returns the display name relative to a URL. - /// - Url = 0x80068000, - } - /// - /// Available Library folder types - /// - public enum LibraryFolderType - { - /// - /// General Items - /// - Generic = 0, - - /// - /// Documents - /// - Documents, - - /// - /// Music - /// - Music, - - /// - /// Pictures - /// - Pictures, - - /// - /// Videos - /// - Videos - - } - - /// - /// Flags controlling the appearance of a window - /// - public enum WindowShowCommand : uint - { - /// - /// Hides the window and activates another window. - /// - Hide = 0, - - /// - /// Activates and displays the window (including restoring - /// it to its original size and position). - /// - Normal = 1, - - /// - /// Minimizes the window. - /// - Minimized = 2, - - /// - /// Maximizes the window. - /// - Maximized = 3, - - /// - /// Similar to , except that the window - /// is not activated. - /// - ShowNoActivate = 4, - - /// - /// Activates the window and displays it in its current size - /// and position. - /// - Show = 5, - - /// - /// Minimizes the window and activates the next top-level window. - /// - Minimize = 6, - - /// - /// Minimizes the window and does not activate it. - /// - ShowMinimizedNoActivate = 7, - - /// - /// Similar to , except that the window is not - /// activated. - /// - ShowNA = 8, - - /// - /// Activates and displays the window, restoring it to its original - /// size and position. - /// - Restore = 9, - - /// - /// Sets the show state based on the initial value specified when - /// the process was created. - /// - Default = 10, - - /// - /// Minimizes a window, even if the thread owning the window is not - /// responding. Use this only to minimize windows from a different - /// thread. - /// - ForceMinimize = 11 - } - - /// - /// Provides a set of flags to be used with - /// to indicate the operation in methods. - /// - public enum SearchConditionOperation - { - /// - /// An implicit comparison between the value of the property and the value of the constant. - /// - Implicit = 0, - - /// - /// The value of the property and the value of the constant must be equal. - /// - Equal = 1, - - /// - /// The value of the property and the value of the constant must not be equal. - /// - NotEqual = 2, - - /// - /// The value of the property must be less than the value of the constant. - /// - LessThan = 3, - - /// - /// The value of the property must be greater than the value of the constant. - /// - GreaterThan = 4, - - /// - /// The value of the property must be less than or equal to the value of the constant. - /// - LessThanOrEqual = 5, - - /// - /// The value of the property must be greater than or equal to the value of the constant. - /// - GreaterThanOrEqual = 6, - - /// - /// The value of the property must begin with the value of the constant. - /// - ValueStartsWith = 7, - - /// - /// The value of the property must end with the value of the constant. - /// - ValueEndsWith = 8, - - /// - /// The value of the property must contain the value of the constant. - /// - ValueContains = 9, - - /// - /// The value of the property must not contain the value of the constant. - /// - ValueNotContains = 10, - - /// - /// The value of the property must match the value of the constant, where '?' - /// matches any single character and '*' matches any sequence of characters. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "DOS")] - DOSWildcards = 11, - - /// - /// The value of the property must contain a word that is the value of the constant. - /// - WordEqual = 12, - - /// - /// The value of the property must contain a word that begins with the value of the constant. - /// - WordStartsWith = 13, - - /// - /// The application is free to interpret this in any suitable way. - /// - ApplicationSpecific = 14 - } - - /// - /// Set of flags to be used with . - /// - public enum SearchConditionType - { - /// - /// Indicates that the values of the subterms are combined by "AND". - /// - And = 0, - - /// - /// Indicates that the values of the subterms are combined by "OR". - /// - Or = 1, - - /// - /// Indicates a "NOT" comparison of subterms. - /// - Not = 2, - - /// - /// Indicates that the node is a comparison between a property and a - /// constant value using a . - /// - Leaf = 3, - } - - /// - /// Used to describe the view mode. - /// - public enum FolderLogicalViewMode - { - /// - /// The view is not specified. - /// - Unspecified = -1, - - /// - /// The minimum valid enumeration value. Used for validation purposes only. - /// - First = 1, - - /// - /// Details view. - /// - Details = 1, - - /// - /// Tiles view. - /// - Tiles = 2, - - /// - /// Icons view. - /// - Icons = 3, - - /// - /// Windows 7 and later. List view. - /// - List = 4, - - /// - /// Windows 7 and later. Content view. - /// - Content = 5, - - /// - /// The maximum valid enumeration value. Used for validation purposes only. - /// - Last = 5 - } - - /// - /// The direction in which the items are sorted. - /// - public enum SortDirection - { - /// - /// The items are sorted in descending order. Whether the sort is alphabetical, numerical, - /// and so on, is determined by the data type of the column indicated in propkey. - /// - Descending = -1, - - /// - /// The items are sorted in ascending order. Whether the sort is alphabetical, numerical, - /// and so on, is determined by the data type of the column indicated in propkey. - /// - Ascending = 1, - } - - /// - /// Provides a set of flags to be used with IQueryParser::SetOption and - /// IQueryParser::GetOption to indicate individual options. - /// - public enum StructuredQuerySingleOption - { - /// - /// The value should be VT_LPWSTR and the path to a file containing a schema binary. - /// - Schema, - - /// - /// The value must be VT_EMPTY (the default) or a VT_UI4 that is an LCID. It is used - /// as the locale of contents (not keywords) in the query to be searched for, when no - /// other information is available. The default value is the current keyboard locale. - /// Retrieving the value always returns a VT_UI4. - /// - Locale, - - /// - /// This option is used to override the default word breaker used when identifying keywords - /// in queries. The default word breaker is chosen according to the language of the keywords - /// (cf. SQSO_LANGUAGE_KEYWORDS below). When setting this option, the value should be VT_EMPTY - /// for using the default word breaker, or a VT_UNKNOWN with an object supporting - /// the IWordBreaker interface. Retrieving the option always returns a VT_UNKNOWN with an object - /// supporting the IWordBreaker interface. - /// - WordBreaker, - - /// - /// The value should be VT_EMPTY or VT_BOOL with VARIANT_TRUE to allow natural query - /// syntax (the default) or VT_BOOL with VARIANT_FALSE to allow only advanced query syntax. - /// Retrieving the option always returns a VT_BOOL. - /// This option is now deprecated, use SQSO_SYNTAX. - /// - NaturalSyntax, - - /// - /// The value should be VT_BOOL with VARIANT_TRUE to generate query expressions - /// as if each word in the query had a star appended to it (unless followed by punctuation - /// other than a parenthesis), or VT_EMPTY or VT_BOOL with VARIANT_FALSE to - /// use the words as they are (the default). A word-wheeling application - /// will generally want to set this option to true. - /// Retrieving the option always returns a VT_BOOL. - /// - AutomaticWildcard, - - /// - /// Reserved. The value should be VT_EMPTY (the default) or VT_I4. - /// Retrieving the option always returns a VT_I4. - /// - TraceLevel, - - /// - /// The value must be a VT_UI4 that is a LANGID. It defaults to the default user UI language. - /// - LanguageKeywords, - - /// - /// The value must be a VT_UI4 that is a STRUCTURED_QUERY_SYNTAX value. - /// It defaults to SQS_NATURAL_QUERY_SYNTAX. - /// - Syntax, - - /// - /// The value must be a VT_BLOB that is a copy of a TIME_ZONE_INFORMATION structure. - /// It defaults to the current time zone. - /// - TimeZone, - - /// - /// This setting decides what connector should be assumed between conditions when none is specified. - /// The value must be a VT_UI4 that is a CONDITION_TYPE. Only CT_AND_CONDITION and CT_OR_CONDITION - /// are valid. It defaults to CT_AND_CONDITION. - /// - ImplicitConnector, - - /// - /// This setting decides whether there are special requirements on the case of connector keywords (such - /// as AND or OR). The value must be a VT_UI4 that is a CASE_REQUIREMENT value. - /// It defaults to CASE_REQUIREMENT_UPPER_IF_AQS. - /// - ConnectorCase, - - } - - /// - /// Provides a set of flags to be used with IQueryParser::SetMultiOption - /// to indicate individual options. - /// - public enum StructuredQueryMultipleOption - { - /// - /// The key should be property name P. The value should be a - /// VT_UNKNOWN with an IEnumVARIANT which has two values: a VT_BSTR that is another - /// property name Q and a VT_I4 that is a CONDITION_OPERATION cop. A predicate with - /// property name P, some operation and a value V will then be replaced by a predicate - /// with property name Q, operation cop and value V before further processing happens. - /// - VirtualProperty, - - /// - /// The key should be a value type name V. The value should be a - /// VT_LPWSTR with a property name P. A predicate with no property name and a value of type - /// V (or any subtype of V) will then use property P. - /// - DefaultProperty, - - /// - /// The key should be a value type name V. The value should be a - /// VT_UNKNOWN with a IConditionGenerator G. The GenerateForLeaf method of - /// G will then be applied to any predicate with value type V and if it returns a query - /// expression, that will be used. If it returns NULL, normal processing will be used - /// instead. - /// - GeneratorForType, - - /// - /// The key should be a property name P. The value should be a VT_VECTOR|VT_LPWSTR, - /// where each string is a property name. The count must be at least one. This "map" will be - /// added to those of the loaded schema and used during resolution. A second call with the - /// same key will replace the current map. If the value is VT_NULL, the map will be removed. - /// - MapProperty, - } - - /// - /// Used by IQueryParserManager::SetOption to set parsing options. - /// This can be used to specify schemas and localization options. - /// - public enum QueryParserManagerOption - { - /// - /// A VT_LPWSTR containing the name of the file that contains the schema binary. - /// The default value is StructuredQuerySchema.bin for the SystemIndex catalog - /// and StructuredQuerySchemaTrivial.bin for the trivial catalog. - /// - SchemaBiaryName = 0, - - /// - /// Either a VT_BOOL or a VT_LPWSTR. If the value is a VT_BOOL and is FALSE, - /// a pre-localized schema will not be used. If the value is a VT_BOOL and is TRUE, - /// IQueryParserManager will use the pre-localized schema binary in - /// "%ALLUSERSPROFILE%\Microsoft\Windows". If the value is a VT_LPWSTR, the value should - /// contain the full path of the folder in which the pre-localized schema binary can be found. - /// The default value is VT_BOOL with TRUE. - /// - PreLocalizedSchemaBinaryPath = (SchemaBiaryName + 1), - - /// - /// A VT_LPWSTR containing the full path to the folder that contains the - /// unlocalized schema binary. The default value is "%SYSTEMROOT%\System32". - /// - UnLocalizedSchemaBinaryPath = (PreLocalizedSchemaBinaryPath + 1), - - /// - /// A VT_LPWSTR containing the full path to the folder that contains the - /// localized schema binary that can be read and written to as needed. - /// The default value is "%LOCALAPPDATA%\Microsoft\Windows". - /// - LocalizedSchemaBinaryPath = (UnLocalizedSchemaBinaryPath + 1), - - /// - /// A VT_BOOL. If TRUE, then the paths for pre-localized and localized binaries - /// have "\(LCID)" appended to them, where language code identifier (LCID) is - /// the decimal locale ID for the localized language. The default is TRUE. - /// - AppendLCIDToLocalizedPath = (LocalizedSchemaBinaryPath + 1), - - /// - /// A VT_UNKNOWN with an object supporting ISchemaLocalizerSupport. - /// This object will be used instead of the default localizer support object. - /// - LocalizerSupport = (AppendLCIDToLocalizedPath + 1) - } - - -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellFile.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellFile.cs deleted file mode 100644 index 6ae6aed..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellFile.cs +++ /dev/null @@ -1,64 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.IO; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// A file in the Shell Namespace - /// - public class ShellFile : ShellObjectNode, IDisposable - { - #region Internal Constructor - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")] - internal ShellFile(string path) - { - // Get the absolute path - string absPath = ShellHelper.GetAbsolutePath(path); - - // Make sure this is valid - if (!File.Exists(absPath)) - throw new FileNotFoundException(string.Format("The given path does not exist ({0})", path)); - - ParsingName = absPath; - } - - internal ShellFile(IShellItem2 shellItem) - { - nativeShellItem = shellItem; - } - - #endregion - - #region Public Methods - /// - /// Constructs a new ShellFile object given a file path - /// - /// The file or folder path - /// ShellFile object created using given file path. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)", Justification = "We are not currently handling globalization or localization")] - static public ShellFile FromFilePath(string path) - { - return new ShellFile(path); - } - - #endregion - - #region Public Properties - - /// - /// The path for this file - /// - virtual public string Path - { - get - { - return this.ParsingName; - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellFileSystemFolder.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellFileSystemFolder.cs deleted file mode 100644 index e158578..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellFileSystemFolder.cs +++ /dev/null @@ -1,66 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.IO; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// A folder in the Shell Namespace - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public class ShellFileSystemFolder : ShellFolder - { - #region Internal Constructor - - internal ShellFileSystemFolder() - { - - } - - internal ShellFileSystemFolder(IShellItem2 shellItem) - { - nativeShellItem = shellItem; - } - - #endregion - - #region Public Methods - /// - /// Constructs a new ShellFileSystemFolder object given a folder path - /// - /// The folder path - /// ShellFileSystemFolder created from the given folder path. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)", Justification = "We are not currently handling globalization or localization")] - static public ShellFileSystemFolder FromFolderPath(string path) - { - // Get the absolute path - string absPath = ShellHelper.GetAbsolutePath(path); - - // Make sure this is valid - if(!Directory.Exists(absPath)) - throw new DirectoryNotFoundException(string.Format("The given path does not exist ({0})", path)); - - ShellFileSystemFolder folder = new ShellFileSystemFolder(); - folder.ParsingName = absPath; - return folder; - } - - #endregion - - #region Public Properties - - /// - /// The path for this Folder - /// - virtual public string Path - { - get - { - return this.ParsingName; - } - } - - #endregion - - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellFolder.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellFolder.cs deleted file mode 100644 index 6013036..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellFolder.cs +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents the base class for all types of folders (filesystem and non filesystem) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public abstract class ShellFolder : ShellContainer - { - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellFolderItems.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellFolderItems.cs deleted file mode 100644 index 292e37c..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellFolderItems.cs +++ /dev/null @@ -1,118 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - class ShellFolderItems : IEnumerator - { - #region Private Fields - - private IEnumIDList nativeEnumIdList = null; - private ShellObject currentItem = null; - ShellContainer nativeShellFolder; - - #endregion - - #region Internal Constructor - - internal ShellFolderItems(ShellContainer nativeShellFolder) - { - this.nativeShellFolder = nativeShellFolder; - - HRESULT hr = nativeShellFolder.NativeShellFolder.EnumObjects( - IntPtr.Zero, - ShellNativeMethods.SHCONT.SHCONTF_FOLDERS | ShellNativeMethods.SHCONT.SHCONTF_NONFOLDERS, - out nativeEnumIdList); - - - if( !CoreErrorHelper.Succeeded( (int)hr ) ) - { - if( hr == HRESULT.E_ERROR_CANCELLED ) - { - throw new System.IO.FileNotFoundException( ); - } - else - { - Marshal.ThrowExceptionForHR( (int)hr ); - } - } - } - - #endregion - - #region IEnumerator Members - - public ShellObject Current - { - get - { - return currentItem; - } - } - - #endregion - - #region IDisposable Members - - public void Dispose() - { - if (nativeEnumIdList != null) - { - Marshal.ReleaseComObject(nativeEnumIdList); - nativeEnumIdList = null; - } - } - - #endregion - - #region IEnumerator Members - - object IEnumerator.Current - { - get - { - return currentItem; - } - - } - - /// - /// - /// - /// - public bool MoveNext() - { - if (nativeEnumIdList == null) - return false; - - IntPtr item; - uint numItemsReturned; - uint itemsRequested = 1; - HRESULT hr = nativeEnumIdList.Next(itemsRequested, out item, out numItemsReturned); - - if (numItemsReturned < itemsRequested || hr != HRESULT.S_OK) - return false; - - currentItem = ShellObjectFactory.Create(item, nativeShellFolder); - - return true; - } - - /// - /// - /// - public void Reset() - { - if(nativeEnumIdList != null) - nativeEnumIdList.Reset(); - } - - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellHelper.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellHelper.cs deleted file mode 100644 index 3f19e0b..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellHelper.cs +++ /dev/null @@ -1,96 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.IO; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// A helper class for Shell Objects - /// - internal sealed class ShellHelper - { - private ShellHelper() - { - // Private constructor so no one can construct this using the default - // provided by the compiler. - } - - internal static string GetParsingName(IShellItem shellItem) - { - if (shellItem == null) - return null; - - string path = null; - - IntPtr pszPath = IntPtr.Zero; - HRESULT hr = shellItem.GetDisplayName(ShellNativeMethods.SIGDN.SIGDN_DESKTOPABSOLUTEPARSING, out pszPath); - - if (false == - (hr == HRESULT.S_OK || - hr == HRESULT.E_INVALIDARG)) - throw new COMException("GetParsingName", (int)hr); - - if (pszPath != IntPtr.Zero) - { - path = Marshal.PtrToStringAuto(pszPath); - Marshal.FreeCoTaskMem( pszPath ); - pszPath = IntPtr.Zero; - } - - return path; - - } - - internal static string GetAbsolutePath(string path) - { - if (Uri.IsWellFormedUriString(path, UriKind.Absolute)) - return path; - else - return Path.GetFullPath((path)); - - } - - internal static PropertyKey ItemTypePropertyKey = new PropertyKey(new Guid("28636AA6-953D-11D2-B5D6-00C04FD918D0"), 11); - - internal static string GetItemType(IShellItem2 shellItem) - { - if (shellItem != null) - { - string itemType = null; - - HRESULT hr = shellItem.GetString(ref ItemTypePropertyKey, out itemType); - - if (hr == HRESULT.S_OK) - return itemType; - } - - return null; - } - - internal static IntPtr PidlFromParsingName(string name) - { - IntPtr pidl; - - ShellNativeMethods.SFGAO sfgao; - int retCode = ShellNativeMethods.SHParseDisplayName(name, IntPtr.Zero, out pidl, (ShellNativeMethods.SFGAO)0, - out sfgao); - - return (CoreErrorHelper.Succeeded(retCode) ? pidl : IntPtr.Zero); - } - - internal static IntPtr PidlFromShellItem(IShellItem nativeShellItem) - { - IntPtr shellItem = Marshal.GetComInterfaceForObject(nativeShellItem, typeof(IShellItem)); - IntPtr pidl; - - int retCode = ShellNativeMethods.SHGetIDListFromObject(shellItem, out pidl); - - return (CoreErrorHelper.Succeeded(retCode) ? pidl : IntPtr.Zero); - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellItemArray.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellItemArray.cs deleted file mode 100644 index 23dfdff..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellItemArray.cs +++ /dev/null @@ -1,70 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal class ShellItemArray : IShellItemArray - { - List shellItemsList = new List(); - - internal ShellItemArray(IShellItem[] shellItems) - { - shellItemsList.AddRange(shellItems); - } - - #region IShellItemArray Members - - public HRESULT BindToHandler(IntPtr pbc, ref Guid rbhid, ref Guid riid, out IntPtr ppvOut) - { - throw new NotSupportedException(); - } - - public HRESULT GetPropertyStore(int Flags, ref Guid riid, out IntPtr ppv) - { - throw new NotSupportedException(); - } - - public HRESULT GetPropertyDescriptionList(ref PropertyKey keyType, ref Guid riid, out IntPtr ppv) - { - throw new NotSupportedException(); - } - - public HRESULT GetAttributes(ShellNativeMethods.SIATTRIBFLAGS dwAttribFlags, ShellNativeMethods.SFGAO sfgaoMask, out ShellNativeMethods.SFGAO psfgaoAttribs) - { - throw new NotSupportedException(); - } - - public HRESULT GetCount(out uint pdwNumItems) - { - pdwNumItems = (uint)shellItemsList.Count; - return HRESULT.S_OK; - } - - public HRESULT GetItemAt(uint dwIndex, out IShellItem ppsi) - { - int index = (int)dwIndex; - - if (index < shellItemsList.Count) - { - ppsi = shellItemsList[index]; - return HRESULT.S_OK; - } - else - { - ppsi = null; - return HRESULT.E_FAIL; - } - } - - public HRESULT EnumItems(out IntPtr ppenumShellItems) - { - throw new NotSupportedException(); - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellLibrary.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellLibrary.cs deleted file mode 100644 index fcc907d..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellLibrary.cs +++ /dev/null @@ -1,927 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.IO; -using System.Runtime.InteropServices; -using System.Threading; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// A Shell Library in the Shell Namespace - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public sealed class ShellLibrary : ShellContainer, IList - { - #region Private Fields - - private INativeShellLibrary nativeShellLibrary = null; - private IKnownFolder knownFolder = null; - - private static Guid[] FolderTypesGuids = - { - new Guid(ShellKFIDGuid.GenericLibrary), - new Guid(ShellKFIDGuid.DocumentsLibrary), - new Guid(ShellKFIDGuid.MusicLibrary), - new Guid(ShellKFIDGuid.PicturesLibrary), - new Guid(ShellKFIDGuid.VideosLibrary) - }; - - #endregion - - #region Private Constructor - - //Construct the ShellLibrary object from a native Shell Library - private ShellLibrary(INativeShellLibrary nativeShellLibrary) - { - CoreHelpers.ThrowIfNotWin7(); - this.nativeShellLibrary = nativeShellLibrary; - } - - #endregion - - #region Public Constructors - - /// - /// Creates a shell library in the Libraries Known Folder, - /// using the given IKnownFolder - /// - /// KnownFolder from which to create the new Shell Library - /// If true , opens the library in read-only mode. - private ShellLibrary(IKnownFolder sourceKnownFolder, bool isReadOnly) - { - CoreHelpers.ThrowIfNotWin7(); - - Debug.Assert(sourceKnownFolder != null); - - // Keep a reference locally - knownFolder = sourceKnownFolder; - - nativeShellLibrary = (INativeShellLibrary)new ShellLibraryCoClass(); - - ShellNativeMethods.STGM flags = - isReadOnly ? - ShellNativeMethods.STGM.Read : - ShellNativeMethods.STGM.ReadWrite; - - // Get the IShellItem2 - base.nativeShellItem = ((ShellObject)sourceKnownFolder).NativeShellItem2; - - Guid guid = sourceKnownFolder.FolderId; - - // Load the library from the IShellItem2 - try - { - nativeShellLibrary.LoadLibraryFromKnownFolder(ref guid, flags); - } - catch (InvalidCastException) - { - throw new ArgumentException("The given known folder is not a valid library.", "sourceKnownFolder"); - } - catch (NotImplementedException) - { - throw new ArgumentException("The given known folder is not a valid library.", "sourceKnownFolder"); - } - } - - /// - /// Creates a shell library in the Libraries Known Folder, - /// using the given shell library name. - /// - /// The name of this library - /// Allow overwriting an existing library; if one exists with the same name - public ShellLibrary(string libraryName, bool overwrite) - { - CoreHelpers.ThrowIfNotWin7(); - - if (String.IsNullOrEmpty(libraryName)) - { - throw new ArgumentNullException("libraryName", "libraryName cannot be empty."); - } - - this.Name = libraryName; - Guid guid = new Guid(ShellKFIDGuid.Libraries); - - ShellNativeMethods.LIBRARYSAVEFLAGS flags = - overwrite ? - ShellNativeMethods.LIBRARYSAVEFLAGS.LSF_OVERRIDEEXISTING : - ShellNativeMethods.LIBRARYSAVEFLAGS.LSF_FAILIFTHERE; - - nativeShellLibrary = (INativeShellLibrary)new ShellLibraryCoClass(); - nativeShellLibrary.SaveInKnownFolder(ref guid, libraryName, flags, out nativeShellItem); - } - - /// - /// Creates a shell library in a given Known Folder, - /// using the given shell library name. - /// - /// The name of this library - /// The known folder - /// Override an existing library with the same name - public ShellLibrary(string libraryName, IKnownFolder sourceKnownFolder, bool overwrite) - { - CoreHelpers.ThrowIfNotWin7(); - if (String.IsNullOrEmpty(libraryName)) - { - throw new ArgumentNullException("libraryName", "libraryName cannot be empty."); - } - - knownFolder = sourceKnownFolder; - - this.Name = libraryName; - Guid guid = knownFolder.FolderId; - - ShellNativeMethods.LIBRARYSAVEFLAGS flags = - overwrite ? - ShellNativeMethods.LIBRARYSAVEFLAGS.LSF_OVERRIDEEXISTING : - ShellNativeMethods.LIBRARYSAVEFLAGS.LSF_FAILIFTHERE; - - nativeShellLibrary = (INativeShellLibrary)new ShellLibraryCoClass(); - nativeShellLibrary.SaveInKnownFolder(ref guid, libraryName, flags, out nativeShellItem); - } - - /// - /// Creates a shell library in a given local folder, - /// using the given shell library name. - /// - /// The name of this library - /// The path to the local folder - /// Override an existing library with the same name - public ShellLibrary(string libraryName, string folderPath, bool overwrite) - { - CoreHelpers.ThrowIfNotWin7(); - - if (String.IsNullOrEmpty(libraryName)) - { - throw new ArgumentNullException("libraryName", "libraryName cannot be empty."); - } - - if (!Directory.Exists(folderPath)) - { - throw new DirectoryNotFoundException("Folder path not found."); - } - - this.Name = libraryName; - - ShellNativeMethods.LIBRARYSAVEFLAGS flags = - overwrite ? - ShellNativeMethods.LIBRARYSAVEFLAGS.LSF_OVERRIDEEXISTING : - ShellNativeMethods.LIBRARYSAVEFLAGS.LSF_FAILIFTHERE; - - Guid guid = new Guid(ShellIIDGuid.IShellItem); - - IShellItem shellItemIn = null; - ShellNativeMethods.SHCreateItemFromParsingName(folderPath, IntPtr.Zero, ref guid, out shellItemIn); - - nativeShellLibrary = (INativeShellLibrary)new ShellLibraryCoClass(); - nativeShellLibrary.Save(shellItemIn, libraryName, flags, out nativeShellItem); - } - - #endregion - - #region Public Properties - - /// - /// The name of the library, every library must - /// have a name - /// - /// Will throw if no Icon is set - public override string Name - { - get - { - if (base.Name == null && NativeShellItem != null) - { - base.Name = System.IO.Path.GetFileNameWithoutExtension(ShellHelper.GetParsingName(NativeShellItem)); - } - - return base.Name; - } - } - - /// - /// The Resource Reference to the icon. - /// - public IconReference IconResourceId - { - get - { - string iconRef; - nativeShellLibrary.GetIcon(out iconRef); - return new IconReference(iconRef); - } - - set - { - nativeShellLibrary.SetIcon(value.ReferencePath); - nativeShellLibrary.Commit(); - } - } - - /// - /// One of predefined Library types - /// - /// Will throw if no Library Type is set - public LibraryFolderType LibraryType - { - get - { - Guid folderTypeGuid; - nativeShellLibrary.GetFolderType(out folderTypeGuid); - - return GetFolderTypefromGuid(folderTypeGuid); - } - - set - { - Guid guid = FolderTypesGuids[(int)value]; - nativeShellLibrary.SetFolderType(ref guid); - nativeShellLibrary.Commit(); - } - } - - /// - /// The Guid of the Library type - /// - /// Will throw if no Library Type is set - public Guid LibraryTypeId - { - get - { - Guid folderTypeGuid; - nativeShellLibrary.GetFolderType(out folderTypeGuid); - - return folderTypeGuid; - } - } - - private static LibraryFolderType GetFolderTypefromGuid(Guid folderTypeGuid) - { - for (int i = 0; i < FolderTypesGuids.Length; i++) - { - if (folderTypeGuid.Equals(FolderTypesGuids[i])) - return (LibraryFolderType)i; - } - throw new ArgumentOutOfRangeException("folderTypeGuid", "Invalid FoldeType Guid"); - } - - /// - /// By default, this folder is the first location - /// added to the library. The default save folder - /// is both the default folder where files can - /// be saved, and also where the library XML - /// file will be saved, if no other path is specified - /// - public string DefaultSaveFolder - { - get - { - Guid guid = new Guid(ShellIIDGuid.IShellItem); - - IShellItem saveFolderItem; - - nativeShellLibrary.GetDefaultSaveFolder( - ShellNativeMethods.DEFAULTSAVEFOLDERTYPE.DSFT_DETECT, - ref guid, - out saveFolderItem); - - return ShellHelper.GetParsingName(saveFolderItem); - } - - set - { - if (String.IsNullOrEmpty(value)) - { - throw new ArgumentNullException("value"); - } - - if (!Directory.Exists(value)) - throw new DirectoryNotFoundException("DefaultSaveFolder Path not found."); - - string fullPath = new DirectoryInfo(value).FullName; - - Guid guid = new Guid(ShellIIDGuid.IShellItem); - IShellItem saveFolderItem; - - ShellNativeMethods.SHCreateItemFromParsingName(fullPath, IntPtr.Zero, ref guid, out saveFolderItem); - - nativeShellLibrary.SetDefaultSaveFolder( - ShellNativeMethods.DEFAULTSAVEFOLDERTYPE.DSFT_DETECT, - saveFolderItem); - - nativeShellLibrary.Commit(); - } - } - - /// - /// Whether the library will be pinned to the - /// Explorer Navigation Pane - /// - public bool IsPinnedToNavigationPane - { - get - { - ShellNativeMethods.LIBRARYOPTIONFLAGS flags = - ShellNativeMethods.LIBRARYOPTIONFLAGS.LOF_PINNEDTONAVPANE; - - nativeShellLibrary.GetOptions(out flags); - - return ( - (flags & ShellNativeMethods.LIBRARYOPTIONFLAGS.LOF_PINNEDTONAVPANE) == - ShellNativeMethods.LIBRARYOPTIONFLAGS.LOF_PINNEDTONAVPANE); - } - - set - { - ShellNativeMethods.LIBRARYOPTIONFLAGS flags = - ShellNativeMethods.LIBRARYOPTIONFLAGS.LOF_DEFAULT; - - if (value) - flags |= ShellNativeMethods.LIBRARYOPTIONFLAGS.LOF_PINNEDTONAVPANE; - else - flags &= ~ShellNativeMethods.LIBRARYOPTIONFLAGS.LOF_PINNEDTONAVPANE; - - nativeShellLibrary.SetOptions(ShellNativeMethods.LIBRARYOPTIONFLAGS.LOF_PINNEDTONAVPANE, flags); - nativeShellLibrary.Commit(); - - } - } - - #endregion - - #region Public Methods - - /// - /// Close the library, and release its associated file system resources - /// - public void Close() - { - this.Dispose(); - } - - #endregion - - #region Internal Properties - - internal const string FileExtension = ".library-ms"; - - internal override IShellItem NativeShellItem - { - get - { - return NativeShellItem2; - } - - } - - internal override IShellItem2 NativeShellItem2 - { - get - { - return nativeShellItem; - } - } - - #endregion - - #region Static Shell Library methods - - /// - /// Get a the known folder FOLDERID_Libraries - /// - public static IKnownFolder LibrariesKnownFolder - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return KnownFolderHelper.FromKnownFolderId(new Guid(ShellKFIDGuid.Libraries)); - } - } - - /// - /// Load the library using a number of options - /// - /// The name of the library - /// If true, loads the library in read-only mode. - /// A ShellLibrary Object - public static ShellLibrary Load( - string libraryName, - bool isReadOnly) - { - CoreHelpers.ThrowIfNotWin7(); - - IKnownFolder kf = KnownFolders.Libraries; - string librariesFolderPath = (kf != null) ? kf.Path : string.Empty; - - Guid guid = new Guid(ShellIIDGuid.IShellItem); - IShellItem nativeShellItem; - string shellItemPath = System.IO.Path.Combine(librariesFolderPath, libraryName + FileExtension); - int hr = ShellNativeMethods.SHCreateItemFromParsingName(shellItemPath, IntPtr.Zero, ref guid, out nativeShellItem); - - if (!CoreErrorHelper.Succeeded(hr)) - throw Marshal.GetExceptionForHR(hr); - - INativeShellLibrary nativeShellLibrary = (INativeShellLibrary)new ShellLibraryCoClass(); - ShellNativeMethods.STGM flags = - isReadOnly ? - ShellNativeMethods.STGM.Read : - ShellNativeMethods.STGM.ReadWrite; - nativeShellLibrary.LoadLibraryFromItem(nativeShellItem, flags); - - ShellLibrary library = new ShellLibrary(nativeShellLibrary); - library.nativeShellItem = (IShellItem2)nativeShellItem; - library.Name = libraryName; - - return library; - } - - /// - /// Load the library using a number of options - /// - /// The name of the library. - /// The path to the library. - /// If true, opens the library in read-only mode. - /// A ShellLibrary Object - public static ShellLibrary Load( - string libraryName, - string folderPath, - bool isReadOnly) - { - - CoreHelpers.ThrowIfNotWin7(); - - // Create the shell item path - string shellItemPath = System.IO.Path.Combine(folderPath, libraryName + FileExtension); - ShellFile item = ShellFile.FromFilePath(shellItemPath); - - IShellItem nativeShellItem = item.NativeShellItem; - INativeShellLibrary nativeShellLibrary = (INativeShellLibrary)new ShellLibraryCoClass(); - ShellNativeMethods.STGM flags = - isReadOnly ? - ShellNativeMethods.STGM.Read : - ShellNativeMethods.STGM.ReadWrite; - nativeShellLibrary.LoadLibraryFromItem(nativeShellItem, flags); - - ShellLibrary library = new ShellLibrary(nativeShellLibrary); - library.nativeShellItem = (IShellItem2)nativeShellItem; - library.Name = libraryName; - - return library; - } - - /// - /// Load the library using a number of options - /// - /// IShellItem - /// read-only flag - /// A ShellLibrary Object - internal static ShellLibrary FromShellItem( - IShellItem nativeShellItem, - bool isReadOnly) - { - CoreHelpers.ThrowIfNotWin7(); - - INativeShellLibrary nativeShellLibrary = (INativeShellLibrary)new ShellLibraryCoClass(); - - ShellNativeMethods.STGM flags = - isReadOnly ? - ShellNativeMethods.STGM.Read : - ShellNativeMethods.STGM.ReadWrite; - - nativeShellLibrary.LoadLibraryFromItem(nativeShellItem, flags); - - ShellLibrary library = new ShellLibrary(nativeShellLibrary); - library.nativeShellItem = (IShellItem2)nativeShellItem; - - return library; - } - - /// - /// Load the library using a number of options - /// - /// A known folder. - /// If true, opens the library in read-only mode. - /// A ShellLibrary Object - public static ShellLibrary Load( - IKnownFolder sourceKnownFolder, - bool isReadOnly) - { - CoreHelpers.ThrowIfNotWin7(); - return new ShellLibrary(sourceKnownFolder, isReadOnly); - } - - private static void ShowManageLibraryUI(ShellLibrary shellLibrary, IntPtr windowHandle, string title, string instruction, bool allowAllLocations) - { - int hr = 0; - - Thread staWorker = new Thread(() => - { - hr = ShellNativeMethods.SHShowManageLibraryUI( - shellLibrary.NativeShellItem, - windowHandle, - title, - instruction, - allowAllLocations ? - ShellNativeMethods.LIBRARYMANAGEDIALOGOPTIONS.LMD_NOUNINDEXABLELOCATIONWARNING : - ShellNativeMethods.LIBRARYMANAGEDIALOGOPTIONS.LMD_DEFAULT); - }); - - staWorker.SetApartmentState(ApartmentState.STA); - staWorker.Start(); - staWorker.Join(); - - if (!CoreErrorHelper.Succeeded(hr)) - Marshal.ThrowExceptionForHR(hr); - } - - /// - /// Shows the library management dialog which enables users to mange the library folders and default save location. - /// - /// The name of the library - /// The path to the library. - /// The parent window,or IntPtr.Zero for no parent - /// A title for the library management dialog, or null to use the library name as the title - /// An optional help string to display for the library management dialog - /// If true, do not show warning dialogs about locations that cannot be indexed - /// If the library is already open in read-write mode, the dialog will not save the changes. - public static void ShowManageLibraryUI(string libraryName, string folderPath, IntPtr windowHandle, string title, string instruction, bool allowAllLocations) - { - // this method is not safe for MTA consumption and will blow - // Access Violations if called from an MTA thread so we wrap this - // call up into a Worker thread that performs all operations in a - // single threaded apartment - using (ShellLibrary shellLibrary = ShellLibrary.Load(libraryName, folderPath, true)) - { - ShowManageLibraryUI(shellLibrary, windowHandle, title, instruction, allowAllLocations); - } - } - - /// - /// Shows the library management dialog which enables users to mange the library folders and default save location. - /// - /// The name of the library - /// The parent window,or IntPtr.Zero for no parent - /// A title for the library management dialog, or null to use the library name as the title - /// An optional help string to display for the library management dialog - /// If true, do not show warning dialogs about locations that cannot be indexed - /// If the library is already open in read-write mode, the dialog will not save the changes. - public static void ShowManageLibraryUI(string libraryName, IntPtr windowHandle, string title, string instruction, bool allowAllLocations) - { - // this method is not safe for MTA consumption and will blow - // Access Violations if called from an MTA thread so we wrap this - // call up into a Worker thread that performs all operations in a - // single threaded apartment - using (ShellLibrary shellLibrary = ShellLibrary.Load(libraryName, true)) - { - ShowManageLibraryUI(shellLibrary, windowHandle, title, instruction, allowAllLocations); - } - } - - /// - /// Shows the library management dialog which enables users to mange the library folders and default save location. - /// - /// A known folder. - /// The parent window,or IntPtr.Zero for no parent - /// A title for the library management dialog, or null to use the library name as the title - /// An optional help string to display for the library management dialog - /// If true, do not show warning dialogs about locations that cannot be indexed - /// If the library is already open in read-write mode, the dialog will not save the changes. - public static void ShowManageLibraryUI(IKnownFolder sourceKnownFolder, IntPtr windowHandle, string title, string instruction, bool allowAllLocations) - { - // this method is not safe for MTA consumption and will blow - // Access Violations if called from an MTA thread so we wrap this - // call up into a Worker thread that performs all operations in a - // single threaded apartment - using (ShellLibrary shellLibrary = ShellLibrary.Load(sourceKnownFolder, true)) - { - ShowManageLibraryUI(shellLibrary, windowHandle, title, instruction, allowAllLocations); - } - } - - #endregion - - #region Collection Members - - /// - /// Add a new FileSystemFolder or SearchConnector - /// - /// The folder to add to the library. - public void Add(ShellFileSystemFolder item) - { - nativeShellLibrary.AddFolder(item.NativeShellItem); - nativeShellLibrary.Commit(); - } - - /// - /// Add an existing folder to this library - /// - /// The path to the folder to be added to the library. - public void Add(string folderPath) - { - if (!Directory.Exists(folderPath)) - { - throw new DirectoryNotFoundException("Folder path not found."); - } - - Add(ShellFileSystemFolder.FromFolderPath(folderPath)); - } - - /// - /// Clear all items of this Library - /// - public void Clear() - { - List list = ItemsList; - foreach (ShellFileSystemFolder folder in list) - { - nativeShellLibrary.RemoveFolder(folder.NativeShellItem); - } - - nativeShellLibrary.Commit(); - } - - /// - /// Remove a folder or search connector - /// - /// The item to remove. - /// true if the item was removed. - public bool Remove(ShellFileSystemFolder item) - { - try - { - nativeShellLibrary.RemoveFolder(item.NativeShellItem); - nativeShellLibrary.Commit(); - } - catch (COMException) - { - return false; - } - - return true; - } - - /// - /// Remove a folder or search connector - /// - /// The path of the item to remove. - /// true if the item was removed. - public bool Remove(string folderPath) - { - ShellFileSystemFolder item = ShellFileSystemFolder.FromFolderPath(folderPath); - return Remove(item); - } - - #endregion - - #region Disposable Pattern - - /// - /// Release resources - /// - /// Indicates that this was called from Dispose(), rather than from the finalizer. - protected override void Dispose(bool disposing) - { - if (nativeShellLibrary != null) - { - Marshal.ReleaseComObject(nativeShellLibrary); - nativeShellLibrary = null; - } - - base.Dispose(disposing); - } - - /// - /// Release resources - /// - ~ShellLibrary() - { - Dispose(false); - } - - #endregion - - #region Private Properties - - private List ItemsList - { - get - { - return GetFolders(); - } - - } - private List GetFolders() - { - List list = new List(); - IShellItemArray itemArray; - - Guid shellItemArrayGuid = new Guid(ShellIIDGuid.IShellItemArray); - - HRESULT hr = nativeShellLibrary.GetFolders(ShellNativeMethods.LIBRARYFOLDERFILTER.LFF_ALLITEMS, ref shellItemArrayGuid, out itemArray); - - if(!CoreErrorHelper.Succeeded((int)hr)) - return list; - - uint count; - itemArray.GetCount(out count); - - for (uint i = 0; i < count; ++i) - { - IShellItem shellItem; - itemArray.GetItemAt(i, out shellItem); - list.Add(new ShellFileSystemFolder(shellItem as IShellItem2)); - } - - if (itemArray != null) - { - Marshal.ReleaseComObject(itemArray); - itemArray = null; - } - - return list; - } - - #endregion - - #region IEnumerable Members - - /// - /// Retrieves the collection enumerator. - /// - /// The enumerator. - new public IEnumerator GetEnumerator() - { - return ItemsList.GetEnumerator(); - } - - #endregion - - #region IEnumerable Members - - /// - /// Retrieves the collection enumerator. - /// - /// The enumerator. - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return ItemsList.GetEnumerator(); - } - - #endregion - - #region ICollection Members - - - /// - /// Determines if an item with the specified path exists in the collection. - /// - /// The path of the item. - /// true if the item exists in the collection. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1309:UseOrdinalStringComparison", MessageId = "System.String.Equals(System.String,System.StringComparison)", Justification = "We are not currently handling globalization or localization")] - public bool Contains(string fullPath) - { - if (String.IsNullOrEmpty(fullPath)) - { - throw new ArgumentNullException("fullPath"); - } - - List list = ItemsList; - - foreach (ShellFileSystemFolder folder in list) - { - if (fullPath.Equals(folder.Path, StringComparison.InvariantCultureIgnoreCase)) - return true; - } - - return false; - } - - /// - /// Determines if a folder exists in the collection. - /// - /// The folder. - /// true, if the folder exists in the collection. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1309:UseOrdinalStringComparison", MessageId = "System.String.Equals(System.String,System.StringComparison)", Justification = "We are not currently handling globalization or localization")] - public bool Contains(ShellFileSystemFolder item) - { - if (item == null) - { - throw new ArgumentNullException("item"); - } - - List list = ItemsList; - - foreach (ShellFileSystemFolder folder in list) - { - if (item.Path.Equals(folder.Path, StringComparison.InvariantCultureIgnoreCase)) - return true; - } - - return false; - } - - #endregion - - #region IList Members - - /// - /// Searches for the specified FileSystemFolder and returns the zero-based index of the - /// first occurrence within Library list. - /// - /// The item to search for. - /// The index of the item in the collection, or -1 if the item does not exist. - public int IndexOf(ShellFileSystemFolder item) - { - return ItemsList.IndexOf(item); - } - - /// - /// Inserts a FileSystemFolder at the specified index. - /// - /// The index to insert at. - /// The FileSystemFolder to insert. - void IList.Insert(int index, ShellFileSystemFolder item) - { - // Index related options are not supported by IShellLibrary - // doesn't support them. - throw new NotImplementedException(); - } - - /// - /// Removes an item at the specified index. - /// - /// The index to remove. - void IList.RemoveAt(int index) - { - // Index related options are not supported by IShellLibrary - // doesn't support them. - throw new NotImplementedException(); - } - - /// - /// Retrieves the folder at the specified index - /// - /// The index of the folder to retrieve. - /// A folder. - public ShellFileSystemFolder this[int index] - { - get - { - return ItemsList[index]; - } - set - { - // Index related options are not supported by IShellLibrary - // doesn't support them. - throw new NotImplementedException(); - } - } - #endregion - - #region ICollection Members - - /// - /// Copies the collection to an array. - /// - /// The array to copy to. - /// The index in the array at which to start the copy. - void ICollection.CopyTo(ShellFileSystemFolder[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - /// - /// The count of the items in the list. - /// - public int Count - { - get { return ItemsList.Count; } - } - - /// - /// Indicates whether this list is read-only or not. - /// - public bool IsReadOnly - { - get { return false; } - } - - #endregion - - /// - /// Indicates whether this feature is supported on the current platform. - /// - new public static bool IsPlatformSupported - { - get - { - // We need Windows 7 onwards ... - return CoreHelpers.RunningOnWin7; - } - } - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellLink.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellLink.cs deleted file mode 100644 index bbd12ed..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellLink.cs +++ /dev/null @@ -1,107 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a link to existing FileSystem or Virtual item. - /// - public class ShellLink : ShellObject - { - /// - /// Path for this file e.g. c:\Windows\file.txt, - /// - private string internalPath = null; - - #region Internal Constructors - - internal ShellLink(IShellItem2 shellItem) - { - nativeShellItem = shellItem; - } - - #endregion - - #region Public Properties - - /// - /// The path for this link - /// - virtual public string Path - { - get - { - if (internalPath == null && NativeShellItem != null) - { - internalPath = base.ParsingName; - } - return internalPath; - } - protected set - { - this.internalPath = value; - } - } - - private string internalTargetLocation; - /// - /// Gets the location to which this link points to. - /// - public string TargetLocation - { - get - { - if (string.IsNullOrEmpty(internalTargetLocation) && NativeShellItem2 != null) - internalTargetLocation = this.Properties.System.Link.TargetParsingPath.Value; - - return internalTargetLocation; - } - set - { - if (value == null) - return; - - internalTargetLocation = value; - - if (NativeShellItem2 != null) - this.Properties.System.Link.TargetParsingPath.Value = internalTargetLocation; - } - } - - /// - /// Gets the ShellObject to which this link points to. - /// - public ShellObject TargetShellObject - { - get - { - return ShellObjectFactory.Create(TargetLocation); - } - } - - /// - /// Gets or sets the link's title - /// - public string Title - { - get - { - if (NativeShellItem2 != null) - return this.Properties.System.Title.Value; - else - return null; - } - set - { - if (value == null) - throw new ArgumentNullException("value"); - - if (NativeShellItem2 != null) - this.Properties.System.Title.Value = value; - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemFolder.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemFolder.cs deleted file mode 100644 index da77cc0..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemFolder.cs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a Non FileSystem folder (e.g. My Computer, Control Panel) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public class ShellNonFileSystemFolder : ShellFolder - { - #region Internal Constructors - - internal ShellNonFileSystemFolder() - { - - } - - internal ShellNonFileSystemFolder(IShellItem2 shellItem) - { - nativeShellItem = shellItem; - } - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemItem.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemItem.cs deleted file mode 100644 index f4d63bb..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellNonFileSystemItem.cs +++ /dev/null @@ -1,15 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a non filesystem item (e.g. virtual items inside Control Panel) - /// - public class ShellNonFileSystemItem : ShellObjectNode - { - internal ShellNonFileSystemItem(IShellItem2 shellItem) - { - nativeShellItem = shellItem; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellObject.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellObject.cs deleted file mode 100644 index c6694e0..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellObject.cs +++ /dev/null @@ -1,517 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.IO; -using System.Runtime.InteropServices; -using System.Security.Cryptography; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// The base class for all Shell objects in Shell Namespace. - /// - abstract public class ShellObject : IDisposable, IEquatable - { - - #region Public Static Methods - - /// - /// Creates a ShellObject subclass given a parsing name. - /// For file system items, this method will only accept absolute paths. - /// - /// The parsing name of the object. - /// A newly constructed ShellObject object. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.String.ToLower")] - public static ShellObject FromParsingName(string parsingName) - { - return ShellObjectFactory.Create(parsingName); - } - - /// - /// Indicates whether this feature is supported on the current platform. - /// - public static bool IsPlatformSupported - { - get - { - // We need Windows Vista onwards ... - return CoreHelpers.RunningOnVista; - } - } - - #endregion - - #region Internal Fields - - /// - /// Internal member to keep track of the native IShellItem2 - /// - internal IShellItem2 nativeShellItem; - - #endregion - - #region Constructors - - internal ShellObject() - { - } - - internal ShellObject(IShellItem2 shellItem) - { - nativeShellItem = shellItem; - } - - #endregion - - #region Protected Fields - - /// - /// Parsing name for this Object e.g. c:\Windows\file.txt, - /// or ::{Some Guid} - /// - private string internalParsingName = null; - - /// - /// A friendly name for this object that' suitable for display - /// - private string internalName = null; - - /// - /// PID List (PIDL) for this object - /// - private IntPtr internalPIDL = IntPtr.Zero; - - #endregion - - #region Internal Properties - - /// - /// Return the native ShellFolder object as newer IShellItem2 - /// - /// If the native object cannot be created. - /// The ErrorCode member will contain the external error code. - virtual internal IShellItem2 NativeShellItem2 - { - get - { - if (nativeShellItem == null && ParsingName != null) - { - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - int retCode = ShellNativeMethods.SHCreateItemFromParsingName(ParsingName, IntPtr.Zero, ref guid, out nativeShellItem); - - if (nativeShellItem == null || !CoreErrorHelper.Succeeded(retCode)) - { - throw new ExternalException("Shell item could not be created.", Marshal.GetExceptionForHR(retCode)); - } - } - return nativeShellItem; - } - } - - /// - /// Return the native ShellFolder object - /// - virtual internal IShellItem NativeShellItem - { - get - { - return NativeShellItem2; - } - } - - /// - /// Gets access to the native IPropertyStore (if one is already - /// created for this item and still valid. This is usually done by the - /// ShellPropertyWriter class. The reference will be set to null - /// when the writer has been closed/commited). - /// - internal IPropertyStore NativePropertyStore - { - get; - set; - } - - #endregion - - #region Public Properties - - private ShellProperties properties = null; - /// - /// Gets an object that allows the manipulation of ShellProperties for this shell item. - /// - public ShellProperties Properties - { - get - { - if (properties == null) - { - properties = new ShellProperties(this); - } - return properties; - } - } - - /// - /// Gets the parsing name for this ShellItem. - /// - virtual public string ParsingName - { - get - { - if (internalParsingName == null && nativeShellItem != null) - { - internalParsingName = ShellHelper.GetParsingName(nativeShellItem); - } - return internalParsingName; - } - protected set - { - this.internalParsingName = value; - } - } - - /// - /// Gets the normal display for this ShellItem. - /// - virtual public string Name - { - get - { - if (internalName == null && NativeShellItem != null) - { - IntPtr pszString = IntPtr.Zero; - HRESULT hr = NativeShellItem.GetDisplayName(ShellNativeMethods.SIGDN.SIGDN_NORMALDISPLAY, out pszString); - if (hr == HRESULT.S_OK && pszString != IntPtr.Zero) - { - internalName = Marshal.PtrToStringAuto(pszString); - - // Free the string - Marshal.FreeCoTaskMem(pszString); - - } - } - return internalName; - } - - protected set - { - this.internalName = value; - } - } - - /// - /// Gets the PID List (PIDL) for this ShellItem. - /// - virtual internal IntPtr PIDL - { - get - { - // Get teh PIDL for the ShellItem - if (internalPIDL == IntPtr.Zero && NativeShellItem != null) - internalPIDL = ShellHelper.PidlFromShellItem(NativeShellItem); - - return internalPIDL; - } - set - { - this.internalPIDL = value; - } - } - - /// - /// Overrides object.ToString() - /// - /// A string representation of the object. - public override string ToString() - { - return this.Name; - } - - /// - /// Returns the display name of the ShellFolder object. DisplayNameType represents one of the - /// values that indicates how the name should look. - /// See for a list of possible values. - /// - /// A disaply name type. - /// A string. - virtual public string GetDisplayName(DisplayNameType displayNameType) - { - string returnValue = null; - - HRESULT hr = HRESULT.S_OK; - - if (NativeShellItem2 != null) - hr = NativeShellItem2.GetDisplayName((ShellNativeMethods.SIGDN)displayNameType, out returnValue); - - if (hr != HRESULT.S_OK) - throw new COMException("Can't get the display name", (int)hr); - - return returnValue; - } - - /// - /// Gets a value that determines if this ShellObject is a link or shortcut. - /// - public bool IsLink - { - get - { - try - { - ShellNativeMethods.SFGAO sfgao; - NativeShellItem.GetAttributes(ShellNativeMethods.SFGAO.SFGAO_LINK, out sfgao); - return (sfgao & ShellNativeMethods.SFGAO.SFGAO_LINK) != 0; - } - catch (FileNotFoundException) - { - return false; - } - catch (NullReferenceException) - { - // NativeShellItem is null - return false; - } - } - } - - /// - /// Gets a value that determines if this ShellObject is a file system object. - /// - public bool IsFileSystemObject - { - get - { - try - { - ShellNativeMethods.SFGAO sfgao; - NativeShellItem.GetAttributes(ShellNativeMethods.SFGAO.SFGAO_FILESYSTEM, out sfgao); - return (sfgao & ShellNativeMethods.SFGAO.SFGAO_FILESYSTEM) != 0; - } - catch (FileNotFoundException) - { - return false; - } - catch (NullReferenceException) - { - // NativeShellItem is null - return false; - } - } - } - - private ShellThumbnail thumbnail; - /// - /// Gets the thumbnail of the ShellObject. - /// - public ShellThumbnail Thumbnail - { - get - { - if (thumbnail == null) - thumbnail = new ShellThumbnail(this); - - return thumbnail; - } - } - - private ShellObject parentShellObject = null; - /// - /// Gets the parent ShellObject. - /// Returns null if the object has no parent, i.e. if this object is the Desktop folder. - /// - public ShellObject Parent - { - get - { - if (parentShellObject == null && NativeShellItem2 != null) - { - IShellItem parentShellItem = null; - - HRESULT hr = NativeShellItem2.GetParent(out parentShellItem); - - if (hr == HRESULT.S_OK && parentShellItem != null) - parentShellObject = ShellObjectFactory.Create(parentShellItem); - else if (hr == HRESULT.NO_OBJECT) - { - // Should return null if the parent is desktop - return null; - } - else - { - throw Marshal.GetExceptionForHR((int)hr); - } - } - - return parentShellObject; - } - } - - - #endregion - - #region IDisposable Members - - /// - /// Release the native and managed objects - /// - /// Indicates that this is being called from Dispose(), rather than the finalizer. - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - internalName = null; - internalParsingName = null; - properties = null; - thumbnail = null; - parentShellObject = null; - } - - if (internalPIDL != IntPtr.Zero) - { - ShellNativeMethods.ILFree(internalPIDL); - internalPIDL = IntPtr.Zero; - } - - if (nativeShellItem != null) - { - Marshal.ReleaseComObject(nativeShellItem); - nativeShellItem = null; - } - - if (NativePropertyStore != null) - { - Marshal.ReleaseComObject(NativePropertyStore); - NativePropertyStore = null; - } - - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Implement the finalizer. - /// - ~ShellObject() - { - Dispose(false); - } - - #endregion - - #region equality and hashing - - /// - /// Returns the hash code of the object. - /// - /// - public override int GetHashCode( ) - { - if( !hashValue.HasValue ) - { - uint size = ShellNativeMethods.ILGetSize( PIDL ); - if( size != 0 ) - { - byte[ ] pidlData = new byte[ size ]; - Marshal.Copy( PIDL, pidlData, 0, (int)size ); - byte[ ] hashData = ShellObject.hashProvider.ComputeHash( pidlData ); - hashValue = BitConverter.ToInt32( hashData, 0 ); - } - else - { - hashValue = 0; - } - - } - return hashValue.Value; - } - private static MD5CryptoServiceProvider hashProvider = new MD5CryptoServiceProvider( ); - private int? hashValue; - - /// - /// Determines if two ShellObjects are identical. - /// - /// The ShellObject to comare this one to. - /// True if the ShellObjects are equal, false otherwise. - public bool Equals(ShellObject other) - { - bool areEqual = false; - - if ((object)other != null) - { - IShellItem ifirst = this.NativeShellItem; - IShellItem isecond = other.NativeShellItem; - if (((ifirst != null) && (isecond != null))) - { - int result = 0; - HRESULT hr = ifirst.Compare( - isecond, SICHINTF.SICHINT_ALLFIELDS, out result); - - if ((hr == HRESULT.S_OK) && (result == 0)) - areEqual = true; - } - } - - return areEqual; - } - - /// - /// Returns whether this object is equal to another. - /// - /// The object to compare against. - /// Equality result. - public override bool Equals(object obj) - { - return this.Equals(obj as ShellObject); - } - - /// - /// Implements the == (equality) operator. - /// - /// Object a. - /// Object b. - /// true if object a equals object b; false otherwise. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "a"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "b")] - public static bool operator ==(ShellObject a, ShellObject b) - { - if ((object)a == null) - { - return ((object)b == null); - } - else - { - return a.Equals(b); - } - } - - /// - /// Implements the != (inequality) operator. - /// - /// Object a. - /// Object b. - /// true if object a does not equal object b; false otherwise. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "a"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "b")] - public static bool operator !=(ShellObject a, ShellObject b) - { - if ((object)a == null) - { - return ((object)b != null); - } - else - { - return !a.Equals(b); - } - } - - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs deleted file mode 100644 index 09fa838..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectCollection.cs +++ /dev/null @@ -1,397 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// An ennumerable list of ShellObjects - /// - public class ShellObjectCollection : IEnumerable, IDisposable, IList - { - private List content; - - bool readOnly = false; - bool isDisposed = false; - - #region construction/disposal/finialization - /// - /// Creates a ShellObject collection from an IShellItemArray - /// - /// IShellItemArray pointer - /// Indicates whether the collection shouldbe read-only or not - internal ShellObjectCollection(IShellItemArray iArray, bool readOnly) - { - this.readOnly = readOnly; - - if (iArray != null) - { - try - { - uint itemCount = 0; - iArray.GetCount(out itemCount); - - content = new List((int)itemCount); - - for (uint index = 0; index < itemCount; index++) - { - IShellItem iShellItem = null; - iArray.GetItemAt(index, out iShellItem); - content.Add(ShellObjectFactory.Create(iShellItem)); - } - } - finally - { - Marshal.ReleaseComObject(iArray); - } - } - } - - /// - /// Creates a ShellObjectCollection from an IDataObject passed during Drop operation. - /// - /// An object that implements the IDataObject COM interface. - /// ShellObjectCollection created from the given IDataObject - public static ShellObjectCollection FromDataObject(object dataObject) - { - System.Runtime.InteropServices.ComTypes.IDataObject iDataObject = dataObject as - System.Runtime.InteropServices.ComTypes.IDataObject; - - IShellItemArray shellItemArray; - Guid iid = new Guid(ShellIIDGuid.IShellItemArray); - ShellNativeMethods.SHCreateShellItemArrayFromDataObject(iDataObject, ref iid, out shellItemArray); - return new ShellObjectCollection(shellItemArray, true); - } - - /// - /// Constructs an empty ShellObjectCollection - /// - public ShellObjectCollection() - { - content = new List(); - } - - /// - /// - /// - ~ShellObjectCollection() - { - Dispose(false); - GC.SuppressFinalize(this); - } - - /// - /// Standard Dispose pattern - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Standard Dispose patterns - /// - /// Indicates that this is being called from Dispose(), rather than the finalizer. - protected void Dispose(bool disposing) - { - if (isDisposed == false) - { - if (disposing && content != null) - { - foreach (ShellObject obj in content) - obj.Dispose(); - - content.Clear(); - content = null; - } - - isDisposed = true; - } - } - #endregion - - #region implementation - - /// - /// Item count - /// - public int Count - { - get - { - if (content != null) - return content.Count; - else - return 0; - } - } - - /// - /// Collection enumeration - /// - /// - public System.Collections.IEnumerator GetEnumerator() - { - for (int index = 0; index < Count; index++) - { - yield return content[index]; - } - } - - /// - /// Builds the data for the CFSTR_SHELLIDLIST Drag and Clipboard data format from the - /// ShellObjects in the collection. - /// - /// A memory stream containing the drag/drop data. - public MemoryStream BuildShellIDList() - { - if (content == null || content.Count < 1) - throw new ArgumentException("Must have at least one shell object in the collection."); - - MemoryStream mstream = new MemoryStream(); - BinaryWriter bwriter = new BinaryWriter(mstream); - - // number of IDLs to be written (shell objects + parent folder) - uint itemCount = (uint)(content.Count + 1); - - // grab the object IDLs - IntPtr[] idls = new IntPtr[itemCount]; - - for (int index = 0; index < itemCount; index++) - { - if (index == 0) - { - // Because the ShellObjects passed in may be from anywhere, the - // parent folder reference must be the desktop. - idls[index] = ((ShellObject)KnownFolders.Desktop).PIDL; - } - else - { - idls[index] = content[index - 1].PIDL; - } - } - - // calculate offset array (folder IDL + item IDLs) - uint[] offsets = new uint[itemCount + 1]; - for (int index = 0; index < itemCount; index++) - { - if (index == 0) - { - // first offset equals size of CIDA header data - offsets[0] = (uint)(sizeof(uint) * (offsets.Length + 1)); - } - else - { - offsets[index] = offsets[index - 1] + ShellNativeMethods.ILGetSize(idls[index - 1]); - } - } - - // Fill out the CIDA header - // - // typedef struct _IDA { - // UINT cidl; // number of relative IDList - // UINT aoffset[1]; // [0]: folder IDList, [1]-[cidl]: item IDList - // } CIDA, * LPIDA; - // - bwriter.Write(content.Count); - foreach (uint offset in offsets) - { - bwriter.Write(offset); - } - - // copy idls - foreach (IntPtr idl in idls) - { - byte[] data = new byte[ShellNativeMethods.ILGetSize(idl)]; - Marshal.Copy(idl, data, 0, data.Length); - bwriter.Write(data, 0, data.Length); - } - - // return CIDA stream - return mstream; - } - #endregion - - #region IList Members - - /// - /// Returns the index of a particualr shell object in the collection - /// - /// The item to search for. - /// The index of the item found, or -1 if not found. - public int IndexOf(ShellObject item) - { - if (content != null) - return content.FindIndex(x => x.Equals(item)); - else - return -1; - } - - /// - /// Inserts a new shell object into the collection. - /// - /// The index at which to insert. - /// The item to insert. - public void Insert(int index, ShellObject item) - { - if (readOnly) - throw new ArgumentException("Can not insert items into a read only list."); - - content.Insert(index, item); - } - - /// - /// Removes the specified ShellObject from the collection - /// - /// The index to remove at. - public void RemoveAt(int index) - { - if (readOnly) - throw new ArgumentException("Can not remove items from a read only list."); - - content.RemoveAt(index); - } - - /// - /// The collection indexer - /// - /// The index of the item to retrieve. - /// The ShellObject at the specified index - public ShellObject this[int index] - { - get - { - if (content != null) - return content[index]; - else - return null; - } - set - { - if (readOnly) - throw new ArgumentException("Can not insert items into a read only list"); - - content[index] = value; - } - } - - #endregion - - #region ICollection Members - - /// - /// Adds a ShellObject to the collection, - /// - /// The ShellObject to add. - public void Add(ShellObject item) - { - if (readOnly) - throw new ArgumentException("Can not add items to a read only list."); - - if (content != null) - content.Add(item); - } - - /// - /// Clears the collection of ShellObjects. - /// - public void Clear() - { - if (readOnly) - throw new ArgumentException("Can not clear a read only list."); - - if (content != null) - content.Clear(); - } - - /// - /// Determines if the collection contains a particular ShellObject. - /// - /// The ShellObject. - /// true, if the ShellObject is in the list, false otherwise. - public bool Contains(ShellObject item) - { - if (content != null) - return content.Contains(item); - else - return false; - } - - /// - /// Copies the ShellObjects in the collection to a ShellObject array. - /// - /// The destination to copy to. - /// The index into the array at which copying will commence. - public void CopyTo(ShellObject[] array, int arrayIndex) - { - if (array.Length < arrayIndex + content.Count) - throw new ArgumentException("Destination array too small, or invalid arrayIndex."); - - for (int index = 0; index < content.Count; index++) - { - array[index + arrayIndex] = content[index]; - } - } - - /// - /// Retrieves the number of ShellObjects in the collection - /// - int ICollection.Count - { - get - { - if (content != null) - return content.Count; - else - return 0; - } - } - - /// - /// If true, the contents of the collection are immutable. - /// - public bool IsReadOnly - { - get - { - return readOnly; - } - } - - /// - /// Removes a particular ShellObject from the list. - /// - /// The ShellObject to remove. - /// True if the item could be removed, false otherwise. - public bool Remove(ShellObject item) - { - if (readOnly) - throw new ArgumentException("Can not remove an item from a read only list."); - - if (content != null) - return content.Remove(item); - else - return false; - } - - #endregion - - #region IEnumerable Members - - /// - /// Allows for enumeration through the list of ShellObjects in the collection. - /// - /// The IEnumerator interface to use for enumeration. - IEnumerator IEnumerable.GetEnumerator() - { - return content as IEnumerator; - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectContainer.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellObjectContainer.cs deleted file mode 100644 index 4b3d058..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectContainer.cs +++ /dev/null @@ -1,133 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents the base class for all types of Shell "containers". Any class deriving from this class - /// can contain other ShellObjects (e.g. ShellFolder, FileSystemKnownFolder, ShellLibrary, etc) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public abstract class ShellContainer : ShellObject, IEnumerable, IDisposable - { - - #region Private Fields - - private IShellFolder desktopFolderEnumeration; - private IShellFolder nativeShellFolder; - - #endregion - - #region Internal Properties - - internal IShellFolder NativeShellFolder - { - get - { - if (nativeShellFolder == null) - { - Guid guid = new Guid(ShellIIDGuid.IShellFolder); - Guid handler = new Guid( ShellBHIDGuid.ShellFolderObject ); - - HRESULT hr = NativeShellItem.BindToHandler( - IntPtr.Zero, ref handler, ref guid, out nativeShellFolder ); - - if (CoreErrorHelper.Failed(hr)) - { - string str = ShellHelper.GetParsingName(NativeShellItem); - if (str != null) - { - if (str == Environment.GetFolderPath(Environment.SpecialFolder.Desktop)) - { - return null; - } - else - { - throw Marshal.GetExceptionForHR((int) hr); - } - } - } - } - - return nativeShellFolder; - } - } - - #endregion - - #region Internal Constructor - - internal ShellContainer() - { - - } - - internal ShellContainer(IShellItem2 shellItem):base(shellItem) - { - - } - - #endregion - - #region Disposable Pattern - - /// - /// Release resources - /// - /// True indicates that this is being called from Dispose(), rather than the finalizer. - protected override void Dispose(bool disposing) - { - if (nativeShellFolder != null) - { - Marshal.ReleaseComObject(nativeShellFolder); - nativeShellFolder = null; - } - - if (desktopFolderEnumeration != null) - { - Marshal.ReleaseComObject(desktopFolderEnumeration); - desktopFolderEnumeration = null; - } - - base.Dispose(disposing); - } - - #endregion - - #region IEnumerable Members - - /// - /// - /// - /// - public IEnumerator GetEnumerator() - { - if (NativeShellFolder == null) - { - if (desktopFolderEnumeration == null) - { - ShellNativeMethods.SHGetDesktopFolder(out desktopFolderEnumeration); - } - - nativeShellFolder = desktopFolderEnumeration; - } - - return new ShellFolderItems(this); - } - - #endregion - - #region IEnumerable Members - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return new ShellFolderItems(this); - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs deleted file mode 100644 index 2c532d5..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectFactory.cs +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal static class ShellObjectFactory - { - internal const string STR_PARSE_PREFER_FOLDER_BROWSING = "Parse Prefer Folder Browsing"; - - /// - /// Creates a ShellObject given a native IShellItem interface - /// - /// - /// A newly constructed ShellObject object - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.String.ToLower", Justification = "We are not currently handling globalization or localization")] - internal static ShellObject Create(IShellItem nativeShellItem) - { - // Sanity check - Debug.Assert(nativeShellItem != null, "nativeShellItem should not be null"); - - // Need to make sure we're running on Vista or higher - if (!CoreHelpers.RunningOnVista) - { - throw new PlatformNotSupportedException("Shell Object creation requires Windows Vista or higher operating system."); - } - - // A lot of APIs need IShellItem2, so just keep a copy of it here - IShellItem2 nativeShellItem2 = nativeShellItem as IShellItem2; - - // Get the System.ItemType property - string itemType = ShellHelper.GetItemType(nativeShellItem2); - - if (!string.IsNullOrEmpty(itemType)) - itemType = itemType.ToLower(); - - // Get some IShellItem attributes - ShellNativeMethods.SFGAO sfgao; - nativeShellItem2.GetAttributes(ShellNativeMethods.SFGAO.SFGAO_FILESYSTEM | ShellNativeMethods.SFGAO.SFGAO_FOLDER, out sfgao); - - // Is this item a FileSystem item? - bool isFileSystem = (sfgao & ShellNativeMethods.SFGAO.SFGAO_FILESYSTEM) != 0; - - // Is this item a Folder? - bool isFolder = (sfgao & ShellNativeMethods.SFGAO.SFGAO_FOLDER) != 0; - - // Shell Library - ShellLibrary shellLibrary = null; - - // For KnownFolders - bool isKnownFolderVirtual = false; - - // Create the right type of ShellObject based on the above information - - // 1. First check if this is a Shell Link - if (itemType == ".lnk") - { - return new ShellLink(nativeShellItem2); - } - // 2. Check if this is a container or a single item (entity) - else if (isFolder) - { - // 3. If this is a folder, check for types: Shell Library, Shell Folder or Search Container - if ((itemType == ".library-ms") && (shellLibrary = ShellLibrary.FromShellItem(nativeShellItem2, true)) != null) - return shellLibrary; // we already created this above while checking for Library - else if (itemType == ".searchconnector-ms") - return new ShellSearchConnector(nativeShellItem2); - else if ((itemType == ".search-ms")) - return new ShellSavedSearchCollection(nativeShellItem2); - else - { - // 4. It's a ShellFolder - if (isFileSystem) - { - // 5. Is it a (File-System / Non-Virtual) Known Folder - if ((GetNativeKnownFolder(nativeShellItem2, out isKnownFolderVirtual) != null) && !isKnownFolderVirtual) - { - FileSystemKnownFolder kf = new FileSystemKnownFolder(nativeShellItem2); - return kf; - } - else - return new ShellFileSystemFolder(nativeShellItem2); - } - else - { - // 5. Is it a (Non File-System / Virtual) Known Folder - if ((GetNativeKnownFolder(nativeShellItem2, out isKnownFolderVirtual) != null) && isKnownFolderVirtual) - { - NonFileSystemKnownFolder kf = new NonFileSystemKnownFolder(nativeShellItem2); - return kf; - } - else - return new ShellNonFileSystemFolder(nativeShellItem2); - } - - } - - } - else - { - // 6. If this is an entity (single item), check if its filesystem or not - if (isFileSystem) - return new ShellFile(nativeShellItem2); - else - return new ShellNonFileSystemItem(nativeShellItem2); - - } - } - - private static IKnownFolderNative GetNativeKnownFolder(IShellItem nativeShellItem, out bool isVirtual) - { - IntPtr pidl = IntPtr.Zero; - - try - { - // Get the PIDL for the ShellItem - pidl = ShellHelper.PidlFromShellItem(nativeShellItem); - - if (pidl == IntPtr.Zero) - { - isVirtual = false; - return null; - } - - IKnownFolderNative knownFolderNative = KnownFolderHelper.FromPIDL(pidl); - - if (knownFolderNative != null) - { - // If we have a valid IKnownFolder, try to get its category - KnownFoldersSafeNativeMethods.NativeFolderDefinition nativeFolderDefinition; - knownFolderNative.GetFolderDefinition(out nativeFolderDefinition); - - // Get the category type and see if it's virtual - if (nativeFolderDefinition.category == FolderCategory.Virtual) - isVirtual = true; - else - isVirtual = false; - - return knownFolderNative; - } - else - { - // KnownFolderHelper.FromPIDL could not create a valid KnownFolder from the given PIDL. - // Return null to indicate the given IShellItem is not a KnownFolder. Also set our out parameter - // to default value. - isVirtual = false; - return null; - } - } - finally - { - ShellNativeMethods.ILFree(pidl); - } - } - - /// - /// Creates a ShellObject given a parsing name - /// - /// - /// A newly constructed ShellObject object - internal static ShellObject Create(string parsingName) - { - if (string.IsNullOrEmpty(parsingName)) - throw new ArgumentNullException("parsingName"); - - // Create a native shellitem from our path - IShellItem2 nativeShellItem; - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - int retCode = ShellNativeMethods.SHCreateItemFromParsingName(parsingName, IntPtr.Zero, ref guid, out nativeShellItem); - - if (CoreErrorHelper.Succeeded(retCode)) - { - return ShellObjectFactory.Create(nativeShellItem); - } - else - { - throw new ExternalException("Unable to Create Shell Item.", Marshal.GetExceptionForHR(retCode)); - } - } - - /// - /// Constructs a new Shell object from IDList pointer - /// - /// - /// - internal static ShellObject Create(IntPtr idListPtr) - { - // Throw exception if not running on Win7 or newer. - CoreHelpers.ThrowIfNotVista(); - - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - IShellItem2 nativeShellItem; - int retCode = ShellNativeMethods.SHCreateItemFromIDList(idListPtr, ref guid, out nativeShellItem); - if (CoreErrorHelper.Succeeded(retCode)) - { - return ShellObjectFactory.Create(nativeShellItem); - } - else - { - // Since this is an internal method, return null instead of throwing an exception. - // Let the caller know we weren't able to create a valid ShellObject with the given PIDL - return null; - } - } - - /// - /// Constructs a new Shell object from IDList pointer - /// - /// - /// - /// - internal static ShellObject Create(IntPtr idListPtr, ShellContainer parent) - { - IShellItem nativeShellItem; - - int retCode = ShellNativeMethods.SHCreateShellItem( - IntPtr.Zero, - parent.NativeShellFolder, - idListPtr, out nativeShellItem); - - if (CoreErrorHelper.Succeeded(retCode)) - { - return ShellObjectFactory.Create(nativeShellItem); - } - else - { - // Since this is an internal method, return null instead of throwing an exception. - // Let the caller know we weren't able to create a valid ShellObject with the given PIDL - return null; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectNode.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellObjectNode.cs deleted file mode 100644 index 325b885..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellObjectNode.cs +++ /dev/null @@ -1,11 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a base class for individual shell entities (file system files, non-file system items, etc) - /// - public abstract class ShellObjectNode : ShellObject - { - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellSavedSearchCollection.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellSavedSearchCollection.cs deleted file mode 100644 index 70e162e..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellSavedSearchCollection.cs +++ /dev/null @@ -1,18 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a saved search - /// - public class ShellSavedSearchCollection : ShellSearchCollection - { - internal ShellSavedSearchCollection(IShellItem2 shellItem) - :base(shellItem) - { - CoreHelpers.ThrowIfNotVista(); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellSearchCollection.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellSearchCollection.cs deleted file mode 100644 index 73b59b3..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellSearchCollection.cs +++ /dev/null @@ -1,21 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents the base class for all search-related classes. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public class ShellSearchCollection : ShellContainer - { - internal ShellSearchCollection() - { - } - - internal ShellSearchCollection(IShellItem2 shellItem):base(shellItem) - { - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellSearchConnector.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellSearchConnector.cs deleted file mode 100644 index 47f6c59..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellSearchConnector.cs +++ /dev/null @@ -1,42 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// A Serch Connector folder in the Shell Namespace - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public sealed class ShellSearchConnector : ShellSearchCollection - { - - #region Private Constructor - - internal ShellSearchConnector() - { - CoreHelpers.ThrowIfNotWin7(); - } - - internal ShellSearchConnector(IShellItem2 shellItem) - { - CoreHelpers.ThrowIfNotWin7(); - - nativeShellItem = shellItem; - } - - #endregion - - /// - /// Indicates whether this feature is supported on the current platform. - /// - new public static bool IsPlatformSupported - { - get - { - // We need Windows 7 onwards ... - return CoreHelpers.RunningOnWin7; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs deleted file mode 100644 index 54d9613..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellSearchFolder.cs +++ /dev/null @@ -1,285 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Create and modify search folders. - /// - public class ShellSearchFolder : ShellSearchCollection - { - /// - /// Create a simple search folder. Once the appropriate parameters are set, - /// the search folder can be enumerated to get the search results. - /// - /// Specific condition on which to perform the search (property and expected value) - /// List of folders/paths to perform the search on. These locations need to be indexed by the system. - public ShellSearchFolder(SearchCondition searchCondition, params ShellContainer[] searchScopePath) - { - CoreHelpers.ThrowIfNotVista(); - - NativeSearchFolderItemFactory = (ISearchFolderItemFactory)new SearchFolderItemFactoryCoClass(); - - this.SearchCondition = searchCondition; - - if (searchScopePath != null && searchScopePath.Length > 0 && searchScopePath[0] != null) - { - List paths = new List(); - foreach (ShellContainer cont in searchScopePath) - paths.Add(cont.ParsingName); - - this.SearchScopePaths = paths.ToArray(); - } - } - - /// - /// Create a simple search folder. Once the appropiate parameters are set, - /// the search folder can be enumerated to get the search results. - /// - /// Specific condition on which to perform the search (property and expected value) - /// List of folders/paths to perform the search on. These locations need to be indexed by the system. - public ShellSearchFolder(SearchCondition searchCondition, params string[] searchScopePath) - { - CoreHelpers.ThrowIfNotVista(); - - NativeSearchFolderItemFactory = (ISearchFolderItemFactory)new SearchFolderItemFactoryCoClass(); - - if (searchScopePath != null && searchScopePath.Length > 0 && searchScopePath[0] != null) - { - this.SearchScopePaths = searchScopePath; - } - - this.SearchCondition = searchCondition; - } - - internal ISearchFolderItemFactory NativeSearchFolderItemFactory - { - get; - set; - } - - private SearchCondition searchCondition; - /// - /// Gets the of the search. - /// When this property is not set, the resulting search will have no filters applied. - /// - public SearchCondition SearchCondition - { - get { return searchCondition; } - private set - { - searchCondition = value; - - NativeSearchFolderItemFactory.SetCondition(searchCondition.NativeSearchCondition); - } - } - - private string[] searchScopePaths; - /// - /// Gets the search scope, as specified using an array of locations to search. - /// The search will include this location and all its subcontainers. The default is FOLDERID_Profile - /// - public string[] SearchScopePaths - { - get - { - return searchScopePaths; - } - private set - { - searchScopePaths = value; - List shellItems = new List(); - - Guid shellItemGuid = new Guid(ShellIIDGuid.IShellItem); - Guid shellItemArrayGuid = new Guid(ShellIIDGuid.IShellItemArray); - - // Create IShellItem for all the scopes we were given - foreach (string path in searchScopePaths) - { - IShellItem scopeShellItem; - - int hr = ShellNativeMethods.SHCreateItemFromParsingName(path, IntPtr.Zero, ref shellItemGuid, out scopeShellItem); - - if (CoreErrorHelper.Succeeded(hr)) - shellItems.Add(scopeShellItem); - } - - // Create a new IShellItemArray - IShellItemArray scopeShellItemArray = new ShellItemArray(shellItems.ToArray()); - - // Set the scope on the native ISearchFolderItemFactory - HRESULT hResult = NativeSearchFolderItemFactory.SetScope(scopeShellItemArray); - - if (!CoreErrorHelper.Succeeded((int)hResult)) - Marshal.ThrowExceptionForHR((int)hResult); - } - } - - internal override IShellItem NativeShellItem - { - get - { - IShellItem shellItem; - Guid guid = new Guid(ShellIIDGuid.IShellItem); - - if (NativeSearchFolderItemFactory != null) - { - int hr = NativeSearchFolderItemFactory.GetShellItem(ref guid, out shellItem); - - if (!CoreErrorHelper.Succeeded(hr)) - Marshal.ThrowExceptionForHR(hr); - - return shellItem; - } - else - return null; - } - } - - - /// - /// Creates a list of stack keys, as specified. If this method is not called, - /// by default the folder will not be stacked. - /// - /// Array of canonical names for properties on which the folder is stacked. - /// If one of the given canonical names is invalid. - public void SetStacks(params string[] canonicalNames) - { - List propertyKeyList = new List(); - - foreach (string prop in canonicalNames) - { - // Get the PropertyKey using the canonicalName passed in - PropertyKey propKey; - int result = PropertySystemNativeMethods.PSGetPropertyKeyFromName(prop, out propKey); - - if (!CoreErrorHelper.Succeeded(result)) - throw new ArgumentException("The given CanonicalName is not valid.", "canonicalNames", Marshal.GetExceptionForHR(result)); - - propertyKeyList.Add(propKey); - } - - if (propertyKeyList.Count > 0) - SetStacks(propertyKeyList.ToArray()); - } - - /// - /// Creates a list of stack keys, as specified. If this method is not called, - /// by default the folder will not be stacked. - /// - /// Array of property keys on which the folder is stacked. - public void SetStacks(params PropertyKey[] propertyKeys) - { - if (propertyKeys.Length > 0) - NativeSearchFolderItemFactory.SetStacks((uint)propertyKeys.Length, propertyKeys); - } - - /// - /// Sets the search folder display name. - /// - public string DisplayName - { - set - { - HRESULT hr = NativeSearchFolderItemFactory.SetDisplayName(value); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - } - - /// - /// Sets the search folder icon size. - /// The default settings are based on the FolderTypeID which is set by the - /// SearchFolder::SetFolderTypeID method. - /// - public int IconSize - { - set - { - HRESULT hr = NativeSearchFolderItemFactory.SetIconSize(value); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - } - - /// - /// Sets a search folder type ID, as specified. - /// - public Guid FolderTypeID - { - set - { - HRESULT hr = NativeSearchFolderItemFactory.SetFolderTypeID(value); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - } - - /// - /// Sets folder logical view mode. The default settings are based on the FolderTypeID which is set - /// by the SearchFolder::SetFolderTypeID method. - /// - /// The logical view mode to set. - public void SetFolderLogicalViewMode(FolderLogicalViewMode mode) - { - HRESULT hr = NativeSearchFolderItemFactory.SetFolderLogicalViewMode(mode); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - - /// - /// Creates a new column list whose columns are all visible, - /// given an array of PropertyKey structures. The default is based on FolderTypeID. - /// - /// This property may not work correctly with the ExplorerBrowser control. - public PropertyKey[] VisibleColumns - { - set - { - HRESULT hr = NativeSearchFolderItemFactory.SetVisibleColumns((uint)value.Length, value); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - } - - /// - /// Creates a list of sort column directions, as specified. - /// - /// This property may not work correctly with the ExplorerBrowser control. - public SortColumn[] SortColumns - { - set - { - HRESULT hr = NativeSearchFolderItemFactory.SetSortColumns((uint)value.Length, value); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - } - - /// - /// Sets a group column, as specified. If no group column is specified, no grouping occurs. - /// - /// This property may not work correctly with the ExplorerBrowser control. - public PropertyKey GroupColumn - { - set - { - HRESULT hr = NativeSearchFolderItemFactory.SetGroupColumn(ref value); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs deleted file mode 100644 index 4d316dd..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellThumbnail.cs +++ /dev/null @@ -1,419 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using System.Windows.Interop; -using System.Windows.Media.Imaging; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a thumbnail or an icon for a ShellObject. - /// - public class ShellThumbnail - { - #region Private members - - /// - /// Native shellItem - /// - private IShellItem shellItemNative = null; - - /// - /// Internal member to keep track of the current size - /// - private System.Windows.Size currentSize = new System.Windows.Size(256, 256); - - #endregion - - #region Constructors - - /// - /// Internal constructor that takes in a parent ShellObject. - /// - /// - internal ShellThumbnail(ShellObject shellObject) - { - if (shellObject == null || shellObject.NativeShellItem == null) - throw new ArgumentNullException("shellObject"); - - shellItemNative = shellObject.NativeShellItem; - } - - /// - /// No public default constructor. User should not be able to create a ShellThumbnail, - /// only retrive it from an existing ShellFolder - /// - private ShellThumbnail() { } - - #endregion - - #region Public properties - - /// - /// Gets or sets the default size of the thumbnail or icon. The default is 32x32 pixels for icons and - /// 256x256 pixels for thumbnails. - /// - /// If the size specified is larger than the maximum size of 1024x1024 for thumbnails and 256x256 for icons, - /// an is thrown. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)", Justification = "We are not currently handling globalization or localization")] - public System.Windows.Size CurrentSize - { - get - { - return currentSize; - } - set - { - // Check for 0; negative number check not required as System.Windows.Size only allows positive numbers. - if (value.Height == 0 || value.Width == 0) - throw new System.ArgumentOutOfRangeException("value", "CurrentSize (width or height) cannot be 0"); - - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - { - if (value.Height > DefaultIconSize.Maximum.Height || value.Width > DefaultIconSize.Maximum.Width) - throw new System.ArgumentOutOfRangeException("value", string.Format("CurrentSize (width or height) cannot be greater than the maximum size", DefaultIconSize.Maximum)); - } - else - { - // Covers the default mode (Thumbnail Or Icon) as well as ThumbnailOnly - if (value.Height > DefaultThumbnailSize.Maximum.Height || value.Width > DefaultThumbnailSize.Maximum.Width) - throw new System.ArgumentOutOfRangeException("value", string.Format("CurrentSize (width or height) cannot be greater than the maximum size", DefaultThumbnailSize.Maximum)); - } - - currentSize = value; - } - } - - /// - /// Gets the thumbnail or icon image in format. - /// Null is returned if the ShellObject does not have a thumbnail or icon image. - /// - public Bitmap Bitmap - { - get - { - return GetBitmap(CurrentSize); - } - } - - /// - /// Gets the thumbnail or icon image in format. - /// Null is returned if the ShellObject does not have a thumbnail or icon image. - /// - public BitmapSource BitmapSource - { - get - { - return GetBitmapSource(CurrentSize); - } - } - - /// - /// Gets the thumbnail or icon image in format. - /// Null is returned if the ShellObject does not have a thumbnail or icon image. - /// - public Icon Icon - { - get - { - return Icon.FromHandle(Bitmap.GetHicon()); - } - } - - /// - /// Gets the thumbnail or icon in small size and format. - /// - public Bitmap SmallBitmap - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmap(DefaultIconSize.Small); - else - return GetBitmap(DefaultThumbnailSize.Small); - } - } - - /// - /// Gets the thumbnail or icon in small size and format. - /// - public BitmapSource SmallBitmapSource - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmapSource(DefaultIconSize.Small); - else - return GetBitmapSource(DefaultThumbnailSize.Small); - } - } - - /// - /// Gets the thumbnail or icon in small size and format. - /// - public Icon SmallIcon - { - get - { - return Icon.FromHandle(SmallBitmap.GetHicon()); - } - } - - /// - /// Gets the thumbnail or icon in Medium size and format. - /// - public Bitmap MediumBitmap - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmap(DefaultIconSize.Medium); - else - return GetBitmap(DefaultThumbnailSize.Medium); - } - } - - /// - /// Gets the thumbnail or icon in medium size and format. - /// - public BitmapSource MediumBitmapSource - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmapSource(DefaultIconSize.Medium); - else - return GetBitmapSource(DefaultThumbnailSize.Medium); - } - } - - /// - /// Gets the thumbnail or icon in Medium size and format. - /// - public Icon MediumIcon - { - get - { - return Icon.FromHandle(MediumBitmap.GetHicon()); - } - } - - /// - /// Gets the thumbnail or icon in large size and format. - /// - public Bitmap LargeBitmap - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmap(DefaultIconSize.Large); - else - return GetBitmap(DefaultThumbnailSize.Large); - } - } - - /// - /// Gets the thumbnail or icon in large size and format. - /// - public BitmapSource LargeBitmapSource - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmapSource(DefaultIconSize.Large); - else - return GetBitmapSource(DefaultThumbnailSize.Large); - } - } - - /// - /// Gets the thumbnail or icon in Large size and format. - /// - public Icon LargeIcon - { - get - { - return Icon.FromHandle(LargeBitmap.GetHicon()); - } - } - - /// - /// Gets the thumbnail or icon in extra large size and format. - /// - public Bitmap ExtraLargeBitmap - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmap(DefaultIconSize.ExtraLarge); - else - return GetBitmap(DefaultThumbnailSize.ExtraLarge); - - } - } - - /// - /// Gets the thumbnail or icon in Extra Large size and format. - /// - public BitmapSource ExtraLargeBitmapSource - { - get - { - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - return GetBitmapSource(DefaultIconSize.ExtraLarge); - else - return GetBitmapSource(DefaultThumbnailSize.ExtraLarge); - } - } - - /// - /// Gets the thumbnail or icon in Extra Large size and format. - /// - public Icon ExtraLargeIcon - { - get - { - return Icon.FromHandle(ExtraLargeBitmap.GetHicon()); - } - } - - /// - /// Gets or sets a value that determines if the current retrieval option is cache or extract, cache only, or from memory only. - /// The default is cache or extract. - /// - public ShellThumbnailRetrievalOptions RetrievalOption - { - get; - set; - } - - private ShellThumbnailFormatOptions formatOption = ShellThumbnailFormatOptions.Default; - /// - /// Gets or sets a value that determines if the current format option is thumbnail or icon, thumbnail only, or icon only. - /// The default is thumbnail or icon. - /// - public ShellThumbnailFormatOptions FormatOption - { - get - { - return formatOption; - } - set - { - formatOption = value; - - // Do a similar check as we did in CurrentSize property setter, - // If our mode is IconOnly, then our max is defined by DefaultIconSize.Maximum. We should make sure - // our CurrentSize is within this max range - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - { - if (CurrentSize.Height > DefaultIconSize.Maximum.Height || CurrentSize.Width > DefaultIconSize.Maximum.Width) - CurrentSize = DefaultIconSize.Maximum; - } - } - - } - - /// - /// Gets or sets a value that determines if the user can manually stretch the returned image. - /// The default value is false. - /// - /// - /// For example, if the caller passes in 80x80 a 96x96 thumbnail could be returned. - /// This could be used as a performance optimization if the caller will need to stretch - /// the image themselves anyway. Note that the Shell implementation performs a GDI stretch blit. - /// If the caller wants a higher quality image stretch, they should pass this flag and do it themselves. - /// - public bool AllowBiggerSize - { - get; - set; - } - - #endregion - - #region Private Methods - - private ShellNativeMethods.SIIGBF CalculateFlags() - { - ShellNativeMethods.SIIGBF flags = 0x0000; - - if (AllowBiggerSize) - flags |= ShellNativeMethods.SIIGBF.SIIGBF_BIGGERSIZEOK; - - if (RetrievalOption == ShellThumbnailRetrievalOptions.CacheOnly) - flags |= ShellNativeMethods.SIIGBF.SIIGBF_INCACHEONLY; - else if (RetrievalOption == ShellThumbnailRetrievalOptions.MemoryOnly) - flags |= ShellNativeMethods.SIIGBF.SIIGBF_MEMORYONLY; - - if (FormatOption == ShellThumbnailFormatOptions.IconOnly) - flags |= ShellNativeMethods.SIIGBF.SIIGBF_ICONONLY; - else if (FormatOption == ShellThumbnailFormatOptions.ThumbnailOnly) - flags |= ShellNativeMethods.SIIGBF.SIIGBF_THUMBNAILONLY; - - return flags; - } - - private IntPtr GetHBitmap(System.Windows.Size size) - { - IntPtr hbitmap = IntPtr.Zero; - - // Create a size structure to pass to the native method - CoreNativeMethods.SIZE nativeSIZE = new CoreNativeMethods.SIZE(); - nativeSIZE.cx = Convert.ToInt32(size.Width); - nativeSIZE.cy = Convert.ToInt32(size.Height); - - // Use IShellItemImageFactory to get an icon - // Options passed in: Resize to fit - HRESULT hr = ((IShellItemImageFactory)shellItemNative).GetImage(nativeSIZE, CalculateFlags(), out hbitmap); - - if (hr == HRESULT.S_OK) - return hbitmap; - else if ((uint)hr == 0x8004B200 && FormatOption == ShellThumbnailFormatOptions.ThumbnailOnly) - { - // Thumbnail was requested, but this ShellItem doesn't have a thumbnail. - throw new InvalidOperationException("The current ShellObject does not have a thumbnail. Try using ShellThumbnailFormatOptions.Default to get the icon for this item.", Marshal.GetExceptionForHR((int)hr)); - } - else if ((uint)hr == 0x80040154) // REGDB_E_CLASSNOTREG - { - throw new NotSupportedException("The current ShellObject does not have a valid thumbnail handler or there was a problem in extracting the thumbnail for this specific shell object.", Marshal.GetExceptionForHR((int)hr)); - } - else - throw Marshal.GetExceptionForHR((int)hr); - } - - private Bitmap GetBitmap(System.Windows.Size size) - { - IntPtr hBitmap = GetHBitmap(size); - - // return a System.Drawing.Bitmap from the hBitmap - Bitmap returnValue = Bitmap.FromHbitmap(hBitmap); - - // delete HBitmap to avoid memory leaks - ShellNativeMethods.DeleteObject(hBitmap); - - return returnValue; - } - - private BitmapSource GetBitmapSource(System.Windows.Size size) - { - IntPtr hBitmap = GetHBitmap(size); - - // return a System.Media.Imaging.BitmapSource - // Use interop to create a BitmapSource from hBitmap. - BitmapSource returnValue = Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, System.Windows.Int32Rect.Empty, BitmapSizeOptions.FromEmptyOptions()); - - // delete HBitmap to avoid memory leaks - ShellNativeMethods.DeleteObject(hBitmap); - - return returnValue; - } - - #endregion - - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Common/ShellThumbnailEnums.cs b/src/External/WindowsAPICodePack/Shell/Common/ShellThumbnailEnums.cs deleted file mode 100644 index 6c8eb90..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/ShellThumbnailEnums.cs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents the different retrieval options for the thumbnail or icon, - /// such as extracting the thumbnail or icon from a file, - /// from the cache only, or from memory only. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags", Justification = "The members of this enum do not represent flags")] - public enum ShellThumbnailRetrievalOptions - { - /// - /// The default behavior loads a thumbnail. If there is no thumbnail for the current ShellItem, - /// the icon is retrieved. The thumbnail or icon is extracted if it is not currently cached. - /// - Default, - - /// - /// The CacheOnly behavior returns a cached thumbnail if it is available. Allows access to the disk, - /// but only to retrieve a cached item. If no cached thumbnail is available, a cached per-instance icon is returned but - /// a thumbnail or icon is not extracted. - /// - CacheOnly = ShellNativeMethods.SIIGBF.SIIGBF_INCACHEONLY, - - /// - /// The MemoryOnly behavior returns the item only if it is in memory. The disk is not accessed even if the item is cached. - /// Note that this only returns an already-cached icon and can fall back to a per-class icon if - /// an item has a per-instance icon that has not been cached yet. Retrieving a thumbnail, - /// even if it is cached, always requires the disk to be accessed, so this method should not be - /// called from the user interface (UI) thread without passing ShellThumbnailCacheOptions.MemoryOnly. - /// - MemoryOnly = ShellNativeMethods.SIIGBF.SIIGBF_MEMORYONLY, - } - - /// - /// Represents the format options for the thumbnails and icons. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1027:MarkEnumsWithFlags", Justification = "The members of this enum do not represent flags")] - public enum ShellThumbnailFormatOptions - { - /// - /// The default behavior loads a thumbnail. An HBITMAP for the icon of the item is retrieved if there is no thumbnail for the current Shell Item. - /// - Default, - - /// - /// The ThumbnailOnly behavior returns only the thumbnails, never the icon. Note that not all items have thumbnails - /// so ShellThumbnailFormatOptions.ThumbnailOnly can fail in these cases. - /// - ThumbnailOnly = ShellNativeMethods.SIIGBF.SIIGBF_THUMBNAILONLY, - - /// - /// The IconOnly behavior returns only the icon, never the thumbnail. - /// - IconOnly = ShellNativeMethods.SIIGBF.SIIGBF_ICONONLY, - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Common/SortColumn.cs b/src/External/WindowsAPICodePack/Shell/Common/SortColumn.cs deleted file mode 100644 index b3c0979..0000000 --- a/src/External/WindowsAPICodePack/Shell/Common/SortColumn.cs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Stores information about how to sort a column that is displayed in the folder view. - /// - [StructLayout(LayoutKind.Sequential)] - public struct SortColumn - { - /// - /// Creates a sort column with the specified direction for the given property. - /// - /// Property key for the property that the user will sort. - /// The direction in which the items are sorted. - public SortColumn(PropertyKey propertyKey, SortDirection direction) - { - PropertyKey = propertyKey; - Direction = direction; - } - - /// - /// The ID of the column by which the user will sort. A PropertyKey structure. - /// For example, for the "Name" column, the property key is PKEY_ItemNameDisplay or - /// . - /// - public PropertyKey PropertyKey; - - /// - /// The direction in which the items are sorted. - /// - public SortDirection Direction; - }; - -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs deleted file mode 100644 index 26ba485..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialog.cs +++ /dev/null @@ -1,1290 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.ObjectModel; -using System.ComponentModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Markup; -using Microsoft.WindowsAPICodePack.Dialogs.Controls; -using Microsoft.WindowsAPICodePack.Shell; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Defines the abstract base class for the common file dialogs. - /// - [ContentProperty("Controls")] - public abstract class CommonFileDialog : IDialogControlHost, IDisposable - { - /// - /// The collection of names selected by the user. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Security", "CA2104:DoNotDeclareReadOnlyMutableReferenceTypes")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields", Justification = "This is an internal field used by the CommonOpenFileDialog and possibly other dialogs deriving from this base class.")] - protected readonly Collection fileNames; - internal readonly Collection items; - internal DialogShowState showState = DialogShowState.PreShow; - - private IFileDialog nativeDialog; - private IFileDialogCustomize customize; - private NativeDialogEventSink nativeEventSink; - private bool? canceled; - private bool resetSelections; - private IntPtr parentWindow = IntPtr.Zero; - - private bool filterSet = false; // filters can be set only once - - /// - /// Contains a common error message string shared by classes that - /// inherit from this class. - /// - protected const string IllegalPropertyChangeString = " cannot be changed while dialog is showing"; - - #region Constructors - - /// - /// Creates a new instance of this class. - /// - protected CommonFileDialog() - { - if (!CoreHelpers.RunningOnVista) - throw new PlatformNotSupportedException( - "Common File Dialog requires Windows Vista or later."); - - fileNames = new Collection(); - filters = new CommonFileDialogFilterCollection(); - items = new Collection(); - controls = new CommonFileDialogControlCollection(this); - } - - /// - /// Creates a new instance of this class with the specified title. - /// - /// The title to display in the dialog. - protected CommonFileDialog(string title) - : this() - { - this.title = title; - } - - #endregion - - // Template method to allow derived dialog to create actual - // specific COM coclass (e.g. FileOpenDialog or FileSaveDialog). - internal abstract void InitializeNativeFileDialog(); - internal abstract IFileDialog GetNativeFileDialog(); - internal abstract void PopulateWithFileNames(Collection names); - internal abstract void PopulateWithIShellItems(Collection shellItems); - internal abstract void CleanUpNativeFileDialog(); - internal abstract ShellNativeMethods.FOS GetDerivedOptionFlags(ShellNativeMethods.FOS flags); - - #region Public API - - // Events. - /// - /// Raised just before the dialog is about to return with a result. Occurs when the user clicks on the Open - /// or Save button on a file dialog box. - /// - public event CancelEventHandler FileOk; - /// - /// Raised just before the user navigates to a new folder. - /// - public event EventHandler FolderChanging; - /// - /// Raised when the user navigates to a new folder. - /// - public event EventHandler FolderChanged; - /// - /// Raised when the user changes the selection in the dialog's view. - /// - public event EventHandler SelectionChanged; - /// - /// Raised when the dialog is opened to notify the application of the initial chosen filetype. - /// - public event EventHandler FileTypeChanged; - /// - /// Raised when the dialog is opening. - /// - public event EventHandler DialogOpening; - - private CommonFileDialogControlCollection controls; - /// - /// Gets the collection of controls for the dialog. - /// - public CommonFileDialogControlCollection Controls - { - get { return controls; } - } - - private CommonFileDialogFilterCollection filters; - /// - /// Gets the filters used by the dialog. - /// - public CommonFileDialogFilterCollection Filters - { - get { return filters; } - } - - private string title; - /// - /// Gets or sets the dialog title. - /// - /// A object. - public string Title - { - get { return title; } - set - { - title = value; - if (NativeDialogShowing) - nativeDialog.SetTitle(value); - } - } - - // This is the first of many properties that are backed by the FOS_* - // bitflag options set with IFileDialog.SetOptions(). - // SetOptions() fails - // if called while dialog is showing (e.g. from a callback). - private bool ensureFileExists; - /// - /// Gets or sets a value that determines whether the file must exist beforehand. - /// - /// A value. true if the file must exist. - /// This property cannot be set when the dialog is visible. - public bool EnsureFileExists - { - get { return ensureFileExists; } - set - { - ThrowIfDialogShowing("EnsureFileExists" + IllegalPropertyChangeString); - ensureFileExists = value; - } - } - - private bool ensurePathExists; - /// - /// Gets or sets a value that specifies whether the returned file must be in an existing folder. - /// - /// A value. true if the file must exist. - /// This property cannot be set when the dialog is visible. - public bool EnsurePathExists - { - get { return ensurePathExists; } - set - { - ThrowIfDialogShowing("EnsurePathExists" + IllegalPropertyChangeString); - ensurePathExists = value; - } - } - - private bool ensureValidNames; - /// Gets or sets a value that determines whether to validate file names. - /// - ///A value. true to check for situations that would prevent an application from opening the selected file, such as sharing violations or access denied errors. - /// This property cannot be set when the dialog is visible. - /// - public bool EnsureValidNames - { - get { return ensureValidNames; } - set - { - ThrowIfDialogShowing("EnsureValidNames" + IllegalPropertyChangeString); - ensureValidNames = value; - } - } - - private bool ensureReadOnly; - /// - /// Gets or sets a value that determines whether read-only items are returned. - /// Default value for CommonOpenFileDialog is true (allow read-only files) and - /// CommonSaveFileDialog is false (don't allow read-only files). - /// - /// A value. true includes read-only items. - /// This property cannot be set when the dialog is visible. - public bool EnsureReadOnly - { - get { return ensureReadOnly; } - set - { - ThrowIfDialogShowing("EnsureReadOnly" + IllegalPropertyChangeString); - ensureReadOnly = value; - } - } - - private bool restoreDirectory; - /// - /// Gets or sets a value that determines the restore directory. - /// - /// - /// This property cannot be set when the dialog is visible. - public bool RestoreDirectory - { - get { return restoreDirectory; } - set - { - ThrowIfDialogShowing("RestoreDirectory" + IllegalPropertyChangeString); - restoreDirectory = value; - } - } - - private bool showPlacesList = true; - /// - /// Gets or sets a value that controls whether - /// to show or hide the list of pinned places that - /// the user can choose. - /// - /// A value. true if the list is visible; otherwise false. - /// This property cannot be set when the dialog is visible. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "ShowPlaces", Justification = "The property is for showing or hiding the _Places_ section in Vista")] - public bool ShowPlacesList - { - - get { return showPlacesList; } - set - { - ThrowIfDialogShowing("ShowPlacesList" + IllegalPropertyChangeString); - showPlacesList = value; - } - } - - private bool addToMruList = true; - /// - /// Gets or sets a value that controls whether to show or hide the list of places where the user has recently opened or saved items. - /// - /// A value. - /// This property cannot be set when the dialog is visible. - public bool AddToMostRecentlyUsedList - { - get { return addToMruList; } - set - { - ThrowIfDialogShowing("AddToMostRecentlyUsedList" + IllegalPropertyChangeString); - addToMruList = value; - } - } - - private bool showHiddenItems; - /// - /// Gets or sets a value that controls whether to show hidden items. - /// - /// A value.true to show the items; otherwise false. - /// This property cannot be set when the dialog is visible. - public bool ShowHiddenItems - { - get { return showHiddenItems; } - set - { - ThrowIfDialogShowing("ShowHiddenItems" + IllegalPropertyChangeString); - showHiddenItems = value; - } - } - private bool allowPropertyEditing; - /// - /// Gets or sets a value that controls whether - /// properties can be edited. - /// - /// A value. - public bool AllowPropertyEditing - { - get { return allowPropertyEditing; } - set { allowPropertyEditing = value; } - } - - private bool navigateToShortcut = true; - /// - /// Gets or sets a value that controls whether shortcuts should be treated as their target items, allowing an application to open a .lnk file. - /// - /// A value. true indicates that shortcuts should be treated as their targets. - /// This property cannot be set when the dialog is visible. - public bool NavigateToShortcut - { - get { return navigateToShortcut; } - set - { - ThrowIfDialogShowing("NavigateToShortcut" + IllegalPropertyChangeString); - navigateToShortcut = value; - } - } - - /// - /// Gets or sets the default file extension to be added to file names. If the value is null - /// or String.Empty, the extension is not added to the file names. - /// - public string DefaultExtension - { - get; - set; - } - - /// - /// Gets the index for the currently selected file type. - /// - public int SelectedFileTypeIndex - { - get - { - uint fileType; - - if (nativeDialog != null) - { - nativeDialog.GetFileTypeIndex(out fileType); - return (int)fileType; - } - - return -1; - } - } - - /// - /// Tries to set the File(s) Type Combo to match the value in - /// 'DefaultExtension'. Only doing this if 'this' is a Save dialog - /// as it makes no sense to do this if only Opening a file. - /// - /// - /// The native/IFileDialog instance. - /// - private void SyncFileTypeComboToDefaultExtension(IFileDialog dialog) - { - // make sure it's a Save dialog and that there is a default - // extension to sync to. - if (!(this is CommonSaveFileDialog) || DefaultExtension == null || - filters.Count <= 0) - { - return; - } - - // The native version of SetFileTypeIndex() requires an - // unsigned integer as its parameter. This (having it be defined - // as a uint right up front) avoids a cast, and the potential - // problems of casting a signed value to an unsigned one. - uint filtersCounter = 0; - - CommonFileDialogFilter filter = null; - - for (filtersCounter = 0; filtersCounter < filters.Count; - filtersCounter++) - { - filter = (CommonFileDialogFilter)filters[(int)filtersCounter]; - - if (filter.Extensions.Contains(DefaultExtension)) - { - // set the docType combo to match this - // extension. property is a 1-based index. - dialog.SetFileTypeIndex(filtersCounter + 1); - - // we're done, exit for - break; - } - } - - } - - /// - /// Gets the selected filename. - /// - /// A object. - /// This property cannot be used when multiple files are selected. - public string FileName - { - get - { - CheckFileNamesAvailable(); - - if (fileNames.Count > 1) - throw new InvalidOperationException("Multiple files selected - the FileNames property should be used instead."); - - string returnFilename = fileNames[0]; - - // "If extension is a null reference (Nothing in Visual - // Basic), the returned string contains the specified - // path with its extension removed." Since we do not want - // to remove any existing extension, make sure the - // DefaultExtension property is NOT null. - - // if we should, and there is one to set... - if (!string.IsNullOrEmpty(DefaultExtension)) - { - returnFilename = System.IO.Path.ChangeExtension(returnFilename, DefaultExtension); - } - - return returnFilename; - } - } - - /// - /// Gets the selected item as a ShellObject. - /// - /// A object. - /// This property cannot be used when multiple files - /// are selected. - public ShellObject FileAsShellObject - { - get - { - CheckFileItemsAvailable(); - - if (items.Count > 1) - throw new InvalidOperationException("Multiple files selected - the Items property should be used instead."); - - if (items.Count == 1) - return ShellObjectFactory.Create(items[0]); - else - return null; - } - } - - /// - /// Adds a location, such as a folder, library, search connector, or known folder, to the list of - /// places available for a user to open or save items. This method actually adds an item - /// to the Favorite Links or Places section of the Open/Save dialog. - /// - /// The item to add to the places list. - /// One of the enumeration values that indicates placement of the item in the list. - public void AddPlace(ShellContainer place, FileDialogAddPlaceLocation location) - { - // Get our native dialog - if (nativeDialog == null) - { - InitializeNativeFileDialog(); - nativeDialog = GetNativeFileDialog(); - } - - // Add the shellitem to the places list - if (nativeDialog != null) - nativeDialog.AddPlace(((ShellObject)place).NativeShellItem, (ShellNativeMethods.FDAP)location); - } - - /// - /// Adds a location (folder, library, search connector, known folder) to the list of - /// places available for the user to open or save items. This method actually adds an item - /// to the Favorite Links or Places section of the Open/Save dialog. Overload method - /// takes in a string for the path. - /// - /// The item to add to the places list. - /// One of the enumeration values that indicates placement of the item in the list. - public void AddPlace(string path, FileDialogAddPlaceLocation location) - { - if (string.IsNullOrEmpty(path)) - throw new ArgumentNullException("path"); - - // Get our native dialog - if (nativeDialog == null) - { - InitializeNativeFileDialog(); - nativeDialog = GetNativeFileDialog(); - } - - // Create a native shellitem from our path - IShellItem2 nativeShellItem; - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - int retCode = ShellNativeMethods.SHCreateItemFromParsingName(path, IntPtr.Zero, ref guid, out nativeShellItem); - - if (!CoreErrorHelper.Succeeded(retCode)) - throw new ExternalException("Shell item could not be created.", Marshal.GetExceptionForHR(retCode)); - - // Add the shellitem to the places list - if (nativeDialog != null) - nativeDialog.AddPlace(nativeShellItem, (ShellNativeMethods.FDAP)location); - } - - // Null = use default directory. - private string initialDirectory; - /// - /// Gets or sets the initial directory displayed when the dialog is shown. - /// A null or empty string indicates that the dialog is using the default directory. - /// - /// A object. - public string InitialDirectory - { - get { return initialDirectory; } - set { initialDirectory = value; } - } - - private ShellContainer initialDirectoryShellContainer; - /// - /// Gets or sets a location that is always selected when the dialog is opened, - /// regardless of previous user action. A null value implies that the dialog is using - /// the default location. - /// - public ShellContainer InitialDirectoryShellContainer - { - get - { - return initialDirectoryShellContainer; - } - set - { - initialDirectoryShellContainer = value; - } - } - - private string defaultDirectory; - /// - /// Sets the folder and path used as a default if there is not a recently used folder value available. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1044:PropertiesShouldNotBeWriteOnly", Justification = "This is following the native API")] - public string DefaultDirectory - { - set { defaultDirectory = value; } - } - - private ShellContainer defaultDirectoryShellContainer; - /// - /// Sets the location (ShellContainer - /// used as a default if there is not a recently used folder value available. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1044:PropertiesShouldNotBeWriteOnly", Justification = "This is following the native API")] - public ShellContainer DefaultDirectoryShellContainer - { - set { defaultDirectoryShellContainer = value; } - } - - // Null = use default identifier. - private Guid cookieIdentifier; - /// - /// Gets or sets a value that enables a calling application - /// to associate a GUID with a dialog's persisted state. - /// - public Guid CookieIdentifier - { - get { return cookieIdentifier; } - set { cookieIdentifier = value; } - } - - /// - /// Displays the dialog. - /// - /// Window handle of any top-level window that will own the modal dialog box. - /// A object. - public CommonFileDialogResult ShowDialog(IntPtr ownerWindowHandle) - { - if (ownerWindowHandle == IntPtr.Zero) - throw new ArgumentException("ownerWindowHandle"); - - // Set the parent / owner window - parentWindow = ownerWindowHandle; - - // Show the modal dialog - return ShowDialog(); - } - - /// - /// Displays the dialog. - /// - /// Top-level WPF window that will own the modal dialog box. - /// A object. - public CommonFileDialogResult ShowDialog(Window window) - { - if (window == null) - throw new ArgumentNullException("window"); - - // Set the parent / owner window - parentWindow = (new WindowInteropHelper(window)).Handle; - - // Show the modal dialog - return ShowDialog(); - } - - /// - /// Displays the dialog. - /// - /// A object. - public CommonFileDialogResult ShowDialog() - { - CommonFileDialogResult result; - - // Fetch derived native dialog (i.e. Save or Open). - InitializeNativeFileDialog(); - nativeDialog = GetNativeFileDialog(); - - // Apply outer properties to native dialog instance. - ApplyNativeSettings(nativeDialog); - InitializeEventSink(nativeDialog); - - // Clear user data if Reset has been called - // since the last show. - if (resetSelections) - { - resetSelections = false; - } - - // Show dialog. - showState = DialogShowState.Showing; - int hresult = nativeDialog.Show(parentWindow); - showState = DialogShowState.Closed; - - // Create return information. - if (CoreErrorHelper.Matches(hresult, (int)HRESULT.ERROR_CANCELLED)) - { - canceled = true; - result = CommonFileDialogResult.Cancel; - fileNames.Clear(); - } - else - { - canceled = false; - result = CommonFileDialogResult.OK; - - // Populate filenames if user didn't cancel. - PopulateWithFileNames(fileNames); - - // Populate the actual IShellItems - PopulateWithIShellItems(items); - } - - return result; - } - /// - /// Removes the current selection. - /// - public void ResetUserSelections() - { - resetSelections = true; - } - - /// - /// Default file name. - /// - public string DefaultFileName - { - get; - set; - } - - #endregion - - #region Configuration - - private void InitializeEventSink(IFileDialog nativeDlg) - { - // Check if we even need to have a sink. - if (FileOk != null - || FolderChanging != null - || FolderChanged != null - || SelectionChanged != null - || FileTypeChanged != null - || DialogOpening != null - || (controls != null && controls.Count > 0)) - { - uint cookie; - nativeEventSink = new NativeDialogEventSink(this); - nativeDlg.Advise(nativeEventSink, out cookie); - nativeEventSink.Cookie = cookie; - } - } - - private void ApplyNativeSettings(IFileDialog dialog) - { - Debug.Assert(dialog != null, "No dialog instance to configure"); - - if (parentWindow == IntPtr.Zero) - { - if (System.Windows.Application.Current != null && System.Windows.Application.Current.MainWindow != null) - parentWindow = (new WindowInteropHelper(System.Windows.Application.Current.MainWindow)).Handle; - else if (System.Windows.Forms.Application.OpenForms.Count > 0) - parentWindow = System.Windows.Forms.Application.OpenForms[0].Handle; - } - - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - - // Apply option bitflags. - dialog.SetOptions(CalculateNativeDialogOptionFlags()); - - // Other property sets. - if (title != null) - dialog.SetTitle(title); - if (initialDirectoryShellContainer != null) - { - dialog.SetFolder(((ShellObject)initialDirectoryShellContainer).NativeShellItem); - } - if (defaultDirectoryShellContainer != null) - { - dialog.SetDefaultFolder(((ShellObject)defaultDirectoryShellContainer).NativeShellItem); - } - if (!String.IsNullOrEmpty(initialDirectory)) - { - // Create a native shellitem from our path - IShellItem2 initialDirectoryShellItem; - ShellNativeMethods.SHCreateItemFromParsingName(initialDirectory, IntPtr.Zero, ref guid, out initialDirectoryShellItem); - - // If we get a real shell item back, - // then use that as the initial folder - otherwise, - // we'll allow the dialog to revert to the default folder. - // (OR should we fail loudly?) - if (initialDirectoryShellItem != null) - dialog.SetFolder(initialDirectoryShellItem); - } - if (!string.IsNullOrEmpty(defaultDirectory)) - { - // Create a native shellitem from our path - IShellItem2 defaultDirectoryShellItem; - ShellNativeMethods.SHCreateItemFromParsingName(defaultDirectory, IntPtr.Zero, ref guid, out defaultDirectoryShellItem); - - // If we get a real shell item back, - // then use that as the initial folder - otherwise, - // we'll allow the dialog to revert to the default folder. - // (OR should we fail loudly?) - if (defaultDirectoryShellItem != null) - dialog.SetDefaultFolder(defaultDirectoryShellItem); - } - - // Apply file type filters, if available. - if (filters.Count > 0 && !filterSet) - { - dialog.SetFileTypes( - (uint)filters.Count, - filters.GetAllFilterSpecs()); - - filterSet = true; - - SyncFileTypeComboToDefaultExtension(dialog); - } - - if (cookieIdentifier != Guid.Empty) - dialog.SetClientGuid(ref cookieIdentifier); - - // Set the default extension - if (!string.IsNullOrEmpty(DefaultExtension)) - dialog.SetDefaultExtension(DefaultExtension); - - // Set the default filename - dialog.SetFileName(DefaultFileName); - } - - private ShellNativeMethods.FOS CalculateNativeDialogOptionFlags() - { - // We start with only a few flags set by default, - // then go from there based on the current state - // of the managed dialog's property values. - ShellNativeMethods.FOS flags = - ShellNativeMethods.FOS.FOS_NOTESTFILECREATE; - - // Call to derived (concrete) dialog to - // set dialog-specific flags. - flags = GetDerivedOptionFlags(flags); - - // Apply other optional flags. - if (ensureFileExists) - flags |= ShellNativeMethods.FOS.FOS_FILEMUSTEXIST; - if (ensurePathExists) - flags |= ShellNativeMethods.FOS.FOS_PATHMUSTEXIST; - if (!ensureValidNames) - flags |= ShellNativeMethods.FOS.FOS_NOVALIDATE; - if (!EnsureReadOnly) - flags |= ShellNativeMethods.FOS.FOS_NOREADONLYRETURN; - if (restoreDirectory) - flags |= ShellNativeMethods.FOS.FOS_NOCHANGEDIR; - if (!showPlacesList) - flags |= ShellNativeMethods.FOS.FOS_HIDEPINNEDPLACES; - if (!addToMruList) - flags |= ShellNativeMethods.FOS.FOS_DONTADDTORECENT; - if (showHiddenItems) - flags |= ShellNativeMethods.FOS.FOS_FORCESHOWHIDDEN; - if (!navigateToShortcut) - flags |= ShellNativeMethods.FOS.FOS_NODEREFERENCELINKS; - return flags; - } - - #endregion - - #region IDialogControlHost Members - - private static void GenerateNotImplementedException() - { - throw new NotImplementedException( - "The method or operation is not implemented."); - } - - bool IDialogControlHost.IsCollectionChangeAllowed() - { - return true; - } - - void IDialogControlHost.ApplyCollectionChanged() - { - // Query IFileDialogCustomize interface before adding controls - GetCustomizedFileDialog(); - // Populate all the custom controls and add them to the dialog - foreach (CommonFileDialogControl control in controls) - { - if (!control.IsAdded) - { - control.HostingDialog = this; - control.Attach(customize); - control.IsAdded = true; - } - } - - } - - bool IDialogControlHost.IsControlPropertyChangeAllowed(string propertyName, DialogControl control) - { - CommonFileDialog.GenerateNotImplementedException(); - return false; - } - - void IDialogControlHost.ApplyControlPropertyChange(string propertyName, DialogControl control) - { - if (propertyName == "Text") - { - if (control is CommonFileDialogTextBox) - customize.SetEditBoxText(control.Id, ((CommonFileDialogControl)control).Text); - else - customize.SetControlLabel(control.Id, ((CommonFileDialogControl)control).Text); - } - else if (propertyName == "Visible") - { - CommonFileDialogControl dialogControl = control as CommonFileDialogControl; - ShellNativeMethods.CDCONTROLSTATE state; - - customize.GetControlState(control.Id, out state); - - if (dialogControl.Visible == true) - state |= ShellNativeMethods.CDCONTROLSTATE.CDCS_VISIBLE; - else if (dialogControl.Visible == false) - { - state &= ~ShellNativeMethods.CDCONTROLSTATE.CDCS_VISIBLE; - } - - customize.SetControlState(control.Id, state); - } - else if (propertyName == "Enabled") - { - CommonFileDialogControl dialogControl = control as CommonFileDialogControl; - ShellNativeMethods.CDCONTROLSTATE state; - - customize.GetControlState(control.Id, out state); - - if (dialogControl.Enabled == true) - state |= ShellNativeMethods.CDCONTROLSTATE.CDCS_ENABLED; - else if (dialogControl.Enabled == false) - { - state &= ~ShellNativeMethods.CDCONTROLSTATE.CDCS_ENABLED; - } - - customize.SetControlState(control.Id, state); - } - else if (propertyName == "SelectedIndex") - { - if (control is CommonFileDialogRadioButtonList) - { - CommonFileDialogRadioButtonList list = control as CommonFileDialogRadioButtonList; - customize.SetSelectedControlItem(control.Id, list.SelectedIndex); - } - else if (control is CommonFileDialogComboBox) - { - CommonFileDialogComboBox box = control as CommonFileDialogComboBox; - customize.SetSelectedControlItem(control.Id, box.SelectedIndex); - } - } - else if (propertyName == "IsChecked") - { - if (control is CommonFileDialogCheckBox) - { - CommonFileDialogCheckBox checkBox = control as CommonFileDialogCheckBox; - customize.SetCheckButtonState(control.Id, checkBox.IsChecked); - } - } - } - - #endregion - - #region Helpers - - /// - /// Ensures that the user has selected one or more files. - /// - /// - /// The dialog has not been dismissed yet or the dialog was cancelled. - /// - protected void CheckFileNamesAvailable() - { - if (showState != DialogShowState.Closed) - throw new InvalidOperationException( - "Filename not available - dialog has not closed yet."); - - if (canceled.GetValueOrDefault()) - throw new InvalidOperationException( - "Filename not available - dialog was canceled."); - - Debug.Assert(fileNames.Count != 0, - "FileNames empty - shouldn't happen unless dialog canceled or not yet shown."); - } - - /// - /// Ensures that the user has selected one or more files. - /// - /// - /// The dialog has not been dismissed yet or the dialog was cancelled. - /// - protected void CheckFileItemsAvailable() - { - if (showState != DialogShowState.Closed) - throw new InvalidOperationException( - "Filename not available - dialog has not closed yet."); - - if (canceled.GetValueOrDefault()) - throw new InvalidOperationException( - "Filename not available - dialog was canceled."); - - Debug.Assert(items.Count != 0, - "Items list empty - shouldn't happen unless dialog canceled or not yet shown."); - } - - static IntPtr GetHandleFromWindow(Window window) - { - if (window == null) - return IntPtr.Zero; - - return (new WindowInteropHelper(window)).Handle; - } - - private bool NativeDialogShowing - { - get - { - return (nativeDialog != null) - && (showState == DialogShowState.Showing || - showState == DialogShowState.Closing); - } - } - - internal static string GetFileNameFromShellItem(IShellItem item) - { - string filename = null; - IntPtr pszString = IntPtr.Zero; - HRESULT hr = item.GetDisplayName(ShellNativeMethods.SIGDN.SIGDN_DESKTOPABSOLUTEPARSING, out pszString); - if (hr == HRESULT.S_OK && pszString != IntPtr.Zero) - { - filename = Marshal.PtrToStringAuto(pszString); - Marshal.FreeCoTaskMem(pszString); - } - return filename; - } - - internal static IShellItem GetShellItemAt(IShellItemArray array, int i) - { - IShellItem result; - uint index = (uint)i; - array.GetItemAt(index, out result); - return result; - } - - /// - /// Throws an exception when the dialog is showing preventing - /// a requested change to a property or the visible set of controls. - /// - /// The message to include in the exception. - /// The dialog is in an - /// invalid state to perform the requested operation. - protected void ThrowIfDialogShowing(string message) - { - if (NativeDialogShowing) - throw new InvalidOperationException(message); - } - /// - /// Get the IFileDialogCustomize interface, preparing to add controls. - /// - private void GetCustomizedFileDialog() - { - if (customize == null) - { - if (nativeDialog == null) - { - InitializeNativeFileDialog(); - nativeDialog = GetNativeFileDialog(); - } - customize = (IFileDialogCustomize)nativeDialog; - } - } - #endregion - - #region CheckChanged handling members - /// - /// Raises the event just before the dialog is about to return with a result. - /// - /// The event data. - protected virtual void OnFileOk(CancelEventArgs e) - { - CancelEventHandler handler = FileOk; - if (handler != null) - { - handler(this, e); - } - } - /// - /// Raises the to stop navigation to a particular location. - /// - /// Cancelable event arguments. - protected virtual void OnFolderChanging(CommonFileDialogFolderChangeEventArgs e) - { - EventHandler handler = FolderChanging; - if (handler != null) - { - handler(this, e); - } - } - /// - /// Raises the event when the user navigates to a new folder. - /// - /// The event data. - protected virtual void OnFolderChanged(EventArgs e) - { - EventHandler handler = FolderChanged; - if (handler != null) - { - handler(this, e); - } - } - /// - /// Raises the event when the user changes the selection in the dialog's view. - /// - /// The event data. - protected virtual void OnSelectionChanged(EventArgs e) - { - EventHandler handler = SelectionChanged; - if (handler != null) - { - handler(this, e); - } - } - /// - /// Raises the event when the dialog is opened to notify the - /// application of the initial chosen filetype. - /// - /// The event data. - protected virtual void OnFileTypeChanged(EventArgs e) - { - EventHandler handler = FileTypeChanged; - if (handler != null) - { - handler(this, e); - } - } - /// - /// Raises the event when the dialog is opened. - /// - /// The event data. - protected virtual void OnOpening(EventArgs e) - { - EventHandler handler = DialogOpening; - if (handler != null) - { - handler(this, e); - } - } - - #endregion - - #region NativeDialogEventSink Nested Class - - private class NativeDialogEventSink : IFileDialogEvents, IFileDialogControlEvents - { - private CommonFileDialog parent; - private bool firstFolderChanged = true; - - public NativeDialogEventSink(CommonFileDialog commonDialog) - { - this.parent = commonDialog; - } - - private uint cookie; - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This can be called from an application using our library")] - public uint Cookie - { - get { return cookie; } - set { cookie = value; } - } - - public HRESULT OnFileOk(IFileDialog pfd) - { - CancelEventArgs args = new CancelEventArgs(); - parent.OnFileOk(args); - - if (!args.Cancel) - { - // Make sure all custom properties are sync'ed - if (parent.Controls != null) - { - foreach (CommonFileDialogControl control in parent.Controls) - { - if (control is CommonFileDialogTextBox) - { - (control as CommonFileDialogTextBox).SyncValue(); - (control as CommonFileDialogTextBox).Closed = true; - } - // Also check subcontrols - else if (control is CommonFileDialogGroupBox) - { - CommonFileDialogGroupBox groupbox = control as CommonFileDialogGroupBox; - foreach (CommonFileDialogControl subcontrol in groupbox.Items) - { - if (subcontrol is CommonFileDialogTextBox) - { - (subcontrol as CommonFileDialogTextBox).SyncValue(); - (subcontrol as CommonFileDialogTextBox).Closed = true; - } - } - } - } - } - } - - return (args.Cancel ? HRESULT.S_FALSE : HRESULT.S_OK); - } - - public HRESULT OnFolderChanging(IFileDialog pfd, IShellItem psiFolder) - { - CommonFileDialogFolderChangeEventArgs args = - new CommonFileDialogFolderChangeEventArgs(CommonFileDialog.GetFileNameFromShellItem(psiFolder)); - if (!firstFolderChanged) - parent.OnFolderChanging(args); - return (args.Cancel ? HRESULT.S_FALSE : HRESULT.S_OK); - } - - public void OnFolderChange(IFileDialog pfd) - { - if (firstFolderChanged) - { - firstFolderChanged = false; - parent.OnOpening(EventArgs.Empty); - } - else - parent.OnFolderChanged(EventArgs.Empty); - } - - public void OnSelectionChange(IFileDialog pfd) - { - parent.OnSelectionChanged(EventArgs.Empty); - } - - public void OnShareViolation( - IFileDialog pfd, - IShellItem psi, - out ShellNativeMethods.FDE_SHAREVIOLATION_RESPONSE pResponse) - { - // Do nothing: we will ignore share violations, - // and don't register - // for them, so this method should never be called. - pResponse = ShellNativeMethods.FDE_SHAREVIOLATION_RESPONSE.FDESVR_ACCEPT; - } - - public void OnTypeChange(IFileDialog pfd) - { - parent.OnFileTypeChanged(EventArgs.Empty); - } - - public void OnOverwrite(IFileDialog pfd, IShellItem psi, out ShellNativeMethods.FDE_OVERWRITE_RESPONSE pResponse) - { - // Don't accept or reject the dialog, keep default settings - pResponse = ShellNativeMethods.FDE_OVERWRITE_RESPONSE.FDEOR_DEFAULT; - } - - public void OnItemSelected(IFileDialogCustomize pfdc, int dwIDCtl, int dwIDItem) - { - // Find control - DialogControl control = this.parent.controls.GetControlbyId(dwIDCtl); - - // Process ComboBox and/or RadioButtonList - if (control is ICommonFileDialogIndexedControls) - { - // Update selected item and raise SelectedIndexChanged event - ICommonFileDialogIndexedControls controlInterface = control as ICommonFileDialogIndexedControls; - controlInterface.SelectedIndex = dwIDItem; - controlInterface.RaiseSelectedIndexChangedEvent(); - } - // Process Menu - else if (control is CommonFileDialogMenu) - { - CommonFileDialogMenu menu = control as CommonFileDialogMenu; - - // Find the menu item that was clicked and invoke it's click event - foreach (CommonFileDialogMenuItem item in menu.Items) - { - if (item.Id == dwIDItem) - { - item.RaiseClickEvent(); - break; - } - } - } - } - - public void OnButtonClicked(IFileDialogCustomize pfdc, int dwIDCtl) - { - // Find control - DialogControl control = this.parent.controls.GetControlbyId(dwIDCtl); - - // Call corresponding event - if (control is CommonFileDialogButton) - { - ((CommonFileDialogButton)control).RaiseClickEvent(); - } - } - - public void OnCheckButtonToggled(IFileDialogCustomize pfdc, int dwIDCtl, bool bChecked) - { - // Find control - DialogControl control = this.parent.controls.GetControlbyId(dwIDCtl); - - // Update control and call corresponding event - if (control is CommonFileDialogCheckBox) - { - CommonFileDialogCheckBox box = control as CommonFileDialogCheckBox; - box.IsChecked = bChecked; - box.RaiseCheckedChangedEvent(); - } - } - - public void OnControlActivating(IFileDialogCustomize pfdc, int dwIDCtl) - { - } - } - - #endregion - - #region IDisposable Members - - /// - /// Releases the unmanaged resources used by the CommonFileDialog class and optionally - /// releases the managed resources. - /// - /// true to release both managed and unmanaged resources; - /// false to release only unmanaged resources. - public void Dispose(bool disposing) - { - if (disposing) - { - CleanUpNativeFileDialog(); - } - } - - /// - /// Releases the resources used by the current instance of the CommonFileDialog class. - /// - public void Dispose() - { - Dispose(true); - } - - #endregion - - /// - /// Indicates whether this feature is supported on the current platform. - /// - public static bool IsPlatformSupported - { - get - { - // We need Windows Vista onwards ... - return CoreHelpers.RunningOnVista; - } - } - } - - -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogButton.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogButton.cs deleted file mode 100644 index 7bc438d..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogButton.cs +++ /dev/null @@ -1,70 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Creates the push button controls used by the Common File Dialog. - /// - public class CommonFileDialogButton : CommonFileDialogProminentControl - { - /// - /// Initializes a new instance of this class. - /// - public CommonFileDialogButton() - : base(String.Empty) - { - } - - /// - /// Initializes a new instance of this class with the text only. - /// - /// The text to display for this control. - public CommonFileDialogButton(string text) - : base(text) - { - } - - /// - /// Initializes a new instance of this class with the specified name and text. - /// - /// The name of this control. - /// The text to display for this control. - public CommonFileDialogButton(string name, string text) - : base(name, text) - { - } - - /// - /// Attach the PushButton control to the dialog object - /// - /// Target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogButton.Attach: dialog parameter can not be null"); - - // Add a push button control - dialog.AddPushButton(this.Id, this.Text); - - // Make this control prominent if needed - if (IsProminent) - dialog.MakeProminent(this.Id); - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - } - - /// - /// Occurs when the user clicks the control. This event is routed from COM via the event sink. - /// - public event EventHandler Click = delegate { }; - internal void RaiseClickEvent() - { - // Make sure that this control is enabled and has a specified delegate - if (Enabled) - this.Click(this, EventArgs.Empty); - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogCheckBox.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogCheckBox.cs deleted file mode 100644 index fdcf274..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogCheckBox.cs +++ /dev/null @@ -1,113 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Creates the check button controls used by the Common File Dialog. - /// - public class CommonFileDialogCheckBox : CommonFileDialogProminentControl - { - private bool isChecked = false; - /// - /// Gets or sets the state of the check box. - /// - public bool IsChecked - { - get { return isChecked; } - set - { - // Check if property has changed - if (isChecked != value) - { - isChecked = value; - ApplyPropertyChange("IsChecked"); - } - } - } - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogCheckBox() - { - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The text to display for this control. - public CommonFileDialogCheckBox(string text) - : base(text) - { - } - - /// - /// Creates a new instance of this class with the specified name and text. - /// - /// The name of this control. - /// The text to display for this control. - public CommonFileDialogCheckBox(string name, string text) - : base(name, text) - { - } - - /// - /// Creates a new instance of this class with the specified text and check state. - /// - /// The text to display for this control. - /// The check state of this control. - public CommonFileDialogCheckBox(string text, bool isChecked) - : base(text) - { - this.isChecked = isChecked; - } - - /// - /// Creates a new instance of this class with the specified name, text and check state. - /// - /// The name of this control. - /// The text to display for this control. - /// The check state of this control. - public CommonFileDialogCheckBox(string name, string text, bool isChecked) - : base(name, text) - { - this.isChecked = isChecked; - } - - /// - /// Occurs when the user changes the check state. - /// - public event EventHandler CheckedChanged = delegate { }; - internal void RaiseCheckedChangedEvent() - { - // Make sure that this control is enabled and has a specified delegate - if (Enabled) - this.CheckedChanged(this, EventArgs.Empty); - } - - /// - /// Attach the CheckButton control to the dialog object. - /// - /// the target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogCheckBox.Attach: dialog parameter can not be null"); - - // Add a check button control - dialog.AddCheckButton(this.Id, this.Text, this.isChecked); - - // Make this control prominent if needed - if (IsProminent) - dialog.MakeProminent(this.Id); - - // Make sure this property is set - ApplyPropertyChange("IsChecked"); - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogComboBox.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogComboBox.cs deleted file mode 100644 index 56d235c..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogComboBox.cs +++ /dev/null @@ -1,170 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Windows.Markup; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Creates the ComboBox controls in the Common File Dialog. - /// - [ContentProperty("Items")] - public class CommonFileDialogComboBox : CommonFileDialogProminentControl, ICommonFileDialogIndexedControls - { - private readonly Collection items = new Collection(); - /// - /// Gets the collection of CommonFileDialogComboBoxItem objects. - /// - public Collection Items - { - get { return items; } - } - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogComboBox() - { - } - - /// - /// Creates a new instance of this class with the specified name. - /// - /// Text to display for this control - public CommonFileDialogComboBox(string name): base (name, String.Empty) - { - } - - #region ICommonFileDialogIndexedControls Members - - private int selectedIndex = -1; - /// - /// Gets or sets the current index of the selected item. - /// - public int SelectedIndex - { - get { return selectedIndex; } - set - { - // Don't update property if it hasn't changed - if (selectedIndex == value) - return; - - if (HostingDialog == null) - { - selectedIndex = value; - return; - } - - // Only update this property if it has a valid value - if (value >= 0 && value < items.Count) - { - selectedIndex = value; - ApplyPropertyChange("SelectedIndex"); - } - else - { - throw new IndexOutOfRangeException("Index was outside the bounds of the CommonFileDialogComboBox."); - } - } - } - - /// - /// Occurs when the SelectedIndex is changed. - /// - /// - /// - /// By initializing the SelectedIndexChanged event with an empty - /// delegate, it is not necessary to check - /// if the SelectedIndexChanged is not null. - /// - /// - public event EventHandler SelectedIndexChanged = delegate { }; - - /// - /// Raises the SelectedIndexChanged event if this control is - /// enabled. - /// - /// Because this method is defined in an interface, we can either - /// have it as public, or make it private and explicitly implement (like below). - /// Making it public doesn't really help as its only internal (but can't have this - /// internal because of the interface) - /// - void ICommonFileDialogIndexedControls.RaiseSelectedIndexChangedEvent() - { - // Make sure that this control is enabled and has a specified delegate - if (Enabled) - SelectedIndexChanged(this, EventArgs.Empty); - } - - #endregion - - /// - /// Attach the ComboBox control to the dialog object - /// - /// The target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogComboBox.Attach: dialog parameter can not be null"); - - // Add the combo box control - dialog.AddComboBox(this.Id); - - // Add the combo box items - for (int index = 0; index < items.Count; index++) - dialog.AddControlItem(this.Id, index, items[index].Text); - - // Set the currently selected item - if (selectedIndex >= 0 && selectedIndex < items.Count) - { - dialog.SetSelectedControlItem(this.Id, this.selectedIndex); - } - else if (selectedIndex != -1) - { - throw new IndexOutOfRangeException("Index was outside the bounds of the CommonFileDialogComboBox."); - } - - // Make this control prominent if needed - if (IsProminent) - dialog.MakeProminent(this.Id); - - // Sync additional properties - SyncUnmanagedProperties(); - } - - } - - /// - /// Creates a ComboBoxItem for the Common File Dialog. - /// - public class CommonFileDialogComboBoxItem - { - private string text = String.Empty; - /// - /// Gets or sets the string that is displayed for this item. - /// - public string Text - { - get { return text; } - set { text = value; } - } - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogComboBoxItem() - { - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The text to use for the combo box item. - public CommonFileDialogComboBoxItem(string text) - { - this.text = text; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControl.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControl.cs deleted file mode 100644 index c1007a9..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControl.cs +++ /dev/null @@ -1,121 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using Microsoft.WindowsAPICodePack.Dialogs; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Defines an abstract class that supports shared functionality for the - /// common file dialog controls. - /// - public abstract class CommonFileDialogControl : DialogControl - { - /// - /// Holds the text that is displayed for this control. - /// - private string textValue; - - /// - /// Gets or sets the text string that is displayed on the control. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1307:SpecifyStringComparison", MessageId = "System.String.Compare(System.String,System.String)", Justification = "We are not currently handling globalization or localization")] - public virtual string Text - { - get { return textValue; } - set - { - // Don't update this property if it hasn't changed - if (string.Compare(value, textValue) == 0) - return; - - textValue = value; - ApplyPropertyChange("Text"); - } - } - - private bool enabled = true; - /// - /// Gets or sets a value that determines if this control is enabled. - /// - public bool Enabled - { - get { return enabled; } - set - { - // Don't update this property if it hasn't changed - if (value == enabled) - return; - - enabled = value; - ApplyPropertyChange("Enabled"); - } - } - - private bool visible = true; - /// - /// Gets or sets a boolean value that indicates whether - /// this control is visible. - /// - public bool Visible - { - get { return visible; } - set - { - // Don't update this property if it hasn't changed - if (value == visible) - return; - - visible = value; - ApplyPropertyChange("Visible"); - } - } - - private bool isAdded = false; - /// - /// Has this control been added to the dialog - /// - internal bool IsAdded - { - get { return isAdded; } - set { isAdded = value; } - } - - /// - /// Creates a new instance of this class. - /// - protected CommonFileDialogControl() : base() - { - } - - /// - /// Creates a new instance of this class with the text. - /// - /// The text of the common file dialog control. - protected CommonFileDialogControl(string text) : base() - { - this.textValue = text; - } - - /// - /// Creates a new instance of this class with the specified name and text. - /// - /// The name of the common file dialog control. - /// The text of the common file dialog control. - protected CommonFileDialogControl(string name, string text) : base(name) - { - this.textValue = text; - } - - /// - /// Attach the custom control itself to the specified dialog - /// - /// the target dialog - internal abstract void Attach(IFileDialogCustomize dialog); - - internal virtual void SyncUnmanagedProperties() - { - ApplyPropertyChange("Enabled"); - ApplyPropertyChange("Visible"); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControlCollection.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControlCollection.cs deleted file mode 100644 index 77d84ec..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogControlCollection.cs +++ /dev/null @@ -1,186 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Provides a strongly typed collection for dialog controls. - /// - /// DialogControl - public sealed class CommonFileDialogControlCollection : Collection where T : DialogControl - { - private IDialogControlHost hostingDialog; - - internal CommonFileDialogControlCollection(IDialogControlHost host) - { - hostingDialog = host; - } - - /// - /// Inserts an dialog control at the specified index. - /// - /// The location to insert the control. - /// The item to insert. - /// A control with - /// the same name already exists in this collection -or- - /// the control is being hosted by another dialog -or- the associated dialog is - /// showing and cannot be modified. - protected override void InsertItem(int index, T control) - { - // Check for duplicates, lack of host, - // and during-show adds. - if (Items.Contains(control)) - throw new InvalidOperationException( - "Dialog cannot have more than one control with the same name."); - if (control.HostingDialog != null) - throw new InvalidOperationException( - "Dialog control must be removed from current collections first."); - if (!hostingDialog.IsCollectionChangeAllowed()) - throw new InvalidOperationException( - "Modifying controls collection while dialog is showing is not supported."); - if (control is CommonFileDialogMenuItem) - throw new InvalidOperationException( - "CommonFileDialogMenuItem controls can only be added to CommonFileDialogMenu controls."); - - // Reparent, add control. - control.HostingDialog = hostingDialog; - base.InsertItem(index, control); - - // Notify that we've added a control. - hostingDialog.ApplyCollectionChanged(); - } - - /// - /// Removes the control at the specified index. - /// - /// The location of the control to remove. - /// - /// The associated dialog is - /// showing and cannot be modified. - protected override void RemoveItem(int index) - { - throw new NotSupportedException("Custom controls cannot be removed from a File dialog once added."); - } - - /// - /// Defines the indexer that supports accessing controls by name. - /// - /// - /// Control names are case sensitive. - /// This indexer is useful when the dialog is created in XAML - /// rather than constructed in code. - /// - /// The name cannot be null or a zero-length string. - /// If there is more than one control with the same name, only the first control will be returned. - public T this[string name] - { - get - { - if (String.IsNullOrEmpty(name)) - throw new ArgumentException( - "Control name must not be null or zero length."); - - foreach (T control in base.Items) - { - // NOTE: we don't ToLower() the strings - casing effects - // hash codes, so we are case-sensitive. - if (control.Name == name) - return control; - else if (control is CommonFileDialogGroupBox) - { - foreach (T subControl in (control as CommonFileDialogGroupBox).Items) - { - if (subControl.Name == name) - return subControl; - } - } - } - return null; - } - } - - /// - /// Recursively searches for the control who's id matches the value - /// passed in the parameter. - /// - /// - /// An integer containing the identifier of the - /// control being searched for. - /// - /// A DialogControl who's id matches the value of the - /// parameter. - /// - internal DialogControl GetControlbyId(int id) - { - return GetSubControlbyId( - Items as IEnumerable, - id); - } - - - /// - /// Recursively searches for a given control id in the - /// collection passed via the parameter. - /// - /// - /// A Collection<CommonFileDialogControl> - /// An int containing the identifier of the control - /// being searched for. - /// - /// A DialogControl who's Id matches the value of the - /// parameter. - /// - internal DialogControl GetSubControlbyId(IEnumerable ctrlColl, - int id) - { - DialogControl foundControl = null; - int iSubCtrlCount = 0; - - // if ctrlColl is null, it will throw in the foreach. - if (ctrlColl == null) - return null; - - foreach (DialogControl control in ctrlColl) - { - // Match? - if (control.Id == id) - { - return control; - } - - // Search GroupBox child items - if (control is CommonFileDialogGroupBox) - { - CommonFileDialogGroupBox groupBox = control as CommonFileDialogGroupBox; - - // recurse and search the GroupBox - iSubCtrlCount = - ((CommonFileDialogGroupBox)control).Items.Count; - - if (iSubCtrlCount > 0) - { - foundControl = this.GetSubControlbyId( - groupBox.Items as IEnumerable, - id); - - // make sure something was actually found - if (foundControl != null) - { - return foundControl; - } - } - } - } - - // Control id not found - likely an error, but the calling - // function should ultimately decide. - return null; - - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs deleted file mode 100644 index 2961a72..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilter.cs +++ /dev/null @@ -1,163 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.ObjectModel; -using System.Text; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Stores the file extensions used when filtering files in File Open and File Save dialogs. - /// - public class CommonFileDialogFilter - { - // We'll keep a parsed list of separate - // extensions and rebuild as needed. - - private Collection extensions; - private string rawDisplayName; - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogFilter() - { - extensions = new Collection(); - } - /// - /// Creates a new instance of this class with the specified display name and - /// file extension list. - /// - /// The name of this filter. - /// The list of extensions in - /// this filter. See remarks. - /// The can use a semicolon(";") - /// or comma (",") to separate extensions. Extensions can be prefaced - /// with a period (".") or with the file wild card specifier "*.". - /// - /// The cannot be null or a - /// zero-length string. - /// - public CommonFileDialogFilter(string rawDisplayName, string extensionList) - : this() - { - if (String.IsNullOrEmpty(extensionList)) - throw new ArgumentNullException( - "extensionList", - "extensionList must be non-null."); - - this.rawDisplayName = rawDisplayName; - - // Parse string and create extension strings. - // Format: "bat,cmd", or "bat;cmd", or "*.bat;*.cmd" - // Can support leading "." or "*." - these will be stripped. - string[] rawExtensions = extensionList.Split(',', ';'); - foreach (string extension in rawExtensions) - extensions.Add(CommonFileDialogFilter.NormalizeExtension(extension)); - } - /// - /// Gets or sets the display name for this filter. - /// - /// - /// The value for this property cannot be set to null or a - /// zero-length string. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object)", Justification = "We are not currently handling globalization or localization")] - public string DisplayName - { - get - { - if (showExtensions) - return String.Format("{0} ({1})", - rawDisplayName, CommonFileDialogFilter.GetDisplayExtensionList(extensions)); - else - return rawDisplayName; - } - - set - { - if (String.IsNullOrEmpty(value)) - throw new ArgumentNullException( - "value", - "DisplayName must be non-null."); - rawDisplayName = value; - } - } - - /// - /// Gets a collection of the individual extensions - /// described by this filter. - /// - public Collection Extensions - { - get { return extensions; } - } - - private bool showExtensions = true; - /// - /// Gets or sets a value that controls whether the extensions are displayed. - /// - public bool ShowExtensions - { - get { return showExtensions; } - set { showExtensions = value; } - } - - private static string NormalizeExtension(string rawExtension) - { - rawExtension = rawExtension.Trim(); - rawExtension = rawExtension.Replace("*.", null); - rawExtension = rawExtension.Replace(".", null); - return rawExtension; - } - - private static string GetDisplayExtensionList(Collection extensions) - { - StringBuilder extensionList = new StringBuilder(); - foreach (string extension in extensions) - { - if (extensionList.Length > 0) - extensionList.Append(", "); - extensionList.Append("*."); - extensionList.Append(extension); - } - - return extensionList.ToString(); - } - - /// - /// Internal helper that generates a single filter - /// specification for this filter, used by the COM API. - /// - /// Filter specification for this filter - /// - internal ShellNativeMethods.COMDLG_FILTERSPEC GetFilterSpec() - { - StringBuilder filterList = new StringBuilder(); - foreach (string extension in extensions) - { - if (filterList.Length > 0) - filterList.Append(";"); - - filterList.Append("*."); - filterList.Append(extension); - - } - return new ShellNativeMethods.COMDLG_FILTERSPEC(DisplayName, filterList.ToString()); - } - - /// - /// Returns a string representation for this filter that includes - /// the display name and the list of extensions. - /// - /// A . - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object,System.Object)", Justification = "We are not currently handling globalization or localization")] - public override string ToString() - { - return String.Format("{0} ({1})", - rawDisplayName, - CommonFileDialogFilter.GetDisplayExtensionList(extensions)); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilterCollection.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilterCollection.cs deleted file mode 100644 index df23806..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFilterCollection.cs +++ /dev/null @@ -1,31 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Collections.ObjectModel; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Provides a strongly typed collection for file dialog filters. - /// - public class CommonFileDialogFilterCollection : Collection - { - internal CommonFileDialogFilterCollection() - : base() - { - // Make the default constructor internal so users can't instantiate this - // collection by themselves. - } - - internal ShellNativeMethods.COMDLG_FILTERSPEC[] GetAllFilterSpecs() - { - ShellNativeMethods.COMDLG_FILTERSPEC[] filterSpecs = - new ShellNativeMethods.COMDLG_FILTERSPEC[this.Count]; - - for (int i = 0; i < this.Count; i++) - filterSpecs[i] = this[i].GetFilterSpec(); - - return filterSpecs; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFolderChangeEventArgs.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFolderChangeEventArgs.cs deleted file mode 100644 index 3314208..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogFolderChangeEventArgs.cs +++ /dev/null @@ -1,33 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.ComponentModel; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Creates the event data associated with event. - /// - /// - public class CommonFileDialogFolderChangeEventArgs : CancelEventArgs - { - /// - /// Creates a new instance of this class. - /// - /// The name of the folder. - public CommonFileDialogFolderChangeEventArgs(string folder) - { - this.folder = folder; - } - - private string folder; - /// - /// Gets or sets the name of the folder. - /// - public string Folder - { - get { return folder; } - set { folder = value; } - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogGroupBox.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogGroupBox.cs deleted file mode 100644 index d66ec04..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogGroupBox.cs +++ /dev/null @@ -1,93 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Windows.Markup; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Represents a group box control for the Common File Dialog. - /// note - [ContentProperty("Items")] - public class CommonFileDialogGroupBox : CommonFileDialogProminentControl - { - private Collection items; - /// - /// Gets the collection of controls for this group box. - /// - public Collection Items - { - get { return items; } - } - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogGroupBox() - : base(String.Empty) - { - Initialize(); - } - - /// - /// Create a new instance of this class with the specified text. - /// - /// The text to display for this control. - public CommonFileDialogGroupBox(string text) - : base(text) - { - Initialize(); - } - - /// - /// Creates a new instance of this class with the specified name and text. - /// - /// The name of this control. - /// The text to display for this control. - public CommonFileDialogGroupBox(string name, string text) - : base(name, text) - { - Initialize(); - } - - /// - /// Initializes the item collection for this class. - /// - private void Initialize() - { - items = new Collection(); - } - - /// - /// Attach the GroupBox control to the dialog object - /// - /// Target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogGroupBox.Attach: dialog parameter can not be null"); - - // Start a visual group - dialog.StartVisualGroup(this.Id, this.Text); - - // Add child controls - foreach (CommonFileDialogControl item in this.items) - { - item.HostingDialog = HostingDialog; - item.Attach(dialog); - } - - // End visual group - dialog.EndVisualGroup(); - - // Make this control prominent if needed - if (IsProminent) - dialog.MakeProminent(this.Id); - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogLabel.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogLabel.cs deleted file mode 100644 index 15889e3..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogLabel.cs +++ /dev/null @@ -1,53 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Diagnostics; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Defines the label controls in the Common File Dialog. - /// - public class CommonFileDialogLabel : CommonFileDialogControl - { - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogLabel() - { - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The text to display for this control. - public CommonFileDialogLabel(string text) - : base(text) - { - } - - /// - /// Creates a new instance of this class with the specified name and text. - /// - /// The name of this control. - /// The text to display for this control. - public CommonFileDialogLabel(string name, string text) - : base(name, text) - { - } - - /// - /// Attach this control to the dialog object - /// - /// Target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialog.Attach: dialog parameter can not be null"); - - // Add a text control - dialog.AddText(this.Id, this.Text); - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogMenu.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogMenu.cs deleted file mode 100644 index 2adfc40..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogMenu.cs +++ /dev/null @@ -1,129 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Windows.Markup; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Defines the menu controls for the Common File Dialog. - /// - [ContentProperty("Items")] - public class CommonFileDialogMenu : CommonFileDialogProminentControl - { - private Collection items; - /// - /// Gets the collection of CommonFileDialogMenuItem objects. - /// - public Collection Items - { - get { return items; } - } - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogMenu() - : base() - { - Initialize(); - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The text to display for this control. - public CommonFileDialogMenu(string text) - : base(text) - { - Initialize(); - } - - /// - /// Creates a new instance of this class with the specified name and text. - /// - /// The name of this control. - /// The text to display for this control. - public CommonFileDialogMenu(string name, string text) - : base(name, text) - { - Initialize(); - } - - /// - /// Initializes the item collection for this class. - /// - private void Initialize() - { - items = new Collection(); - } - - /// - /// Attach the Menu control to the dialog object. - /// - /// the target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogMenu.Attach: dialog parameter can not be null"); - - // Add the menu control - dialog.AddMenu(this.Id, this.Text); - - // Add the menu items - foreach (CommonFileDialogMenuItem item in this.items) - dialog.AddControlItem(this.Id, item.Id, item.Text); - - // Make prominent as needed - if (IsProminent) - dialog.MakeProminent(this.Id); - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - } - } - - /// - /// Creates the CommonFileDialogMenuItem items for the Common File Dialog. - /// - public class CommonFileDialogMenuItem : CommonFileDialogControl - { - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogMenuItem() - : base(String.Empty) - { - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The text to display for this control. - public CommonFileDialogMenuItem(string text) - : base(text) - { - } - - /// - /// Occurs when a user clicks a menu item. - /// - public event EventHandler Click = delegate { }; - internal void RaiseClickEvent() - { - // Make sure that this control is enabled and has a specified delegate - if (Enabled) - Click(this, EventArgs.Empty); - } - - /// - /// Attach this control to the dialog object - /// - /// Target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - // Items are added via the menu itself - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogProminentControl.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogProminentControl.cs deleted file mode 100644 index f2b595a..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogProminentControl.cs +++ /dev/null @@ -1,56 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Windows.Markup; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Defines the properties and constructors for all prominent controls in the Common File Dialog. - /// - [ContentProperty("Items")] - public abstract class CommonFileDialogProminentControl : CommonFileDialogControl - { - private bool isProminent; - - /// - /// Gets or sets the prominent value of this control. - /// - /// Only one control can be specified as prominent. If more than one control is specified prominent, - /// then an 'E_UNEXPECTED' exception will be thrown when these controls are added to the dialog. - /// A group box control can only be specified as prominent if it contains one control and that control is of type 'CommonFileDialogProminentControl'. - /// - public bool IsProminent - { - get { return isProminent; } - set { isProminent = value; } - } - - - /// - /// Creates a new instance of this class. - /// - protected CommonFileDialogProminentControl() - : base() - { - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The text to display for this control. - protected CommonFileDialogProminentControl(string text) - : base(text) - { - } - - /// - /// Creates a new instance of this class with the specified name and text. - /// - /// The name of this control. - /// The text to display for this control. - protected CommonFileDialogProminentControl(string name, string text) - : base(name, text) - { - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogRadioButtonList.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogRadioButtonList.cs deleted file mode 100644 index 125728e..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogRadioButtonList.cs +++ /dev/null @@ -1,177 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Windows.Markup; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Represents a radio button list for the Common File Dialog. - /// - [ContentProperty("Items")] - public class CommonFileDialogRadioButtonList : CommonFileDialogControl, ICommonFileDialogIndexedControls - { - private Collection items; - /// - /// Gets the collection of CommonFileDialogRadioButtonListItem objects - /// - public Collection Items - { - get { return items; } - } - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogRadioButtonList() - { - Initialize(); - } - - /// - /// Creates a new instance of this class with the specified name. - /// - /// The name of this control. - public CommonFileDialogRadioButtonList(string name): base (name, String.Empty) - { - Initialize(); - } - - /// - /// Initializes the item collection for this class. - /// - private void Initialize() - { - items = new Collection(); - } - - #region ICommonFileDialogIndexedControls Members - - private int selectedIndex = -1; - /// - /// Gets or sets the current index of the selected item. - /// - public int SelectedIndex - { - get { return selectedIndex; } - set - { - // Don't update this property if it hasn't changed - if (selectedIndex == value) - return; - - // If the native dialog has not been created yet - if (HostingDialog == null) - { - selectedIndex = value; - return; - } - - // Check for valid index - if (value >= 0 && value < items.Count) - { - selectedIndex = value; - ApplyPropertyChange("SelectedIndex"); - } - else - { - throw new IndexOutOfRangeException("Index was outside the bounds of the CommonFileDialogRadioButtonList."); - } - } - } - - /// - /// Occurs when the user changes the SelectedIndex. - /// - /// - /// - /// By initializing the SelectedIndexChanged event with an empty - /// delegate, we can skip the test to determine - /// if the SelectedIndexChanged is null. - /// test. - /// - public event EventHandler SelectedIndexChanged = delegate { }; - - /// - /// Occurs when the user changes the SelectedIndex. - /// - /// Because this method is defined in an interface, we can either - /// have it as public, or make it private and explicitly implement (like below). - /// Making it public doesn't really help as its only internal (but can't have this - /// internal because of the interface) - /// - void ICommonFileDialogIndexedControls.RaiseSelectedIndexChangedEvent() - { - // Make sure that this control is enabled and has a specified delegate - if (Enabled) - SelectedIndexChanged(this, EventArgs.Empty); - } - - #endregion - - /// - /// Attach the RadioButtonList control to the dialog object - /// - /// The target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogRadioButtonList.Attach: dialog parameter can not be null"); - - // Add the radio button list control - dialog.AddRadioButtonList(this.Id); - - // Add the radio button list items - for (int index = 0; index < items.Count; index++) - dialog.AddControlItem(this.Id, index, items[index].Text); - - // Set the currently selected item - if (selectedIndex >= 0 && selectedIndex < items.Count) - { - dialog.SetSelectedControlItem(this.Id, this.selectedIndex); - } - else if (selectedIndex != -1) - { - throw new IndexOutOfRangeException("Index was outside the bounds of the CommonFileDialogRadioButtonList."); - } - - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - } - } - - /// - /// Represents a list item for the CommonFileDialogRadioButtonList object. - /// - public class CommonFileDialogRadioButtonListItem - { - private string text; - /// - /// Gets or sets the string that will be displayed for this list item. - /// - public string Text - { - get { return text; } - set { text = value; } - } - - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogRadioButtonListItem() - { - this.text = String.Empty; - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The string that you want to display for this list item. - public CommonFileDialogRadioButtonListItem(string text) - { - this.text = text; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogResult.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogResult.cs deleted file mode 100644 index cb94035..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogResult.cs +++ /dev/null @@ -1,20 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Specifies identifiers to indicate the return value of a CommonFileDialog dialog. - /// - public enum CommonFileDialogResult - { - /// - /// The dialog box return value is OK (usually sent from a button labeled OK or Save). - /// - OK = 1, - - /// - /// The dialog box return value is Cancel (usually sent from a button labeled Cancel). - /// - Cancel = 2, - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogSeperator.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogSeperator.cs deleted file mode 100644 index c2d1d11..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogSeperator.cs +++ /dev/null @@ -1,27 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Diagnostics; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Defines the class for the simplest separator controls. - /// - public class CommonFileDialogSeparator : CommonFileDialogControl - { - /// - /// Attach the Separator control to the dialog object - /// - /// Target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogSeparator.Attach: dialog parameter can not be null"); - - // Add a separator - dialog.AddSeparator(this.Id); - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogStandardFilters.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogStandardFilters.cs deleted file mode 100644 index eccb1b8..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogStandardFilters.cs +++ /dev/null @@ -1,54 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Defines the class of commonly used file filters. - /// - public static class CommonFileDialogStandardFilters - { - private static CommonFileDialogFilter textFilesFilter; - /// - /// Gets a value that specifies the filter for *.txt files. - /// - public static CommonFileDialogFilter TextFiles - { - get - { - if (textFilesFilter == null) - textFilesFilter = new CommonFileDialogFilter("Text Files", "*.txt"); - return textFilesFilter; - } - } - - private static CommonFileDialogFilter pictureFilesFilter; - /// - /// Gets a value that specifies the filter for picture files. - /// - public static CommonFileDialogFilter PictureFiles - { - get - { - if (pictureFilesFilter == null) - pictureFilesFilter = new CommonFileDialogFilter("All Picture Files", - "*.bmp, *.jpg, *.jpeg, *.png, *.ico"); - return pictureFilesFilter; - } - - } - private static CommonFileDialogFilter officeFilesFilter; - /// - /// Gets a value that specifies the filter for Microsoft Office files. - /// - public static CommonFileDialogFilter OfficeFiles - { - get - { - if (officeFilesFilter == null) - officeFilesFilter = new CommonFileDialogFilter("Office Files", - "*.doc, *.docx, *.xls, *.xlsx, *.ppt, *.pptx"); - return officeFilesFilter; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogTextBox.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogTextBox.cs deleted file mode 100644 index 78d6785..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonFileDialogTextBox.cs +++ /dev/null @@ -1,113 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Defines the text box controls in the Common File Dialog. - /// - public class CommonFileDialogTextBox : CommonFileDialogControl - { - /// - /// Creates a new instance of this class. - /// - public CommonFileDialogTextBox() - : base(String.Empty) - { - } - - /// - /// Creates a new instance of this class with the specified text. - /// - /// The text to display for this control. - public CommonFileDialogTextBox(string text) - : base(text) - { - } - - /// - /// Creates a new instance of this class with the specified name and text. - /// - /// The name of this control. - /// The text to display for this control. - public CommonFileDialogTextBox(string name, string text) - : base(name, text) - { - } - - internal bool Closed - { - set; - get; - } - /// - /// Gets or sets a value for the text string contained in the CommonFileDialogTextBox. - /// - public override string Text - { - get - { - if (!Closed) - { - SyncValue(); - } - - return base.Text; - } - - set - { - if (customizedDialog != null) - { - customizedDialog.SetEditBoxText( this.Id, value ); - } - - base.Text = value; - } - } - - /// - /// Holds an instance of the customized (/native) dialog and should - /// be null until after the Attach() call is made. - /// - private IFileDialogCustomize customizedDialog = null; - - /// - /// Attach the TextBox control to the dialog object - /// - /// Target dialog - internal override void Attach(IFileDialogCustomize dialog) - { - Debug.Assert(dialog != null, "CommonFileDialogTextBox.Attach: dialog parameter can not be null"); - - // Add a text entry control - dialog.AddEditBox(this.Id, this.Text); - - // Set to local instance in order to gate access to same. - customizedDialog = dialog; - - // Sync unmanaged properties with managed properties - SyncUnmanagedProperties(); - - Closed = false; - } - - internal void SyncValue() - { - // Make sure that the local native dialog instance is NOT - // null. If it's null, just return the "textValue" var, - // otherwise, use the native call to get the text value, - // setting the textValue member variable then return it. - - if (customizedDialog != null) - { - string textValue; - customizedDialog.GetEditBoxText(this.Id, out textValue); - - base.Text = textValue; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonOpenFileDialog.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonOpenFileDialog.cs deleted file mode 100644 index 9924f56..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonOpenFileDialog.cs +++ /dev/null @@ -1,175 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security.Permissions; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Creates a Vista or Windows 7 Common File Dialog, allowing the user to select one or more files. - /// - /// - [FileDialogPermissionAttribute(SecurityAction.LinkDemand, Open = true)] - public sealed class CommonOpenFileDialog : CommonFileDialog - { - private NativeFileOpenDialog openDialogCoClass; - - /// - /// Creates a new instance of this class. - /// - public CommonOpenFileDialog() : base() - { - // For Open file dialog, allow read only files. - base.EnsureReadOnly = true; - } - - /// - /// Creates a new instance of this class with the specified name. - /// - /// The name of this dialog. - public CommonOpenFileDialog(string name) : base(name) - { - // For Open file dialog, allow read only files. - base.EnsureReadOnly = true; - } - - #region Public API specific to Open - - /// - /// Gets a collection of the selected file names. - /// - /// This property should only be used when the - /// - /// property is true. - public Collection FileNames - { - get - { - CheckFileNamesAvailable(); - return fileNames; - } - } - - /// - /// Gets a collection of the selected items as ShellObject objects. - /// - /// This property should only be used when the - /// - /// property is true. - public ICollection FilesAsShellObject - { - get - { - // Check if we have selected files from the user. - CheckFileItemsAvailable(); - - // temp collection to hold our shellobjects - ICollection resultItems = new Collection(); - - // Loop through our existing list of filenames, and try to create a concrete type of - // ShellObject (e.g. ShellLibrary, FileSystemFolder, ShellFile, etc) - foreach (IShellItem si in items) - resultItems.Add(ShellObjectFactory.Create(si)); - - return resultItems; - } - } - - - private bool multiselect; - /// - /// Gets or sets a value that determines whether the user can select more than one file. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Multiselect", Justification="This is following the same convention as the Winforms CFD")] - public bool Multiselect - { - get { return multiselect; } - set { multiselect = value; } - } - - private bool isFolderPicker; - /// - /// Gets or sets a value that determines whether the user can select folders or files. - /// Default value is false. - /// - public bool IsFolderPicker - { - get { return isFolderPicker; } - set { isFolderPicker = value; } - } - - private bool allowNonFileSystem; - /// - /// Gets or sets a value that determines whether the user can select non-filesystem items, - /// such as Library, Search Connectors, or Known Folders. - /// - public bool AllowNonFileSystemItems - { - get { return allowNonFileSystem; } - set { allowNonFileSystem = value; } - } - #endregion - - internal override IFileDialog GetNativeFileDialog() - { - Debug.Assert(openDialogCoClass != null, - "Must call Initialize() before fetching dialog interface"); - return (IFileDialog)openDialogCoClass; - } - - internal override void InitializeNativeFileDialog() - { - if (openDialogCoClass == null) - openDialogCoClass = new NativeFileOpenDialog(); - } - - internal override void CleanUpNativeFileDialog() - { - if (openDialogCoClass != null) - Marshal.ReleaseComObject(openDialogCoClass); - } - - internal override void PopulateWithFileNames(Collection names) - { - IShellItemArray resultsArray; - uint count; - - openDialogCoClass.GetResults(out resultsArray); - resultsArray.GetCount(out count); - names.Clear(); - for (int i = 0; i < count; i++) - names.Add(GetFileNameFromShellItem(GetShellItemAt(resultsArray, i))); - } - - internal override void PopulateWithIShellItems(Collection items) - { - IShellItemArray resultsArray; - uint count; - - openDialogCoClass.GetResults(out resultsArray); - resultsArray.GetCount(out count); - items.Clear(); - for (int i = 0; i < count; i++) - items.Add(GetShellItemAt(resultsArray, i)); - } - - internal override ShellNativeMethods.FOS GetDerivedOptionFlags(ShellNativeMethods.FOS flags) - { - if (multiselect) - flags |= ShellNativeMethods.FOS.FOS_ALLOWMULTISELECT; - if (isFolderPicker) - flags |= ShellNativeMethods.FOS.FOS_PICKFOLDERS; - if (!allowNonFileSystem) - flags |= ShellNativeMethods.FOS.FOS_FORCEFILESYSTEM; - if (allowNonFileSystem) - flags |= ShellNativeMethods.FOS.FOS_ALLNONSTORAGEITEMS; - - return flags; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs deleted file mode 100644 index f1fd935..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/CommonSaveFileDialog.cs +++ /dev/null @@ -1,308 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using System.Security.Permissions; -using Microsoft.WindowsAPICodePack.Shell; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - /// - /// Creates a Vista or Windows 7 Common File Dialog, allowing the user to select the filename and location for a saved file. - /// - /// - /// to save a file. Associated enumeration: . - /// - [FileDialogPermissionAttribute(SecurityAction.LinkDemand, Save = true)] - public sealed class CommonSaveFileDialog : CommonFileDialog - { - private NativeFileSaveDialog saveDialogCoClass; - - /// - /// Creates a new instance of this class. - /// - public CommonSaveFileDialog() : base() { } - /// - /// Creates a new instance of this class with the specified name. - /// - /// The name of this dialog. - public CommonSaveFileDialog(string name) : base(name) { } - - #region Public API specific to Save - - private bool overwritePrompt = true; - /// - /// Gets or sets a value that controls whether to prompt before - /// overwriting an existing file of the same name. Default value is true. - /// - /// - /// This property cannot be changed when the dialog is showing. - /// - public bool OverwritePrompt - { - get { return overwritePrompt; } - set - { - ThrowIfDialogShowing("OverwritePrompt" + IllegalPropertyChangeString); - overwritePrompt = value; - } - } - - private bool createPrompt; - /// - /// Gets or sets a value that controls whether to prompt for creation if the item returned in the save dialog does not exist. - /// - /// Note that this does not actually create the item. - /// - /// This property cannot be changed when the dialog is showing. - /// - public bool CreatePrompt - { - get { return createPrompt; } - set - { - ThrowIfDialogShowing("CreatePrompt" + IllegalPropertyChangeString); - createPrompt = value; - } - } - - private bool isExpandedMode; - /// - /// Gets or sets a value that controls whether to the save dialog - /// displays in expanded mode. - /// - /// Expanded mode controls whether the dialog - /// shows folders for browsing or hides them. - /// - /// This property cannot be changed when the dialog is showing. - /// - public bool IsExpandedMode - { - get { return isExpandedMode; } - set - { - ThrowIfDialogShowing("IsExpandedMode" + IllegalPropertyChangeString); - isExpandedMode = value; - } - } - - private bool alwaysAppendDefaultExtension; - /// - /// Gets or sets a value that controls whether the - /// returned file name has a file extension that matches the - /// currently selected file type. If necessary, the dialog appends the correct - /// file extension. - /// - /// - /// This property cannot be changed when the dialog is showing. - /// - public bool AlwaysAppendDefaultExtension - { - get { return alwaysAppendDefaultExtension; } - set - { - ThrowIfDialogShowing("AlwaysAppendDefaultExtension" + IllegalPropertyChangeString); - alwaysAppendDefaultExtension = value; - } - } - - /// - /// Sets an item to appear as the initial entry in a Save As dialog. - /// - /// The initial entry to be set in the dialog. - /// The name of the item is displayed in the file name edit box, - /// and the containing folder is opened in the view. This would generally be - /// used when the application is saving an item that already exists. - public void SetSaveAsItem(ShellObject item) - { - IFileSaveDialog nativeDialog = null; - - if (nativeDialog == null) - { - InitializeNativeFileDialog(); - nativeDialog = GetNativeFileDialog() as IFileSaveDialog; - } - - // Get the native IShellItem from ShellObject - if (nativeDialog != null) - nativeDialog.SetSaveAsItem(item.NativeShellItem); - } - - /// - /// Specifies which properties will be collected in the save dialog. - /// - /// True to show default properties for the currently selected - /// filetype in addition to the properties specified by propertyList. False to show only properties - /// specified by pList. - /// List of properties to collect. This parameter can be null. - /// - /// - /// SetCollectedPropertyKeys can be called at any time before the dialog is displayed or while it - /// is visible. If different properties are to be collected depending on the chosen filetype, - /// then SetCollectedProperties can be called in response to CommonFileDialog::FileTypeChanged event. - /// Note: By default, no properties are collected in the save dialog. - /// - public void SetCollectedPropertyKeys(bool appendDefault, params PropertyKey[] propertyList) - { - string propertyListStr = null; - - // Loop through all our property keys and create a semicolon-delimited property list string. - if (propertyList != null && propertyList.Length > 0 && propertyList[0] != null) - { - foreach (PropertyKey key in propertyList) - { - string canonicalName = ShellPropertyDescriptionsCache.Cache.GetPropertyDescription(key).CanonicalName; - - // The string we pass to PSGetPropertyDescriptionListFromString must - // start with "prop:", followed a list of canonical names for each - // property that is to collected. - // - // Add "prop:" at the start of the string if we are starting our for loop. - if (propertyListStr == null) - propertyListStr = "prop:"; - - // For each property, append the canonical name, followed by a semicolon - if (!string.IsNullOrEmpty(canonicalName)) - propertyListStr += canonicalName + ";"; - } - } - - // If the string was created correctly, get IPropertyDescriptionList for it - if (!string.IsNullOrEmpty(propertyListStr)) - { - Guid guid = new Guid(ShellIIDGuid.IPropertyDescriptionList); - IPropertyDescriptionList propertyDescriptionList = null; - - try - { - int hr = PropertySystemNativeMethods.PSGetPropertyDescriptionListFromString(propertyListStr, ref guid, out propertyDescriptionList); - - // If we get a IPropertyDescriptionList, setit on the native dialog. - if (CoreErrorHelper.Succeeded(hr)) - { - IFileSaveDialog nativeDialog = null; - - if (nativeDialog == null) - { - InitializeNativeFileDialog(); - nativeDialog = GetNativeFileDialog() as IFileSaveDialog; - } - - if (nativeDialog != null) - { - hr = nativeDialog.SetCollectedProperties(propertyDescriptionList, appendDefault); - - if (!CoreErrorHelper.Succeeded(hr)) - Marshal.ThrowExceptionForHR(hr); - } - } - } - finally - { - if (propertyDescriptionList != null) - Marshal.ReleaseComObject(propertyDescriptionList); - } - } - } - - /// - /// Retrieves the set of property values for a saved item or an item in the process of being saved. - /// - /// Collection of property values collected from the save dialog - /// This property can be called while the dialog is showing to retrieve the current - /// set of values in the metadata collection pane. It can also be called after the dialog - /// has closed, to retrieve the final set of values. The call to this method will fail - /// unless property collection has been turned on with a call to SetCollectedPropertyKeys method. - /// - public ShellPropertyCollection CollectedProperties - { - get - { - IFileSaveDialog nativeDialog = null; - - if (nativeDialog == null) - { - InitializeNativeFileDialog(); - nativeDialog = GetNativeFileDialog() as IFileSaveDialog; - } - - if (nativeDialog != null) - { - IPropertyStore propertyStore; - HRESULT hr = nativeDialog.GetProperties(out propertyStore); - - if (!CoreErrorHelper.Succeeded((int)hr)) - throw Marshal.GetExceptionForHR((int)hr); - - if (propertyStore != null) - return new ShellPropertyCollection(propertyStore); - } - - return null; - } - } - - #endregion - - internal override void InitializeNativeFileDialog() - { - if (saveDialogCoClass == null) - saveDialogCoClass = new NativeFileSaveDialog(); - } - - internal override IFileDialog GetNativeFileDialog() - { - Debug.Assert(saveDialogCoClass != null, - "Must call Initialize() before fetching dialog interface"); - return (IFileDialog)saveDialogCoClass; - } - - internal override void PopulateWithFileNames( - System.Collections.ObjectModel.Collection names) - { - IShellItem item; - saveDialogCoClass.GetResult(out item); - - if (item == null) - throw new InvalidOperationException( - "Retrieved a null shell item from dialog"); - names.Clear(); - names.Add(GetFileNameFromShellItem(item)); - } - - internal override void PopulateWithIShellItems( - System.Collections.ObjectModel.Collection items) - { - IShellItem item; - saveDialogCoClass.GetResult(out item); - - if (item == null) - throw new InvalidOperationException( - "Retrieved a null shell item from dialog"); - items.Clear(); - items.Add(item); - } - - internal override void CleanUpNativeFileDialog() - { - if (saveDialogCoClass != null) - Marshal.ReleaseComObject(saveDialogCoClass); - } - - internal override ShellNativeMethods.FOS GetDerivedOptionFlags(ShellNativeMethods.FOS flags) - { - if (overwritePrompt) - flags |= ShellNativeMethods.FOS.FOS_OVERWRITEPROMPT; - if (createPrompt) - flags |= ShellNativeMethods.FOS.FOS_CREATEPROMPT; - if (!isExpandedMode) - flags |= ShellNativeMethods.FOS.FOS_DEFAULTNOMINIMODE; - if (alwaysAppendDefaultExtension) - flags |= ShellNativeMethods.FOS.FOS_STRICTFILETYPES; - return flags; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/ICommonFileDialogIndexedControls.cs b/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/ICommonFileDialogIndexedControls.cs deleted file mode 100644 index 0cd44de..0000000 --- a/src/External/WindowsAPICodePack/Shell/CommonFileDialogs/ICommonFileDialogIndexedControls.cs +++ /dev/null @@ -1,27 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Dialogs.Controls -{ - /// - /// Specifies a property, event and method that indexed controls need - /// to implement. - /// - /// - /// - /// not sure where else to put this, so leaving here for now. - /// - interface ICommonFileDialogIndexedControls - { - int SelectedIndex - { - get; - set; - } - - event EventHandler SelectedIndexChanged; - - void RaiseSelectedIndexChangedEvent(); - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml b/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml deleted file mode 100644 index 34a7de5..0000000 --- a/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - diff --git a/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml.cs b/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml.cs deleted file mode 100644 index d263992..0000000 --- a/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWPF.xaml.cs +++ /dev/null @@ -1,145 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.ComponentModel; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Controls.WindowsPresentationFoundation -{ - /// - /// Implements a CommandLink button that can be used in WPF user interfaces. - /// - public partial class CommandLink : UserControl, INotifyPropertyChanged - { - /// - /// Creates a new instance of this class. - /// - public CommandLink() - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - this.DataContext = this; - InitializeComponent(); - this.button.Click += new RoutedEventHandler(button_Click); - } - - void button_Click(object sender, RoutedEventArgs e) - { - e.Source = this; - if (Click != null) - Click(sender, e); - } - - RoutedUICommand command; - - /// - /// Routed UI command to use for this button - /// - public RoutedUICommand Command - { - get { return command; } - set { command = value; } - } - - /// - /// Occurs when the control is clicked. - /// - public event RoutedEventHandler Click; - - private string link; - - /// - /// Specifies the main instruction text - /// - public string Link - { - get { return link; } - set - { - link = value; - - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("Link")); - } - } - } - private string note; - - /// - /// Specifies the supporting note text - /// - public string Note - { - get { return note; } - set - { - note = value; - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("Note")); - } - } - } - private ImageSource icon; - - /// - /// Icon to set for the command link button - /// - public ImageSource Icon - { - get { return icon; } - set - { - icon = value; - if (PropertyChanged != null) - { - PropertyChanged(this, new PropertyChangedEventArgs("Icon")); - } - } - } - - /// - /// Indicates if the button is in a checked state - /// - public bool? IsCheck - { - get - { - return button.IsChecked; - } - set { button.IsChecked = value; } - } - - - #region INotifyPropertyChanged Members - - /// - /// Occurs when a property value changes. - /// - public event PropertyChangedEventHandler PropertyChanged; - - #endregion - - /// - /// Indicates whether this feature is supported on the current platform. - /// - public static bool IsPlatformSupported - { - get - { - // We need Windows Vista onwards ... - return CoreHelpers.RunningOnVista; - } - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWinforms.cs b/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWinforms.cs deleted file mode 100644 index 33ab97e..0000000 --- a/src/External/WindowsAPICodePack/Shell/Controls/CommandLinkWinforms.cs +++ /dev/null @@ -1,156 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.ComponentModel; -using System.Text; -using System.Windows.Forms; -using MS.WindowsAPICodePack.Internal; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Controls.WindowsForms -{ - /// - /// Implements a CommandLink button that can be used in - /// WinForms user interfaces. - /// - public class CommandLink : Button - { - /// - /// Gets a System.Windows.Forms.CreateParams on the base class when - /// creating a window. - /// - protected override CreateParams CreateParams - { - get - { - // Add BS_COMMANDLINK style before control creation. - CreateParams cp = base.CreateParams; - - cp.Style = AddCommandLinkStyle(cp.Style); - - return (cp); - } - } - - // Let Windows handle the rendering. - /// - /// Creates a new instance of this class. - /// - public CommandLink() - { - // Throw PlatformNotSupportedException if the user is not running Vista or beyond - CoreHelpers.ThrowIfNotVista(); - - FlatStyle = FlatStyle.System; - } - - // Add Design-Time Support. - - /// - /// Increase default width. - /// - protected override System.Drawing.Size DefaultSize - { - get { return new System.Drawing.Size(180, 60); } - } - - /// - /// Specifies the supporting note text - /// - [Category("Appearance")] - [Description("Specifies the supporting note text.")] - [BrowsableAttribute(true)] - [DefaultValue("(Note Text)")] - public string NoteText - { - get { return (GetNote(this)); } - set - { - SetNote(this, value); - } - } - - /// - /// Enable shield icon to be set at design-time. - /// - [Category("Appearance")] - [Description("Indicates whether the button should be decorated with the security shield icon (Windows Vista only).")] - [BrowsableAttribute(true)] - [DefaultValue(false)] - public bool ShieldIcon - { - get { return (shieldIconDisplayed); } - set - { - shieldIconDisplayed = value; - SetShieldIcon(this, this.shieldIconDisplayed); - } - } - private bool shieldIconDisplayed; - - - #region Interop helpers - - private static int AddCommandLinkStyle(int Style) - { - int newStyle = Style; - - // Only add BS_COMMANDLINK style on Windows Vista or above. - // Otherwise, button creation will fail. - if (Environment.OSVersion.Version.Major >= 6) - { - newStyle |= ShellNativeMethods.BS_COMMANDLINK; - } - - return (newStyle); - } - - private static string GetNote(System.Windows.Forms.Button Button) - { - IntPtr retVal = CoreNativeMethods.SendMessage( - Button.Handle, - ShellNativeMethods.BCM_GETNOTELENGTH, - IntPtr.Zero, - IntPtr.Zero); - - // Add 1 for null terminator, to get the entire string back. - int len = ((int)retVal) + 1; - StringBuilder strBld = new StringBuilder(len); - - retVal = CoreNativeMethods.SendMessage(Button.Handle, ShellNativeMethods.BCM_GETNOTE, ref len, strBld); - return (strBld.ToString()); - } - - private static void SetNote(System.Windows.Forms.Button button, string text) - { - // This call will be ignored on versions earlier than - // Windows Vista. - CoreNativeMethods.SendMessage(button.Handle, ShellNativeMethods.BCM_SETNOTE, 0, text); - } - - static internal void SetShieldIcon( - System.Windows.Forms.Button Button, bool Show) - { - IntPtr fRequired = new IntPtr(Show ? 1 : 0); - CoreNativeMethods.SendMessage( - Button.Handle, - ShellNativeMethods.BCM_SETSHIELD, - IntPtr.Zero, - fRequired); - } - - #endregion - - /// - /// Indicates whether this feature is supported on the current platform. - /// - public static bool IsPlatformSupported - { - get - { - // We need Windows Vista onwards ... - return CoreHelpers.RunningOnVista; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Design/ShellObjects.cd b/src/External/WindowsAPICodePack/Shell/Design/ShellObjects.cd deleted file mode 100644 index ae8f19c..0000000 --- a/src/External/WindowsAPICodePack/Shell/Design/ShellObjects.cd +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - AAoAAAgAAGAACQANgAJASAYAQABAAIAAAAAAAAAiAiQ= - Common\ShellObject.cs - - - - - - - AGIAoEAQACAAABBRCIAARCQCAAIABAAMCAEEAAPQKAQ= - Common\ShellLibrary.cs - - - - - - - BAAAABAAACAgAAoAAkSCIIAAQARAAAAIAoAEIAAACAA= - KnownFolders\FileSystemKnownFolder.cs - - - - - - - ACAAAAIAAKAAABAAAAAABAAAAAAAAIAAAAAAAAAAAAA= - Common\ShellObjectContainer.cs - - - - - - - AAQAAACAAAAAAEKAAIAAAIAABAAgESAAIAACAAQAAAA= - Common\ShellLink.cs - - - - - - BAAAABAAACAgAAoAAkSCIIAAQARAAAAIAoAEIAAACAA= - KnownFolders\NonFileSystemKnownFolder.cs - - - - - - - AAAAAAgAAAAAAAIAAAAAAAAABAAAAAAAAAABAAAAAAA= - Common\ShellFile.cs - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellFolder.cs - ShellFolder.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellObjectNode.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellNonFileSystemItem.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellSearchCollection.cs - - - - - - AAAAAAAAAAAAAAIAIAAAAAAABAAAAAAAAAAAAAAAAAA= - Common\ShellFileSystemFolder.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellNonFileSystemFolder.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellSavedSearchCollection.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellSearchConnector.cs - - - - - - AAQAEBAAAAAQAAABBEAAAQAIAIAAAAAAAJBAAgAAAAA= - Common\ShellSearchFolder.cs - - - - - - BAAAABAAAAAgAAoAAkCAIIAAQARAAAAIAoAEIAAACAA= - KnownFolders\IKnownFolder.cs - - - - \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Design/ShellThumbnailClassDiagram.cd b/src/External/WindowsAPICodePack/Shell/Design/ShellThumbnailClassDiagram.cd deleted file mode 100644 index b60a69a..0000000 --- a/src/External/WindowsAPICodePack/Shell/Design/ShellThumbnailClassDiagram.cd +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - QAABAABAAAAAAASAABkIABggAQAACgABgBIQAAEAAEI= - Common\ShellThumbnail.cs - - - - - - gAAAAAAAAAAAAAAQAAAAAABgAAAAAAAAAAAAAAAEAAA= - Common\DefaultShellImageSizes.cs - - - - - - gAAAAAAAAAAAAAAQAAAAAABgAAAAAAAAAAAAAAAEAAA= - Common\DefaultShellImageSizes.cs - - - - - - AAAAAAAAAAAAAACAAAAAIAAAAAAAAAAAAAAAIAAAAAA= - Common\ShellThumbnailEnums.cs - - - - - - BAAAAAAAAAAAAAAAACAAIAAAAAAAAAAAAAAAAAAAAAA= - Common\ShellThumbnailEnums.cs - - - - \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/DesktopWindowManagerNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/DesktopWindowManagerNativeMethods.cs deleted file mode 100644 index 865acbc..0000000 --- a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/DesktopWindowManagerNativeMethods.cs +++ /dev/null @@ -1,84 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Security; -using MS.WindowsAPICodePack.Internal; - -namespace MS.WindowsAPICodePack.Internal -{ - internal static class DWMMessages - { - internal const int WM_DWMCOMPOSITIONCHANGED = 0x031E; - internal const int WM_DWMNCRENDERINGCHANGED = 0x031F; - } - - [StructLayout( LayoutKind.Sequential )] - internal struct MARGINS - { - public int cxLeftWidth; // width of left border that retains its size - public int cxRightWidth; // width of right border that retains its size - public int cyTopHeight; // height of top border that retains its size - public int cyBottomHeight; // height of bottom border that retains its size - - public MARGINS( bool fullWindow ) - { - cxLeftWidth = cxRightWidth = cyTopHeight = cyBottomHeight = (fullWindow ? -1 : 0); - } - }; - - internal enum DwmBlurBehindDwFlags : uint - { - DWM_BB_ENABLE = 0x00000001, - DWM_BB_BLURREGION = 0x00000002, - DWM_BB_TRANSITIONONMAXIMIZED = 0x00000004 - } - - [StructLayout( LayoutKind.Sequential )] - internal struct DWM_BLURBEHIND - { - public DwmBlurBehindDwFlags dwFlags; - public bool fEnable; - public IntPtr hRgnBlur; - public bool fTransitionOnMaximized; - }; - - internal enum CompositionEnable : uint - { - DWM_EC_DISABLECOMPOSITION = 0, - DWM_EC_ENABLECOMPOSITION = 1 - } - - /// - /// Internal class that contains interop declarations for - /// functions that are not benign and are performance critical. - /// - [SuppressUnmanagedCodeSecurity] - internal static class DesktopWindowManagerNativeMethods - { - [DllImport( "DwmApi.dll" )] - internal static extern int DwmEnableBlurBehindWindow( - IntPtr hwnd, - ref DWM_BLURBEHIND bb ); - - [DllImport( "DwmApi.dll" )] - internal static extern int DwmExtendFrameIntoClientArea( - IntPtr hwnd, - ref MARGINS m ); - - [DllImport( "DwmApi.dll", PreserveSig = false )] - internal static extern bool DwmIsCompositionEnabled( ); - - [DllImport( "DwmApi.dll" )] - internal static extern int DwmEnableComposition( - CompositionEnable compositionAction ); - - [DllImport( "user32.dll" )] - [return: MarshalAs( UnmanagedType.Bool )] - internal static extern bool GetWindowRect( IntPtr hwnd, ref CoreNativeMethods.RECT rect ); - - [DllImport( "user32.dll" )] - [return: MarshalAs( UnmanagedType.Bool )] - internal static extern bool GetClientRect( IntPtr hwnd, ref CoreNativeMethods.RECT rect ); - } -} diff --git a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassEvents.cs b/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassEvents.cs deleted file mode 100644 index 5553210..0000000 --- a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassEvents.cs +++ /dev/null @@ -1,38 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Event argument for The GlassAvailabilityChanged event - /// - public class AeroGlassCompositionChangedEvenArgs : EventArgs - { - private bool availability; - - internal AeroGlassCompositionChangedEvenArgs( bool avilability ) - { - this.availability = avilability; - } - - /// - /// The new GlassAvailable state - /// - public bool GlassAvailable - { - get - { - return availability; - } - } - } - - /// - /// Sent when the availability of the desktop Glass effect is changed - /// - /// The AeroGlassWindow that is affected by this change - /// The new state of the glass availability - public delegate void AeroGlassCompositionChangedEvent( object sender, AeroGlassCompositionChangedEvenArgs e ); -} diff --git a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs b/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs deleted file mode 100644 index 9efb211..0000000 --- a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassForm.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Windows.Forms; -using System.Drawing; -using MS.WindowsAPICodePack.Internal; - - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Windows Glass Form - /// Inherit from this form to be able to enable glass on Windows Form - /// - public class GlassForm : Form - { - #region properties - - /// - /// Get determines if AeroGlass is enabled on the desktop. Set enables/disables AreoGlass on the desktop. - /// - public bool AeroGlassCompositionEnabled - { - set - { - DesktopWindowManagerNativeMethods.DwmEnableComposition( - value ? CompositionEnable.DWM_EC_ENABLECOMPOSITION : CompositionEnable.DWM_EC_DISABLECOMPOSITION ); - } - get - { - return DesktopWindowManagerNativeMethods.DwmIsCompositionEnabled( ); - } - } - - #endregion - - #region events - - /// - /// Fires when the availability of Glass effect changes. - /// - public event AeroGlassCompositionChangedEvent AeroGlassCompositionChanged; - - #endregion - - #region operations - - /// - /// Makes the background of current window transparent - /// - public void SetAeroGlassTransparency( ) - { - this.BackColor = Color.Transparent; - } - - /// - /// Excludes a Control from the AeroGlass frame. - /// - /// The control to exclude. - /// Many non-WPF rendered controls (i.e., the ExplorerBrowser control) will not - /// render properly on top of an AeroGlass frame. - public void ExcludeControlFromAeroGlass( Control control ) - { - if( AeroGlassCompositionEnabled ) - { - Rectangle clientScreen = this.RectangleToScreen( this.ClientRectangle ); - Rectangle controlScreen = control.RectangleToScreen( control.ClientRectangle ); - - MARGINS margins = new MARGINS( ); - margins.cxLeftWidth = controlScreen.Left - clientScreen.Left; - margins.cxRightWidth = clientScreen.Right - controlScreen.Right; - margins.cyTopHeight = controlScreen.Top - clientScreen.Top; - margins.cyBottomHeight = clientScreen.Bottom - controlScreen.Bottom; - - // Extend the Frame into client area - DesktopWindowManagerNativeMethods.DwmExtendFrameIntoClientArea( Handle, ref margins ); - } - } - - /// - /// Resets the AeroGlass exclusion area. - /// - public void ResetAreoGlass( ) - { - if( this.Handle != IntPtr.Zero ) - { - MARGINS margins = new MARGINS( true ); - DesktopWindowManagerNativeMethods.DwmExtendFrameIntoClientArea( this.Handle, ref margins ); - } - } - #endregion - - #region implementation - /// - /// Catches the DWM messages to this window and fires the appropriate event. - /// - /// - protected override void WndProc( ref Message m ) - { - if( m.Msg == DWMMessages.WM_DWMCOMPOSITIONCHANGED - || m.Msg == DWMMessages.WM_DWMNCRENDERINGCHANGED ) - { - if( AeroGlassCompositionChanged != null ) - { - AeroGlassCompositionChanged.Invoke( - this, - new AeroGlassCompositionChangedEvenArgs( AeroGlassCompositionEnabled ) ); - } - } - - base.WndProc( ref m ); - } - - /// - /// Initializes the Form for AeroGlass - /// - /// The arguments for this event - protected override void OnLoad( EventArgs e ) - { - base.OnLoad( e ); - ResetAreoGlass( ); - } - - /// - /// Overide OnPaint to paint the background as black. - /// - /// PaintEventArgs - protected override void OnPaint( PaintEventArgs e ) - { - base.OnPaint( e ); - - if( DesignMode == false ) - { - if( AeroGlassCompositionEnabled ) - { - // Paint the all the regions black to enable glass - e.Graphics.FillRectangle( Brushes.Black, this.ClientRectangle ); - } - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassWindow.cs b/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassWindow.cs deleted file mode 100644 index da1990b..0000000 --- a/src/External/WindowsAPICodePack/Shell/DesktopWindowManager/GlassWindow.cs +++ /dev/null @@ -1,156 +0,0 @@ -using System; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Media; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - - -namespace Microsoft.WindowsAPICodePack.Shell -{ - - /// - /// WPF Glass Window - /// Inherit from this window class to enable glass on a WPF window - /// - public class GlassWindow : Window - { - #region properties - - /// - /// Get determines if AeroGlass is enabled on the desktop. Set enables/disables AreoGlass on the desktop. - /// - public bool AeroGlassCompositionEnabled - { - set - { - DesktopWindowManagerNativeMethods.DwmEnableComposition( - value ? CompositionEnable.DWM_EC_ENABLECOMPOSITION : CompositionEnable.DWM_EC_DISABLECOMPOSITION ); - } - get - { - return DesktopWindowManagerNativeMethods.DwmIsCompositionEnabled( ); - } - } - - #endregion - - #region events - - /// - /// Fires when the availability of Glass effect changes. - /// - public event AeroGlassCompositionChangedEvent AeroGlassCompositionChanged; - - #endregion - - #region operations - - /// - /// Makes the background of current window transparent from both Wpf and Windows Perspective - /// - public void SetAeroGlassTransparency( ) - { - // Set the Background to transparent from Win32 perpective - HwndSource.FromHwnd( windowHandle ).CompositionTarget.BackgroundColor = System.Windows.Media.Colors.Transparent; - - // Set the Background to transparent from WPF perpective - this.Background = Brushes.Transparent; - } - - /// - /// Excludes a UI element from the AeroGlass frame. - /// - /// The element to exclude. - /// Many non-WPF rendered controls (i.e., the ExplorerBrowser control) will not - /// render properly on top of an AeroGlass frame. - public void ExcludeElementFromAeroGlass( FrameworkElement element ) - { - if( AeroGlassCompositionEnabled ) - { - // calculate total size of window nonclient area - HwndSource hwndSource = PresentationSource.FromVisual( this ) as HwndSource; - CoreNativeMethods.RECT windowRect = new CoreNativeMethods.RECT( ); - CoreNativeMethods.RECT clientRect = new CoreNativeMethods.RECT( ); - DesktopWindowManagerNativeMethods.GetWindowRect( hwndSource.Handle, ref windowRect ); - DesktopWindowManagerNativeMethods.GetClientRect( hwndSource.Handle, ref clientRect ); - Size nonClientSize = - new Size( - (double)(windowRect.right - windowRect.left) - (double)(clientRect.right - clientRect.left), - (double)(windowRect.bottom - windowRect.top) - (double)(clientRect.bottom - clientRect.top) ); - - // calculate size of element relative to nonclient area - GeneralTransform transform = element.TransformToAncestor( this ); - Point topLeftFrame = - transform.Transform( new Point( 0, 0 ) ); - Point bottomRightFrame = - transform.Transform( - new Point( - element.ActualWidth + nonClientSize.Width, - element.ActualHeight + nonClientSize.Height ) ); - - // Create a margin structure - MARGINS margins = new MARGINS( ); - margins.cxLeftWidth = (int)topLeftFrame.X; - margins.cxRightWidth = (int)(this.ActualWidth - bottomRightFrame.X); - margins.cyTopHeight = (int)(topLeftFrame.Y); - margins.cyBottomHeight = (int)(this.ActualHeight - bottomRightFrame.Y); - - // Extend the Frame into client area - DesktopWindowManagerNativeMethods.DwmExtendFrameIntoClientArea( windowHandle, ref margins ); - } - } - - /// - /// Resets the AeroGlass exclusion area. - /// - public void ResetAreoGlass() - { - MARGINS margins = new MARGINS( true ); - DesktopWindowManagerNativeMethods.DwmExtendFrameIntoClientArea( windowHandle, ref margins ); - } - - #endregion - - #region implementation - private IntPtr windowHandle; - - private IntPtr WndProc( IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled ) - { - if( msg == DWMMessages.WM_DWMCOMPOSITIONCHANGED - || msg == DWMMessages.WM_DWMNCRENDERINGCHANGED ) - { - if( AeroGlassCompositionChanged != null ) - { - AeroGlassCompositionChanged.Invoke( - this, - new AeroGlassCompositionChangedEvenArgs( AeroGlassCompositionEnabled ) ); - } - - handled = true; - } - return IntPtr.Zero; - } - - /// - /// OnSourceInitialized - /// Override SourceInitialized to initialize windowHandle for this window. - /// A valid windowHandle is available only after the sourceInitialized is completed - /// - /// EventArgs - protected override void OnSourceInitialized( EventArgs e ) - { - base.OnSourceInitialized( e ); - WindowInteropHelper interopHelper = new WindowInteropHelper( this ); - this.windowHandle = interopHelper.Handle; - - // add Window Proc hook to capture DWM messages - HwndSource source = HwndSource.FromHwnd( windowHandle ); - source.AddHook( new HwndSourceHook( WndProc ) ); - - ResetAreoGlass( ); - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml deleted file mode 100644 index 9d5cee9..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - Explorer Browser Control - - diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml.cs deleted file mode 100644 index fde0c9e..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.WPF.xaml.cs +++ /dev/null @@ -1,940 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Text; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using System.Windows.Forms.Integration; -using Microsoft.WindowsAPICodePack.Shell; -using Microsoft.WindowsAPICodePack.Controls; -using System.Windows.Threading; -using System.Threading; - - -namespace Microsoft.WindowsAPICodePack.Controls.WindowsPresentationFoundation -{ - /// - /// Interaction logic for ExplorerBrowser.xaml - /// - public partial class ExplorerBrowser : UserControl - { - /// - /// The underlying WinForms control - /// - public Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser ExplorerBrowserControl - { - get; - set; - } - - private ObservableCollection selectedItems = null; - private ObservableCollection items = null; - private ObservableCollection navigationLog = null; - private DispatcherTimer dtCLRUpdater = new DispatcherTimer( ); - - private ShellObject initialNavigationTarget = null; - private ExplorerBrowserViewMode? initialViewMode = null; - - private AutoResetEvent itemsChanged = new AutoResetEvent( false ); - private AutoResetEvent selectionChanged = new AutoResetEvent( false ); - private int selectionChangeWaitCount = 0; - - /// - /// Hosts the ExplorerBrowser WinForms wrapper in this control - /// - public ExplorerBrowser( ) - { - InitializeComponent( ); - - // the ExplorerBrowser WinForms control - ExplorerBrowserControl = new Microsoft.WindowsAPICodePack.Controls.WindowsForms.ExplorerBrowser( ); - - // back the dependency collection properties with instances - SelectedItems = selectedItems = new ObservableCollection(); - Items = items = new ObservableCollection(); - NavigationLog = navigationLog = new ObservableCollection( ); - - // hook up events for collection synchronization - ExplorerBrowserControl.ItemsChanged += new ExplorerBrowserItemsChangedEventHandler( ItemsChanged ); - ExplorerBrowserControl.SelectionChanged += new ExplorerBrowserSelectionChangedEventHandler( SelectionChanged ); - ExplorerBrowserControl.ViewEnumerationComplete += new ExplorerBrowserViewEnumerationCompleteHandler( ExplorerBrowserControl_ViewEnumerationComplete ); - ExplorerBrowserControl.ViewSelectedItemChanged += new ExplorerBrowserViewSelectedItemChangedHandler( ExplorerBrowserControl_ViewSelectedItemChanged ); - ExplorerBrowserControl.NavigationLog.NavigationLogChanged += new NavigationLogChangedEventHandler( NavigationLogChanged ); - - // host the control - WindowsFormsHost host = new WindowsFormsHost( ); - host.Child = ExplorerBrowserControl; - this.root.Children.Clear( ); - this.root.Children.Add( host ); - - - Loaded += new RoutedEventHandler( ExplorerBrowser_Loaded ); - } - - void ExplorerBrowserControl_ViewSelectedItemChanged( object sender, EventArgs e ) - { - } - - void ExplorerBrowserControl_ViewEnumerationComplete( object sender, EventArgs e ) - { - itemsChanged.Set( ); - selectionChanged.Set( ); - } - - /// - /// To avoid the 'Dispatcher processing has been suspended' InvalidOperationException on Win7, - /// the ExplorerBorwser native control is initialized after this control is fully loaded. - /// - /// - /// - void ExplorerBrowser_Loaded( object sender, RoutedEventArgs e ) - { - // setup timer to update dependency properties from CLR properties of WinForms ExplorerBrowser object - dtCLRUpdater.Tick += new EventHandler( UpdateDependencyPropertiesFromCLRPRoperties ); - dtCLRUpdater.Interval = new TimeSpan( 100 * 10000 ); // 100ms - dtCLRUpdater.Start( ); - - if (initialNavigationTarget != null ) - { - ExplorerBrowserControl.Navigate(initialNavigationTarget); - initialNavigationTarget = null; - } - - if (initialViewMode != null) - { - ExplorerBrowserControl.ContentOptions.ViewMode = (ExplorerBrowserViewMode)initialViewMode; - initialViewMode = null; - } - } - - /// - /// Map changes to the CLR flags to the dependency properties - /// - /// - /// - void UpdateDependencyPropertiesFromCLRPRoperties( object sender, EventArgs e ) - { - if( AlignLeft != ExplorerBrowserControl.ContentOptions.AlignLeft ) - AlignLeft = ExplorerBrowserControl.ContentOptions.AlignLeft; - if( AutoArrange != ExplorerBrowserControl.ContentOptions.AutoArrange ) - AutoArrange = ExplorerBrowserControl.ContentOptions.AutoArrange; - if( CheckSelect != ExplorerBrowserControl.ContentOptions.CheckSelect ) - CheckSelect = ExplorerBrowserControl.ContentOptions.CheckSelect; - if( ExtendedTiles != ExplorerBrowserControl.ContentOptions.ExtendedTiles ) - ExtendedTiles = ExplorerBrowserControl.ContentOptions.ExtendedTiles; - if( FullRowSelect != ExplorerBrowserControl.ContentOptions.FullRowSelect ) - FullRowSelect = ExplorerBrowserControl.ContentOptions.FullRowSelect; - if( HideFileNames != ExplorerBrowserControl.ContentOptions.HideFileNames ) - HideFileNames = ExplorerBrowserControl.ContentOptions.HideFileNames; - if( NoBrowserViewState != ExplorerBrowserControl.ContentOptions.NoBrowserViewState ) - NoBrowserViewState = ExplorerBrowserControl.ContentOptions.NoBrowserViewState; - if( NoColumnHeader != ExplorerBrowserControl.ContentOptions.NoColumnHeader ) - NoColumnHeader = ExplorerBrowserControl.ContentOptions.NoColumnHeader; - if( NoHeaderInAllViews != ExplorerBrowserControl.ContentOptions.NoHeaderInAllViews ) - NoHeaderInAllViews = ExplorerBrowserControl.ContentOptions.NoHeaderInAllViews; - if( NoIcons != ExplorerBrowserControl.ContentOptions.NoIcons ) - NoIcons = ExplorerBrowserControl.ContentOptions.NoIcons; - if( NoSubfolders != ExplorerBrowserControl.ContentOptions.NoSubfolders ) - NoSubfolders = ExplorerBrowserControl.ContentOptions.NoSubfolders; - if( SingleClickActivate != ExplorerBrowserControl.ContentOptions.SingleClickActivate ) - SingleClickActivate = ExplorerBrowserControl.ContentOptions.SingleClickActivate; - if( SingleSelection != ExplorerBrowserControl.ContentOptions.SingleSelection ) - SingleSelection = ExplorerBrowserControl.ContentOptions.SingleSelection; - - if( ThumbnailSize != ExplorerBrowserControl.ContentOptions.ThumbnailSize ) - ThumbnailSize = ExplorerBrowserControl.ContentOptions.ThumbnailSize; - - if( ViewMode != ExplorerBrowserControl.ContentOptions.ViewMode ) - ViewMode = ExplorerBrowserControl.ContentOptions.ViewMode; - - if( AlwaysNavigate != ExplorerBrowserControl.NavigationOptions.AlwaysNavigate ) - AlwaysNavigate = ExplorerBrowserControl.NavigationOptions.AlwaysNavigate; - if( NavigateOnce != ExplorerBrowserControl.NavigationOptions.NavigateOnce ) - NavigateOnce = ExplorerBrowserControl.NavigationOptions.NavigateOnce; - - if( AdvancedQueryPane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.AdvancedQuery ) - AdvancedQueryPane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.AdvancedQuery; - if( CommandsPane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.Commands ) - CommandsPane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.Commands; - if( CommandsOrganizePane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.CommandsOrganize ) - CommandsOrganizePane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.CommandsOrganize; - if( CommandsViewPane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.CommandsView ) - CommandsViewPane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.CommandsView; - if( DetailsPane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.Details ) - DetailsPane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.Details; - if( NavigationPane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.Navigation ) - NavigationPane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.Navigation; - if( PreviewPane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.Preview ) - PreviewPane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.Preview; - if( QueryPane != ExplorerBrowserControl.NavigationOptions.PaneVisibility.Query ) - QueryPane = ExplorerBrowserControl.NavigationOptions.PaneVisibility.Query; - - if( NavigationLogIndex != ExplorerBrowserControl.NavigationLog.CurrentLocationIndex ) - NavigationLogIndex = ExplorerBrowserControl.NavigationLog.CurrentLocationIndex; - - if( itemsChanged.WaitOne( 1 ) ) - { - items.Clear( ); - foreach( ShellObject obj in ExplorerBrowserControl.Items ) - { - items.Add( obj ); - } - } - - - if( selectionChanged.WaitOne( 1 ) ) - { - selectionChangeWaitCount = 4; - } - else - { - if( selectionChangeWaitCount > 0 ) - { - selectionChangeWaitCount--; - - if( selectionChangeWaitCount == 0 ) - { - selectedItems.Clear( ); - foreach( ShellObject obj in ExplorerBrowserControl.SelectedItems ) - { - selectedItems.Add( obj ); - } - } - } - } - } - - /// - /// Synchronize NavigationLog collection to dependency collection - /// - /// - /// - void NavigationLogChanged( object sender, NavigationLogEventArgs args ) - { - navigationLog.Clear( ); - foreach( ShellObject obj in ExplorerBrowserControl.NavigationLog.Locations ) - { - navigationLog.Add( obj ); - } - } - - /// - /// Synchronize SelectedItems collection to dependency collection - /// - /// - /// - void SelectionChanged( object sender, EventArgs e ) - { - selectionChanged.Set( ); - } - - // Synchronize ItemsCollection to dependency collection - void ItemsChanged( object sender, EventArgs e ) - { - itemsChanged.Set( ); - } - - /// - /// The items in the ExplorerBrowser window - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification="This needs to be read-write collection for WPF databinding")] - public ObservableCollection Items - { - get - { - return (ObservableCollection)GetValue( ItemsProperty ); - } - set - { - SetValue( ItemsPropertyKey, value ); - } - } - - private static readonly DependencyPropertyKey ItemsPropertyKey = - DependencyProperty.RegisterReadOnly( - "Items", typeof( ObservableCollection ), - typeof( ExplorerBrowser ), - new PropertyMetadata( null ) ); - - /// - /// The items in the ExplorerBrowser window - /// - public static readonly DependencyProperty ItemsProperty = ItemsPropertyKey.DependencyProperty; - - /// - /// The selected items in the ExplorerBrowser window - /// - public ObservableCollection SelectedItems - { - get - { - return (ObservableCollection)GetValue( SelectedItemsProperty ); - } - internal set - { - SetValue( SelectedItemsPropertyKey, value ); - } - } - - private static readonly DependencyPropertyKey SelectedItemsPropertyKey = - DependencyProperty.RegisterReadOnly( - "SelectedItems", typeof( ObservableCollection ), - typeof( ExplorerBrowser ), - new PropertyMetadata( null ) ); - - /// - /// The selected items in the ExplorerBrowser window - /// - public ObservableCollection NavigationLog - { - get - { - return (ObservableCollection)GetValue( NavigationLogProperty ); - } - internal set - { - SetValue( NavigationLogPropertyKey, value ); - } - } - - private static readonly DependencyPropertyKey NavigationLogPropertyKey = - DependencyProperty.RegisterReadOnly( - "NavigationLog", typeof( ObservableCollection ), - typeof( ExplorerBrowser ), - new PropertyMetadata( null ) ); - - /// - /// The NavigaitonLog - /// - public static readonly DependencyProperty NavigationLogProperty = NavigationLogPropertyKey.DependencyProperty; - - /// - /// The selected items in the ExplorerBrowser window - /// - public static readonly DependencyProperty SelectedItemsProperty = SelectedItemsPropertyKey.DependencyProperty; - - - /// - /// The location the explorer browser is navigating to - /// - public ShellObject NavigationTarget - { - get - { - return (ShellObject)GetValue( NavigationTargetProperty ); - } - set - { - SetValue( NavigationTargetProperty, value ); - } - } - - private static readonly DependencyProperty NavigationTargetProperty = - DependencyProperty.Register( - "NavigationTarget", typeof( ShellObject ), - typeof( ExplorerBrowser ), - new PropertyMetadata( null, navigationTargetChanged ) ); - - private static void navigationTargetChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - - if (instance.ExplorerBrowserControl.explorerBrowserControl != null) - instance.ExplorerBrowserControl.Navigate((ShellObject)e.NewValue); - else - instance.initialNavigationTarget = (ShellObject)e.NewValue; - } - - /// - /// The view should be left-aligned. - /// - public bool AlignLeft - { - get { return (bool)GetValue( AlignLeftProperty ); } - set { SetValue( AlignLeftProperty, value ); } - } - - internal static DependencyProperty AlignLeftProperty = - DependencyProperty.Register( - "AlignLeft", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnAlignLeftChanged ) ); - - private static void OnAlignLeftChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.AlignLeft = (bool)e.NewValue; - } - - - /// - /// Automatically arrange the elements in the view. - /// - public bool AutoArrange - { - get { return (bool)GetValue( AutoArrangeProperty ); } - set { SetValue( AutoArrangeProperty, value ); } - } - - internal static DependencyProperty AutoArrangeProperty = - DependencyProperty.Register( - "AutoArrange", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnAutoArrangeChanged ) ); - - private static void OnAutoArrangeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.AutoArrange = (bool)e.NewValue; - } - - /// - /// Turns on check mode for the view - /// - public bool CheckSelect - { - get { return (bool)GetValue( CheckSelectProperty ); } - set { SetValue( CheckSelectProperty, value ); } - } - - internal static DependencyProperty CheckSelectProperty = - DependencyProperty.Register( - "CheckSelect", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnCheckSelectChanged ) ); - - private static void OnCheckSelectChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.CheckSelect = (bool)e.NewValue; - } - - /// - /// When the view is in "tile view mode" the layout of a single item should be extended to the width of the view. - /// - public bool ExtendedTiles - { - get { return (bool)GetValue( ExtendedTilesProperty ); } - set { SetValue( ExtendedTilesProperty, value ); } - } - - internal static DependencyProperty ExtendedTilesProperty = - DependencyProperty.Register( - "ExtendedTiles", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnExtendedTilesChanged ) ); - - private static void OnExtendedTilesChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.ExtendedTiles = (bool)e.NewValue; - } - - /// - /// When an item is selected, the item and all its sub-items are highlighted. - /// - public bool FullRowSelect - { - get { return (bool)GetValue( FullRowSelectProperty ); } - set { SetValue( FullRowSelectProperty, value ); } - } - - internal static DependencyProperty FullRowSelectProperty = - DependencyProperty.Register( - "FullRowSelect", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnFullRowSelectChanged ) ); - - private static void OnFullRowSelectChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.FullRowSelect = (bool)e.NewValue; - } - - /// - /// The view should not display file names - /// - public bool HideFileNames - { - get { return (bool)GetValue( HideFileNamesProperty ); } - set { SetValue( HideFileNamesProperty, value ); } - } - - internal static DependencyProperty HideFileNamesProperty = - DependencyProperty.Register( - "HideFileNames", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnHideFileNamesChanged ) ); - - private static void OnHideFileNamesChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.HideFileNames = (bool)e.NewValue; - } - - /// - /// The view should not save view state in the browser. - /// - public bool NoBrowserViewState - { - get { return (bool)GetValue( NoBrowserViewStateProperty ); } - set { SetValue( NoBrowserViewStateProperty, value ); } - } - - internal static DependencyProperty NoBrowserViewStateProperty = - DependencyProperty.Register( - "NoBrowserViewState", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnNoBrowserViewStateChanged ) ); - - private static void OnNoBrowserViewStateChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.NoBrowserViewState = (bool)e.NewValue; - } - - /// - /// Do not display a column header in the view in any view mode. - /// - public bool NoColumnHeader - { - get { return (bool)GetValue( NoColumnHeaderProperty ); } - set { SetValue( NoColumnHeaderProperty, value ); } - } - - internal static DependencyProperty NoColumnHeaderProperty = - DependencyProperty.Register( - "NoColumnHeader", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnNoColumnHeaderChanged ) ); - - private static void OnNoColumnHeaderChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.NoColumnHeader = (bool)e.NewValue; - } - - /// - /// Only show the column header in details view mode. - /// - public bool NoHeaderInAllViews - { - get { return (bool)GetValue( NoHeaderInAllViewsProperty ); } - set { SetValue( NoHeaderInAllViewsProperty, value ); } - } - - internal static DependencyProperty NoHeaderInAllViewsProperty = - DependencyProperty.Register( - "NoHeaderInAllViews", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnNoHeaderInAllViewsChanged ) ); - - private static void OnNoHeaderInAllViewsChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.NoHeaderInAllViews = (bool)e.NewValue; - } - - /// - /// The view should not display icons. - /// - public bool NoIcons - { - get { return (bool)GetValue( NoIconsProperty ); } - set { SetValue( NoIconsProperty, value ); } - } - - internal static DependencyProperty NoIconsProperty = - DependencyProperty.Register( - "NoIcons", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnNoIconsChanged ) ); - - private static void OnNoIconsChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.NoIcons = (bool)e.NewValue; - } - - /// - /// Do not show subfolders. - /// - public bool NoSubfolders - { - get { return (bool)GetValue( NoSubfoldersProperty ); } - set { SetValue( NoSubfoldersProperty, value ); } - } - - internal static DependencyProperty NoSubfoldersProperty = - DependencyProperty.Register( - "NoSubfolders", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnNoSubfoldersChanged ) ); - - private static void OnNoSubfoldersChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.NoSubfolders = (bool)e.NewValue; - } - - /// - /// Navigate with a single click - /// - public bool SingleClickActivate - { - get { return (bool)GetValue( SingleClickActivateProperty ); } - set { SetValue( SingleClickActivateProperty, value ); } - } - - internal static DependencyProperty SingleClickActivateProperty = - DependencyProperty.Register( - "SingleClickActivate", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnSingleClickActivateChanged ) ); - - private static void OnSingleClickActivateChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.SingleClickActivate = (bool)e.NewValue; - } - - /// - /// Do not allow more than a single item to be selected. - /// - public bool SingleSelection - { - get { return (bool)GetValue( SingleSelectionProperty ); } - set { SetValue( SingleSelectionProperty, value ); } - } - - internal static DependencyProperty SingleSelectionProperty = - DependencyProperty.Register( - "SingleSelection", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnSingleSelectionChanged ) ); - - private static void OnSingleSelectionChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.SingleSelection = (bool)e.NewValue; - } - - /// - /// The size of the thumbnails in the explorer browser - /// - public int ThumbnailSize - { - get { return (int)GetValue( ThumbnailSizeProperty ); } - set { SetValue( ThumbnailSizeProperty, value ); } - } - - internal static DependencyProperty ThumbnailSizeProperty = - DependencyProperty.Register( - "ThumbnailSize", typeof( int ), - typeof( ExplorerBrowser ), - new PropertyMetadata( 32, OnThumbnailSizeChanged ) ); - - private static void OnThumbnailSizeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.ContentOptions.ThumbnailSize = (int)e.NewValue; - } - - - - /// - /// The various view modes of the explorer browser control - /// - public ExplorerBrowserViewMode ViewMode - { - get { return (ExplorerBrowserViewMode)GetValue( ViewModeProperty ); } - set { SetValue( ViewModeProperty, value ); } - } - - internal static DependencyProperty ViewModeProperty = - DependencyProperty.Register( - "ViewMode", typeof( ExplorerBrowserViewMode ), - typeof( ExplorerBrowser ), - new PropertyMetadata( ExplorerBrowserViewMode.Auto, OnViewModeChanged ) ); - - private static void OnViewModeChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - - if (instance.ExplorerBrowserControl != null) - { - if (instance.ExplorerBrowserControl.explorerBrowserControl == null) - instance.initialViewMode = (ExplorerBrowserViewMode)e.NewValue; - else - instance.ExplorerBrowserControl.ContentOptions.ViewMode = (ExplorerBrowserViewMode)e.NewValue; - } - } - - - /// - /// Always navigate, even if you are attempting to navigate to the current folder. - /// - public bool AlwaysNavigate - { - get { return (bool)GetValue( AlwaysNavigateProperty ); } - set { SetValue( AlwaysNavigateProperty, value ); } - } - - internal static DependencyProperty AlwaysNavigateProperty = - DependencyProperty.Register( - "AlwaysNavigate", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnAlwaysNavigateChanged ) ); - - private static void OnAlwaysNavigateChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.AlwaysNavigate = (bool)e.NewValue; - } - - /// - /// Do not navigate further than the initial navigation. - /// - public bool NavigateOnce - { - get { return (bool)GetValue( NavigateOnceProperty ); } - set { SetValue( NavigateOnceProperty, value ); } - } - - internal static DependencyProperty NavigateOnceProperty = - DependencyProperty.Register( - "NavigateOnce", typeof( bool ), - typeof( ExplorerBrowser ), - new PropertyMetadata( false, OnNavigateOnceChanged ) ); - - private static void OnNavigateOnceChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.NavigateOnce = (bool)e.NewValue; - } - - /// - /// Show/Hide the AdvancedQuery pane on subsequent navigation - /// - public PaneVisibilityState AdvancedQueryPane - { - get { return (PaneVisibilityState)GetValue( AdvancedQueryPaneProperty ); } - set { SetValue( AdvancedQueryPaneProperty, value ); } - } - - internal static DependencyProperty AdvancedQueryPaneProperty = - DependencyProperty.Register( - "AdvancedQueryPane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnAdvancedQueryPaneChanged ) ); - - private static void OnAdvancedQueryPaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.AdvancedQuery = (PaneVisibilityState)e.NewValue; - } - - /// - /// Show/Hide the Commands pane on subsequent navigation - /// - public PaneVisibilityState CommandsPane - { - get { return (PaneVisibilityState)GetValue( CommandsPaneProperty ); } - set { SetValue( CommandsPaneProperty, value ); } - } - - internal static DependencyProperty CommandsPaneProperty = - DependencyProperty.Register( - "CommandsPane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnCommandsPaneChanged ) ); - - private static void OnCommandsPaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.Commands = (PaneVisibilityState)e.NewValue; - } - - /// - /// Show/Hide the Organize menu in the Commands pane on subsequent navigation - /// - public PaneVisibilityState CommandsOrganizePane - { - get { return (PaneVisibilityState)GetValue( CommandsOrganizePaneProperty ); } - set { SetValue( CommandsOrganizePaneProperty, value ); } - } - - internal static DependencyProperty CommandsOrganizePaneProperty = - DependencyProperty.Register( - "CommandsOrganizePane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnCommandsOrganizePaneChanged ) ); - - private static void OnCommandsOrganizePaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.CommandsOrganize = (PaneVisibilityState)e.NewValue; - } - - /// - /// Show/Hide the View menu in the Commands pane on subsequent navigation - /// - public PaneVisibilityState CommandsViewPane - { - get { return (PaneVisibilityState)GetValue( CommandsViewPaneProperty ); } - set { SetValue( CommandsViewPaneProperty, value ); } - } - - internal static DependencyProperty CommandsViewPaneProperty = - DependencyProperty.Register( - "CommandsViewPane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnCommandsViewPaneChanged ) ); - - private static void OnCommandsViewPaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.CommandsView = (PaneVisibilityState)e.NewValue; - } - - /// - /// Show/Hide the Details pane on subsequent navigation - /// - public PaneVisibilityState DetailsPane - { - get { return (PaneVisibilityState)GetValue( DetailsPaneProperty ); } - set { SetValue( DetailsPaneProperty, value ); } - } - - internal static DependencyProperty DetailsPaneProperty = - DependencyProperty.Register( - "DetailsPane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnDetailsPaneChanged ) ); - - private static void OnDetailsPaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.Details = (PaneVisibilityState)e.NewValue; - } - - /// - /// Show/Hide the Navigation pane on subsequent navigation - /// - public PaneVisibilityState NavigationPane - { - get { return (PaneVisibilityState)GetValue( NavigationPaneProperty ); } - set { SetValue( NavigationPaneProperty, value ); } - } - - internal static DependencyProperty NavigationPaneProperty = - DependencyProperty.Register( - "NavigationPane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnNavigationPaneChanged ) ); - - private static void OnNavigationPaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.Navigation = (PaneVisibilityState)e.NewValue; - } - - /// - /// Show/Hide the Preview pane on subsequent navigation - /// - public PaneVisibilityState PreviewPane - { - get { return (PaneVisibilityState)GetValue( PreviewPaneProperty ); } - set { SetValue( PreviewPaneProperty, value ); } - } - - internal static DependencyProperty PreviewPaneProperty = - DependencyProperty.Register( - "PreviewPane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnPreviewPaneChanged ) ); - - private static void OnPreviewPaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.Preview = (PaneVisibilityState)e.NewValue; - } - - /// - /// Show/Hide the Query pane on subsequent navigation - /// - public PaneVisibilityState QueryPane - { - get { return (PaneVisibilityState)GetValue( QueryPaneProperty ); } - set { SetValue( QueryPaneProperty, value ); } - } - - internal static DependencyProperty QueryPaneProperty = - DependencyProperty.Register( - "QueryPane", typeof( PaneVisibilityState ), - typeof( ExplorerBrowser ), - new PropertyMetadata( PaneVisibilityState.DontCare, OnQueryPaneChanged ) ); - - private static void OnQueryPaneChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationOptions.PaneVisibility.Query = (PaneVisibilityState)e.NewValue; - } - - - /// - /// Navigation log index - /// - public int NavigationLogIndex - { - get { return (int)GetValue( NavigationLogIndexProperty ); } - set { SetValue( NavigationLogIndexProperty, value ); } - } - - internal static DependencyProperty NavigationLogIndexProperty = - DependencyProperty.Register( - "NavigationLogIndex", typeof( int ), - typeof( ExplorerBrowser ), - new PropertyMetadata( 0, OnNavigationLogIndexChanged ) ); - - private static void OnNavigationLogIndexChanged( DependencyObject d, DependencyPropertyChangedEventArgs e ) - { - ExplorerBrowser instance = d as ExplorerBrowser; - if( instance.ExplorerBrowserControl != null ) - instance.ExplorerBrowserControl.NavigationLog.NavigateLog( (int)e.NewValue ); - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs deleted file mode 100644 index b0b7232..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowser.cs +++ /dev/null @@ -1,811 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Windows.Forms; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Runtime.InteropServices; -using System.Diagnostics; -using System.Collections.Generic; -using System.Threading; -using MS.WindowsAPICodePack.Internal; -using System.Reflection; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Controls.WindowsForms -{ - /// - /// This class is a wrapper around the Windows Explorer Browser control. - /// - public class ExplorerBrowser : - System.Windows.Forms.UserControl, - Microsoft.WindowsAPICodePack.Controls.IServiceProvider, - IExplorerPaneVisibility, - IExplorerBrowserEvents, - ICommDlgBrowser, - IMessageFilter - { - #region properties - /// - /// Options that control how the ExplorerBrowser navigates - /// - public ExplorerBrowserNavigationOptions NavigationOptions - { - get; - private set; - } - - /// - /// Options that control how the content of the ExplorerBorwser looks - /// - public ExplorerBrowserContentOptions ContentOptions - { - get; - private set; - } - - private IShellItemArray shellItemsArray; - private ShellObjectCollection itemsCollection; - /// - /// The set of ShellObjects in the Explorer Browser - /// - public ShellObjectCollection Items - { - get - { - if (shellItemsArray != null) - Marshal.ReleaseComObject(shellItemsArray); - - if (itemsCollection != null) - { - itemsCollection.Dispose(); - itemsCollection = null; - } - - shellItemsArray = GetItemsArray(); - itemsCollection = new ShellObjectCollection(shellItemsArray, true); - - return itemsCollection; - } - } - - private IShellItemArray selectedShellItemsArray; - private ShellObjectCollection selectedItemsCollection; - /// - /// The set of selected ShellObjects in the Explorer Browser - /// - public ShellObjectCollection SelectedItems - { - get - { - if (selectedShellItemsArray != null) - Marshal.ReleaseComObject(selectedShellItemsArray); - - if (selectedItemsCollection != null) - { - selectedItemsCollection.Dispose(); - selectedItemsCollection = null; - } - - selectedShellItemsArray = GetSelectedItemsArray(); - selectedItemsCollection = new ShellObjectCollection(selectedShellItemsArray, true); - - - return selectedItemsCollection; - } - } - - /// - /// Contains the navigation history of the ExplorerBrowser - /// - public ExplorerBrowserNavigationLog NavigationLog - { - get; - private set; - } - - /// - /// The name of the property bag used to persist changes to the ExplorerBrowser's view state. - /// - public string PropertyBagName - { - get - { - return propertyBagName; - } - set - { - propertyBagName = value; - if (explorerBrowserControl != null) - explorerBrowserControl.SetPropertyBag(propertyBagName); - } - } - - #endregion - - #region operations - /// - /// Clears the Explorer Browser of existing content, fills it with - /// content from the specified container, and adds a new point to the Travel Log. - /// - /// The shell container to navigate to. - /// Will throw if navigation fails for any other reason. - public void Navigate(ShellObject shellObject) - { - if (explorerBrowserControl == null) - { - antecreationNavigationTarget = shellObject; - } - else - { - HRESULT hr = explorerBrowserControl.BrowseToObject(shellObject.NativeShellItem, 0); - if (hr != HRESULT.S_OK) - { - if (hr == HRESULT.RESOURCE_IN_USE) - { - if (NavigationFailed != null) - { - NavigationFailedEventArgs args = new NavigationFailedEventArgs(); - args.FailedLocation = shellObject; - NavigationFailed(this, args); - } - } - else - throw new COMException("BrowseToObject failed", (int)hr); - } - } - } - - /// - /// Navigates within the navigation log. This does not change the set of - /// locations in the navigation log. - /// - /// Forward of Backward - /// True if the navigation succeeded, false if it failed for any reason. - public bool NavigateLogLocation(NavigationLogDirection direction) - { - return NavigationLog.NavigateLog(direction); - } - - /// - /// Navigate within the navigation log. This does not change the set of - /// locations in the navigation log. - /// - /// An index into the navigation logs Locations collection. - /// True if the navigation succeeded, false if it failed for any reason. - public bool NavigateLogLocation(int navigationLogIndex) - { - return NavigationLog.NavigateLog(navigationLogIndex); - } - #endregion - - #region events - - /// - /// Fires when the SelectedItems collection changes. - /// - public event ExplorerBrowserSelectionChangedEventHandler SelectionChanged; - - /// - /// Fires when the Items colection changes. - /// - public event ExplorerBrowserItemsChangedEventHandler ItemsChanged; - - /// - /// Fires when a navigation has been initiated, but is not yet complete. - /// - public event ExplorerBrowserNavigationPendingEventHandler NavigationPending; - - /// - /// Fires when a navigation has been 'completed': no NavigationPending listener - /// has cancelled, and the ExplorerBorwser has created a new view. The view - /// will be populated with new items asynchronously, and ItemsChanged will be - /// fired to reflect this some time later. - /// - public event ExplorerBrowserNavigationCompleteEventHandler NavigationComplete; - - /// - /// Fires when either a NavigationPending listener cancels the navigation, or - /// if the operating system determines that navigation is not possible. - /// - public event ExplorerBrowserNavigationFailedEventHandler NavigationFailed; - - /// - /// Fires when the ExplorerBorwser view has finished enumerating files. - /// - public event ExplorerBrowserViewEnumerationCompleteHandler ViewEnumerationComplete; - - /// - /// Fires when the item selected in the view has changed (i.e., a rename ). - /// This is not the same as SelectionChanged. - /// - public event ExplorerBrowserViewSelectedItemChangedHandler ViewSelectedItemChanged; - - #endregion - - #region implementation - - #region construction - internal ExplorerBrowserClass explorerBrowserControl = null; - - // for the IExplorerBrowserEvents Advise call - internal uint eventsCookie = 0; - - // name of the property bag that contains the view state options of the browser - string propertyBagName = typeof(ExplorerBrowser).FullName; - - /// - /// Initializes the ExplorerBorwser WinForms wrapper. - /// - public ExplorerBrowser() - : base() - { - NavigationOptions = new ExplorerBrowserNavigationOptions(this); - ContentOptions = new ExplorerBrowserContentOptions(this); - NavigationLog = new ExplorerBrowserNavigationLog(this); - } - - #endregion - - #region message handlers - - /// - /// Displays a placeholder for the explorer browser in design mode - /// - /// Contains information about the paint event. - protected override void OnPaint(PaintEventArgs e) - { - if (DesignMode) - { - LinearGradientBrush linGrBrush = new LinearGradientBrush( - ClientRectangle, - Color.Aqua, - Color.CadetBlue, - LinearGradientMode.ForwardDiagonal); - - - e.Graphics.FillRectangle(linGrBrush, ClientRectangle); - - StringFormat sf = new StringFormat(); - sf.Alignment = StringAlignment.Center; - sf.LineAlignment = StringAlignment.Center; - e.Graphics.DrawString( - "ExplorerBrowserControl", - new Font("Garamond", 30), - Brushes.White, - ClientRectangle, - sf); - } - - base.OnPaint(e); - } - - ShellObject antecreationNavigationTarget = null; - ExplorerBrowserViewEvents viewEvents = null; - - /// - /// Creates and initializes the native ExplorerBrowser control - /// - protected override void OnCreateControl() - { - base.OnCreateControl(); - - HRESULT hr = HRESULT.S_OK; - - if (this.DesignMode == false) - { - explorerBrowserControl = new ExplorerBrowserClass(); - - // hooks up IExplorerPaneVisibility and ICommDlgBrowser event notifications - hr = ExplorerBrowserNativeMethods.IUnknown_SetSite(explorerBrowserControl, this); - - // hooks up IExplorerBrowserEvents event notification - hr = explorerBrowserControl.Advise( - Marshal.GetComInterfaceForObject(this, typeof(IExplorerBrowserEvents)), - out eventsCookie); - - // sets up ExplorerBrowser view connection point events - viewEvents = new ExplorerBrowserViewEvents( this ); - - CoreNativeMethods.RECT rect = new CoreNativeMethods.RECT(); - rect.top = ClientRectangle.Top; - rect.left = ClientRectangle.Left; - rect.right = ClientRectangle.Right; - rect.bottom = ClientRectangle.Bottom; - - explorerBrowserControl.Initialize(this.Handle, ref rect, null); - - // Force an initial show frames so that IExplorerPaneVisibility works the first time it is set. - // This also enables the control panel to be browsed to. If it is not set, then navigating to - // the control panel succeeds, but no items are visible in the view. - explorerBrowserControl.SetOptions(EXPLORER_BROWSER_OPTIONS.EBO_SHOWFRAMES); - - explorerBrowserControl.SetPropertyBag(propertyBagName); - - if (antecreationNavigationTarget != null) - { - BeginInvoke(new MethodInvoker( - delegate - { - Navigate(antecreationNavigationTarget); - antecreationNavigationTarget = null; - })); - } - } - - Application.AddMessageFilter(this); - } - - /// - /// Sizes the native control to match the WinForms control wrapper. - /// - /// Contains information about the size changed event. - protected override void OnSizeChanged(EventArgs e) - { - if (explorerBrowserControl != null) - { - CoreNativeMethods.RECT rect = new CoreNativeMethods.RECT(); - rect.top = ClientRectangle.Top; - rect.left = ClientRectangle.Left; - rect.right = ClientRectangle.Right; - rect.bottom = ClientRectangle.Bottom; - IntPtr ptr = IntPtr.Zero; - explorerBrowserControl.SetRect(ref ptr, rect); - } - - base.OnSizeChanged(e); - } - - /// - /// Cleans up the explorer browser events+object when the window is being taken down. - /// - /// An EventArgs that contains event data. - protected override void OnHandleDestroyed(EventArgs e) - { - if (explorerBrowserControl != null) - { - // unhook events - viewEvents.DisconnectFromView( ); - HRESULT hr = explorerBrowserControl.Unadvise(eventsCookie); - ExplorerBrowserNativeMethods.IUnknown_SetSite(explorerBrowserControl, null); - - // destroy the explorer browser control - explorerBrowserControl.Destroy(); - - // release com reference to it - Marshal.ReleaseComObject(explorerBrowserControl); - explorerBrowserControl = null; - } - - base.OnHandleDestroyed(e); - } - #endregion - - #region object interfaces - - #region IServiceProvider - HRESULT Microsoft.WindowsAPICodePack.Controls.IServiceProvider.QueryService( - ref Guid guidService, ref Guid riid, out IntPtr ppvObject) - { - HRESULT hr = HRESULT.S_OK; - - if (guidService.CompareTo(new Guid(ExplorerBrowserIIDGuid.IExplorerPaneVisibility)) == 0) - { - // Responding to this SID allows us to control the visibility of the - // explorer browser panes - ppvObject = - Marshal.GetComInterfaceForObject(this, typeof(IExplorerPaneVisibility)); - hr = HRESULT.S_OK; - } - else if (guidService.CompareTo(new Guid(ExplorerBrowserIIDGuid.ICommDlgBrowser)) == 0) - { - // Responding to this SID allows us to hook up our ICommDlgBrowser - // implementation so we get selection change events from the view. - if (riid.CompareTo(new Guid(ExplorerBrowserIIDGuid.ICommDlgBrowser)) == 0) - { - ppvObject = Marshal.GetComInterfaceForObject(this, typeof(ICommDlgBrowser)); - hr = HRESULT.S_OK; - } - else - { - ppvObject = IntPtr.Zero; - hr = HRESULT.E_NOINTERFACE; - } - } - else - { - IntPtr nullObj = IntPtr.Zero; - ppvObject = nullObj; - hr = HRESULT.E_NOINTERFACE; - } - - return hr; - } - #endregion - - #region IExplorerPaneVisibility - /// - /// Controls the visibility of the explorer borwser panes - /// - /// a guid identifying the pane - /// the pane state desired - /// - HRESULT IExplorerPaneVisibility.GetPaneState(ref Guid explorerPane, out EXPLORERPANESTATE peps) - { - switch (explorerPane.ToString()) - { - case ExplorerBrowserViewPanes.AdvancedQuery: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.AdvancedQuery); - break; - case ExplorerBrowserViewPanes.Commands: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.Commands); - break; - case ExplorerBrowserViewPanes.CommandsOrganize: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.CommandsOrganize); - break; - case ExplorerBrowserViewPanes.CommandsView: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.CommandsView); - break; - case ExplorerBrowserViewPanes.Details: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.Details); - break; - case ExplorerBrowserViewPanes.Navigation: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.Navigation); - break; - case ExplorerBrowserViewPanes.Preview: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.Preview); - break; - case ExplorerBrowserViewPanes.Query: - peps = VisibilityToPaneState(NavigationOptions.PaneVisibility.Query); - break; - default: -#if LOG_UNKNOWN_PANES - System.Diagnostics.Debugger.Log( 4, "ExplorerBrowser", "unknown pane view state. id=" + explorerPane.ToString( ) ); -#endif - peps = VisibilityToPaneState(PaneVisibilityState.Show); - break; - } - - return HRESULT.S_OK; - } - - private EXPLORERPANESTATE VisibilityToPaneState(PaneVisibilityState visibility) - { - switch (visibility) - { - case PaneVisibilityState.DontCare: - return EXPLORERPANESTATE.EPS_DONTCARE; - - case PaneVisibilityState.Hide: - return EXPLORERPANESTATE.EPS_DEFAULT_OFF | EXPLORERPANESTATE.EPS_FORCE; - - case PaneVisibilityState.Show: - return EXPLORERPANESTATE.EPS_DEFAULT_ON | EXPLORERPANESTATE.EPS_FORCE; - - default: - throw new ArgumentException("unexpected PaneVisibilityState"); - } - } - - #endregion - - #region IExplorerBrowserEvents - HRESULT IExplorerBrowserEvents.OnNavigationPending(IntPtr pidlFolder) - { - bool canceled = false; - - if (NavigationPending != null) - { - NavigationPendingEventArgs args = new NavigationPendingEventArgs(); - - // For some special items (like network machines), ShellObject.FromIDList - // might return null - args.PendingLocation = ShellObjectFactory.Create(pidlFolder); - - if (args.PendingLocation != null) - { - foreach (Delegate del in NavigationPending.GetInvocationList()) - { - del.DynamicInvoke(new object[] { this, args }); - if (args.Cancel) - { - canceled = true; - } - } - } - } - - return canceled ? HRESULT.E_FAIL : HRESULT.S_OK; - } - - HRESULT IExplorerBrowserEvents.OnViewCreated( object psv ) - { - viewEvents.ConnectToView( (IShellView)psv ); - - return HRESULT.S_OK; - } - - HRESULT IExplorerBrowserEvents.OnNavigationComplete(IntPtr pidlFolder) - { - // view mode may change - ContentOptions.folderSettings.ViewMode = GetCurrentViewMode(); - - if (NavigationComplete != null) - { - NavigationCompleteEventArgs args = new NavigationCompleteEventArgs(); - args.NewLocation = ShellObjectFactory.Create(pidlFolder); - NavigationComplete(this, args); - } - return HRESULT.S_OK; - } - - HRESULT IExplorerBrowserEvents.OnNavigationFailed(IntPtr pidlFolder) - { - if (NavigationFailed != null) - { - NavigationFailedEventArgs args = new NavigationFailedEventArgs(); - args.FailedLocation = ShellObjectFactory.Create(pidlFolder); - NavigationFailed(this, args); - } - return HRESULT.S_OK; - } - #endregion - - #region ICommDlgBrowser - HRESULT ICommDlgBrowser.OnDefaultCommand(IntPtr ppshv) - { - return HRESULT.S_FALSE; - } - - HRESULT ICommDlgBrowser.OnStateChange(IntPtr ppshv, CommDlgBrowserStateChange uChange) - { - if( uChange == CommDlgBrowserStateChange.CDBOSC_SELCHANGE ) - FireSelectionChanged( ); - - return HRESULT.S_OK; - } - - HRESULT ICommDlgBrowser.IncludeObject(IntPtr ppshv, IntPtr pidl) - { - // items in the view have changed, so the collections need updating - FireContentChanged( ); - - return HRESULT.S_OK; - } - - #endregion - - #region IMessageFilter Members - - bool IMessageFilter.PreFilterMessage(ref Message m) - { - HRESULT hr = HRESULT.S_FALSE; - if (explorerBrowserControl != null) - { - // translate keyboard input - hr = ((IInputObject)explorerBrowserControl).TranslateAcceleratorIO(ref m); - } - return (hr == HRESULT.S_OK); - } - - #endregion - - #endregion - - #region utilities - - /// - /// Returns the current view mode of the browser - /// - /// - internal FOLDERVIEWMODE GetCurrentViewMode() - { - IFolderView2 ifv2 = GetFolderView2(); - uint viewMode = 0; - if (ifv2 != null) - { - try - { - HRESULT hr = ifv2.GetCurrentViewMode(out viewMode); - if (hr != HRESULT.S_OK) - throw Marshal.GetExceptionForHR((int)hr); - } - finally - { - Marshal.ReleaseComObject(ifv2); - ifv2 = null; - } - } - return (FOLDERVIEWMODE)viewMode; - } - - /// - /// Gets the IFolderView2 interface from the explorer browser. - /// - /// - internal IFolderView2 GetFolderView2() - { - Guid iid = new Guid(ExplorerBrowserIIDGuid.IFolderView2); - IntPtr view = IntPtr.Zero; - if (this.explorerBrowserControl != null) - { - HRESULT hr = this.explorerBrowserControl.GetCurrentView(ref iid, out view); - switch (hr) - { - case HRESULT.S_OK: - break; - - case HRESULT.E_NOINTERFACE: - case HRESULT.E_FAIL: -#if LOG_KNOWN_COM_ERRORS - Debugger.Log( 2, "ExplorerBrowser", "Unable to obtain view. Error=" + e.ToString( ) ); -#endif - return null; - - default: - throw new COMException("ExplorerBrowser failed to get current view.", (int)hr); - } - - return (IFolderView2)Marshal.GetObjectForIUnknown(view); - } - else - { - return null; - } - } - - /// - /// Gets the selected items in the explorer browser as an IShellItemArray - /// - /// - internal IShellItemArray GetSelectedItemsArray() - { - IShellItemArray iArray = null; - IFolderView2 iFV2 = GetFolderView2(); - if (iFV2 != null) - { - try - { - Guid iidShellItemArray = new Guid(ShellIIDGuid.IShellItemArray); - object oArray = null; - HRESULT hr = iFV2.Items((uint)SVGIO.SVGIO_SELECTION, ref iidShellItemArray, out oArray); - iArray = oArray as IShellItemArray; - if (hr != HRESULT.S_OK && - hr != HRESULT.E_ELEMENTNOTFOUND && - hr != HRESULT.E_FAIL) - { - throw new COMException("unexpected error retrieving selection", (int)hr); - } - } - finally - { - Marshal.ReleaseComObject(iFV2); - iFV2 = null; - } - } - - return iArray; - } - - internal int GetItemsCount() - { - int itemsCount = 0; - - IFolderView2 iFV2 = GetFolderView2(); - if (iFV2 != null) - { - try - { - HRESULT hr = iFV2.ItemCount((uint)SVGIO.SVGIO_ALLVIEW, out itemsCount); - - if (hr != HRESULT.S_OK && - hr != HRESULT.E_ELEMENTNOTFOUND && - hr != HRESULT.E_FAIL) - { - throw new COMException("unexpected error retrieving item count", (int)hr); - } - } - finally - { - Marshal.ReleaseComObject(iFV2); - iFV2 = null; - } - } - - return itemsCount; - } - - internal int GetSelectedItemsCount() - { - int itemsCount = 0; - - IFolderView2 iFV2 = GetFolderView2(); - if (iFV2 != null) - { - try - { - HRESULT hr = iFV2.ItemCount((uint)SVGIO.SVGIO_SELECTION, out itemsCount); - - if( hr != HRESULT.S_OK && - hr != HRESULT.E_ELEMENTNOTFOUND && - hr != HRESULT.E_FAIL ) - { - throw new COMException( "unexpected error retrieving selected item count", (int)hr ); - } - } - finally - { - Marshal.ReleaseComObject(iFV2); - iFV2 = null; - } - } - - return itemsCount; - } - - /// - /// Gets the items in the ExplorerBrowser as an IShellItemArray - /// - /// - internal IShellItemArray GetItemsArray() - { - IShellItemArray iArray = null; - IFolderView2 iFV2 = GetFolderView2(); - if (iFV2 != null) - { - try - { - Guid iidShellItemArray = new Guid(ShellIIDGuid.IShellItemArray); - object oArray = null; - HRESULT hr = iFV2.Items((uint)SVGIO.SVGIO_ALLVIEW, ref iidShellItemArray, out oArray); - if (hr != HRESULT.S_OK && - hr != HRESULT.E_FAIL && - hr != HRESULT.E_ELEMENTNOTFOUND && - hr != HRESULT.E_INVALIDARG) - { - throw new COMException("unexpected error retrieving view items", (int)hr); - } - - iArray = oArray as IShellItemArray; - } - finally - { - Marshal.ReleaseComObject(iFV2); - iFV2 = null; - } - } - return iArray; - } - - #endregion - - #region view event forwarding - internal void FireSelectionChanged( ) - { - if( SelectionChanged != null ) - SelectionChanged.Invoke( this, EventArgs.Empty ); - } - - internal void FireContentChanged( ) - { - if( ItemsChanged != null ) - ItemsChanged.Invoke( this, EventArgs.Empty ); - } - - internal void FireContentEnumerationComplete( ) - { - if( ViewEnumerationComplete != null ) - ViewEnumerationComplete.Invoke( this, EventArgs.Empty ); - } - - internal void FireSelectedItemChanged( ) - { - if( ViewSelectedItemChanged != null ) - ViewSelectedItemChanged.Invoke( this, EventArgs.Empty ); - } - #endregion - - #endregion - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserContentOptions.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserContentOptions.cs deleted file mode 100644 index ec9199f..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserContentOptions.cs +++ /dev/null @@ -1,325 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Diagnostics; -using MS.WindowsAPICodePack.Internal; -using Microsoft.WindowsAPICodePack.Controls.WindowsForms; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - /// - /// These options control how the content of the Explorer Browser - /// is rendered. - /// - public class ExplorerBrowserContentOptions - { - #region construction - ExplorerBrowser eb; - internal ExplorerBrowserContentOptions( ExplorerBrowser eb ) - { - this.eb = eb; - } - #endregion - - #region ViewMode property - // This is a one-way property of the explorer browser. - // Keeping it around for the get implementations. - internal FOLDERSETTINGS folderSettings = new FOLDERSETTINGS( ); - - /// - /// The viewing mode of the Explorer Browser - /// - public ExplorerBrowserViewMode ViewMode - { - get - { - return (ExplorerBrowserViewMode)folderSettings.ViewMode; - } - set - { - folderSettings.ViewMode = (FOLDERVIEWMODE)value; - HRESULT hr = HRESULT.S_OK; - if( eb.explorerBrowserControl != null ) - hr = eb.explorerBrowserControl.SetFolderSettings( folderSettings ); - } - } - #endregion - - #region Flags property - /// - /// The binary representation of the ExplorerBrowser content flags - /// - public ExplorerBrowserContentFlags Flags - { - get - { - return (ExplorerBrowserContentFlags)folderSettings.fFlags; - } - set - { - folderSettings.fFlags = (FOLDERFLAGS)value | FOLDERFLAGS.FWF_USESEARCHFOLDER | FOLDERFLAGS.FWF_NOWEBVIEW; - if( eb.explorerBrowserControl != null ) - eb.explorerBrowserControl.SetFolderSettings( folderSettings ); - } - } - #endregion - - #region content flags to properties mapping - /// - /// The view should be left-aligned. - /// - public bool AlignLeft - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.AlignLeft ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.AlignLeft, value ); - } - } - /// - /// Automatically arrange the elements in the view. - /// - public bool AutoArrange - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.AutoArrange ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.AutoArrange, value ); - } - } - /// - /// Turns on check mode for the view - /// - public bool CheckSelect - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.CheckSelect ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.CheckSelect, value ); - } - } - /// - /// When the view is in "tile view mode" the layout of a single item should be extended to the width of the view. - /// - public bool ExtendedTiles - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.ExtendedTiles ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.ExtendedTiles, value ); - } - } - /// - /// When an item is selected, the item and all its sub-items are highlighted. - /// - public bool FullRowSelect - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.FullRowSelect ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.FullRowSelect, value ); - } - } - /// - /// The view should not display file names - /// - public bool HideFileNames - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.HideFileNames ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.HideFileNames, value ); - } - } - /// - /// The view should not save view state in the browser. - /// - public bool NoBrowserViewState - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.NoBrowserViewState ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.NoBrowserViewState, value ); - } - } - /// - /// Do not display a column header in the view in any view mode. - /// - public bool NoColumnHeader - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.NoColumnHeader ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.NoColumnHeader, value ); - } - } - /// - /// Only show the column header in details view mode. - /// - public bool NoHeaderInAllViews - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.NoHeaderInAllViews ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.NoHeaderInAllViews, value ); - } - } - /// - /// The view should not display icons. - /// - public bool NoIcons - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.NoIcons ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.NoIcons, value ); - } - } - /// - /// Do not show subfolders. - /// - public bool NoSubfolders - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.NoSubfolders ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.NoSubfolders, value ); - } - } - /// - /// Navigate with a single click - /// - public bool SingleClickActivate - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.SingleClickActivate ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.SingleClickActivate, value ); - } - } - /// - /// Do not allow more than a single item to be selected. - /// - public bool SingleSelection - { - get - { - return IsFlagSet( ExplorerBrowserContentFlags.SingleSelection ); - } - set - { - SetFlag( ExplorerBrowserContentFlags.SingleSelection, value ); - } - } - - private bool IsFlagSet( ExplorerBrowserContentFlags flag ) - { - return ( folderSettings.fFlags & (FOLDERFLAGS)flag ) != 0; - } - - private void SetFlag( ExplorerBrowserContentFlags flag, bool value ) - { - if( value ) - folderSettings.fFlags |= (FOLDERFLAGS)flag; - else - folderSettings.fFlags = folderSettings.fFlags & ~(FOLDERFLAGS)flag; - - if( eb.explorerBrowserControl != null ) - eb.explorerBrowserControl.SetFolderSettings( folderSettings ); - } - - #endregion - - #region thumbnail size - /// - /// The size of the thumbnails in pixels - /// - public int ThumbnailSize - { - get - { - int iconSize = 0; - IFolderView2 iFV2 = eb.GetFolderView2( ); - if( iFV2 != null ) - { - try - { - int fvm = 0; - HRESULT hr = iFV2.GetViewModeAndIconSize( out fvm, out iconSize ); - if( hr != HRESULT.S_OK ) - throw new COMException("unable to get icon size", (int)hr ); - } - finally - { - Marshal.ReleaseComObject( iFV2 ); - iFV2 = null; - } - } - - return iconSize; - } - set - { - IFolderView2 iFV2 = eb.GetFolderView2( ); - if( iFV2 != null ) - { - try - { - int fvm = 0; - int iconSize = 0; - HRESULT hr = iFV2.GetViewModeAndIconSize( out fvm, out iconSize ); - if( hr != HRESULT.S_OK ) - throw new COMException( "unable to get icon size", (int)hr ); - hr = iFV2.SetViewModeAndIconSize( fvm, value ); - if( hr != HRESULT.S_OK ) - throw new COMException( "unable to set icon size", (int)hr ); - } - finally - { - Marshal.ReleaseComObject( iFV2 ); - iFV2 = null; - } - } - } - } - #endregion - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserDiagram.cd b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserDiagram.cd deleted file mode 100644 index 5188dd1..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserDiagram.cd +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - AADgIAAAIAgBOAEAAABAQAAAAEAACAAGAAAQcACAAAA= - ExplorerBrowser\ExplorerBrowser.cs - - - - - - - - - - - AAAABAAAAAoIAgEAAggAEAAgEQAAAAACABJAAAUAAAA= - ExplorerBrowser\ExplorerBrowserContentOptions.cs - - - - - - - - - AABAggAAAAgJAAAAAACAABAAAAAAAAwFAAQAQAAAQBA= - ExplorerBrowser\ExplorerBrowserPaneVisibility.cs - - - - - - - - AAAAAAAAAAAAABAAAAIgAAEAAAAAAABAAAAQAAAAAAQ= - ExplorerBrowser\ExplorerBrowserNavigationLog.cs - - - - - - - - - - - AAAABAAIAAAIAAAAEAACAAAgAAAAAAAAACAAAAAAAAA= - ExplorerBrowser\ExplorerBrowserNavigationOptions.cs - - - - - - AAAAAAAAQAAAAAAAAAAAAAAAAAAAABAAAAAAAAAgAAA= - ExplorerBrowser\ExplorerBrowserEvents.cs - - - - - - AAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - ExplorerBrowser\ExplorerBrowserEvents.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAA= - ExplorerBrowser\ExplorerBrowserEvents.cs - - - - \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEnums.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEnums.cs deleted file mode 100644 index 2479401..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEnums.cs +++ /dev/null @@ -1,159 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - /// - /// Indicates the viewing mode of the explorer browser - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Justification = "This is following the native API")] - public enum ExplorerBrowserViewMode - { - /// - /// Choose the best view mode for the folder - /// - Auto = -1, - - /// - /// (New for Windows7) - /// - Content = 8, - - /// - /// Object names and other selected information, such as the size or date last updated, are shown. - /// - Details = 4, - - /// - /// The view should display medium-size icons. - /// - Icon = 1, - - /// - /// Object names are displayed in a list view. - /// - List = 3, - - /// - /// The view should display small icons. - /// - SmallIcon = 2, - - /// - /// The view should display thumbnail icons. - /// - Thumbnail = 5, - - /// - /// The view should display icons in a filmstrip format. - /// - ThumbStrip = 7, - - /// - /// The view should display large icons. - /// - Tile = 6 - } - - /// - /// Specifies the options that control subsequent navigation. - /// Typically use one, or a bitwise combination of these - /// flags to specify how the explorer browser navigates. - /// - [Flags] - public enum ExplorerBrowserNavigationFlags - { - /// - /// Always navigate, even if you are attempting to navigate to the current folder. - /// - AlwaysNavigate = 0x00000004, - - /// - /// Do not navigate further than the initial navigation. - /// - NavigateOnce = 0x00000001, - } - - /// - /// Indicates the content options of the explorer browser. - /// Typically use one, or a bitwise combination of these - /// flags to specify how conent should appear in the - /// explorer browser control - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2217:DoNotMarkEnumsWithFlags", Justification = "This is following the native API"), Flags] - public enum ExplorerBrowserContentFlags : uint - { - /// - /// The view should be left-aligned. - /// - AlignLeft = 0x00000800, - /// - /// Automatically arrange the elements in the view. - /// - AutoArrange = 0x00000001, - /// - /// Turns on check mode for the view - /// - CheckSelect = 0x08040000, - /// - /// When the view is set to "Tile" the layout of a single item should be extended to the width of the view. - /// - ExtendedTiles = 0x02000000, - /// - /// When an item is selected, the item and all its sub-items are highlighted. - /// - FullRowSelect = 0x00200000, - /// - /// The view should not display file names - /// - HideFileNames = 0x00020000, - /// - /// The view should not save view state in the browser. - /// - NoBrowserViewState = 0x10000000, - /// - /// Do not display a column header in the view in any view mode. - /// - NoColumnHeader = 0x00800000, - /// - /// Only show the column header in details view mode. - /// - NoHeaderInAllViews = 0x01000000, - /// - /// The view should not display icons. - /// - NoIcons = 0x00001000, - /// - /// Do not show subfolders. - /// - NoSubfolders = 0x00000080, - /// - /// Navigate with a single click - /// - SingleClickActivate = 0x00008000, - /// - /// Do not allow more than a single item to be selected. - /// - SingleSelection = 0x00000040, - } - - /// - /// Indicates the visibility state of an ExplorerBrowser pane - /// - public enum PaneVisibilityState - { - /// - /// Allow the explorer browser to determine if this pane is displayed. - /// - DontCare, - /// - /// Hide the pane - /// - Hide, - /// - /// Show the pane - /// - Show - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEvents.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEvents.cs deleted file mode 100644 index 7a926a2..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserEvents.cs +++ /dev/null @@ -1,118 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - /// - /// Fires when the SelectedItems collection changes. - /// - /// - /// - public delegate void ExplorerBrowserSelectionChangedEventHandler( object sender, EventArgs e ); - - /// - /// Fires when the Items colection changes. - /// - /// - /// - public delegate void ExplorerBrowserItemsChangedEventHandler( object sender, EventArgs e ) ; - - /// - /// Fires when a navigation has been initiated, but is not yet complete. - /// - /// - /// - public delegate void ExplorerBrowserNavigationPendingEventHandler( object sender, NavigationPendingEventArgs e ); - - /// - /// Fires when a navigation has been 'completed': no NavigationPending listener - /// has cancelled, and the ExplorerBorwser has created a new view. The view - /// will be populated with new items asynchronously, and ItemsChanged will be - /// fired to reflect this some time later. - /// - /// - /// - public delegate void ExplorerBrowserNavigationCompleteEventHandler( object sender, NavigationCompleteEventArgs e ); - - /// - /// Fires when either a NavigationPending listener cancels the navigation, or - /// if the operating system determines that navigation is not possible. - /// - /// - /// - public delegate void ExplorerBrowserNavigationFailedEventHandler( object sender, NavigationFailedEventArgs e ); - - /// - /// Fires when the ExplorerBorwser view has finished enumerating files. - /// - /// the explorer borwser - /// empty - public delegate void ExplorerBrowserViewEnumerationCompleteHandler( object sender, EventArgs e ); - - /// - /// Fires when the item selected in the view has changed (i.e., a rename ). - /// This is not the same as SelectionChanged. - /// - /// the explorer borwser - /// empty - public delegate void ExplorerBrowserViewSelectedItemChangedHandler( object sender, EventArgs e ); - - - - /// - /// Event argument for The NavigationPending event - /// - public class NavigationPendingEventArgs : EventArgs - { - /// - /// The location being navigated to - /// - public ShellObject PendingLocation - { - get; - set; - } - - /// - /// Set to 'True' to cancel the navigation. - /// - public bool Cancel - { - get; - set; - } - - } - - /// - /// Event argument for The NavigationComplete event - /// - public class NavigationCompleteEventArgs : EventArgs - { - /// - /// The new location of the explorer browser - /// - public ShellObject NewLocation - { - get; - set; - } - } - - /// - /// Event argument for the NavigatinoFailed event - /// - public class NavigationFailedEventArgs : EventArgs - { - /// - /// The location the the browser would have navigated to. - /// - public ShellObject FailedLocation - { - get; - set; - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserPaneVisibility.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserPaneVisibility.cs deleted file mode 100644 index 195c258..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserPaneVisibility.cs +++ /dev/null @@ -1,146 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - /// - /// Controls the visibility of the various ExplorerBrowser panes on subsequent navigation - /// - public class ExplorerBrowserPaneVisibility - { - /// - /// The pane on the left side of the Windows Explorer window that hosts the folders tree and Favorites. - /// - public PaneVisibilityState Navigation - { - get - { - return _Navigation; - } - set - { - _Navigation = value; - } - } - private PaneVisibilityState _Navigation = PaneVisibilityState.DontCare; - - /// - /// Commands module along the top of the Windows Explorer window. - /// - public PaneVisibilityState Commands - { - get - { - return _Commands; - } - set - { - _Commands = value; - } - } - private PaneVisibilityState _Commands = PaneVisibilityState.DontCare; - - /// - /// Organize menu within the commands module. - /// - public PaneVisibilityState CommandsOrganize - { - get - { - return _CommandsOrganize; - } - set - { - _CommandsOrganize = value; - } - } - private PaneVisibilityState _CommandsOrganize = PaneVisibilityState.DontCare; - - - /// - /// View menu within the commands module. - /// - public PaneVisibilityState CommandsView - { - get - { - return _CommandsView; - } - set - { - _CommandsView = value; - } - } - private PaneVisibilityState _CommandsView = PaneVisibilityState.DontCare; - - - /// - /// Pane showing metadata along the bottom of the Windows Explorer window. - /// - public PaneVisibilityState Details - { - get - { - return _Details; - } - set - { - _Details = value; - } - } - private PaneVisibilityState _Details = PaneVisibilityState.DontCare; - - - /// - /// Pane on the right of the Windows Explorer window that shows a large reading preview of the file. - /// - public PaneVisibilityState Preview - { - get - { - return _Preview; - } - set - { - _Preview = value; - } - } - private PaneVisibilityState _Preview = PaneVisibilityState.DontCare; - - - /// - /// Quick filter buttons to aid in a search. - /// - public PaneVisibilityState Query - { - get - { - return _Query; - } - set - { - _Query = value; - } - } - private PaneVisibilityState _Query = PaneVisibilityState.DontCare; - - - /// - /// Additional fields and options to aid in a search. - /// - public PaneVisibilityState AdvancedQuery - { - get - { - return _AdvancedQuery; - } - set - { - _AdvancedQuery = value; - } - } - private PaneVisibilityState _AdvancedQuery = PaneVisibilityState.DontCare; - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserViewEvents.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserViewEvents.cs deleted file mode 100644 index 2f519a4..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/ExplorerBrowserViewEvents.cs +++ /dev/null @@ -1,121 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Controls.WindowsForms; -using Microsoft.WindowsAPICodePack.Controls; - -namespace MS.WindowsAPICodePack.Internal -{ - /// - /// This provides a connection point container compatible dispatch interface for - /// hooking into the ExplorerBrowser view. - /// - [ComVisible( true )] - [ClassInterface( ClassInterfaceType.AutoDual )] - public class ExplorerBrowserViewEvents - { - #region implementation - private uint viewConnectionPointCookie = 0; - private object viewDispatch = null; - private IntPtr nullPtr = IntPtr.Zero; - - private Guid IID_DShellFolderViewEvents = new Guid( ExplorerBrowserIIDGuid.DShellFolderViewEvents ); - private Guid IID_IDispatch = new Guid( ExplorerBrowserIIDGuid.IDispatch ); - private ExplorerBrowser parent = null; - #endregion - - #region contstruction - internal ExplorerBrowserViewEvents( ExplorerBrowser parent ) - { - this.parent = parent; - } - #endregion - - #region operations - internal void ConnectToView( IShellView psv ) - { - DisconnectFromView( ); - - HRESULT hr = psv.GetItemObject( - SVGIO.SVGIO_BACKGROUND, - ref IID_IDispatch, - out viewDispatch ); - - if( hr == HRESULT.S_OK ) - { - hr = ExplorerBrowserNativeMethods.ConnectToConnectionPoint( - this, - ref IID_DShellFolderViewEvents, - true, - viewDispatch, - ref viewConnectionPointCookie, - ref nullPtr ); - - if( hr != HRESULT.S_OK ) - { - Marshal.ReleaseComObject( viewDispatch ); - } - } - } - - internal void DisconnectFromView( ) - { - if( viewDispatch != null ) - { - ExplorerBrowserNativeMethods.ConnectToConnectionPoint( - IntPtr.Zero, - ref IID_DShellFolderViewEvents, - false, - viewDispatch, - ref viewConnectionPointCookie, - ref nullPtr ); - - Marshal.ReleaseComObject( viewDispatch ); - viewDispatch = null; - viewConnectionPointCookie = 0; - } - } - #endregion - - #region IDispatch events - // These need to be public to be accessible via AutoDual reflection - - /// - /// The view selection has changed - /// - [DispId( ExplorerBrowserViewDispatchIds.SelectionChanged )] - public void ViewSelectionChanged( ) - { - parent.FireSelectionChanged( ); - } - - /// - /// The contents of the view have changed - /// - [DispId( ExplorerBrowserViewDispatchIds.ContentsChanged )] - public void ViewContentsChanged( ) - { - parent.FireContentChanged( ); - } - - /// - /// The enumeration of files in the view is complete - /// - [DispId( ExplorerBrowserViewDispatchIds.FileListEnumDone )] - public void ViewFileListEnumDone( ) - { - parent.FireContentEnumerationComplete( ); - } - - /// - /// The selected item in the view has changed (not the same as the selection has changed) - /// - [DispId( ExplorerBrowserViewDispatchIds.SelectedItemChanged )] - public void ViewSelectedItemChanged( ) - { - parent.FireSelectedItemChanged( ); - } - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLog.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLog.cs deleted file mode 100644 index 3ff26fe..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLog.cs +++ /dev/null @@ -1,259 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using Microsoft.WindowsAPICodePack.Controls.WindowsForms; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - - /// - /// The navigation log is a history of the locations visited by the explorer browser. - /// - public class ExplorerBrowserNavigationLog - { - #region operations - /// - /// Clears the contents of the navigation log. - /// - public void ClearLog( ) - { - // nothing to do - if( Locations.Count == 0 ) - return; - - bool oldCanNavigateBackward = CanNavigateBackward; - bool oldCanNavigateForward = CanNavigateForward; - - Locations.Clear( ); - this.currentLocationIndex = -1; - - NavigationLogEventArgs args = new NavigationLogEventArgs( ); - args.LocationsChanged = true; - args.CanNavigateBackwardChanged = ( oldCanNavigateBackward != CanNavigateBackward ); - args.CanNavigateForwardChanged = ( oldCanNavigateForward != CanNavigateForward ); - if( NavigationLogChanged != null ) - NavigationLogChanged( this, args ); - } - #endregion - - #region properties - /// - /// Indicates the presence of locations in the log that can be - /// reached by calling Navigate(Forward) - /// - public bool CanNavigateForward - { - get - { - return (CurrentLocationIndex < (Locations.Count - 1)); - } - } - - /// - /// Indicates the presence of locations in the log that can be - /// reached by calling Navigate(Backward) - /// - public bool CanNavigateBackward - { - get - { - return ( CurrentLocationIndex >= 1 ); - } - } - - /// - /// The navigation log - /// - public List Locations - { - get; - private set; - } - - /// - /// An index into the Locations collection. The ShellObject pointed to - /// by this index is the current location of the ExplorerBrowser. - /// - public int CurrentLocationIndex - { - get - { - return currentLocationIndex; - } - } - - - /// - /// Gets the shell object in the Locations collection pointed to - /// by CurrentLocationIndex. - /// - public ShellObject CurrentLocation - { - get - { - if( currentLocationIndex < 0 ) - return null; - - return Locations[currentLocationIndex]; - } - } - #endregion - - #region events - /// - /// Fires when the navigation log changes or - /// the current navigation position changes - /// - public event NavigationLogChangedEventHandler NavigationLogChanged; - #endregion - - #region implementation - - private ExplorerBrowser parent = null; - - /// - /// The pending navigation log action. null if the user is not navigating - /// via the navigation log. - /// - private PendingNavigation pendingNavigation = null; - - /// - /// The index into the Locations collection. -1 if the Locations colleciton - /// is empty. - /// - private int currentLocationIndex = -1; - - internal ExplorerBrowserNavigationLog( ExplorerBrowser parent ) - { - if( parent == null ) - throw new ArgumentException( "parent can not be null!" ); - - // - Locations = new List(); - - // Hook navigation events from the parent to distinguish between - // navigation log induced navigation, and other navigations. - this.parent = parent; - this.parent.NavigationComplete += new ExplorerBrowserNavigationCompleteEventHandler( OnNavigationComplete ); - this.parent.NavigationFailed += new ExplorerBrowserNavigationFailedEventHandler( OnNavigationFailed ); - } - - private void OnNavigationFailed( object sender, NavigationFailedEventArgs args ) - { - pendingNavigation = null; - } - - private void OnNavigationComplete( object sender, NavigationCompleteEventArgs args ) - { - NavigationLogEventArgs eventArgs = new NavigationLogEventArgs( ); - bool oldCanNavigateBackward = CanNavigateBackward; - bool oldCanNavigateForward = CanNavigateForward; - - if( ( pendingNavigation != null ) ) - { - // navigation log traversal in progress - - // determine if new location is the same as the traversal request - int result = 0; - pendingNavigation.location.NativeShellItem.Compare( - args.NewLocation.NativeShellItem, SICHINTF.SICHINT_ALLFIELDS, out result ); - bool shellItemsEqual = ( result == 0 ); - if( shellItemsEqual == false ) - { - // new location is different than traversal request, - // behave is if it never happened! - // remove history following currentLocationIndex, append new item - if( currentLocationIndex < ( Locations.Count - 1 ) ) - Locations.RemoveRange( (int)currentLocationIndex + 1, (int)( Locations.Count - ( currentLocationIndex + 1 ) ) ); - Locations.Add( args.NewLocation ); - currentLocationIndex = (Locations.Count - 1); - eventArgs.LocationsChanged = true; - } - else - { - // log traversal successful, update index - currentLocationIndex = (int)pendingNavigation.index; - eventArgs.LocationsChanged = false; - } - pendingNavigation = null; - } - else - { - // remove history following currentLocationIndex, append new item - if( currentLocationIndex < (Locations.Count - 1) ) - Locations.RemoveRange( (int)currentLocationIndex + 1, (int)( Locations.Count - (currentLocationIndex + 1)) ); - Locations.Add( args.NewLocation ); - currentLocationIndex = (Locations.Count - 1); - eventArgs.LocationsChanged = true; - } - - // update event args - eventArgs.CanNavigateBackwardChanged = ( oldCanNavigateBackward != CanNavigateBackward ); - eventArgs.CanNavigateForwardChanged = ( oldCanNavigateForward != CanNavigateForward ); - - if( NavigationLogChanged != null ) - NavigationLogChanged( this, eventArgs ); - } - - internal bool NavigateLog( NavigationLogDirection direction ) - { - // determine proper index to navigate to - int locationIndex = 0; - if( (direction == NavigationLogDirection.Backward) && CanNavigateBackward ) - { - locationIndex = (currentLocationIndex - 1); - } - else if( (direction == NavigationLogDirection.Forward) && CanNavigateForward ) - { - locationIndex = (currentLocationIndex + 1); - } - else - { - return false; - } - - // initiate traversal request - ShellObject location = Locations[ (int)locationIndex ]; - pendingNavigation = new PendingNavigation( location, locationIndex ); - parent.Navigate( location ); - return true; - } - - internal bool NavigateLog( int index ) - { - // can't go anywhere - if( index >= Locations.Count || - index < 0 ) - return false; - - // no need to re navigate to the same location - if( index == currentLocationIndex ) - return false; - - // initiate traversal request - ShellObject location = Locations[ (int)index ]; - pendingNavigation = new PendingNavigation( location, index ); - parent.Navigate( location ); - return true; - } - - #endregion - } - - /// - /// A navigation traversal request - /// - internal class PendingNavigation - { - internal PendingNavigation( ShellObject location, int index ) - { - this.location = location; - this.index = index; - } - - internal ShellObject location; - internal int index; - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEnums.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEnums.cs deleted file mode 100644 index 293e478..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEnums.cs +++ /dev/null @@ -1,22 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - /// - /// The direction argument for Navigate - /// - public enum NavigationLogDirection - { - /// - /// Navigates forward through the navigation log - /// - Forward, - - /// - /// Navigates backward through the travel log - /// - Backward - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEvents.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEvents.cs deleted file mode 100644 index 5738cca..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationLogEvents.cs +++ /dev/null @@ -1,47 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - /// - /// The event argument for NavigationLogChangedEvent - /// - public class NavigationLogEventArgs : EventArgs - { - /// - /// Indicates CanNavigateForward has changed - /// - public bool CanNavigateForwardChanged - { - get; - set; - } - - /// - /// Indicates CanNavigateBackward has changed - /// - public bool CanNavigateBackwardChanged - { - get; - set; - } - - /// - /// Indicates the Locations collection has changed - /// - public bool LocationsChanged - { - get; - set; - } - - } - - /// - /// This is fired when the navigation log changes - /// - /// The ExplorerBrowser that this navigation log is attached to. - /// The changes made to the navigation log - public delegate void NavigationLogChangedEventHandler( object sender, NavigationLogEventArgs e ); -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationOptions.cs b/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationOptions.cs deleted file mode 100644 index bc86f2c..0000000 --- a/src/External/WindowsAPICodePack/Shell/ExplorerBrowser/NavigationOptions.cs +++ /dev/null @@ -1,106 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. -using System; -using Microsoft.WindowsAPICodePack.Controls.WindowsForms; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - - /// - /// These options control the results subsequent navigations of the ExplorerBrowser - /// - public class ExplorerBrowserNavigationOptions - { - #region construction - ExplorerBrowser eb; - internal ExplorerBrowserNavigationOptions( ExplorerBrowser eb ) - { - this.eb = eb; - PaneVisibility = new ExplorerBrowserPaneVisibility( ); - } - #endregion - - #region Flags property - /// - /// The binary flags that are passed to the explorer browser control's GetOptions/SetOptions methods - /// - public ExplorerBrowserNavigationFlags Flags - { - get - { - EXPLORER_BROWSER_OPTIONS ebo = new EXPLORER_BROWSER_OPTIONS( ); - if( eb.explorerBrowserControl != null ) - { - eb.explorerBrowserControl.GetOptions( out ebo ); - return (ExplorerBrowserNavigationFlags)ebo; - } - return (ExplorerBrowserNavigationFlags)ebo; - } - set - { - EXPLORER_BROWSER_OPTIONS ebo = (EXPLORER_BROWSER_OPTIONS)value; - if( eb.explorerBrowserControl != null ) - { - // Always forcing SHOWFRAMES because we handle IExplorerPaneVisibility - eb.explorerBrowserControl.SetOptions( ebo | EXPLORER_BROWSER_OPTIONS.EBO_SHOWFRAMES ); - } - } - } - #endregion - - #region control flags to properties mapping - /// - /// Do not navigate further than the initial navigation. - /// - public bool NavigateOnce - { - get - { - return IsFlagSet( ExplorerBrowserNavigationFlags.NavigateOnce ); - } - set - { - SetFlag( ExplorerBrowserNavigationFlags.NavigateOnce, value ); - } - } - /// - /// Always navigate, even if you are attempting to navigate to the current folder. - /// - public bool AlwaysNavigate - { - get - { - return IsFlagSet( ExplorerBrowserNavigationFlags.AlwaysNavigate ); - } - set - { - SetFlag( ExplorerBrowserNavigationFlags.AlwaysNavigate, value ); - } - } - - private bool IsFlagSet( ExplorerBrowserNavigationFlags flag ) - { - return ( Flags & flag ) != 0; - } - - private void SetFlag( ExplorerBrowserNavigationFlags flag, bool value ) - { - if( value ) - Flags |= flag; - else - Flags = Flags & ~flag; - } - #endregion - - #region ExplorerBrowser pane visibility - /// - /// Controls the visibility of the various ExplorerBrowser panes on subsequent navigation - /// - public ExplorerBrowserPaneVisibility PaneVisibility - { - get; - private set; - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMClasses.cs b/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMClasses.cs deleted file mode 100644 index 43394b3..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMClasses.cs +++ /dev/null @@ -1,22 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - [ComImport, - Guid(ShellIIDGuid.IShellLibrary), - CoClass(typeof(ShellLibraryCoClass))] - internal interface INativeShellLibrary : IShellLibrary - { - } - - [ComImport, - ClassInterface(ClassInterfaceType.None), - TypeLibType(TypeLibTypeFlags.FCanCreate), - Guid(ShellCLSIDGuid.ShellLibrary)] - internal class ShellLibraryCoClass - { - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMGuids.cs b/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMGuids.cs deleted file mode 100644 index 245a8a3..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMGuids.cs +++ /dev/null @@ -1,100 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal static class ShellIIDGuid - { - static ShellIIDGuid() - { - // Hide default constructor - } - - // IID GUID strings for relevant Shell COM interfaces. - internal const string IModalWindow = "B4DB1657-70D7-485E-8E3E-6FCB5A5C1802"; - internal const string IFileDialog = "42F85136-DB7E-439C-85F1-E4075D135FC8"; - internal const string IFileOpenDialog = "D57C7288-D4AD-4768-BE02-9D969532D960"; - internal const string IFileSaveDialog = "84BCCD23-5FDE-4CDB-AEA4-AF64B83D78AB"; - internal const string IFileDialogEvents = "973510DB-7D7F-452B-8975-74A85828D354"; - internal const string IFileDialogControlEvents = "36116642-D713-4B97-9B83-7484A9D00433"; - internal const string IFileDialogCustomize = "E6FDD21A-163F-4975-9C8C-A69F1BA37034"; - - internal const string IShellItem = "43826D1E-E718-42EE-BC55-A1E261C37BFE"; - internal const string IShellItem2 = "7E9FB0D3-919F-4307-AB2E-9B1860310C93"; - internal const string IShellItemArray = "B63EA76D-1F85-456F-A19C-48159EFA858B"; - internal const string IShellLibrary = "11A66EFA-382E-451A-9234-1E0E12EF3085"; - internal const string IThumbnailCache = "F676C15D-596A-4ce2-8234-33996F445DB1"; - internal const string ISharedBitmap = "091162a4-bc96-411f-aae8-c5122cd03363"; - internal const string IShellFolder = "000214E6-0000-0000-C000-000000000046"; - internal const string IShellFolder2 = "93F2F68C-1D1B-11D3-A30E-00C04F79ABD1"; - internal const string IEnumIDList = "000214F2-0000-0000-C000-000000000046"; - internal const string IShellLinkW = "000214F9-0000-0000-C000-000000000046"; - internal const string CShellLink = "00021401-0000-0000-C000-000000000046"; - - internal const string IPropertyStore = "886D8EEB-8CF2-4446-8D02-CDBA1DBDCF99"; - internal const string IPropertyDescription = "6F79D558-3E96-4549-A1D1-7D75D2288814"; - internal const string IPropertyDescription2 = "57D2EDED-5062-400E-B107-5DAE79FE57A6"; - internal const string IPropertyDescriptionList = "1F9FC1D0-C39B-4B26-817F-011967D3440E"; - internal const string IPropertyEnumType = "11E1FBF9-2D56-4A6B-8DB3-7CD193A471F2"; - internal const string IPropertyEnumType2 = "9B6E051C-5DDD-4321-9070-FE2ACB55E794"; - internal const string IPropertyEnumTypeList = "A99400F4-3D84-4557-94BA-1242FB2CC9A6"; - - internal const string ICondition = "0FC988D4-C935-4b97-A973-46282EA175C8"; - internal const string ISearchFolderItemFactory = "a0ffbc28-5482-4366-be27-3e81e78e06c2"; - internal const string IConditionFactory = "A5EFE073-B16F-474f-9F3E-9F8B497A3E08"; - internal const string IRichChunk = "4FDEF69C-DBC9-454e-9910-B34F3C64B510"; - internal const string IPersistStream = "00000109-0000-0000-C000-000000000046"; - internal const string IPersist = "0000010c-0000-0000-C000-000000000046"; - internal const string IEnumUnknown = "00000100-0000-0000-C000-000000000046"; - internal const string IQuerySolution = "D6EBC66B-8921-4193-AFDD-A1789FB7FF57"; - internal const string IQueryParser = "2EBDEE67-3505-43f8-9946-EA44ABC8E5B0"; - internal const string IQueryParserManager = "A879E3C4-AF77-44fb-8F37-EBD1487CF920"; - } - - internal static class ShellCLSIDGuid - { - static ShellCLSIDGuid() - { - // Hide default constructor - } - - // CLSID GUID strings for relevant coclasses. - internal const string FileOpenDialog = "DC1C5A9C-E88A-4DDE-A5A1-60F82A20AEF7"; - internal const string FileSaveDialog = "C0B4E2F3-BA21-4773-8DBA-335EC946EB8B"; - internal const string KnownFolderManager = "4DF0C730-DF9D-4AE3-9153-AA6B82E9795A"; - internal const string ShellLibrary = "D9B3211D-E57F-4426-AAEF-30A806ADD397"; - internal const string SearchFolderItemFactory = "14010e02-bbbd-41f0-88e3-eda371216584"; - internal const string ConditionFactory = "E03E85B0-7BE3-4000-BA98-6C13DE9FA486"; - internal const string QueryParserManager = "5088B39A-29B4-4d9d-8245-4EE289222F66"; - } - - internal static class ShellKFIDGuid - { - static ShellKFIDGuid() - { - // Hide default constructor - } - - internal const string ComputerFolder = "0AC0837C-BBF8-452A-850D-79D08E667CA7"; - internal const string Favorites = "1777F761-68AD-4D8A-87BD-30B759FA33DD"; - internal const string Documents = "FDD39AD0-238F-46AF-ADB4-6C85480369C7"; - internal const string Profile = "5E6C858F-0E22-4760-9AFE-EA3317B67173"; - - internal const string GenericLibrary = "5c4f28b5-f869-4e84-8e60-f11db97c5cc7"; - internal const string DocumentsLibrary = "7d49d726-3c21-4f05-99aa-fdc2c9474656"; - internal const string MusicLibrary = "94d6ddcc-4a68-4175-a374-bd584a510b78"; - internal const string PicturesLibrary = "b3690e58-e961-423b-b687-386ebfd83239"; - internal const string VideosLibrary = "5fa96407-7e77-483c-ac93-691d05850de8"; - - internal const string Libraries = "1B3EA5DC-B587-4786-B4EF-BD1DC332AEAE"; - } - - internal static class ShellBHIDGuid - { - static ShellBHIDGuid() - { - // Hide default constructor - } - - internal const string ShellFolderObject = "3981e224-f559-11d3-8e3a-00c04f6837d5"; - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMInterfaces.cs b/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMInterfaces.cs deleted file mode 100644 index ad9d11d..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellCOMInterfaces.cs +++ /dev/null @@ -1,929 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using System.Text; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal enum SICHINTF : uint - { - SICHINT_DISPLAY = 0x00000000, - SICHINT_CANONICAL = 0x10000000, - SICHINT_TEST_FILESYSPATH_IF_NOT_EQUAL = 0x20000000, - SICHINT_ALLFIELDS = 0x80000000 - } - - // Disable warning if a method declaration hides another inherited from a parent COM interface - // To successfully import a COM interface, all inherited methods need to be declared again with - // the exception of those already declared in "IUnknown" -#pragma warning disable 108 - - #region COM Interfaces - - [ComImport(), - Guid(ShellIIDGuid.IModalWindow), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IModalWindow - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), - PreserveSig] - int Show([In] IntPtr parent); - } - - [ComImport, - Guid(ShellIIDGuid.IShellItem), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IShellItem - { - // Not supported: IBindCtx. - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT BindToHandler( - [In] IntPtr pbc, - [In] ref Guid bhid, - [In] ref Guid riid, - [Out, MarshalAs(UnmanagedType.Interface)] out IShellFolder ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetParent([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetDisplayName( - [In] ShellNativeMethods.SIGDN sigdnName, - out IntPtr ppszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAttributes([In] ShellNativeMethods.SFGAO sfgaoMask, out ShellNativeMethods.SFGAO psfgaoAttribs); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT Compare( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, - [In] SICHINTF hint, - out int piOrder); - } - - [ComImport, - Guid(ShellIIDGuid.IShellItem2), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IShellItem2 : IShellItem - { - // Not supported: IBindCtx. - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT BindToHandler( - [In] IntPtr pbc, - [In] ref Guid bhid, - [In] ref Guid riid, - [Out, MarshalAs(UnmanagedType.Interface)] out IShellFolder ppv); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetParent([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetDisplayName( - [In] ShellNativeMethods.SIGDN sigdnName, - [MarshalAs(UnmanagedType.LPWStr)] out string ppszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAttributes([In] ShellNativeMethods.SFGAO sfgaoMask, out ShellNativeMethods.SFGAO psfgaoAttribs); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Compare( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, - [In] uint hint, - out int piOrder); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), PreserveSig] - int GetPropertyStore( - [In] ShellNativeMethods.GETPROPERTYSTOREFLAGS Flags, - [In] ref Guid riid, - [Out, MarshalAs(UnmanagedType.Interface)] out IPropertyStore ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetPropertyStoreWithCreateObject([In] ShellNativeMethods.GETPROPERTYSTOREFLAGS Flags, [In, MarshalAs(UnmanagedType.IUnknown)] object punkCreateObject, [In] ref Guid riid, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetPropertyStoreForKeys([In] ref PropertyKey rgKeys, [In] uint cKeys, [In] ShellNativeMethods.GETPROPERTYSTOREFLAGS Flags, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.IUnknown)] out IPropertyStore ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetPropertyDescriptionList([In] ref PropertyKey keyType, [In] ref Guid riid, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Update([In, MarshalAs(UnmanagedType.Interface)] IBindCtx pbc); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetProperty([In] ref PropertyKey key, out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCLSID([In] ref PropertyKey key, out Guid pclsid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFileTime([In] ref PropertyKey key, out System.Runtime.InteropServices.ComTypes.FILETIME pft); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetInt32([In] ref PropertyKey key, out int pi); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetString([In] ref PropertyKey key, [MarshalAs(UnmanagedType.LPWStr)] out string ppsz); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetUInt32([In] ref PropertyKey key, out uint pui); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetUInt64([In] ref PropertyKey key, out ulong pull); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetBool([In] ref PropertyKey key, out int pf); - } - - [ComImport, - Guid(ShellIIDGuid.IShellItemArray), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IShellItemArray - { - // Not supported: IBindCtx. - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT BindToHandler( - [In, MarshalAs(UnmanagedType.Interface)] IntPtr pbc, - [In] ref Guid rbhid, - [In] ref Guid riid, - out IntPtr ppvOut); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetPropertyStore( - [In] int Flags, - [In] ref Guid riid, - out IntPtr ppv); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetPropertyDescriptionList( - [In] ref PropertyKey keyType, - [In] ref Guid riid, - out IntPtr ppv); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetAttributes( - [In] ShellNativeMethods.SIATTRIBFLAGS dwAttribFlags, - [In] ShellNativeMethods.SFGAO sfgaoMask, - out ShellNativeMethods.SFGAO psfgaoAttribs); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetCount(out uint pdwNumItems); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetItemAt( - [In] uint dwIndex, - [MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - // Not supported: IEnumShellItems (will use GetCount and GetItemAt instead). - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT EnumItems([MarshalAs(UnmanagedType.Interface)] out IntPtr ppenumShellItems); - } - - [ComImport, - Guid(ShellIIDGuid.IShellLibrary), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IShellLibrary - { - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT LoadLibraryFromItem( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem library, - [In] ShellNativeMethods.STGM grfMode); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void LoadLibraryFromKnownFolder( - [In] ref Guid knownfidLibrary, - [In] ShellNativeMethods.STGM grfMode); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem location); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void RemoveFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem location); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetFolders( - [In] ShellNativeMethods.LIBRARYFOLDERFILTER lff, - [In] ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void ResolveFolder( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem folderToResolve, - [In] uint timeout, - [In] ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDefaultSaveFolder( - [In] ShellNativeMethods.DEFAULTSAVEFOLDERTYPE dsft, - [In] ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultSaveFolder( - [In] ShellNativeMethods.DEFAULTSAVEFOLDERTYPE dsft, - [In, MarshalAs(UnmanagedType.Interface)] IShellItem si); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetOptions( - out ShellNativeMethods.LIBRARYOPTIONFLAGS lofOptions); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetOptions( - [In] ShellNativeMethods.LIBRARYOPTIONFLAGS lofMask, - [In] ShellNativeMethods.LIBRARYOPTIONFLAGS lofOptions); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFolderType(out Guid ftid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFolderType([In] ref Guid ftid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetIcon([MarshalAs(UnmanagedType.LPWStr)] out string icon); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetIcon([In, MarshalAs(UnmanagedType.LPWStr)] string icon); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Commit(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Save( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem folderToSaveIn, - [In, MarshalAs(UnmanagedType.LPWStr)] string libraryName, - [In] ShellNativeMethods.LIBRARYSAVEFLAGS lsf, - [MarshalAs(UnmanagedType.Interface)] out IShellItem2 savedTo); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SaveInKnownFolder( - [In] ref Guid kfidToSaveIn, - [In, MarshalAs(UnmanagedType.LPWStr)] string libraryName, - [In] ShellNativeMethods.LIBRARYSAVEFLAGS lsf, - [MarshalAs(UnmanagedType.Interface)] out IShellItem2 savedTo); - }; - - [ComImportAttribute()] - [GuidAttribute("bcc18b79-ba16-442f-80c4-8a59c30c463b")] - [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] - interface IShellItemImageFactory - { - [PreserveSig] - HRESULT GetImage( - [In, MarshalAs(UnmanagedType.Struct)] CoreNativeMethods.SIZE size, - [In] ShellNativeMethods.SIIGBF flags, - [Out] out IntPtr phbm); - } - - [ComImport, - Guid(ShellIIDGuid.IThumbnailCache), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IThumbnailCache - { - void GetThumbnail([In] IShellItem pShellItem, - [In] uint cxyRequestedThumbSize, - [In] Microsoft.WindowsAPICodePack.Shell.ShellNativeMethods.WTS_FLAGS flags, - [Out] out ISharedBitmap ppvThumb, - [Out] out Microsoft.WindowsAPICodePack.Shell.ShellNativeMethods.WTS_CACHEFLAGS pOutFlags, - [Out] Microsoft.WindowsAPICodePack.Shell.ShellNativeMethods.WTS_THUMBNAILID pThumbnailID); - - void GetThumbnailByID([In] Microsoft.WindowsAPICodePack.Shell.ShellNativeMethods.WTS_THUMBNAILID thumbnailID, - [In] uint cxyRequestedThumbSize, - [Out] out ISharedBitmap ppvThumb, - [Out] out Microsoft.WindowsAPICodePack.Shell.ShellNativeMethods.WTS_CACHEFLAGS pOutFlags); - } - - [ComImport, - Guid(ShellIIDGuid.ISharedBitmap), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface ISharedBitmap - { - void GetSharedBitmap([Out] out IntPtr phbm); - void GetSize([Out] out CoreNativeMethods.SIZE pSize); - void GetFormat([Out] out ShellNativeMethods.WTS_ALPHATYPE pat); - void InitializeBitmap([In] IntPtr hbm, [In] ShellNativeMethods.WTS_ALPHATYPE wtsAT); - void Detach([Out] out IntPtr phbm); - } - [ComImport, - Guid(ShellIIDGuid.IShellFolder), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown), - ComConversionLoss] - internal interface IShellFolder - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void ParseDisplayName(IntPtr hwnd, [In, MarshalAs(UnmanagedType.Interface)] IBindCtx pbc, [In, MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, [In, Out] ref uint pchEaten, [Out] IntPtr ppidl, [In, Out] ref uint pdwAttributes); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT EnumObjects([In] IntPtr hwnd, [In] ShellNativeMethods.SHCONT grfFlags, [MarshalAs(UnmanagedType.Interface)] out IEnumIDList ppenumIDList); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT BindToObject([In] IntPtr pidl, /*[In, MarshalAs(UnmanagedType.Interface)] IBindCtx*/ IntPtr pbc, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IShellFolder ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void BindToStorage([In] ref IntPtr pidl, [In, MarshalAs(UnmanagedType.Interface)] IBindCtx pbc, [In] ref Guid riid, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void CompareIDs([In] IntPtr lParam, [In] ref IntPtr pidl1, [In] ref IntPtr pidl2); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void CreateViewObject([In] IntPtr hwndOwner, [In] ref Guid riid, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAttributesOf([In] uint cidl, [In] IntPtr apidl, [In, Out] ref uint rgfInOut); - - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetUIObjectOf([In] IntPtr hwndOwner, [In] uint cidl, [In] IntPtr apidl, [In] ref Guid riid, [In, Out] ref uint rgfReserved, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDisplayNameOf([In] ref IntPtr pidl, [In] uint uFlags, out IntPtr pName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetNameOf([In] IntPtr hwnd, [In] ref IntPtr pidl, [In, MarshalAs(UnmanagedType.LPWStr)] string pszName, [In] uint uFlags, [Out] IntPtr ppidlOut); - } - - [ComImport, - Guid(ShellIIDGuid.IShellFolder2), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown), - ComConversionLoss] - internal interface IShellFolder2 : IShellFolder - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void ParseDisplayName([In] IntPtr hwnd, [In, MarshalAs(UnmanagedType.Interface)] IBindCtx pbc, [In, MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, [In, Out] ref uint pchEaten, [Out] IntPtr ppidl, [In, Out] ref uint pdwAttributes); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void EnumObjects([In] IntPtr hwnd, [In] ShellNativeMethods.SHCONT grfFlags, [MarshalAs(UnmanagedType.Interface)] out IEnumIDList ppenumIDList); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void BindToObject([In] IntPtr pidl, /*[In, MarshalAs(UnmanagedType.Interface)] IBindCtx*/ IntPtr pbc, [In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IShellFolder ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void BindToStorage([In] ref IntPtr pidl, [In, MarshalAs(UnmanagedType.Interface)] IBindCtx pbc, [In] ref Guid riid, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void CompareIDs([In] IntPtr lParam, [In] ref IntPtr pidl1, [In] ref IntPtr pidl2); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void CreateViewObject([In] IntPtr hwndOwner, [In] ref Guid riid, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAttributesOf([In] uint cidl, [In] IntPtr apidl, [In, Out] ref uint rgfInOut); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetUIObjectOf([In] IntPtr hwndOwner, [In] uint cidl, [In] IntPtr apidl, [In] ref Guid riid, [In, Out] ref uint rgfReserved, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDisplayNameOf([In] ref IntPtr pidl, [In] uint uFlags, out IntPtr pName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetNameOf([In] IntPtr hwnd, [In] ref IntPtr pidl, [In, MarshalAs(UnmanagedType.LPWStr)] string pszName, [In] uint uFlags, [Out] IntPtr ppidlOut); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDefaultSearchGUID(out Guid pguid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void EnumSearches([Out] out IntPtr ppenum); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDefaultColumn([In] uint dwRes, out uint pSort, out uint pDisplay); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDefaultColumnState([In] uint iColumn, out uint pcsFlags); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDetailsEx([In] ref IntPtr pidl, [In] ref PropertyKey pscid, [MarshalAs(UnmanagedType.Struct)] out object pv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDetailsOf([In] ref IntPtr pidl, [In] uint iColumn, out IntPtr psd); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void MapColumnToSCID([In] uint iColumn, out PropertyKey pscid); - } - - [ComImport, - Guid(ShellIIDGuid.IEnumIDList), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IEnumIDList - { - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT Next(uint celt, out IntPtr rgelt, out uint pceltFetched); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT Skip([In] uint celt); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT Reset(); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT Clone([MarshalAs(UnmanagedType.Interface)] out IEnumIDList ppenum); - } - - [ComImport, - Guid(ShellIIDGuid.IShellLinkW), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IShellLinkW - { - void GetPath( - [Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, - int cchMaxPath, - //ref _WIN32_FIND_DATAW pfd, - IntPtr pfd, - uint fFlags); - void GetIDList(out IntPtr ppidl); - void SetIDList(IntPtr pidl); - void GetDescription( - [Out(), MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszFile, - 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 wHotKey); - void SetHotKey(short wHotKey); - void GetShowCmd(out uint iShowCmd); - void SetShowCmd(uint iShowCmd); - void GetIconLocation( - [Out(), MarshalAs(UnmanagedType.LPWStr)] out StringBuilder pszIconPath, - int cchIconPath, - out int iIcon); - void SetIconLocation( - [MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, - int iIcon); - void SetRelativePath( - [MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, - uint dwReserved); - void Resolve(IntPtr hwnd, uint fFlags); - void SetPath( - [MarshalAs(UnmanagedType.LPWStr)] string pszFile); - } - - [ComImport, - Guid(ShellIIDGuid.CShellLink), - ClassInterface(ClassInterfaceType.None)] - internal class CShellLink { } - - // Summary: - // Provides the managed definition of the IPersistStream interface, with functionality - // from IPersist. - [ComImport] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [Guid("00000109-0000-0000-C000-000000000046")] - internal interface IPersistStream - { - // Summary: - // Retrieves the class identifier (CLSID) of an object. - // - // Parameters: - // pClassID: - // When this method returns, contains a reference to the CLSID. This parameter - // is passed uninitialized. - [PreserveSig] - void GetClassID(out Guid pClassID); - // - // Summary: - // Checks an object for changes since it was last saved to its current file. - // - // Returns: - // S_OK if the file has changed since it was last saved; S_FALSE if the file - // has not changed since it was last saved. - [PreserveSig] - HRESULT IsDirty(); - - [PreserveSig] - HRESULT Load([In, MarshalAs(UnmanagedType.Interface)] IStream stm); - - [PreserveSig] - HRESULT Save([In, MarshalAs(UnmanagedType.Interface)] IStream stm, bool fRemember); - - [PreserveSig] - HRESULT GetSizeMax(out ulong cbSize); - } - - [ComImport(), - Guid(ShellIIDGuid.ICondition), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface ICondition : IPersistStream - { - // Summary: - // Retrieves the class identifier (CLSID) of an object. - // - // Parameters: - // pClassID: - // When this method returns, contains a reference to the CLSID. This parameter - // is passed uninitialized. - [PreserveSig] - void GetClassID(out Guid pClassID); - // - // Summary: - // Checks an object for changes since it was last saved to its current file. - // - // Returns: - // S_OK if the file has changed since it was last saved; S_FALSE if the file - // has not changed since it was last saved. - [PreserveSig] - HRESULT IsDirty(); - - [PreserveSig] - HRESULT Load([In, MarshalAs(UnmanagedType.Interface)] IStream stm); - - [PreserveSig] - HRESULT Save([In, MarshalAs(UnmanagedType.Interface)] IStream stm, bool fRemember); - - [PreserveSig] - HRESULT GetSizeMax(out ulong cbSize); - - // For any node, return what kind of node it is. - [PreserveSig] - HRESULT GetConditionType([Out()] out SearchConditionType pNodeType); - - // riid must be IID_IEnumUnknown, IID_IEnumVARIANT or IID_IObjectArray, or in the case of a negation node IID_ICondition. - // If this is a leaf node, E_FAIL will be returned. - // If this is a negation node, then if riid is IID_ICondition, *ppv will be set to a single ICondition, otherwise an enumeration of one. - // If this is a conjunction or a disjunction, *ppv will be set to an enumeration of the subconditions. - [PreserveSig] - HRESULT GetSubConditions([In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out object ppv); - - // If this is not a leaf node, E_FAIL will be returned. - // Retrieve the property name, operation and value from the leaf node. - // Any one of ppszPropertyName, pcop and ppropvar may be NULL. - [PreserveSig] - HRESULT GetComparisonInfo([Out(), MarshalAs(UnmanagedType.LPWStr)] out string ppszPropertyName, - [Out()] out SearchConditionOperation pcop, - [Out()] out PropVariant ppropvar); - - // If this is not a leaf node, E_FAIL will be returned. - // *ppszValueTypeName will be set to the semantic type of the value, or to NULL if this is not meaningful. - [PreserveSig] - HRESULT GetValueType([Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszValueTypeName); - - // If this is not a leaf node, E_FAIL will be returned. - // If the value of the leaf node is VT_EMPTY, *ppszNormalization will be set to an empty string. - // If the value is a string (VT_LPWSTR, VT_BSTR or VT_LPSTR), then *ppszNormalization will be set to a - // character-normalized form of the value. - // Otherwise, *ppszNormalization will be set to some (character-normalized) string representation of the value. - [PreserveSig] - HRESULT GetValueNormalization([Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszNormalization); - - // Return information about what parts of the input produced the property, the operation and the value. - // Any one of ppPropertyTerm, ppOperationTerm and ppValueTerm may be NULL. - // For a leaf node returned by the parser, the position information of each IRichChunk identifies the tokens that - // contributed the property/operation/value, the string value is the corresponding part of the input string, and - // the PROPVARIANT is VT_EMPTY. - [PreserveSig] - HRESULT GetInputTerms([Out] out IRichChunk ppPropertyTerm, [Out] out IRichChunk ppOperationTerm, [Out] out IRichChunk ppValueTerm); - - // Make a deep copy of this ICondition. - [PreserveSig] - HRESULT Clone([Out()] out ICondition ppc); - }; - - [ComImport, - Guid(ShellIIDGuid.IRichChunk), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IRichChunk - { - // The position *pFirstPos is zero-based. - // Any one of pFirstPos, pLength, ppsz and pValue may be NULL. - [PreserveSig] - HRESULT GetData(/*[out, annotation("__out_opt")] ULONG* pFirstPos, [out, annotation("__out_opt")] ULONG* pLength, [out, annotation("__deref_opt_out_opt")] LPWSTR* ppsz, [out, annotation("__out_opt")] PROPVARIANT* pValue*/); - } - - [ComImport] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [Guid(ShellIIDGuid.IEnumUnknown)] - internal interface IEnumUnknown - { - [PreserveSig] - HRESULT Next(UInt32 requestedNumber, ref IntPtr buffer, ref UInt32 fetchedNumber); - [PreserveSig] - HRESULT Skip(UInt32 number); - [PreserveSig] - HRESULT Reset(); - [PreserveSig] - HRESULT Clone(out IEnumUnknown result); - } - - - [ComImport, - Guid(ShellIIDGuid.IConditionFactory), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IConditionFactory - { - [PreserveSig] - HRESULT MakeNot([In] ICondition pcSub, [In] bool fSimplify, [Out] out ICondition ppcResult); - - [PreserveSig] - HRESULT MakeAndOr([In] SearchConditionType ct, [In] IEnumUnknown peuSubs, [In] bool fSimplify, [Out] out ICondition ppcResult); - - [PreserveSig] - HRESULT MakeLeaf( - [In, MarshalAs(UnmanagedType.LPWStr)] string pszPropertyName, - [In] SearchConditionOperation cop, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszValueType, - [In] ref PropVariant ppropvar, - IRichChunk richChunk1, - IRichChunk richChunk2, - IRichChunk richChunk3, - [In] bool fExpand, - [Out] out ICondition ppcResult); - - [PreserveSig] - HRESULT Resolve(/*[In] ICondition pc, [In] STRUCTURED_QUERY_RESOLVE_OPTION sqro, [In] ref SYSTEMTIME pstReferenceTime, [Out] out ICondition ppcResolved*/); - - }; - - [ComImport, - Guid(ShellIIDGuid.IConditionFactory), - CoClass(typeof(ConditionFactoryCoClass))] - internal interface INativeConditionFactory : IConditionFactory - { - } - - [ComImport, - ClassInterface(ClassInterfaceType.None), - TypeLibType(TypeLibTypeFlags.FCanCreate), - Guid(ShellCLSIDGuid.ConditionFactory)] - internal class ConditionFactoryCoClass - { - } - - - - [ComImport, - Guid(ShellIIDGuid.ISearchFolderItemFactory), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface ISearchFolderItemFactory - { - [PreserveSig] - HRESULT SetDisplayName([In, MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName); - - [PreserveSig] - HRESULT SetFolderTypeID([In] Guid ftid); - - [PreserveSig] - HRESULT SetFolderLogicalViewMode([In] FolderLogicalViewMode flvm); - - [PreserveSig] - HRESULT SetIconSize([In] int iIconSize); - - [PreserveSig] - HRESULT SetVisibleColumns([In] uint cVisibleColumns, [In, MarshalAs(UnmanagedType.LPArray)] PropertyKey[] rgKey); - - [PreserveSig] - HRESULT SetSortColumns([In] uint cSortColumns, [In, MarshalAs(UnmanagedType.LPArray)] SortColumn[] rgSortColumns); - - [PreserveSig] - HRESULT SetGroupColumn([In] ref PropertyKey keyGroup); - - [PreserveSig] - HRESULT SetStacks([In] uint cStackKeys, [In, MarshalAs(UnmanagedType.LPArray)] PropertyKey[] rgStackKeys); - - [PreserveSig] - HRESULT SetScope([In, MarshalAs(UnmanagedType.Interface)] IShellItemArray ppv); - - [PreserveSig] - HRESULT SetCondition([In] ICondition pCondition); - - [PreserveSig] - int GetShellItem(ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IShellItem ppv); - - [PreserveSig] - HRESULT GetIDList([Out] IntPtr ppidl); - }; - - [ComImport, - Guid(ShellIIDGuid.ISearchFolderItemFactory), - CoClass(typeof(SearchFolderItemFactoryCoClass))] - internal interface INativeSearchFolderItemFactory : ISearchFolderItemFactory - { - } - - [ComImport, - ClassInterface(ClassInterfaceType.None), - TypeLibType(TypeLibTypeFlags.FCanCreate), - Guid(ShellCLSIDGuid.SearchFolderItemFactory)] - internal class SearchFolderItemFactoryCoClass - { - } - - [ComImport, - Guid(ShellIIDGuid.IQuerySolution), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - interface IQuerySolution : IConditionFactory - { - [PreserveSig] - HRESULT MakeNot([In] ICondition pcSub, [In] bool fSimplify, [Out] out ICondition ppcResult); - - [PreserveSig] - HRESULT MakeAndOr([In] SearchConditionType ct, [In] IEnumUnknown peuSubs, [In] bool fSimplify, [Out] out ICondition ppcResult); - - [PreserveSig] - HRESULT MakeLeaf( - [In, MarshalAs(UnmanagedType.LPWStr)] string pszPropertyName, - [In] SearchConditionOperation cop, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszValueType, - [In] ref PropVariant ppropvar, - IRichChunk richChunk1, - IRichChunk richChunk2, - IRichChunk richChunk3, - [In] bool fExpand, - [Out] out ICondition ppcResult); - - [PreserveSig] - HRESULT Resolve([In] ICondition pc, [In] int sqro, [In] ref SYSTEMTIME pstReferenceTime, [Out] out ICondition ppcResolved); - - // Retrieve the condition tree and the "main type" of the solution. - // ppQueryNode and ppMainType may be NULL. - [PreserveSig] - HRESULT GetQuery([Out, MarshalAs(UnmanagedType.Interface)] out ICondition ppQueryNode, [Out, MarshalAs(UnmanagedType.Interface)] out IEntity ppMainType); - - // Identify parts of the input string not accounted for. - // Each parse error is represented by an IRichChunk where the position information - // reflect token counts, the string is NULL and the value is a VT_I4 - // where lVal is from the ParseErrorType enumeration. The valid - // values for riid are IID_IEnumUnknown and IID_IEnumVARIANT. - [PreserveSig] - HRESULT GetErrors([In] ref Guid riid, [Out] out /* void** */ IntPtr ppParseErrors); - - // Report the query string, how it was tokenized and what LCID and word breaker were used (for recognizing keywords). - // ppszInputString, ppTokens, pLocale and ppWordBreaker may be NULL. - [PreserveSig] - HRESULT GetLexicalData([MarshalAs(UnmanagedType.LPWStr)] out string ppszInputString, [Out] /* ITokenCollection** */ out IntPtr ppTokens, [Out] out uint plcid, [Out] /* IUnknown** */ out IntPtr ppWordBreaker); - } - - [ComImport, - Guid(ShellIIDGuid.IQueryParser), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IQueryParser - { - // Parse parses an input string, producing a query solution. - // pCustomProperties should be an enumeration of IRichChunk objects, one for each custom property - // the application has recognized. pCustomProperties may be NULL, equivalent to an empty enumeration. - // For each IRichChunk, the position information identifies the character span of the custom property, - // the string value should be the name of an actual property, and the PROPVARIANT is completely ignored. - [PreserveSig] - HRESULT Parse([In, MarshalAs(UnmanagedType.LPWStr)] string pszInputString, [In] IEnumUnknown pCustomProperties, [Out] out IQuerySolution ppSolution); - - // Set a single option. See STRUCTURED_QUERY_SINGLE_OPTION above. - [PreserveSig] - HRESULT SetOption([In] StructuredQuerySingleOption option, [In] ref PropVariant pOptionValue); - - [PreserveSig] - HRESULT GetOption([In] StructuredQuerySingleOption option, [Out] out PropVariant pOptionValue); - - // Set a multi option. See STRUCTURED_QUERY_MULTIOPTION above. - [PreserveSig] - HRESULT SetMultiOption([In] StructuredQueryMultipleOption option, [In, MarshalAs(UnmanagedType.LPWStr)] string pszOptionKey, [In] PropVariant pOptionValue); - - // Get a schema provider for browsing the currently loaded schema. - [PreserveSig] - HRESULT GetSchemaProvider([Out] out /*ISchemaProvider*/ IntPtr ppSchemaProvider); - - // Restate a condition as a query string according to the currently selected syntax. - // The parameter fUseEnglish is reserved for future use; must be FALSE. - [PreserveSig] - HRESULT RestateToString([In] ICondition pCondition, [In] bool fUseEnglish, [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszQueryString); - - // Parse a condition for a given property. It can be anything that would go after 'PROPERTY:' in an AQS expession. - [PreserveSig] - HRESULT ParsePropertyValue([In, MarshalAs(UnmanagedType.LPWStr)] string pszPropertyName, [In, MarshalAs(UnmanagedType.LPWStr)] string pszInputString, [Out] out IQuerySolution ppSolution); - - // Restate a condition for a given property. If the condition contains a leaf with any other property name, or no property name at all, - // E_INVALIDARG will be returned. - [PreserveSig] - HRESULT RestatePropertyValueToString([In] ICondition pCondition, [In] bool fUseEnglish, [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszPropertyName, [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszQueryString); - } - - [ComImport, - Guid(ShellIIDGuid.IQueryParserManager), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IQueryParserManager - { - // Create a query parser loaded with the schema for a certain catalog localize to a certain language, and initialized with - // standard defaults. One valid value for riid is IID_IQueryParser. - [PreserveSig] - HRESULT CreateLoadedParser([In, MarshalAs(UnmanagedType.LPWStr)] string pszCatalog, [In] ushort langidForKeywords, [In] ref Guid riid, [Out] out IQueryParser ppQueryParser); - - // In addition to setting AQS/NQS and automatic wildcard for the given query parser, this sets up standard named entity handlers and - // sets the keyboard locale as locale for word breaking. - [PreserveSig] - HRESULT InitializeOptions([In] bool fUnderstandNQS, [In] bool fAutoWildCard, [In] IQueryParser pQueryParser); - - // Change one of the settings for the query parser manager, such as the name of the schema binary, or the location of the localized and unlocalized - // schema binaries. By default, the settings point to the schema binaries used by Windows Shell. - [PreserveSig] - HRESULT SetOption([In] QueryParserManagerOption option, [In] PropVariant pOptionValue); - - }; - - [ComImport, - Guid(ShellIIDGuid.IQueryParserManager), - CoClass(typeof(QueryParserManagerCoClass))] - internal interface INativeQueryParserManager : IQueryParserManager - { - } - - [ComImport, - ClassInterface(ClassInterfaceType.None), - TypeLibType(TypeLibTypeFlags.FCanCreate), - Guid(ShellCLSIDGuid.QueryParserManager)] - internal class QueryParserManagerCoClass - { - } - - [ComImport, - Guid("24264891-E80B-4fd3-B7CE-4FF2FAE8931F"), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IEntity - { - // TODO - } - - /// - /// SYSTEMTIME structure with some useful methods - /// - internal struct SYSTEMTIME - { - internal ushort wYear; - internal ushort wMonth; - internal ushort wDayOfWeek; - internal ushort wDay; - internal ushort wHour; - internal ushort wMinute; - internal ushort wSecond; - internal ushort wMilliseconds; - - /// - /// Convert form System.DateTime - /// - /// - internal void FromDateTime(DateTime time) - { - wYear = (ushort)time.Year; - wMonth = (ushort)time.Month; - wDayOfWeek = (ushort)time.DayOfWeek; - wDay = (ushort)time.Day; - wHour = (ushort)time.Hour; - wMinute = (ushort)time.Minute; - wSecond = (ushort)time.Second; - wMilliseconds = (ushort)time.Millisecond; - } - - /// - /// Convert to System.DateTime - /// - /// - internal DateTime ToDateTime() - { - return new DateTime(wYear, wMonth, wDay, wHour, wMinute, wSecond, wMilliseconds); - } - - /// - /// Convert to System.DateTime - /// - /// - /// - internal static DateTime ToDateTime(SYSTEMTIME time) - { - return time.ToDateTime(); - } - } - - #endregion - -#pragma warning restore 108 -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellNativeMethods.cs deleted file mode 100644 index a98a05f..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Common/ShellNativeMethods.cs +++ /dev/null @@ -1,799 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal static class ShellNativeMethods - { - static ShellNativeMethods() - { - // Hide default constructor - } - - #region TaskDialog Definitions - - // Identify button *return values* - note that, unfortunately, these are different - // from the inbound button values. - internal enum TASKDIALOG_COMMON_BUTTON_RETURN_ID - { - IDOK = 1, - IDCANCEL = 2, - IDABORT = 3, - IDRETRY = 4, - IDIGNORE = 5, - IDYES = 6, - IDNO = 7, - IDCLOSE = 8 - } - - #endregion - - #region Shell Enums - - [Flags] - internal enum FOS : uint - { - FOS_OVERWRITEPROMPT = 0x00000002, - FOS_STRICTFILETYPES = 0x00000004, - FOS_NOCHANGEDIR = 0x00000008, - FOS_PICKFOLDERS = 0x00000020, - // Ensure that items returned are filesystem items. - FOS_FORCEFILESYSTEM = 0x00000040, - // Allow choosing items that have no storage. - FOS_ALLNONSTORAGEITEMS = 0x00000080, - FOS_NOVALIDATE = 0x00000100, - FOS_ALLOWMULTISELECT = 0x00000200, - FOS_PATHMUSTEXIST = 0x00000800, - FOS_FILEMUSTEXIST = 0x00001000, - FOS_CREATEPROMPT = 0x00002000, - FOS_SHAREAWARE = 0x00004000, - FOS_NOREADONLYRETURN = 0x00008000, - FOS_NOTESTFILECREATE = 0x00010000, - FOS_HIDEMRUPLACES = 0x00020000, - FOS_HIDEPINNEDPLACES = 0x00040000, - FOS_NODEREFERENCELINKS = 0x00100000, - FOS_DONTADDTORECENT = 0x02000000, - FOS_FORCESHOWHIDDEN = 0x10000000, - FOS_DEFAULTNOMINIMODE = 0x20000000 - } - internal enum CDCONTROLSTATE : uint - { - CDCS_INACTIVE = 0x00000000, - CDCS_ENABLED = 0x00000001, - CDCS_VISIBLE = 0x00000002 - } - internal enum SIGDN : uint - { - SIGDN_NORMALDISPLAY = 0x00000000, // SHGDN_NORMAL - SIGDN_PARENTRELATIVEPARSING = 0x80018001, // SHGDN_INFOLDER | SHGDN_FORPARSING - SIGDN_DESKTOPABSOLUTEPARSING = 0x80028000, // SHGDN_FORPARSING - SIGDN_PARENTRELATIVEEDITING = 0x80031001, // SHGDN_INFOLDER | SHGDN_FOREDITING - SIGDN_DESKTOPABSOLUTEEDITING = 0x8004c000, // SHGDN_FORPARSING | SHGDN_FORADDRESSBAR - SIGDN_FILESYSPATH = 0x80058000, // SHGDN_FORPARSING - SIGDN_URL = 0x80068000, // SHGDN_FORPARSING - SIGDN_PARENTRELATIVEFORADDRESSBAR = 0x8007c001, // SHGDN_INFOLDER | SHGDN_FORPARSING | SHGDN_FORADDRESSBAR - SIGDN_PARENTRELATIVE = 0x80080001 // SHGDN_INFOLDER - } - - /// - /// Indicate flags that modify the property store object retrieved by methods - /// that create a property store, such as IShellItem2::GetPropertyStore or - /// IPropertyStoreFactory::GetPropertyStore. - /// - [Flags] - internal enum GETPROPERTYSTOREFLAGS : uint - { - /// - /// Meaning to a calling process: Return a read-only property store that contains all - /// properties. Slow items (offline files) are not opened. - /// Combination with other flags: Can be overridden by other flags. - /// - GPS_DEFAULT = 0, - - /// - /// Meaning to a calling process: Include only properties directly from the property - /// handler, which opens the file on the disk, network, or device. Meaning to a file - /// folder: Only include properties directly from the handler. - /// - /// Meaning to other folders: When delegating to a file folder, pass this flag on - /// to the file folder; do not do any multiplexing (MUX). When not delegating to a - /// file folder, ignore this flag instead of returning a failure code. - /// - /// Combination with other flags: Cannot be combined with GPS_TEMPORARY, - /// GPS_FASTPROPERTIESONLY, or GPS_BESTEFFORT. - /// - GPS_HANDLERPROPERTIESONLY = 0x1, - - /// - /// Meaning to a calling process: Can write properties to the item. - /// Note: The store may contain fewer properties than a read-only store. - /// - /// Meaning to a file folder: ReadWrite. - /// - /// Meaning to other folders: ReadWrite. Note: When using default MUX, - /// return a single unmultiplexed store because the default MUX does not support ReadWrite. - /// - /// Combination with other flags: Cannot be combined with GPS_TEMPORARY, GPS_FASTPROPERTIESONLY, - /// GPS_BESTEFFORT, or GPS_DELAYCREATION. Implies GPS_HANDLERPROPERTIESONLY. - /// - GPS_READWRITE = 0x2, - - /// - /// Meaning to a calling process: Provides a writable store, with no initial properties, - /// that exists for the lifetime of the Shell item instance; basically, a property bag - /// attached to the item instance. - /// - /// Meaning to a file folder: Not applicable. Handled by the Shell item. - /// - /// Meaning to other folders: Not applicable. Handled by the Shell item. - /// - /// Combination with other flags: Cannot be combined with any other flag. Implies GPS_READWRITE - /// - GPS_TEMPORARY = 0x4, - - /// - /// Meaning to a calling process: Provides a store that does not involve reading from the - /// disk or network. Note: Some values may be different, or missing, compared to a store - /// without this flag. - /// - /// Meaning to a file folder: Include the "innate" and "fallback" stores only. Do not load the handler. - /// - /// Meaning to other folders: Include only properties that are available in memory or can - /// be computed very quickly (no properties from disk, network, or peripheral IO devices). - /// This is normally only data sources from the IDLIST. When delegating to other folders, pass this flag on to them. - /// - /// Combination with other flags: Cannot be combined with GPS_TEMPORARY, GPS_READWRITE, - /// GPS_HANDLERPROPERTIESONLY, or GPS_DELAYCREATION. - /// - GPS_FASTPROPERTIESONLY = 0x8, - - /// - /// Meaning to a calling process: Open a slow item (offline file) if necessary. - /// Meaning to a file folder: Retrieve a file from offline storage, if necessary. - /// Note: Without this flag, the handler is not created for offline files. - /// - /// Meaning to other folders: Do not return any properties that are very slow. - /// - /// Combination with other flags: Cannot be combined with GPS_TEMPORARY or GPS_FASTPROPERTIESONLY. - /// - GPS_OPENSLOWITEM = 0x10, - - /// - /// Meaning to a calling process: Delay memory-intensive operations, such as file access, until - /// a property is requested that requires such access. - /// - /// Meaning to a file folder: Do not create the handler until needed; for example, either - /// GetCount/GetAt or GetValue, where the innate store does not satisfy the request. - /// Note: GetValue might fail due to file access problems. - /// - /// Meaning to other folders: If the folder has memory-intensive properties, such as - /// delegating to a file folder or network access, it can optimize performance by - /// supporting IDelayedPropertyStoreFactory and splitting up its properties into a - /// fast and a slow store. It can then use delayed MUX to recombine them. - /// - /// Combination with other flags: Cannot be combined with GPS_TEMPORARY or - /// GPS_READWRITE - /// - GPS_DELAYCREATION = 0x20, - - /// - /// Meaning to a calling process: Succeed at getting the store, even if some - /// properties are not returned. Note: Some values may be different, or missing, - /// compared to a store without this flag. - /// - /// Meaning to a file folder: Succeed and return a store, even if the handler or - /// innate store has an error during creation. Only fail if substores fail. - /// - /// Meaning to other folders: Succeed on getting the store, even if some properties - /// are not returned. - /// - /// Combination with other flags: Cannot be combined with GPS_TEMPORARY, - /// GPS_READWRITE, or GPS_HANDLERPROPERTIESONLY. - /// - GPS_BESTEFFORT = 0x40, - - /// - /// Mask for valid GETPROPERTYSTOREFLAGS values. - /// - GPS_MASK_VALID = 0xff, - } - - internal enum SIATTRIBFLAGS - { - // if multiple items and the attirbutes together. - SIATTRIBFLAGS_AND = 0x00000001, - // if multiple items or the attributes together. - SIATTRIBFLAGS_OR = 0x00000002, - // Call GetAttributes directly on the - // ShellFolder for multiple attributes. - SIATTRIBFLAGS_APPCOMPAT = 0x00000003, - } - internal enum FDE_SHAREVIOLATION_RESPONSE - { - FDESVR_DEFAULT = 0x00000000, - FDESVR_ACCEPT = 0x00000001, - FDESVR_REFUSE = 0x00000002 - } - internal enum FDE_OVERWRITE_RESPONSE - { - FDEOR_DEFAULT = 0x00000000, - FDEOR_ACCEPT = 0x00000001, - FDEOR_REFUSE = 0x00000002 - } - internal enum FDAP - { - FDAP_BOTTOM = 0x00000000, - FDAP_TOP = 0x00000001, - } - - [Flags] - internal enum SIIGBF - { - SIIGBF_RESIZETOFIT = 0x00, - SIIGBF_BIGGERSIZEOK = 0x01, - SIIGBF_MEMORYONLY = 0x02, - SIIGBF_ICONONLY = 0x04, - SIIGBF_THUMBNAILONLY = 0x08, - SIIGBF_INCACHEONLY = 0x10, - } - - [Flags] - internal enum WTS_FLAGS - { - WTS_EXTRACT = 0x00000000, - WTS_INCACHEONLY = 0x00000001, - WTS_FASTEXTRACT = 0x00000002, - WTS_FORCEEXTRACTION = 0x00000004, - WTS_SLOWRECLAIM = 0x00000008, - WTS_EXTRACTDONOTCACHE = 0x00000020 - } - - [Flags] - internal enum WTS_CACHEFLAGS - { - WTS_DEFAULT = 0x00000000, - WTS_LOWQUALITY = 0x00000001, - WTS_CACHED = 0x00000002, - } - - internal enum WTS_ALPHATYPE - { - WTSAT_UNKNOWN = 0, - WTSAT_RGB = 1, - WTSAT_ARGB = 2, - } - - [Flags] - internal enum SFGAO : uint - { - /// - /// The specified items can be copied. - /// - SFGAO_CANCOPY = 0x00000001, - - /// - /// The specified items can be moved. - /// - SFGAO_CANMOVE = 0x00000002, - - /// - /// Shortcuts can be created for the specified items. This flag has the same value as DROPEFFECT. - /// The normal use of this flag is to add a Create Shortcut item to the shortcut menu that is displayed - /// during drag-and-drop operations. However, SFGAO_CANLINK also adds a Create Shortcut item to the Microsoft - /// Windows Explorer's File menu and to normal shortcut menus. - /// If this item is selected, your application's IContextMenu::InvokeCommand is invoked with the lpVerb - /// member of the CMINVOKECOMMANDINFO structure set to "link." Your application is responsible for creating the link. - /// - SFGAO_CANLINK = 0x00000004, - - /// - /// The specified items can be bound to an IStorage interface through IShellFolder::BindToObject. - /// - SFGAO_STORAGE = 0x00000008, - - /// - /// The specified items can be renamed. - /// - SFGAO_CANRENAME = 0x00000010, - - /// - /// The specified items can be deleted. - /// - SFGAO_CANDELETE = 0x00000020, - - /// - /// The specified items have property sheets. - /// - SFGAO_HASPROPSHEET = 0x00000040, - - /// - /// The specified items are drop targets. - /// - SFGAO_DROPTARGET = 0x00000100, - - /// - /// This flag is a mask for the capability flags. - /// - SFGAO_CAPABILITYMASK = 0x00000177, - - /// - /// Windows 7 and later. The specified items are system items. - /// - SFGAO_SYSTEM = 0x00001000, - - /// - /// The specified items are encrypted. - /// - SFGAO_ENCRYPTED = 0x00002000, - - /// - /// Indicates that accessing the object = through IStream or other storage interfaces, - /// is a slow operation. - /// Applications should avoid accessing items flagged with SFGAO_ISSLOW. - /// - SFGAO_ISSLOW = 0x00004000, - - /// - /// The specified items are ghosted icons. - /// - SFGAO_GHOSTED = 0x00008000, - - /// - /// The specified items are shortcuts. - /// - SFGAO_LINK = 0x00010000, - - /// - /// The specified folder objects are shared. - /// - SFGAO_SHARE = 0x00020000, - - /// - /// The specified items are read-only. In the case of folders, this means - /// that new items cannot be created in those folders. - /// - SFGAO_READONLY = 0x00040000, - - /// - /// The item is hidden and should not be displayed unless the - /// Show hidden files and folders option is enabled in Folder Settings. - /// - SFGAO_HIDDEN = 0x00080000, - - /// - /// This flag is a mask for the display attributes. - /// - SFGAO_DISPLAYATTRMASK = 0x000FC000, - - /// - /// The specified folders contain one or more file system folders. - /// - SFGAO_FILESYSANCESTOR = 0x10000000, - - /// - /// The specified items are folders. - /// - SFGAO_FOLDER = 0x20000000, - - /// - /// The specified folders or file objects are part of the file system - /// that is, they are files, directories, or root directories). - /// - SFGAO_FILESYSTEM = 0x40000000, - - /// - /// The specified folders have subfolders = and are, therefore, - /// expandable in the left pane of Windows Explorer). - /// - SFGAO_HASSUBFOLDER = 0x80000000, - - /// - /// This flag is a mask for the contents attributes. - /// - SFGAO_CONTENTSMASK = 0x80000000, - - /// - /// When specified as input, SFGAO_VALIDATE instructs the folder to validate that the items - /// pointed to by the contents of apidl exist. If one or more of those items do not exist, - /// IShellFolder::GetAttributesOf returns a failure code. - /// When used with the file system folder, SFGAO_VALIDATE instructs the folder to discard cached - /// properties retrieved by clients of IShellFolder2::GetDetailsEx that may - /// have accumulated for the specified items. - /// - SFGAO_VALIDATE = 0x01000000, - - /// - /// The specified items are on removable media or are themselves removable devices. - /// - SFGAO_REMOVABLE = 0x02000000, - - /// - /// The specified items are compressed. - /// - SFGAO_COMPRESSED = 0x04000000, - - /// - /// The specified items can be browsed in place. - /// - SFGAO_BROWSABLE = 0x08000000, - - /// - /// The items are nonenumerated items. - /// - SFGAO_NONENUMERATED = 0x00100000, - - /// - /// The objects contain new content. - /// - SFGAO_NEWCONTENT = 0x00200000, - - /// - /// It is possible to create monikers for the specified file objects or folders. - /// - SFGAO_CANMONIKER = 0x00400000, - - /// - /// Not supported. - /// - SFGAO_HASSTORAGE = 0x00400000, - - /// - /// Indicates that the item has a stream associated with it that can be accessed - /// by a call to IShellFolder::BindToObject with IID_IStream in the riid parameter. - /// - SFGAO_STREAM = 0x00400000, - - /// - /// Children of this item are accessible through IStream or IStorage. - /// Those children are flagged with SFGAO_STORAGE or SFGAO_STREAM. - /// - SFGAO_STORAGEANCESTOR = 0x00800000, - - /// - /// This flag is a mask for the storage capability attributes. - /// - SFGAO_STORAGECAPMASK = 0x70C50008, - - /// - /// Mask used by PKEY_SFGAOFlags to remove certain values that are considered - /// to cause slow calculations or lack context. - /// Equal to SFGAO_VALIDATE | SFGAO_ISSLOW | SFGAO_HASSUBFOLDER. - /// - SFGAO_PKEYSFGAOMASK = 0x81044000, - } - - [Flags] - internal enum SHCONT : ushort - { - SHCONTF_CHECKING_FOR_CHILDREN = 0x0010, - SHCONTF_FOLDERS = 0x0020, - SHCONTF_NONFOLDERS = 0x0040, - SHCONTF_INCLUDEHIDDEN = 0x0080, - SHCONTF_INIT_ON_FIRST_NEXT = 0x0100, - SHCONTF_NETPRINTERSRCH = 0x0200, - SHCONTF_SHAREABLE = 0x0400, - SHCONTF_STORAGE = 0x0800, - SHCONTF_NAVIGATION_ENUM = 0x1000, - SHCONTF_FASTITEMS = 0x2000, - SHCONTF_FLATLIST = 0x4000, - SHCONTF_ENABLE_ASYNC = 0x8000 - } - - #endregion - - #region Shell Structs - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - internal struct COMDLG_FILTERSPEC - { - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszName; - [MarshalAs(UnmanagedType.LPWStr)] - internal string pszSpec; - - internal COMDLG_FILTERSPEC(string name, string spec) - { - pszName = name; - pszSpec = spec; - } - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - internal struct WTS_THUMBNAILID - { - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 16)] - byte rgbKey; - } - - - #endregion - - #region Shell Helper Methods - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true )] - internal static extern int SHCreateShellItemArrayFromDataObject( - System.Runtime.InteropServices.ComTypes.IDataObject pdo, - ref Guid riid, - [MarshalAs( UnmanagedType.Interface )] out IShellItemArray iShellItemArray ); - - [DllImport( "shell32.dll", CharSet = CharSet.Unicode, - SetLastError = true)] - internal static extern int SHCreateItemFromParsingName( - [MarshalAs(UnmanagedType.LPWStr)] string path, - // The following parameter is not used - binding context. - IntPtr pbc, - ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem2 shellItem); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, - SetLastError = true)] - internal static extern int SHCreateItemFromParsingName( - [MarshalAs(UnmanagedType.LPWStr)] string path, - [MarshalAs(UnmanagedType.Interface)] IBindCtx pbc, - ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem2 shellItem); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, - SetLastError = true)] - internal static extern int SHCreateItemFromParsingName( - [MarshalAs(UnmanagedType.LPWStr)] string path, - [MarshalAs(UnmanagedType.Interface)] IBindCtx pbc, - ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem shellItem); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, - SetLastError = true)] - internal static extern int SHCreateItemFromParsingName( - [MarshalAs(UnmanagedType.LPWStr)] string path, - // The following parameter is not used - binding context. - IntPtr pbc, - ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem shellItem); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, - SetLastError = true)] - internal static extern int SHCreateShellItemArrayFromShellItem(IShellItem psi, - ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppenum); - - [DllImport("shlwapi.dll", CharSet = CharSet.Unicode, - SetLastError = true)] - internal static extern int PathParseIconLocation( - [MarshalAs(UnmanagedType.LPWStr)] ref string pszIconFile); - - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int SHCreateItemFromIDList( - /*PCIDLIST_ABSOLUTE*/ IntPtr pidl, - ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem2 ppv); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int SHParseDisplayName( - [MarshalAs(UnmanagedType.LPWStr)] string pszName, - IntPtr pbc, - out IntPtr ppidl, - SFGAO sfgaoIn, - out SFGAO psfgaoOut - ); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int SHGetIDListFromObject(IntPtr iUnknown, - out IntPtr ppidl - ); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int SHGetDesktopFolder( - [MarshalAs(UnmanagedType.Interface)] out IShellFolder ppshf - ); - - [DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int SHCreateShellItem( - IntPtr pidlParent, - [In, MarshalAs(UnmanagedType.Interface)] IShellFolder psfParent, - IntPtr pidl, - [MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi - ); - - [DllImport( "shell32.dll", CharSet = CharSet.Unicode, SetLastError = true )] - internal static extern uint ILGetSize( IntPtr pidl ); - - [DllImport( "shell32.dll", CharSet = CharSet.None )] - public static extern void ILFree( IntPtr pidl ); - - [DllImport("gdi32.dll")] - internal static extern bool DeleteObject(IntPtr hObject); - - [DllImport("ole32.dll")] - public static extern int CreateBindCtx(int reserved, out IBindCtx ppbc); - - #endregion - - #region Shell Library Enums - - internal enum LIBRARYFOLDERFILTER - { - LFF_FORCEFILESYSTEM = 1, - LFF_STORAGEITEMS = 2, - LFF_ALLITEMS = 3 - }; - - [Flags] - internal enum LIBRARYOPTIONFLAGS : uint - { - LOF_DEFAULT = 0, - LOF_PINNEDTONAVPANE = 0x1, - LOF_MASK_ALL = 0x1 - }; - - internal enum DEFAULTSAVEFOLDERTYPE - { - DSFT_DETECT = 1, - DSFT_PRIVATE = (DSFT_DETECT + 1), - DSFT_PUBLIC = (DSFT_PRIVATE + 1) - }; - - internal enum LIBRARYSAVEFLAGS - { - LSF_FAILIFTHERE = 0, - LSF_OVERRIDEEXISTING = 0x1, - LSF_MAKEUNIQUENAME = 0x2 - }; - - internal enum LIBRARYMANAGEDIALOGOPTIONS - { - LMD_DEFAULT = 0, - LMD_NOUNINDEXABLELOCATIONWARNING = 0x1 - }; - - /// - /// The STGM constants are flags that indicate - /// conditions for creating and deleting the object and access modes - /// for the object. - /// - /// You can combine these flags, but you can only choose one flag - /// from each group of related flags. Typically one flag from each - /// of the access and sharing groups must be specified for all - /// functions and methods which use these constants. - /// - [Flags] - internal enum STGM : uint - { - /// - /// Indicates that, in direct mode, each change to a storage - /// or stream element is written as it occurs. - /// - Direct = 0x00000000, - - /// - /// Indicates that, in transacted mode, changes are buffered - /// and written only if an explicit commit operation is called. - /// - Transacted = 0x00010000, - - /// - /// Provides a faster implementation of a compound file - /// in a limited, but frequently used, case. - /// - Simple = 0x08000000, - - - - /// - /// Indicates that the object is read-only, - /// meaning that modifications cannot be made. - /// - Read = 0x00000000, - - /// - /// Enables you to save changes to the object, - /// but does not permit access to its data. - /// - Write = 0x00000001, - - /// - /// Enables access and modification of object data. - /// - ReadWrite = 0x00000002, - - /// - /// Specifies that subsequent openings of the object are - /// not denied read or write access. - /// - ShareDenyNone = 0x00000040, - - /// - /// Prevents others from subsequently opening the object in Read mode. - /// - ShareDenyRead = 0x00000030, - - /// - /// Prevents others from subsequently opening the object - /// for Write or ReadWrite access. - /// - ShareDenyWrite = 0x00000020, - - /// - /// Prevents others from subsequently opening the object in any mode. - /// - ShareExclusive = 0x00000010, - - /// - /// Opens the storage object with exclusive access to the most - /// recently committed version. - /// - Priority = 0x00040000, - - /// - /// Indicates that the underlying file is to be automatically destroyed when the root - /// storage object is released. This feature is most useful for creating temporary files. - /// - DeleteOnRelease = 0x04000000, - - /// - /// Indicates that, in transacted mode, a temporary scratch file is usually used - /// to save modifications until the Commit method is called. - /// Specifying NoScratch permits the unused portion of the original file - /// to be used as work space instead of creating a new file for that purpose. - /// - NoScratch = 0x00100000, - - /// - /// Indicates that an existing storage object - /// or stream should be removed before the new object replaces it. - /// - Create = 0x00001000, - - /// - /// Creates the new object while preserving existing data in a stream named "Contents". - /// - Convert = 0x00020000, - - /// - /// Causes the create operation to fail if an existing object with the specified name exists. - /// - FailIfThere = 0x00000000, - - /// - /// This flag is used when opening a storage object with Transacted - /// and without ShareExclusive or ShareDenyWrite. - /// In this case, specifying NoSnapshot prevents the system-provided - /// implementation from creating a snapshot copy of the file. - /// Instead, changes to the file are written to the end of the file. - /// - NoSnapshot = 0x00200000, - - /// - /// Supports direct mode for single-writer, multireader file operations. - /// - DirectSwmr = 0x00400000 - }; - #endregion - - #region Shell Library Helper Methods - - [DllImport("Shell32", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Winapi, SetLastError = true)] - internal static extern int SHShowManageLibraryUI( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem library, - [In] IntPtr hwndOwner, - [In] string title, - [In] string instruction, - [In] LIBRARYMANAGEDIALOGOPTIONS lmdOptions); - - #endregion - - #region Command Link Definitions - - internal const int BS_COMMANDLINK = 0x0000000E; - internal const uint BCM_SETNOTE = 0x00001609; - internal const uint BCM_GETNOTE = 0x0000160A; - internal const uint BCM_GETNOTELENGTH = 0x0000160B; - internal const uint BCM_SETSHIELD = 0x0000160C; - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Common/WindowUtilities.cs b/src/External/WindowsAPICodePack/Shell/Interop/Common/WindowUtilities.cs deleted file mode 100644 index c6469b3..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Common/WindowUtilities.cs +++ /dev/null @@ -1,45 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using Microsoft.WindowsAPICodePack.Taskbar; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - - internal static class WindowUtilities - { - internal static System.Drawing.Point GetParentOffsetOfChild(IntPtr hwnd, IntPtr hwndParent) - { - var childScreenCoord = new CoreNativeMethods.POINT(0, 0); - - TabbedThumbnailNativeMethods.ClientToScreen( - hwnd, ref childScreenCoord); - - var parentScreenCoord = new CoreNativeMethods.POINT(0, 0); - - TabbedThumbnailNativeMethods.ClientToScreen( - hwndParent, ref parentScreenCoord); - - System.Drawing.Point offset = new System.Drawing.Point( - childScreenCoord.X - parentScreenCoord.X, - childScreenCoord.Y - parentScreenCoord.Y); - - return offset; - } - - internal static System.Drawing.Size GetNonClientArea(IntPtr hwnd) - { - var c = new CoreNativeMethods.POINT(0, 0); - - TabbedThumbnailNativeMethods.ClientToScreen(hwnd, ref c); - - var r = new CoreNativeMethods.RECT(); - - TabbedThumbnailNativeMethods.GetWindowRect(hwnd, ref r); - - return new System.Drawing.Size(c.X - r.left, c.Y - r.top); - } - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMClasses.cs b/src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMClasses.cs deleted file mode 100644 index cc35d91..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMClasses.cs +++ /dev/null @@ -1,51 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ - - // Dummy base interface for CommonFileDialog coclasses. - internal interface NativeCommonFileDialog - { - } - - // Coclass interfaces - designed to "look like" the object - // in the API, so that the 'new' operator can be used in a - // straightforward way. Behind the scenes, the C# compiler - // morphs all 'new CoClass()' calls to 'new CoClassWrapper()'. - - [ComImport, - Guid(ShellIIDGuid.IFileOpenDialog), - CoClass(typeof(FileOpenDialogRCW))] - internal interface NativeFileOpenDialog : IFileOpenDialog - { - } - - [ComImport, - Guid(ShellIIDGuid.IFileSaveDialog), - CoClass(typeof(FileSaveDialogRCW))] - internal interface NativeFileSaveDialog : IFileSaveDialog - { - } - - // .NET classes representing runtime callable wrappers. - [ComImport, - ClassInterface(ClassInterfaceType.None), - TypeLibType(TypeLibTypeFlags.FCanCreate), - Guid(ShellCLSIDGuid.FileOpenDialog)] - internal class FileOpenDialogRCW - { - } - - [ComImport, - ClassInterface(ClassInterfaceType.None), - TypeLibType(TypeLibTypeFlags.FCanCreate), - Guid(ShellCLSIDGuid.FileSaveDialog)] - internal class FileSaveDialogRCW - { - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMInterfaces.cs b/src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMInterfaces.cs deleted file mode 100644 index bac9b83..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Dialogs/DialogsCOMInterfaces.cs +++ /dev/null @@ -1,507 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Dialogs -{ -// Disable warning if a method declaration hides another inherited from a parent COM interface -// To successfully import a COM interface, all inherited methods need to be declared again with -// the exception of those already declared in "IUnknown" -#pragma warning disable 0108 - - [ComImport(), - Guid(ShellIIDGuid.IFileDialog), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IFileDialog : IModalWindow - { - // Defined on IModalWindow - repeated here due to requirements of COM interop layer. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), - PreserveSig] - int Show([In] IntPtr parent); - - // IFileDialog-Specific interface members. - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileTypes( - [In] uint cFileTypes, - [In, MarshalAs(UnmanagedType.LPArray)] ShellNativeMethods.COMDLG_FILTERSPEC[] rgFilterSpec); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileTypeIndex([In] uint iFileType); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFileTypeIndex(out uint piFileType); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Advise( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialogEvents pfde, - out uint pdwCookie); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Unadvise([In] uint dwCookie); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetOptions([In] ShellNativeMethods.FOS fos); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetOptions(out ShellNativeMethods.FOS pfos); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFolder([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCurrentSelection([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileName([In, MarshalAs(UnmanagedType.LPWStr)] string pszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string pszTitle); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetOkButtonLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszText); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileNameLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetResult([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddPlace([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, ShellNativeMethods.FDAP fdap); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultExtension([In, MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Close([MarshalAs(UnmanagedType.Error)] int hr); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetClientGuid([In] ref Guid guid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void ClearClientData(); - - // Not supported: IShellItemFilter is not defined, converting to IntPtr. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); - } - - [ComImport(), - Guid(ShellIIDGuid.IFileOpenDialog), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IFileOpenDialog : IFileDialog - { - // Defined on IModalWindow - repeated here due to requirements of COM interop layer. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), - PreserveSig] - int Show([In] IntPtr parent); - - // Defined on IFileDialog - repeated here due to requirements of COM interop layer. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileTypes([In] uint cFileTypes, [In] ref ShellNativeMethods.COMDLG_FILTERSPEC rgFilterSpec); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileTypeIndex([In] uint iFileType); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFileTypeIndex(out uint piFileType); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Advise( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialogEvents pfde, - out uint pdwCookie); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Unadvise([In] uint dwCookie); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetOptions([In] ShellNativeMethods.FOS fos); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetOptions(out ShellNativeMethods.FOS pfos); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFolder([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCurrentSelection([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileName([In, MarshalAs(UnmanagedType.LPWStr)] string pszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string pszTitle); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetOkButtonLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszText); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileNameLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetResult([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddPlace([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, ShellNativeMethods.FDAP fdap); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultExtension([In, MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Close([MarshalAs(UnmanagedType.Error)] int hr); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetClientGuid([In] ref Guid guid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void ClearClientData(); - - // Not supported: IShellItemFilter is not defined, converting to IntPtr. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); - - // Defined by IFileOpenDialog. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetResults([MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppenum); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetSelectedItems([MarshalAs(UnmanagedType.Interface)] out IShellItemArray ppsai); - } - - [ComImport(), - Guid(ShellIIDGuid.IFileSaveDialog), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IFileSaveDialog : IFileDialog - { - // Defined on IModalWindow - repeated here due to requirements of COM interop layer. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), - PreserveSig] - int Show([In] IntPtr parent); - - // Defined on IFileDialog - repeated here due to requirements of COM interop layer. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileTypes( - [In] uint cFileTypes, - [In] ref ShellNativeMethods.COMDLG_FILTERSPEC rgFilterSpec); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileTypeIndex([In] uint iFileType); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFileTypeIndex(out uint piFileType); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Advise( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialogEvents pfde, - out uint pdwCookie); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Unadvise([In] uint dwCookie); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetOptions([In] ShellNativeMethods.FOS fos); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetOptions(out ShellNativeMethods.FOS pfos); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFolder([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFolder([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCurrentSelection([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileName([In, MarshalAs(UnmanagedType.LPWStr)] string pszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetFileName([MarshalAs(UnmanagedType.LPWStr)] out string pszName); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetTitle([In, MarshalAs(UnmanagedType.LPWStr)] string pszTitle); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetOkButtonLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszText); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFileNameLabel([In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetResult([MarshalAs(UnmanagedType.Interface)] out IShellItem ppsi); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddPlace( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, - ShellNativeMethods.FDAP fdap); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetDefaultExtension([In, MarshalAs(UnmanagedType.LPWStr)] string pszDefaultExtension); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void Close([MarshalAs(UnmanagedType.Error)] int hr); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetClientGuid([In] ref Guid guid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void ClearClientData(); - - // Not supported: IShellItemFilter is not defined, converting to IntPtr. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); - - // Defined by IFileSaveDialog interface. - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetSaveAsItem([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi); - - // Not currently supported: IPropertyStore. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetProperties([In, MarshalAs(UnmanagedType.Interface)] IntPtr pStore); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - int SetCollectedProperties( - [In] IPropertyDescriptionList pList, - [In] bool fAppendDefault); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - [PreserveSig] - HRESULT GetProperties(out IPropertyStore ppStore); - - // Not currently supported: IPropertyStore, IFileOperationProgressSink. - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void ApplyProperties( - [In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, - [In, MarshalAs(UnmanagedType.Interface)] IntPtr pStore, - [In, ComAliasName("ShellObjects.wireHWND")] ref IntPtr hwnd, - [In, MarshalAs(UnmanagedType.Interface)] IntPtr pSink); - } - - [ComImport, - Guid(ShellIIDGuid.IFileDialogEvents), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IFileDialogEvents - { - // NOTE: some of these callbacks are cancelable - returning S_FALSE means that - // the dialog should not proceed (e.g. with closing, changing folder); to - // support this, we need to use the PreserveSig attribute to enable us to return - // the proper HRESULT. - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), - PreserveSig] - HRESULT OnFileOk([In, MarshalAs(UnmanagedType.Interface)] IFileDialog pfd); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), - PreserveSig] - HRESULT OnFolderChanging( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialog pfd, - [In, MarshalAs(UnmanagedType.Interface)] IShellItem psiFolder); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnFolderChange([In, MarshalAs(UnmanagedType.Interface)] IFileDialog pfd); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnSelectionChange([In, MarshalAs(UnmanagedType.Interface)] IFileDialog pfd); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnShareViolation( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialog pfd, - [In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, - out ShellNativeMethods.FDE_SHAREVIOLATION_RESPONSE pResponse); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnTypeChange([In, MarshalAs(UnmanagedType.Interface)] IFileDialog pfd); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnOverwrite([In, MarshalAs(UnmanagedType.Interface)] IFileDialog pfd, - [In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, - out ShellNativeMethods.FDE_OVERWRITE_RESPONSE pResponse); - } - - [ComImport, - Guid(ShellIIDGuid.IFileDialogCustomize), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IFileDialogCustomize - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void EnableOpenDropDown([In] int dwIDCtl); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddMenu( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddPushButton( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddComboBox([In] int dwIDCtl); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddRadioButtonList([In] int dwIDCtl); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddCheckButton( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel, - [In] bool bChecked); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddEditBox( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszText); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddSeparator([In] int dwIDCtl); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddText( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszText); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetControlLabel( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetControlState( - [In] int dwIDCtl, - [Out] out ShellNativeMethods.CDCONTROLSTATE pdwState); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetControlState( - [In] int dwIDCtl, - [In] ShellNativeMethods.CDCONTROLSTATE dwState); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetEditBoxText( - [In] int dwIDCtl, - [MarshalAs(UnmanagedType.LPWStr)] out string ppszText); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetEditBoxText( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszText); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCheckButtonState( - [In] int dwIDCtl, - [Out] out bool pbChecked); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetCheckButtonState( - [In] int dwIDCtl, - [In] bool bChecked); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void AddControlItem( - [In] int dwIDCtl, - [In] int dwIDItem, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void RemoveControlItem( - [In] int dwIDCtl, - [In] int dwIDItem); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void RemoveAllControlItems([In] int dwIDCtl); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetControlItemState( - [In] int dwIDCtl, - [In] int dwIDItem, - [Out] out ShellNativeMethods.CDCONTROLSTATE pdwState); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetControlItemState( - [In] int dwIDCtl, - [In] int dwIDItem, - [In] ShellNativeMethods.CDCONTROLSTATE dwState); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetSelectedControlItem( - [In] int dwIDCtl, - [Out] out int pdwIDItem); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void SetSelectedControlItem( - [In] int dwIDCtl, - [In] int dwIDItem); // Not valid for OpenDropDown. - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void StartVisualGroup( - [In] int dwIDCtl, - [In, MarshalAs(UnmanagedType.LPWStr)] string pszLabel); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void EndVisualGroup(); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void MakeProminent([In] int dwIDCtl); - } - - [ComImport, - Guid(ShellIIDGuid.IFileDialogControlEvents), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IFileDialogControlEvents - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnItemSelected( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialogCustomize pfdc, - [In] int dwIDCtl, - [In] int dwIDItem); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnButtonClicked( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialogCustomize pfdc, - [In] int dwIDCtl); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnCheckButtonToggled( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialogCustomize pfdc, - [In] int dwIDCtl, - [In] bool bChecked); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void OnControlActivating( - [In, MarshalAs(UnmanagedType.Interface)] IFileDialogCustomize pfdc, - [In] int dwIDCtl); - } -// Restore the warning -#pragma warning restore 0108 - -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMGuids.cs b/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMGuids.cs deleted file mode 100644 index 0c237f8..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMGuids.cs +++ /dev/null @@ -1,62 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Controls -{ - internal static class ExplorerBrowserIIDGuid - { - static ExplorerBrowserIIDGuid() - { - // Private constructor to prevent the compiler from generating the default one. - } - - // IID GUID strings for relevant Shell COM interfaces. - internal const string IExplorerBrowser = "DFD3B6B5-C10C-4BE9-85F6-A66969F402F6"; - internal const string IKnownFolderManager = "8BE2D872-86AA-4d47-B776-32CCA40C7018"; - internal const string IFolderView = "cde725b0-ccc9-4519-917e-325d72fab4ce"; - internal const string IFolderView2 = "1af3a467-214f-4298-908e-06b03e0b39f9"; - internal const string ICommDlgBrowser = "000214F1-0000-0000-C000-000000000046"; - internal const string IServiceProvider = "6d5140c1-7436-11ce-8034-00aa006009fa"; - internal const string IExplorerPaneVisibility = "e07010ec-bc17-44c0-97b0-46c7c95b9edc"; - internal const string IExplorerBrowserEvents = "361bbdc7-e6ee-4e13-be58-58e2240c810f"; - internal const string IInputObject = "68284fAA-6A48-11D0-8c78-00C04fd918b4"; - internal const string IShellView = "000214E3-0000-0000-C000-000000000046"; - internal const string IDispatch = "00020400-0000-0000-C000-000000000046"; - internal const string DShellFolderViewEvents = "62112AA2-EBE4-11cf-A5FB-0020AFE7292D"; - } - - internal static class ExplorerBrowserViewPanes - { - static ExplorerBrowserViewPanes() - { - // Private constructor to prevent the compiler from generating the default one. - } - - internal const string Navigation = "cb316b22-25f7-42b8-8a09-540d23a43c2f"; - internal const string Commands = "d9745868-ca5f-4a76-91cd-f5a129fbb076"; - internal const string CommandsOrganize = "72e81700-e3ec-4660-bf24-3c3b7b648806"; - internal const string CommandsView = "21f7c32d-eeaa-439b-bb51-37b96fd6a943"; - internal const string Details = "43abf98b-89b8-472d-b9ce-e69b8229f019"; - internal const string Preview = "893c63d1-45c8-4d17-be19-223be71be365"; - internal const string Query = "65bcde4f-4f07-4f27-83a7-1afca4df7ddd"; - internal const string AdvancedQuery = "b4e9db8b-34ba-4c39-b5cc-16a1bd2c411c"; - } - - internal static class ExplorerBrowserCLSIDGuid - { - static ExplorerBrowserCLSIDGuid() - { - // Private constructor to prevent the compiler from generating the default one. - } - - // CLSID GUID strings for relevant coclasses. - internal const string ExplorerBrowser = "71F96385-DDD6-48D3-A0C1-AE06E8B055FB"; - } - - internal static class ExplorerBrowserViewDispatchIds - { - internal const int SelectionChanged = 200; - internal const int ContentsChanged = 207; - internal const int FileListEnumDone = 201; - internal const int SelectedItemChanged = 220; - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMInterfaces.cs b/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMInterfaces.cs deleted file mode 100644 index 30315bd..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserCOMInterfaces.cs +++ /dev/null @@ -1,678 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - internal enum SVGIO : uint - { - SVGIO_BACKGROUND = 0x00000000, - SVGIO_SELECTION = 0x00000001, - SVGIO_ALLVIEW = 0x00000002, - SVGIO_CHECKED = 0x00000003, - SVGIO_TYPE_MASK = 0x0000000F, - SVGIO_FLAG_VIEWORDER = 0x80000000 - } - - internal enum FOLDERFLAGS : uint - { - FWF_AUTOARRANGE = 0x00000001, - FWF_ABBREVIATEDNAMES = 0x00000002, - FWF_SNAPTOGRID = 0x00000004, - FWF_OWNERDATA = 0x00000008, - FWF_BESTFITWINDOW = 0x00000010, - FWF_DESKTOP = 0x00000020, - FWF_SINGLESEL = 0x00000040, - FWF_NOSUBFOLDERS = 0x00000080, - FWF_TRANSPARENT = 0x00000100, - FWF_NOCLIENTEDGE = 0x00000200, - FWF_NOSCROLL = 0x00000400, - FWF_ALIGNLEFT = 0x00000800, - FWF_NOICONS = 0x00001000, - FWF_SHOWSELALWAYS = 0x00002000, - FWF_NOVISIBLE = 0x00004000, - FWF_SINGLECLICKACTIVATE = 0x00008000, - FWF_NOWEBVIEW = 0x00010000, - FWF_HIDEFILENAMES = 0x00020000, - FWF_CHECKSELECT = 0x00040000, - FWF_NOENUMREFRESH = 0x00080000, - FWF_NOGROUPING = 0x00100000, - FWF_FULLROWSELECT = 0x00200000, - FWF_NOFILTERS = 0x00400000, - FWF_NOCOLUMNHEADER = 0x00800000, - FWF_NOHEADERINALLVIEWS = 0x01000000, - FWF_EXTENDEDTILES = 0x02000000, - FWF_TRICHECKSELECT = 0x04000000, - FWF_AUTOCHECKSELECT = 0x08000000, - FWF_NOBROWSERVIEWSTATE = 0x10000000, - FWF_SUBSETGROUPS = 0x20000000, - FWF_USESEARCHFOLDER = 0x40000000, - FWF_ALLOWRTLREADING = 0x80000000 - } - - internal enum FOLDERVIEWMODE - { - FVM_AUTO = -1, - FVM_FIRST = 1, - FVM_ICON = 1, - FVM_SMALLICON = 2, - FVM_LIST = 3, - FVM_DETAILS = 4, - FVM_THUMBNAIL = 5, - FVM_TILE = 6, - FVM_THUMBSTRIP = 7, - FVM_CONTENT = 8, - FVM_LAST = 8 - } - - internal enum EXPLORERPANESTATE - { - EPS_DONTCARE = 0x00000000, - EPS_DEFAULT_ON = 0x00000001, - EPS_DEFAULT_OFF = 0x00000002, - EPS_STATEMASK = 0x0000ffff, - EPS_INITIALSTATE = 0x00010000, - EPS_FORCE = 0x00020000 - } - - [StructLayout( LayoutKind.Sequential, Pack = 4 )] - internal class FOLDERSETTINGS - { - public FOLDERVIEWMODE ViewMode; - public FOLDERFLAGS fFlags; - } - - internal enum EXPLORER_BROWSER_FILL_FLAGS - { - EBF_NODROPTARGET = 0x200, - EBF_NONE = 0, - EBF_SELECTFROMDATAOBJECT = 0x100 - } - - internal enum EXPLORER_BROWSER_OPTIONS - { - EBO_NAVIGATEONCE = 0x00000001, - EBO_SHOWFRAMES = 0x00000002, - EBO_ALWAYSNAVIGATE = 0x00000004, - EBO_NOTRAVELLOG = 0x00000008, - EBO_NOWRAPPERWINDOW = 0x00000010, - EBO_HTMLSHAREPOINTVIEW = 0x00000020 - } - - internal enum CommDlgBrowserStateChange : uint - { - CDBOSC_SETFOCUS = 0x00000000, - CDBOSC_KILLFOCUS = 0x00000001, - CDBOSC_SELCHANGE = 0x00000002, - CDBOSC_RENAME = 0x00000003, - CDBOSC_STATECHANGE = 0x00000004 - } - - internal enum CommDlgBrowserNotifyType : uint - { - CDB2N_CONTEXTMENU_DONE = 0x00000001, - CDB2N_CONTEXTMENU_START = 0x00000002 - } - - internal enum CommDlgBrowser2ViewFlags : uint - { - CDB2GVF_SHOWALLFILES = 0x00000001, - CDB2GVF_ISFILESAVE = 0x00000002, - CDB2GVF_ALLOWPREVIEWPANE = 0x00000004, - CDB2GVF_NOSELECTVERB = 0x00000008, - CDB2GVF_NOINCLUDEITEM = 0x00000010, - CDB2GVF_ISFOLDERPICKER = 0x00000020 - } - - // Disable warning if a method declaration hides another inherited from a parent COM interface - // To successfully import a COM interface, all inherited methods need to be declared again with - // the exception of those already declared in "IUnknown" -#pragma warning disable 108 - - - [ComImport, - TypeLibType( TypeLibTypeFlags.FCanCreate ), - ClassInterface( ClassInterfaceType.None ), - Guid( ExplorerBrowserCLSIDGuid.ExplorerBrowser )] - internal class ExplorerBrowserClass : IExplorerBrowser - { - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void Initialize( IntPtr hwndParent, [In]ref CoreNativeMethods.RECT prc, [In] FOLDERSETTINGS pfs ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void Destroy( ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void SetRect( [In, Out] ref IntPtr phdwp, CoreNativeMethods.RECT rcBrowser ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void SetPropertyBag( [MarshalAs( UnmanagedType.LPWStr )] string pszPropertyBag ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void SetEmptyText( [MarshalAs( UnmanagedType.LPWStr )] string pszEmptyText ); - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern HRESULT SetFolderSettings( FOLDERSETTINGS pfs ); - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern HRESULT Advise( IntPtr psbe, out uint pdwCookie ); - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern HRESULT Unadvise( uint dwCookie ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void SetOptions( [In]EXPLORER_BROWSER_OPTIONS dwFlag ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void GetOptions( out EXPLORER_BROWSER_OPTIONS pdwFlag ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void BrowseToIDList( IntPtr pidl, uint uFlags ); - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern HRESULT BrowseToObject( [MarshalAs( UnmanagedType.IUnknown )] object punk, uint uFlags ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void FillFromObject( [MarshalAs( UnmanagedType.IUnknown )] object punk, int dwFlags ); - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern void RemoveAll( ); - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - public virtual extern HRESULT GetCurrentView( ref Guid riid, out IntPtr ppv ); - } - - - [ComImport, - InterfaceType( ComInterfaceType.InterfaceIsIUnknown ), - Guid( ExplorerBrowserIIDGuid.IExplorerBrowser )] - internal interface IExplorerBrowser - { - /// - /// Prepares the browser to be navigated. - /// - /// A handle to the owner window or control. - /// A pointer to a RECT containing the coordinates of the bounding rectangle - /// the browser will occupy. The coordinates are relative to hwndParent. If this parameter is NULL, - /// then method IExplorerBrowser::SetRect should subsequently be called. - /// A pointer to a FOLDERSETTINGS structure that determines how the folder will be - /// displayed in the view. If this parameter is NULL, then method IExplorerBrowser::SetFolderSettings - /// should be called, otherwise, the default view settings for the folder are used. - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void Initialize( IntPtr hwndParent, [In] ref CoreNativeMethods.RECT prc, [In] FOLDERSETTINGS pfs ); - - /// - /// Destroys the browser. - /// - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void Destroy( ); - - /// - /// Sets the size and position of the view windows created by the browser. - /// - /// A pointer to a DeferWindowPos handle. This paramater can be NULL. - /// The coordinates that the browser will occupy. - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetRect( [In, Out] ref IntPtr phdwp, CoreNativeMethods.RECT rcBrowser ); - - /// - /// Sets the name of the property bag. - /// - /// A pointer to a constant, null-terminated, Unicode string that contains - /// the name of the property bag. View state information that is specific to the application of the - /// client is stored (persisted) using this name. - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetPropertyBag( [MarshalAs( UnmanagedType.LPWStr )] string pszPropertyBag ); - - /// - /// Sets the default empty text. - /// - /// A pointer to a constant, null-terminated, Unicode string that contains - /// the empty text. - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetEmptyText( [MarshalAs( UnmanagedType.LPWStr )] string pszEmptyText ); - - /// - /// Sets the folder settings for the current view. - /// - /// A pointer to a FOLDERSETTINGS structure that contains the folder settings - /// to be applied. - /// - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT SetFolderSettings( FOLDERSETTINGS pfs ); - - /// - /// Initiates a connection with IExplorerBrowser for event callbacks. - /// - /// A pointer to the IExplorerBrowserEvents interface of the object to be - /// advised of IExplorerBrowser events - /// When this method returns, contains a token that uniquely identifies - /// the event listener. This allows several event listeners to be subscribed at a time. - /// - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT Advise( IntPtr psbe, out uint pdwCookie ); - - /// - /// Terminates an advisory connection. - /// - /// A connection token previously returned from IExplorerBrowser::Advise. - /// Identifies the connection to be terminated. - /// - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT Unadvise( [In] uint dwCookie ); - - /// - /// Sets the current browser options. - /// - /// One or more EXPLORER_BROWSER_OPTIONS flags to be set. - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetOptions( [In]EXPLORER_BROWSER_OPTIONS dwFlag ); - - /// - /// Gets the current browser options. - /// - /// When this method returns, contains the current EXPLORER_BROWSER_OPTIONS - /// for the browser. - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetOptions( out EXPLORER_BROWSER_OPTIONS pdwFlag ); - - /// - /// Browses to a pointer to an item identifier list (PIDL) - /// - /// A pointer to a const ITEMIDLIST (item identifier list) that specifies an object's - /// location as the destination to navigate to. This parameter can be NULL. - /// A flag that specifies the category of the pidl. This affects how - /// navigation is accomplished - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void BrowseToIDList( IntPtr pidl, uint uFlags ); - - /// - /// Browse to an object - /// - /// A pointer to an object to browse to. If the object cannot be browsed, - /// an error value is returned. - /// A flag that specifies the category of the pidl. This affects how - /// navigation is accomplished. - /// - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT BrowseToObject( [MarshalAs( UnmanagedType.IUnknown )] object punk, uint uFlags ); - - /// - /// Creates a results folder and fills it with items. - /// - /// An interface pointer on the source object that will fill the IResultsFolder - /// One of the EXPLORER_BROWSER_FILL_FLAGS - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void FillFromObject( [MarshalAs( UnmanagedType.IUnknown )] object punk, int dwFlags ); - - /// - /// Removes all items from the results folder. - /// - /// - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void RemoveAll( ); - - /// - /// Gets an interface for the current view of the browser. - /// - /// A reference to the desired interface ID. - /// When this method returns, contains the interface pointer requested in riid. - /// This will typically be IShellView or IShellView2. - /// - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT GetCurrentView( ref Guid riid, out IntPtr ppv ); - } - - [ComImport, - Guid( ExplorerBrowserIIDGuid.IServiceProvider ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface IServiceProvider - { - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall )] - HRESULT QueryService( ref Guid guidService, ref Guid riid, out IntPtr ppvObject ); - }; - - [ComImport, - Guid( ExplorerBrowserIIDGuid.IFolderView ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface IFolderView - { - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetCurrentViewMode( [Out] out uint pViewMode ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetCurrentViewMode( uint ViewMode ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetFolder( ref Guid riid, [MarshalAs( UnmanagedType.IUnknown )] out object ppv ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void Item( int iItemIndex, out IntPtr ppidl ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void ItemCount( uint uFlags, out int pcItems ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void Items( uint uFlags, ref Guid riid, [Out, MarshalAs( UnmanagedType.IUnknown )] out object ppv ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSelectionMarkedItem( out int piItem ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetFocusedItem( out int piItem ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetItemPosition( IntPtr pidl, out CoreNativeMethods.POINT ppt ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSpacing( [Out] out CoreNativeMethods.POINT ppt ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetDefaultSpacing( out CoreNativeMethods.POINT ppt ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetAutoArrange( ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SelectItem( int iItem, uint dwFlags ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SelectAndPositionItems( uint cidl, IntPtr apidl, ref CoreNativeMethods.POINT apt, uint dwFlags ); - } - - [ComImport, - Guid( ExplorerBrowserIIDGuid.IFolderView2 ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface IFolderView2 : IFolderView - { - // IFolderView - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT GetCurrentViewMode( out uint pViewMode ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetCurrentViewMode( uint ViewMode ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetFolder( ref Guid riid, [MarshalAs( UnmanagedType.IUnknown )] out object ppv ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void Item( int iItemIndex, out IntPtr ppidl ); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT ItemCount( uint uFlags, out int pcItems ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT Items( uint uFlags, ref Guid riid, [Out, MarshalAs( UnmanagedType.IUnknown )] out object ppv ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSelectionMarkedItem( out int piItem ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetFocusedItem( out int piItem ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetItemPosition( IntPtr pidl, out CoreNativeMethods.POINT ppt ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSpacing( [Out] out CoreNativeMethods.POINT ppt ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetDefaultSpacing( out CoreNativeMethods.POINT ppt ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetAutoArrange( ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SelectItem( int iItem, uint dwFlags ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SelectAndPositionItems( uint cidl, IntPtr apidl, ref CoreNativeMethods.POINT apt, uint dwFlags ); - - // IFolderView2 - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetGroupBy( IntPtr key, bool fAscending ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetGroupBy( ref IntPtr pkey, ref bool pfAscending ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetViewProperty( IntPtr pidl, IntPtr propkey, object propvar ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetViewProperty( IntPtr pidl, IntPtr propkey, out object ppropvar ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetTileViewProperties( IntPtr pidl, [MarshalAs( UnmanagedType.LPWStr )] string pszPropList ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetExtendedTileViewProperties( IntPtr pidl, [MarshalAs( UnmanagedType.LPWStr )] string pszPropList ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetText( int iType, [MarshalAs( UnmanagedType.LPWStr )] string pwszText ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetCurrentFolderFlags( uint dwMask, uint dwFlags ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetCurrentFolderFlags( out uint pdwFlags ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSortColumnCount( out int pcColumns ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetSortColumns( IntPtr rgSortColumns, int cColumns ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSortColumns( out IntPtr rgSortColumns, int cColumns ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetItem( int iItem, ref Guid riid, [MarshalAs( UnmanagedType.IUnknown )] out object ppv ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetVisibleItem( int iStart, bool fPrevious, out int piItem ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSelectedItem( int iStart, out int piItem ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSelection( bool fNoneImpliesFolder, out IShellItemArray ppsia ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetSelectionState( IntPtr pidl, out uint pdwFlags ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void InvokeVerbOnSelection( [In, MarshalAs( UnmanagedType.LPWStr )] string pszVerb ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT SetViewModeAndIconSize( int uViewMode, int iImageSize ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT GetViewModeAndIconSize( out int puViewMode, out int piImageSize ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetGroupSubsetCount( uint cVisibleRows ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void GetGroupSubsetCount( out uint pcVisibleRows ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void SetRedraw( bool fRedrawOn ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void IsMoveInSameFolder( ); - - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - void DoRename( ); - } - - [ComImport, - Guid( ExplorerBrowserIIDGuid.IExplorerPaneVisibility ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface IExplorerPaneVisibility - { - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT GetPaneState( ref Guid explorerPane, out EXPLORERPANESTATE peps); - }; - - [ComImport, - Guid( ExplorerBrowserIIDGuid.IExplorerBrowserEvents ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface IExplorerBrowserEvents - { - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT OnNavigationPending( IntPtr pidlFolder ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT OnViewCreated( [MarshalAs(UnmanagedType.IUnknown)] object psv ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT OnNavigationComplete( IntPtr pidlFolder); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT OnNavigationFailed( IntPtr pidlFolder); - } - - [ComImport, - Guid( ExplorerBrowserIIDGuid.ICommDlgBrowser ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface ICommDlgBrowser - { - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT OnDefaultCommand( IntPtr ppshv ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT OnStateChange( - IntPtr ppshv, - CommDlgBrowserStateChange uChange ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT IncludeObject( - IntPtr ppshv, - IntPtr pidl ); - } - - - [ComImport, - Guid( ExplorerBrowserIIDGuid.IInputObject ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface IInputObject - { - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT UIActivateIO( bool fActivate, ref System.Windows.Forms.Message pMsg ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT HasFocusIO( ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT TranslateAcceleratorIO( ref System.Windows.Forms.Message pMsg ); - - }; - - [ComImport, - Guid( ExplorerBrowserIIDGuid.IShellView ), - InterfaceType( ComInterfaceType.InterfaceIsIUnknown )] - internal interface IShellView - { - // IOleWindow - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT GetWindow( - out IntPtr phwnd); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT ContextSensitiveHelp( - bool fEnterMode); - - // IShellView - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT TranslateAccelerator( - IntPtr pmsg); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT EnableModeless( - bool fEnable); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT UIActivate( - uint uState); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT Refresh( ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT CreateViewWindow( - [MarshalAs( UnmanagedType.IUnknown )] object psvPrevious, - IntPtr pfs, - [MarshalAs( UnmanagedType.IUnknown )] object psb, - IntPtr prcView, - out IntPtr phWnd); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT DestroyViewWindow( ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT GetCurrentInfo( - out IntPtr pfs); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT AddPropertySheetPages( - uint dwReserved, - IntPtr pfn, - uint lparam); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT SaveViewState( ); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT SelectItem( - IntPtr pidlItem, - uint uFlags); - - [PreserveSig] - [MethodImpl( MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime )] - HRESULT GetItemObject( - SVGIO uItem, - ref Guid riid, - [MarshalAs(UnmanagedType.IUnknown)] out object ppv ); - } - -#pragma warning restore 108 - -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserNativeMethods.cs deleted file mode 100644 index eeed1b5..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/ExplorerBrowser/ExplorerBrowserNativeMethods.cs +++ /dev/null @@ -1,33 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Security; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Controls -{ - /// - /// Internal class that contains interop declarations for - /// functions that are not benign and are performance critical. - /// - [SuppressUnmanagedCodeSecurity] - internal static class ExplorerBrowserNativeMethods - { - [DllImport( "SHLWAPI.DLL", CharSet = CharSet.Unicode, SetLastError = true )] - internal static extern HRESULT IUnknown_SetSite( - [In, MarshalAs( UnmanagedType.IUnknown )] object punk, - [In, MarshalAs( UnmanagedType.IUnknown )] object punkSite ); - - - [DllImport( "SHLWAPI.DLL", CharSet = CharSet.Unicode, SetLastError = true )] - internal static extern HRESULT ConnectToConnectionPoint( - [In, MarshalAs( UnmanagedType.IUnknown )] object punk, - ref Guid riidEvent, - bool fConnect, - [In, MarshalAs( UnmanagedType.IUnknown )] object punkTarget, - ref uint pdwCookie, - ref IntPtr ppcpOut ); - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMGuids.cs b/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMGuids.cs deleted file mode 100644 index 09bc4dc..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMGuids.cs +++ /dev/null @@ -1,40 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal static class KnownFoldersIIDGuid - { - static KnownFoldersIIDGuid() - { - // Hide default constructor - } - - // IID GUID strings for relevant Shell COM interfaces. - internal const string IKnownFolder = "3AA7AF7E-9B36-420c-A8E3-F77D4674A488"; - internal const string IKnownFolderManager = "8BE2D872-86AA-4d47-B776-32CCA40C7018"; - } - - internal static class KnownFoldersCLSIDGuid - { - static KnownFoldersCLSIDGuid() - { - // Hide default constructor - } - - // CLSID GUID strings for relevant coclasses. - internal const string KnownFolderManager = "4df0c730-df9d-4ae3-9153-aa6b82e9795a"; - } - - internal static class KnownFoldersKFIDGuid - { - static KnownFoldersKFIDGuid() - { - // Hide default constructor - } - - internal const string ComputerFolder = "0AC0837C-BBF8-452A-850D-79D08E667CA7"; - internal const string Favorites = "1777F761-68AD-4D8A-87BD-30B759FA33DD"; - internal const string Documents = "FDD39AD0-238F-46AF-ADB4-6C85480369C7"; - internal const string Profile = "5E6C858F-0E22-4760-9AFE-EA3317B67173"; - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMInterfaces.cs b/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMInterfaces.cs deleted file mode 100644 index 1fb168b..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersCOMInterfaces.cs +++ /dev/null @@ -1,184 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - // Disable warning if a method declaration hides another inherited from a parent COM interface - // To successfully import a COM interface, all inherited methods need to be declared again with - // the exception of those already declared in "IUnknown" - #pragma warning disable 0108 - - [ComImport, - Guid(KnownFoldersIIDGuid.IKnownFolder), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IKnownFolderNative - { - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - Guid GetId(); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - FolderCategory GetCategory(); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - [PreserveSig] - HRESULT GetShellItem([In] int i, - ref Guid interfaceGuid, - [Out, MarshalAs(UnmanagedType.Interface)] out IShellItem2 shellItem); - - [return: MarshalAs(UnmanagedType.LPWStr)] - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - string GetPath([In] int option); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void SetPath([In] int i, [In] string path); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void GetIDList([In] int i, - [Out] out IntPtr itemIdentifierListPointer); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - Guid GetFolderType(); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - RedirectionCapabilities GetRedirectionCapabilities(); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void GetFolderDefinition( - [Out, MarshalAs(UnmanagedType.Struct)] out KnownFoldersSafeNativeMethods.NativeFolderDefinition definition); - - } - - [ComImport, - Guid(KnownFoldersIIDGuid.IKnownFolderManager), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IKnownFolderManager - { - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void FolderIdFromCsidl(int csidl, - [Out] out Guid knownFolderID); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void FolderIdToCsidl([In, MarshalAs(UnmanagedType.LPStruct)] Guid id, - [Out] out int csidl); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void GetFolderIds([Out] out IntPtr folders, - [Out] out UInt32 count); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetFolder([In, MarshalAs(UnmanagedType.LPStruct)] Guid id, - [Out, MarshalAs(UnmanagedType.Interface)] out IKnownFolderNative knownFolder); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void GetFolderByName(string canonicalName, - [Out, MarshalAs(UnmanagedType.Interface)] out IKnownFolderNative knownFolder); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void RegisterFolder( - [In, MarshalAs(UnmanagedType.LPStruct)] Guid knownFolderGuid, - [In] ref KnownFoldersSafeNativeMethods.NativeFolderDefinition knownFolderDefinition); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void UnregisterFolder( - [In, MarshalAs(UnmanagedType.LPStruct)] Guid knownFolderGuid); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void FindFolderFromPath( - [In, MarshalAs(UnmanagedType.LPWStr)] string path, - [In] int mode, - [Out, MarshalAs(UnmanagedType.Interface)] out IKnownFolderNative knownFolder); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - HRESULT FindFolderFromIDList(IntPtr pidl, [Out, MarshalAs(UnmanagedType.Interface)] out IKnownFolderNative knownFolder); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - void Redirect(); - } - - [ComImport] - [Guid("4df0c730-df9d-4ae3-9153-aa6b82e9795a")] - internal class KnownFolderManagerClass : IKnownFolderManager - { - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void FolderIdFromCsidl(int csidl, - [Out] out Guid knownFolderID); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void FolderIdToCsidl( - [In, MarshalAs(UnmanagedType.LPStruct)] Guid id, - [Out] out int csidl); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void GetFolderIds( - [Out] out IntPtr folders, - [Out] out UInt32 count); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern HRESULT GetFolder( - [In, MarshalAs(UnmanagedType.LPStruct)] Guid id, - [Out, MarshalAs(UnmanagedType.Interface)] - out IKnownFolderNative knownFolder); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void GetFolderByName( - string canonicalName, - [Out, MarshalAs(UnmanagedType.Interface)] out IKnownFolderNative knownFolder); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void RegisterFolder( - [In, MarshalAs(UnmanagedType.LPStruct)] Guid knownFolderGuid, - [In] ref KnownFoldersSafeNativeMethods.NativeFolderDefinition knownFolderDefinition); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void UnregisterFolder( - [In, MarshalAs(UnmanagedType.LPStruct)] Guid knownFolderGuid); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void FindFolderFromPath( - [In, MarshalAs(UnmanagedType.LPWStr)] string path, - [In] int mode, - [Out, MarshalAs(UnmanagedType.Interface)] out IKnownFolderNative knownFolder); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern HRESULT FindFolderFromIDList(IntPtr pidl, [Out, MarshalAs(UnmanagedType.Interface)] out IKnownFolderNative knownFolder); - - [MethodImpl(MethodImplOptions.InternalCall, - MethodCodeType = MethodCodeType.Runtime)] - public virtual extern void Redirect(); - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersNativeMethods.cs deleted file mode 100644 index a63a557..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/KnownFolders/KnownFoldersNativeMethods.cs +++ /dev/null @@ -1,43 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Security; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Internal class that contains interop declarations for - /// functions that are considered benign but that - /// are performance critical. - /// - /// - /// Functions that are benign but not performance critical - /// should be located in the NativeMethods class. - /// - [SuppressUnmanagedCodeSecurity] - internal static class KnownFoldersSafeNativeMethods - { - #region KnownFolders - - [StructLayout(LayoutKind.Sequential)] - internal struct NativeFolderDefinition - { - internal FolderCategory category; - internal IntPtr name; - internal IntPtr description; - internal Guid parentId; - internal IntPtr relativePath; - internal IntPtr parsingName; - internal IntPtr tooltip; - internal IntPtr localizedName; - internal IntPtr icon; - internal IntPtr security; - internal UInt32 attributes; - internal DefinitionOptions definitionOptions; - internal Guid folderTypeId; - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemCOMInterfaces.cs b/src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemCOMInterfaces.cs deleted file mode 100644 index 2d21ea1..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemCOMInterfaces.cs +++ /dev/null @@ -1,258 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ -// Disable warning if a method declaration hides another inherited from a parent COM interface -// To successfully import a COM interface, all inherited methods need to be declared again with -// the exception of those already declared in "IUnknown" -#pragma warning disable 108 - - #region Property System COM Interfaces - [ComImport, - Guid(ShellIIDGuid.IPropertyStore), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IPropertyStore - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCount([Out] out uint cProps); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAt([In] uint iProp, out PropertyKey pkey); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetValue([In] ref PropertyKey key, out PropVariant pv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int SetValue([In] ref PropertyKey key, [In] ref PropVariant pv); - - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT Commit(); - } - - [ComImport, - Guid(ShellIIDGuid.IPropertyDescriptionList), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IPropertyDescriptionList - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCount(out uint pcElem); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAt([In] uint iElem, [In] ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out IPropertyDescription ppv); - } - - [ComImport, - Guid(ShellIIDGuid.IPropertyDescription), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IPropertyDescription - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetPropertyKey(out PropertyKey pkey); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCanonicalName([MarshalAs(UnmanagedType.LPWStr)] out string ppszName); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetPropertyType(out VarEnum pvartype); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime), - PreserveSig] - HRESULT GetDisplayName(out IntPtr ppszName); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetEditInvitation( out IntPtr ppszInvite); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetTypeFlags([In] PropertyTypeFlags mask, out PropertyTypeFlags ppdtFlags); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetViewFlags(out PropertyViewFlags ppdvFlags); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetDefaultColumnWidth(out uint pcxChars); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetDisplayType(out PropertyDisplayType pdisplaytype); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetColumnState(out PropertyColumnState pcsFlags); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetGroupingRange(out PropertyGroupingRange pgr); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRelativeDescriptionType(out PropertySystemNativeMethods.PROPDESC_RELATIVEDESCRIPTION_TYPE prdt); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRelativeDescription([In] ref PropVariant propvar1, [In] ref PropVariant propvar2, [MarshalAs(UnmanagedType.LPWStr)] out string ppszDesc1, [MarshalAs(UnmanagedType.LPWStr)] out string ppszDesc2); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetSortDescription(out PropertySortDescription psd); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetSortDescriptionLabel([In] bool fDescending, out IntPtr ppszDescription); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetAggregationType(out PropertyAggregationType paggtype); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetConditionType(out PropertyConditionType pcontype, out PropertyConditionOperation popDefault); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT GetEnumTypeList([In] ref Guid riid, [Out, MarshalAs(UnmanagedType.Interface)] out IPropertyEnumTypeList ppv); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void CoerceToCanonicalValue([In] ref PropVariant propvar, out PropVariant ppropvar); - [PreserveSig] - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - HRESULT FormatForDisplay([In] ref PropVariant propvar, [In] ref PropertyDescriptionFormat pdfFlags, [MarshalAs(UnmanagedType.LPWStr)] out string ppszDisplay); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void IsValueCanonical([In] ref PropVariant propvar); - } - - [ComImport, - Guid(ShellIIDGuid.IPropertyDescription2), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IPropertyDescription2 : IPropertyDescription - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetPropertyKey(out PropertyKey pkey); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCanonicalName([MarshalAs(UnmanagedType.LPWStr)] out string ppszName); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetPropertyType(out VarEnum pvartype); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDisplayName([MarshalAs(UnmanagedType.LPWStr)] out string ppszName); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetEditInvitation([MarshalAs(UnmanagedType.LPWStr)] out string ppszInvite); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetTypeFlags([In] PropertyTypeFlags mask, out PropertyTypeFlags ppdtFlags); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetViewFlags(out PropertyViewFlags ppdvFlags); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDefaultColumnWidth(out uint pcxChars); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDisplayType(out PropertyDisplayType pdisplaytype); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetColumnState(out uint pcsFlags); - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetGroupingRange(out PropertyGroupingRange pgr); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRelativeDescriptionType(out PropertySystemNativeMethods.PROPDESC_RELATIVEDESCRIPTION_TYPE prdt); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRelativeDescription([In] ref PropVariant propvar1, [In] ref PropVariant propvar2, - [MarshalAs(UnmanagedType.LPWStr)] out string ppszDesc1, - [MarshalAs(UnmanagedType.LPWStr)] out string ppszDesc2); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetSortDescription(out PropertySortDescription psd); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetSortDescriptionLabel([In] int fDescending, [MarshalAs(UnmanagedType.LPWStr)] out string ppszDescription); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAggregationType(out PropertyAggregationType paggtype); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetConditionType( - out PropertyConditionType pcontype, - out PropertyConditionOperation popDefault); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetEnumTypeList([In] ref Guid riid, out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void CoerceToCanonicalValue([In] ref PropVariant propvar, out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void FormatForDisplay([In] ref PropVariant propvar, [In] ref PropertyDescriptionFormat pdfFlags, [MarshalAs(UnmanagedType.LPWStr)] out string ppszDisplay); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void IsValueCanonical([In] ref PropVariant propvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetImageReferenceForValue( - ref PropVariant propvar, - [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszImageRes); - } - - [ComImport, - Guid(ShellIIDGuid.IPropertyEnumType), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IPropertyEnumType - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetEnumType([Out] out PropEnumType penumtype); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetValue([Out] out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRangeMinValue([Out] out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRangeSetValue([Out] out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDisplayText([Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszDisplay); - } - - [ComImport, - Guid(ShellIIDGuid.IPropertyEnumType2), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IPropertyEnumType2 : IPropertyEnumType - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetEnumType([Out] out PropEnumType penumtype); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetValue([Out] out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRangeMinValue([Out] out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetRangeSetValue([Out] out PropVariant ppropvar); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetDisplayText([Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszDisplay); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetImageReference([Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszImageRes); - } - - - [ComImport, - Guid(ShellIIDGuid.IPropertyEnumTypeList), - InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IPropertyEnumTypeList - { - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetCount([Out] out uint pctypes); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetAt( - [In] uint itype, - [In] ref Guid riid, // riid may be IID_IPropertyEnumType - [Out, MarshalAs(UnmanagedType.Interface)] out IPropertyEnumType ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void GetConditionAt( - [In] uint index, - [In] ref Guid riid, - out IntPtr ppv); - - [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)] - void FindMatchingIndex( - [In] ref PropVariant propvarCmp, - [Out] out uint pnIndex); - } - - #endregion - -#pragma warning restore 108 - -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemNativeMethods.cs deleted file mode 100644 index 349b98b..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/PropertySystem/PropertySystemNativeMethods.cs +++ /dev/null @@ -1,67 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - internal static class PropertySystemNativeMethods - { - static PropertySystemNativeMethods() - { - // Hide default constructor - } - - #region Property Definitions - - internal enum PROPDESC_RELATIVEDESCRIPTION_TYPE - { - PDRDT_GENERAL, - PDRDT_DATE, - PDRDT_SIZE, - PDRDT_COUNT, - PDRDT_REVISION, - PDRDT_LENGTH, - PDRDT_DURATION, - PDRDT_SPEED, - PDRDT_RATE, - PDRDT_RATING, - PDRDT_PRIORITY - } - - #endregion - - #region Property System Helpers - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int PSGetNameFromPropertyKey( - ref PropertyKey propkey, - [Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszCanonicalName - ); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern HRESULT PSGetPropertyDescription( - ref PropertyKey propkey, - ref Guid riid, - [Out, MarshalAs(UnmanagedType.Interface)] out IPropertyDescription ppv - ); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int PSGetPropertyKeyFromName( - [In, MarshalAs(UnmanagedType.LPWStr)] string pszCanonicalName, - out PropertyKey propkey - ); - - [DllImport("propsys.dll", CharSet = CharSet.Unicode, SetLastError = true)] - internal static extern int PSGetPropertyDescriptionListFromString( - [In, MarshalAs(UnmanagedType.LPWStr)] string pszPropList, - [In] ref Guid riid, - out IPropertyDescriptionList ppv - ); - - - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/StockIcons/StockIconsNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/Interop/StockIcons/StockIconsNativeMethods.cs deleted file mode 100644 index af414dd..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/StockIcons/StockIconsNativeMethods.cs +++ /dev/null @@ -1,84 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - internal class StockIconsNativeMethods - { - #region StockIcon declarations - - /// - /// Specifies options for the appearance of the - /// stock icon. - /// - [Flags] - internal enum StockIconOptions //: uint - { - - /// - /// Retrieve the small version of the icon, as specified by - /// SM_CXICON and SM_CYICON system metrics. - /// - Large = 0x000000000, - - /// - /// Retrieve the small version of the icon, as specified by - /// SM_CXSMICON and SM_CYSMICON system metrics. - /// - Small = 0x000000001, - - /// - /// Retrieve the shell-sized icons (instead of the - /// size specified by the system metrics). - /// - ShellSize = 0x000000004, - - /// - /// Specified that the hIcon member of the SHSTOCKICONINFO - /// structure receives a handle to the specified icon. - /// - Handle = 0x000000100, - - /// - /// Specifies that the iSysImageImage member of the SHSTOCKICONINFO - /// structure receives the index of the specified - /// icon in the system imagelist. - /// - SystemIndex = 0x000004000, - - /// - /// Adds the link overlay to the icon. - /// - LinkOverlay = 0x000008000, - - /// - /// Adds the system highlight color to the icon. - /// - Selected = 0x000010000 - } - - [StructLayoutAttribute(LayoutKind.Sequential, CharSet = CharSet.Unicode)] - internal struct StockIconInfo - { - internal UInt32 StuctureSize; - internal IntPtr Handle; - internal Int32 ImageIndex; - internal Int32 Identifier; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - internal string Path; - } - - [PreserveSig] - [DllImport("Shell32.dll", CharSet = CharSet.Unicode, - ExactSpelling = true, SetLastError = false)] - internal static extern HRESULT SHGetStockIconInfo( - StockIconIdentifier identifier, - StockIconOptions flags, - ref StockIconInfo info); - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TabbedThumbnailNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TabbedThumbnailNativeMethods.cs deleted file mode 100644 index 9ff61e5..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TabbedThumbnailNativeMethods.cs +++ /dev/null @@ -1,242 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using System.Drawing; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - internal class TabbedThumbnailNativeMethods - { - internal const int DWM_SIT_DISPLAYFRAME = 0x00000001; - - internal const int DWMWA_FORCE_ICONIC_REPRESENTATION = 7; - internal const int DWMWA_HAS_ICONIC_BITMAP = 10; - - internal const uint WM_ACTIVATEAPP = 0x001C; - internal const uint WM_CREATE = 0x1; - internal const uint WM_DESTROY = 0x2; - internal const uint WM_NCDESTROY = 0x0082; - internal const uint WM_ACTIVATE = 0x0006; - internal const uint WM_CLOSE = 0x0010; - internal const uint WM_SYSCOMMAND = 0x112; - internal const uint WM_DWMSENDICONICTHUMBNAIL = 0x0323; - internal const uint WM_DWMSENDICONICLIVEPREVIEWBITMAP = 0x0326; - - internal const uint WA_ACTIVE = 1; - internal const uint WA_CLICKACTIVE = 2; - - internal const int SC_CLOSE = 0xF060; - internal const int SC_MAXIMIZE = 0xF030; - internal const int SC_MINIMIZE = 0xF020; - - internal const uint MSGFLT_ADD = 1; - internal const uint MSGFLT_REMOVE = 2; - - - - private TabbedThumbnailNativeMethods() - { - // Hide the default constructor as this is a static class and we don't want to instantiate it. - } - - [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] - internal static extern IntPtr SendMessage( - IntPtr hWnd, - uint msg, - IntPtr wParam, - IntPtr lParam - ); - - [DllImport("dwmapi.dll")] - internal static extern int DwmSetIconicThumbnail( - IntPtr hwnd, IntPtr hbitmap, uint flags); - - [DllImport("user32.dll")] - internal static extern int GetWindowText( - IntPtr hwnd, StringBuilder str, int maxCount); - - [DllImport("dwmapi.dll")] - internal static extern int DwmInvalidateIconicBitmaps(IntPtr hwnd); - - [DllImport("dwmapi.dll")] - internal static extern int DwmSetIconicLivePreviewBitmap( - IntPtr hwnd, - IntPtr hbitmap, - ref CoreNativeMethods.POINT ptClient, - uint flags); - - [DllImport("dwmapi.dll")] - internal static extern int DwmSetIconicLivePreviewBitmap( - IntPtr hwnd, IntPtr hbitmap, IntPtr ptClient, uint flags); - - [DllImport("dwmapi.dll", PreserveSig = true)] - static extern bool DwmIsCompositionEnabled(); - - [DllImport("dwmapi.dll", PreserveSig = true)] - internal static extern int DwmSetWindowAttribute( - IntPtr hwnd, - //DWMWA_* values. - uint dwAttributeToSet, - IntPtr pvAttributeValue, - uint cbAttribute); - - [DllImport("user32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool GetWindowRect(IntPtr hwnd, ref CoreNativeMethods.RECT rect); - - [DllImport("User32.dll", SetLastError = true)] - internal static extern bool PrintWindow(IntPtr hwnd, IntPtr hDC, uint nFlags); - - [DllImport("gdi32.dll")] - internal static extern IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, - int nBottomRect); - - [DllImport("user32.dll")] - internal static extern int GetWindowRgn(IntPtr hWnd, IntPtr hRgn); - - [DllImport("user32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool GetClientRect(IntPtr hwnd, ref CoreNativeMethods.RECT rect); - - internal static bool GetClientSize(IntPtr hwnd, out System.Drawing.Size size) - { - CoreNativeMethods.RECT rect = new CoreNativeMethods.RECT(); - if (!GetClientRect(hwnd, ref rect)) - { - size = new System.Drawing.Size(-1, -1); - return false; - } - size = new System.Drawing.Size(rect.right, rect.bottom); - return true; - } - - [DllImport("user32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool ClientToScreen( - IntPtr hwnd, - ref CoreNativeMethods.POINT point); - - - [DllImport("gdi32.dll")] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool StretchBlt( - IntPtr hDestDC, int destX, int destY, int destWidth, int destHeight, - IntPtr hSrcDC, int srcX, int srcY, int srcWidth, int srcHeight, - uint operation); - - [DllImport("user32.dll")] - internal static extern IntPtr GetWindowDC(IntPtr hwnd); - - [DllImport("user32.dll")] - internal static extern int ReleaseDC(IntPtr hwnd, IntPtr hdc); - - [DllImport("user32.dll", SetLastError = true)] - internal static extern IntPtr ChangeWindowMessageFilter(uint message, uint dwFlag); - - /// - /// Sets the specified iconic thumbnail for the specified window. - /// This is typically done in response to a DWM message. - /// - /// The window handle. - /// The thumbnail bitmap. - internal static void SetIconicThumbnail(IntPtr hwnd, IntPtr hBitmap) - { - int rc = DwmSetIconicThumbnail( - hwnd, - hBitmap, - DWM_SIT_DISPLAYFRAME); - if (rc != 0) - throw Marshal.GetExceptionForHR(rc); - } - - /// - /// Sets the specified peek (live preview) bitmap for the specified - /// window. This is typically done in response to a DWM message. - /// - /// The window handle. - /// The thumbnail bitmap. - /// Whether to display a standard window - /// frame around the bitmap. - internal static void SetPeekBitmap(IntPtr hwnd, IntPtr bitmap, bool displayFrame) - { - int rc = DwmSetIconicLivePreviewBitmap( - hwnd, - bitmap, - IntPtr.Zero, - displayFrame ? DWM_SIT_DISPLAYFRAME : (uint)0); - if (rc != 0) - throw Marshal.GetExceptionForHR(rc); - } - - /// - /// Sets the specified peek (live preview) bitmap for the specified - /// window. This is typically done in response to a DWM message. - /// - /// The window handle. - /// The thumbnail bitmap. - /// The client area offset at which to display - /// the specified bitmap. The rest of the parent window will be - /// displayed as "remembered" by the DWM. - /// Whether to display a standard window - /// frame around the bitmap. - internal static void SetPeekBitmap(IntPtr hwnd, IntPtr bitmap, Point offset, bool displayFrame) - { - var nativePoint = new CoreNativeMethods.POINT(offset.X, offset.Y); - int rc = DwmSetIconicLivePreviewBitmap( - hwnd, - bitmap, - ref nativePoint, - displayFrame ? DWM_SIT_DISPLAYFRAME : (uint)0); - - if (rc != 0) - { - Exception e = Marshal.GetExceptionForHR(rc); - - if (e is ArgumentException) - { - // Ignore argument exception as it's not really recommended to be throwing - // exception when rendering the peek bitmap. If it's some other kind of exception, - // then throw it. - } - else - throw e; - } - } - - /// - /// Call this method to either enable custom previews on the taskbar (second argument as true) - /// or to disable (second argument as false). If called with True, the method will call DwmSetWindowAttribute - /// for the specific window handle and let DWM know that we will be providing a custom bitmap for the thumbnail - /// as well as Aero peek. - /// - /// - /// - internal static void EnableCustomWindowPreview(IntPtr hwnd, bool enable) - { - IntPtr t = Marshal.AllocHGlobal(4); - Marshal.WriteInt32(t, enable ? 1 : 0); - - try - { - int rc; - rc = DwmSetWindowAttribute( - hwnd, DWMWA_HAS_ICONIC_BITMAP, t, 4); - if (rc != 0) - throw Marshal.GetExceptionForHR(rc); - - rc = DwmSetWindowAttribute( - hwnd, DWMWA_FORCE_ICONIC_REPRESENTATION, t, 4); - if (rc != 0) - throw Marshal.GetExceptionForHR(rc); - } - finally - { - Marshal.FreeHGlobal(t); - } - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarCOMInterfaces.cs b/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarCOMInterfaces.cs deleted file mode 100644 index fa256ce..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarCOMInterfaces.cs +++ /dev/null @@ -1,155 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Text; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - [ComImportAttribute()] - [GuidAttribute("6332DEBF-87B5-4670-90C0-5E57B408A49E")] - [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] - internal interface ICustomDestinationList - { - void SetAppID( - [MarshalAs(UnmanagedType.LPWStr)] string pszAppID); - [PreserveSig] - HRESULT BeginList( - out uint cMaxSlots, - ref Guid riid, - [Out(), MarshalAs(UnmanagedType.Interface)] out object ppvObject); - [PreserveSig] - HRESULT AppendCategory( - [MarshalAs(UnmanagedType.LPWStr)] string pszCategory, - [MarshalAs(UnmanagedType.Interface)] IObjectArray poa); - void AppendKnownCategory( - [MarshalAs(UnmanagedType.I4)] KNOWNDESTCATEGORY category); - [PreserveSig] - HRESULT AddUserTasks( - [MarshalAs(UnmanagedType.Interface)] IObjectArray poa); - void CommitList(); - void GetRemovedDestinations( - ref Guid riid, - [Out(), MarshalAs(UnmanagedType.Interface)] out object ppvObject); - void DeleteList( - [MarshalAs(UnmanagedType.LPWStr)] string pszAppID); - void AbortList(); - } - - [GuidAttribute("77F10CF0-3DB5-4966-B520-B7C54FD35ED6")] - [ClassInterfaceAttribute(ClassInterfaceType.None)] - [ComImportAttribute()] - internal class CDestinationList { } - - [ComImportAttribute()] - [GuidAttribute("92CA9DCD-5622-4BBA-A805-5E9F541BD8C9")] - [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IObjectArray - { - void GetCount(out uint cObjects); - void GetAt( - uint iIndex, - ref Guid riid, - [Out(), MarshalAs(UnmanagedType.Interface)] out object ppvObject); - } - - [ComImportAttribute()] - [GuidAttribute("5632B1A4-E38A-400A-928A-D4CD63230295")] - [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] - internal interface IObjectCollection - { - // IObjectArray - [PreserveSig] - void GetCount(out uint cObjects); - [PreserveSig] - void GetAt( - uint iIndex, - ref Guid riid, - [Out(), MarshalAs(UnmanagedType.Interface)] out object ppvObject); - - // IObjectCollection - void AddObject( - [MarshalAs(UnmanagedType.Interface)] object pvObject); - void AddFromArray( - [MarshalAs(UnmanagedType.Interface)] IObjectArray poaSource); - void RemoveObject(uint uiIndex); - void Clear(); - } - - [GuidAttribute("2D3468C1-36A7-43B6-AC24-D3F02FD9607A")] - [ClassInterfaceAttribute(ClassInterfaceType.None)] - [ComImportAttribute()] - internal class CEnumerableObjectCollection { } - - [ComImportAttribute()] - [GuidAttribute("c43dc798-95d1-4bea-9030-bb99e2983a1a")] - [InterfaceTypeAttribute(ComInterfaceType.InterfaceIsIUnknown)] - internal interface ITaskbarList4 - { - // ITaskbarList - [PreserveSig] - void HrInit(); - [PreserveSig] - void AddTab(IntPtr hwnd); - [PreserveSig] - void DeleteTab(IntPtr hwnd); - [PreserveSig] - void ActivateTab(IntPtr hwnd); - [PreserveSig] - void SetActiveAlt(IntPtr hwnd); - - // ITaskbarList2 - [PreserveSig] - void MarkFullscreenWindow( - IntPtr hwnd, - [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); - - // ITaskbarList3 - [PreserveSig] - void SetProgressValue(IntPtr hwnd, UInt64 ullCompleted, UInt64 ullTotal); - [PreserveSig] - void SetProgressState(IntPtr hwnd, TBPFLAG tbpFlags); - [PreserveSig] - void RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); - [PreserveSig] - void UnregisterTab(IntPtr hwndTab); - [PreserveSig] - void SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); - [PreserveSig] - void SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, uint dwReserved); - [PreserveSig] - HRESULT ThumbBarAddButtons( - IntPtr hwnd, - uint cButtons, - [MarshalAs(UnmanagedType.LPArray)] THUMBBUTTON[] pButtons); - [PreserveSig] - HRESULT ThumbBarUpdateButtons( - IntPtr hwnd, - uint cButtons, - [MarshalAs(UnmanagedType.LPArray)] THUMBBUTTON[] pButtons); - [PreserveSig] - void ThumbBarSetImageList(IntPtr hwnd, IntPtr himl); - [PreserveSig] - void SetOverlayIcon( - IntPtr hwnd, - IntPtr hIcon, - [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); - [PreserveSig] - void SetThumbnailTooltip( - IntPtr hwnd, - [MarshalAs(UnmanagedType.LPWStr)] string pszTip); - [PreserveSig] - void SetThumbnailClip( - IntPtr hwnd, - IntPtr prcClip); - - // ITaskbarList4 - void SetTabProperties(IntPtr hwndTab, STPFLAG stpFlags); - } - - [GuidAttribute("56FDF344-FD6D-11d0-958A-006097C9A090")] - [ClassInterfaceAttribute(ClassInterfaceType.None)] - [ComImportAttribute()] - internal class CTaskbarList { } -} diff --git a/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarNativeMethods.cs b/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarNativeMethods.cs deleted file mode 100644 index d0f0847..0000000 --- a/src/External/WindowsAPICodePack/Shell/Interop/Taskbar/TaskbarNativeMethods.cs +++ /dev/null @@ -1,212 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Text; -using System.Runtime.InteropServices; -using System.Drawing; -using MS.WindowsAPICodePack.Internal; -using Microsoft.WindowsAPICodePack.Shell; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - #region Enums - internal enum KNOWNDESTCATEGORY - { - KDC_FREQUENT = 1, - KDC_RECENT - } - - internal enum SHARD - { - SHARD_PIDL = 0x1, - SHARD_PATHA = 0x2, - SHARD_PATHW = 0x3, - SHARD_APPIDINFO = 0x4, // indicates the data type is a pointer to a SHARDAPPIDINFO structure - SHARD_APPIDINFOIDLIST = 0x5, // indicates the data type is a pointer to a SHARDAPPIDINFOIDLIST structure - SHARD_LINK = 0x6, // indicates the data type is a pointer to an IShellLink instance - SHARD_APPIDINFOLINK = 0x7, // indicates the data type is a pointer to a SHARDAPPIDINFOLINK structure - } - - internal enum TBPFLAG - { - TBPF_NOPROGRESS = 0, - TBPF_INDETERMINATE = 0x1, - TBPF_NORMAL = 0x2, - TBPF_ERROR = 0x4, - TBPF_PAUSED = 0x8 - } - - internal enum TBATFLAG - { - TBATF_USEMDITHUMBNAIL = 0x1, - TBATF_USEMDILIVEPREVIEW = 0x2 - } - - internal enum THBMASK - { - THB_BITMAP = 0x1, - THB_ICON = 0x2, - THB_TOOLTIP = 0x4, - THB_FLAGS = 0x8 - } - - [Flags] - internal enum THBFLAGS - { - THBF_ENABLED = 0x00000000, - THBF_DISABLED = 0x00000001, - THBF_DISMISSONCLICK = 0x00000002, - THBF_NOBACKGROUND = 0x00000004, - THBF_HIDDEN = 0x00000008, - THBF_NONINTERACTIVE = 0x00000010 - } - - internal enum STPFLAG - { - STPF_NONE = 0x0, - STPF_USEAPPTHUMBNAILALWAYS = 0x1, - STPF_USEAPPTHUMBNAILWHENACTIVE = 0x2, - STPF_USEAPPPEEKALWAYS = 0x4, - STPF_USEAPPPEEKWHENACTIVE = 0x8 - } - - #endregion - - #region Structs - - [StructLayout(LayoutKind.Explicit)] - internal struct CALPWSTR - { - [FieldOffset(0)] - internal uint cElems; - [FieldOffset(4)] - internal IntPtr pElems; - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - internal struct THUMBBUTTON - { - /// - /// WPARAM value for a THUMBBUTTON being clicked. - /// - internal const int THBN_CLICKED = 0x1800; - - [MarshalAs(UnmanagedType.U4)] - internal THBMASK dwMask; - internal uint iId; - internal uint iBitmap; - internal IntPtr hIcon; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - internal string szTip; - [MarshalAs(UnmanagedType.U4)] - internal THBFLAGS dwFlags; - } - #endregion; - - internal class TaskbarNativeMethods - { - internal static readonly uint DWM_SIT_DISPLAYFRAME = 0x00000001; - - internal static Guid IID_IObjectArray = new Guid("92CA9DCD-5622-4BBA-A805-5E9F541BD8C9"); - internal static Guid IID_IUnknown = new Guid("00000000-0000-0000-C000-000000000046"); - - internal const int WM_COMMAND = 0x0111; - - // Register Window Message used by Shell to notify that the corresponding taskbar button has been added to the taskbar. - internal static readonly uint WM_TASKBARBUTTONCREATED = RegisterWindowMessage("TaskbarButtonCreated"); - - internal static readonly uint WM_DWMSENDICONICTHUMBNAIL = 0x0323; - internal static readonly uint WM_DWMSENDICONICLIVEPREVIEWBITMAP = 0x0326; - - private TaskbarNativeMethods() - { - // Hide the default constructor as this is a static class and we don't want to instantiate it. - } - - - #region Methods - - [DllImport(CommonDllNames.Shell32, - CharSet = CharSet.Auto, - SetLastError = true)] - internal static extern uint SHCreateItemFromParsingName( - [MarshalAs(UnmanagedType.LPWStr)] string path, - // The following parameter is not used - binding context. - IntPtr pbc, - ref Guid riid, - [MarshalAs(UnmanagedType.Interface)] out IShellItem shellItem); - - [DllImport(CommonDllNames.Shell32)] - internal static extern void SetCurrentProcessExplicitAppUserModelID( - [MarshalAs(UnmanagedType.LPWStr)] string AppID); - - [DllImport(CommonDllNames.Shell32)] - internal static extern void GetCurrentProcessExplicitAppUserModelID( - [Out(), MarshalAs(UnmanagedType.LPWStr)] out string AppID); - - [DllImport(CommonDllNames.Shell32)] - internal static extern void SHAddToRecentDocs( - SHARD flags, - [MarshalAs(UnmanagedType.LPWStr)] string path); - - internal static void SHAddToRecentDocs(string path) - { - SHAddToRecentDocs(SHARD.SHARD_PATHW, path); - } - - [DllImport(CommonDllNames.User32)] - internal static extern int GetWindowText( - IntPtr hwnd, StringBuilder str, int maxCount); - - [DllImport(CommonDllNames.User32, EntryPoint = "RegisterWindowMessage", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern uint RegisterWindowMessage([MarshalAs(UnmanagedType.LPWStr)] string lpString); - - - [DllImport(CommonDllNames.Shell32)] - public static extern int SHGetPropertyStoreForWindow( - IntPtr hwnd, - ref Guid iid /*IID_IPropertyStore*/, - [Out(), MarshalAs(UnmanagedType.Interface)] - out IPropertyStore propertyStore); - - /// - /// Sets the window's application id by its window handle. - /// - /// The window handle. - /// The application id. - internal static void SetWindowAppId(IntPtr hwnd, string appId) - { - SetWindowProperty(hwnd, SystemProperties.System.AppUserModel.ID, appId); - } - - internal static void SetWindowProperty(IntPtr hwnd, PropertyKey propkey, string value) - { - // Get the IPropertyStore for the given window handle - IPropertyStore propStore = GetWindowPropertyStore(hwnd); - - // Set the value - PropVariant pv = new PropVariant(); - propStore.SetValue(ref propkey, ref pv); - - // Dispose the IPropertyStore and PropVariant - Marshal.ReleaseComObject(propStore); - pv.Clear(); - } - - internal static IPropertyStore GetWindowPropertyStore(IntPtr hwnd) - { - IPropertyStore propStore; - Guid guid = new Guid(ShellIIDGuid.IPropertyStore); - int rc = SHGetPropertyStoreForWindow( - hwnd, - ref guid, - out propStore); - if (rc != 0) - throw Marshal.GetExceptionForHR(rc); - return propStore; - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/DefinitionOptions.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/DefinitionOptions.cs deleted file mode 100644 index feebd01..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/DefinitionOptions.cs +++ /dev/null @@ -1,33 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Specifies behaviors for known folders. - /// - [System.Flags] - public enum DefinitionOptions - { - /// - /// No behaviors are defined. - /// - None = 0x0, - /// - /// Prevents a per-user known folder from being - /// redirected to a network location. - /// - LocalRedirectOnly = 0x2, - - /// - /// The known folder can be roamed through PC-to-PC synchronization. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Roamable", Justification = "This is following the native API")] - Roamable = 0x4, - - /// - /// Creates the known folder when the user first logs on. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Precreate", Justification="This is following the native API")] - Precreate = 0x8 - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/FileSystemKnownFolder.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/FileSystemKnownFolder.cs deleted file mode 100644 index 5fc21a5..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/FileSystemKnownFolder.cs +++ /dev/null @@ -1,280 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a registered file system Known Folder - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public class FileSystemKnownFolder : ShellFileSystemFolder, IKnownFolder, IDisposable - { - #region Private Fields - - private IKnownFolderNative knownFolderNative; - private KnownFolderSettings knownFolderSettings = null; - - #endregion - - #region Internal Constructors - - internal FileSystemKnownFolder(IShellItem2 shellItem) - : base(shellItem) - { - } - - internal FileSystemKnownFolder(IKnownFolderNative kf) - { - Debug.Assert(kf != null); - knownFolderNative = kf; - - // Set the native shell item - // and set it on the base class (ShellObject) - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - knownFolderNative.GetShellItem(0, ref guid, out nativeShellItem); - } - - #endregion - - #region Private Members - - private KnownFolderSettings KnownFolderSettings - { - get - { - if (knownFolderNative == null) - { - // We need to get the PIDL either from the NativeShellItem, - // or from base class's property (if someone already set it on us). - // Need to use the PIDL to get the native IKnownFolder interface. - - // Get teh PIDL for the ShellItem - if (nativeShellItem != null && base.PIDL == IntPtr.Zero) - base.PIDL = ShellHelper.PidlFromShellItem(nativeShellItem); - - // If we have a valid PIDL, get the native IKnownFolder - if (base.PIDL != IntPtr.Zero) - knownFolderNative = KnownFolderHelper.FromPIDL(base.PIDL); - - Debug.Assert(knownFolderNative != null); - } - - // If this is the first time this property is being called, - // get the native Folder Defination (KnownFolder properties) - if (knownFolderSettings == null) - knownFolderSettings = new KnownFolderSettings(knownFolderNative); - - return knownFolderSettings; - } - } - - #endregion - - #region IKnownFolder Members - - /// - /// Gets the path for this known folder. - /// - /// A object. - public override string Path - { - get { return KnownFolderSettings.Path; } - } - - /// - /// Gets the category designation for this known folder. - /// - /// A value. - public FolderCategory Category - { - get { return KnownFolderSettings.Category; } - } - - /// - /// Gets this known folder's canonical name. - /// - /// A object. - public string CanonicalName - { - get { return KnownFolderSettings.CanonicalName; } - } - - /// - /// Gets this known folder's description. - /// - /// A object. - public string Description - { - get { return KnownFolderSettings.Description; } - } - - /// - /// Gets the unique identifier for this known folder's parent folder. - /// - /// A value. - public Guid ParentId - { - get { return KnownFolderSettings.ParentId; } - } - - /// - /// Gets this known folder's relative path. - /// - /// A object. - public string RelativePath - { - get { return KnownFolderSettings.RelativePath; } - } - - /// - /// Gets this known folder's parsing name. - /// - /// A object. - public override string ParsingName - { - get { return base.ParsingName; } - } - - /// - /// Gets this known folder's tool tip text. - /// - /// A object. - public string Tooltip - { - get { return KnownFolderSettings.Tooltip; } - } - /// - /// Gets the resource identifier for this - /// known folder's tool tip text. - /// - /// A object. - public string TooltipResourceId - { - get { return KnownFolderSettings.TooltipResourceId; } - } - - /// - /// Gets this known folder's localized name. - /// - /// A object. - public string LocalizedName - { - get { return KnownFolderSettings.LocalizedName; } - } - /// - /// Gets the resource identifier for this - /// known folder's localized name. - /// - /// A object. - public string LocalizedNameResourceId - { - get { return KnownFolderSettings.LocalizedNameResourceId; } - } - - /// - /// Gets this known folder's security attributes. - /// - /// A object. - public string Security - { - get { return KnownFolderSettings.Security; } - } - - /// - /// Gets this known folder's file attributes, - /// such as "read-only". - /// - /// A value. - public System.IO.FileAttributes FileAttributes - { - get { return KnownFolderSettings.FileAttributes; } - } - - /// - /// Gets an value that describes this known folder's behaviors. - /// - /// A value. - public DefinitionOptions DefinitionOptions - { - get { return KnownFolderSettings.DefinitionOptions; } - } - - /// - /// Gets the unique identifier for this known folder's type. - /// - /// A value. - public Guid FolderTypeId - { - get { return KnownFolderSettings.FolderTypeId; } - } - - /// - /// Gets a string representation of this known folder's type. - /// - /// A object. - public string FolderType - { - get { return KnownFolderSettings.FolderType; } - } - /// - /// Gets the unique identifier for this known folder. - /// - /// A value. - public Guid FolderId - { - get { return KnownFolderSettings.FolderId; } - } - - /// - /// Gets a value that indicates whether this known folder's path exists on the computer. - /// - /// A bool value. - /// If this property value is false, - /// the folder might be a virtual folder ( property will - /// be for virtual folders) - public bool PathExists - { - get { return KnownFolderSettings.PathExists; } - } - - /// - /// Gets a value that states whether this known folder - /// can have its path set to a new value, - /// including any restrictions on the redirection. - /// - /// A value. - public RedirectionCapabilities Redirection - { - get { return KnownFolderSettings.Redirection; } - } - - #endregion - - #region IDisposable Members - - /// - /// Release resources - /// - /// Indicates that this mothod is being called from Dispose() rather than the finalizer. - protected override void Dispose(bool disposing) - { - if (disposing) - { - knownFolderSettings = null; - } - - if (knownFolderNative != null) - { - Marshal.ReleaseComObject(knownFolderNative); - knownFolderNative = null; - } - - base.Dispose(disposing); - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderCategory.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderCategory.cs deleted file mode 100644 index 762cffa..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderCategory.cs +++ /dev/null @@ -1,45 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Specifies the categories for known folders. - /// - public enum FolderCategory - { - /// - /// The folder category is not specified. - /// - None = 0x00, - /// - /// The folder is a virtual folder. Virtual folders are not part - /// of the file system. For example, Control Panel and - /// Printers are virtual folders. A number of properties - /// such as folder path and redirection do not apply to this category. - /// - Virtual = 0x1, - /// - /// The folder is fixed. Fixed file system folders are not - /// managed by the Shell and are usually given a permanent - /// path when the system is installed. For example, the - /// Windows and Program Files folders are fixed folders. - /// A number of properties such as redirection do not apply - /// to this category. - /// - Fixed = 0x2, - /// - /// The folder is a common folder. Common folders are - /// used for sharing data and settings - /// accessible by all users of a system. For example, - /// all users share a common Documents folder as well - /// as their per-user Documents folder. - /// - Common = 0x3, - /// - /// Each user has their own copy of the folder. Per-user folders - /// are those stored under each user's profile and - /// accessible only by that user. - /// - PerUser = 0x4 - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderProperties.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderProperties.cs deleted file mode 100644 index 500d88d..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderProperties.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Windows.Media.Imaging; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Structure used internally to store property values for - /// a known folder. This structure holds the information - /// returned in the FOLDER_DEFINITION structure, and - /// resources referenced by fields in NativeFolderDefinition, - /// such as icon and tool tip. - /// - [StructLayout(LayoutKind.Sequential)] - internal struct FolderProperties - { - internal string name; - internal FolderCategory category; - internal string canonicalName; - internal string description; - internal Guid parentId; - internal string parent; - internal string relativePath; - internal string parsingName; - internal string tooltipResourceId; - internal string tooltip; - internal string localizedName; - internal string localizedNameResourceId; - internal string iconResourceId; - internal BitmapSource icon; - internal DefinitionOptions definitionOptions; - internal System.IO.FileAttributes fileAttributes; - internal Guid folderTypeId; - internal string folderType; - internal Guid folderId; - internal string path; - internal bool pathExists; - internal RedirectionCapabilities redirection; - internal string security; - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderTypes.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderTypes.cs deleted file mode 100644 index 1eb2c73..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/FolderTypes.cs +++ /dev/null @@ -1,226 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// The FolderTypes values represent a view template applied to a folder, - /// usually based on its intended use and contents. - /// - internal static class FolderTypes - { - /// - /// No particular content type has been detected or specified. This value is not supported in Windows 7 and later systems. - /// - internal static Guid NotSpecified = new Guid( - 0x5c4f28b5, 0xf869, 0x4e84, 0x8e, 0x60, 0xf1, 0x1d, 0xb9, 0x7c, 0x5c, 0xc7); - - /// - /// The folder is invalid. There are several things that can cause this judgement: hard disk errors, file system errors, and compression errors among them. - /// - internal static Guid Invalid = new Guid( - 0x57807898, 0x8c4f, 0x4462, 0xbb, 0x63, 0x71, 0x04, 0x23, 0x80, 0xb1, 0x09); - - /// - /// The folder contains document files. These can be of mixed format—.doc, .txt, and others. - /// - internal static Guid Documents = new Guid( - 0x7d49d726, 0x3c21, 0x4f05, 0x99, 0xaa, 0xfd, 0xc2, 0xc9, 0x47, 0x46, 0x56); - - /// - /// Image files, such as .jpg, .tif, or .png files. - /// - internal static Guid Pictures = new Guid( - 0xb3690e58, 0xe961, 0x423b, 0xb6, 0x87, 0x38, 0x6e, 0xbf, 0xd8, 0x32, 0x39); - - /// - /// Windows 7 and later. The folder contains audio files, such as .mp3 and .wma files. - /// - internal static Guid Music = new Guid( - 0xaf9c03d6, 0x7db9, 0x4a15, 0x94, 0x64, 0x13, 0xbf, 0x9f, 0xb6, 0x9a, 0x2a); - - /// - /// A list of music files displayed in Icons view. This value is not supported in Windows 7 and later systems. - /// - internal static Guid MusicIcons = new Guid( - 0x0b7467fb, 0x84ba, 0x4aae, 0xa0, 0x9b, 0x15, 0xb7, 0x10, 0x97, 0xaf, 0x9e); - - /// - /// The folder is the Games folder found in the Start menu. - /// - internal static Guid Games = new Guid( - 0xb689b0d0, 0x76d3, 0x4cbb, 0x87, 0xf7, 0x58, 0x5d, 0x0e, 0x0c, 0xe0, 0x70); - - /// - /// The Control Panel in category view. This is a virtual folder. - /// - internal static Guid ControlPanelCategory = new Guid( - 0xde4f0660, 0xfa10, 0x4b8f, 0xa4, 0x94, 0x06, 0x8b, 0x20, 0xb2, 0x23, 0x07); - - /// - /// The Control Panel in classic view. This is a virtual folder. - /// - internal static Guid ControlPanelClassic = new Guid( - 0x0c3794f3, 0xb545, 0x43aa, 0xa3, 0x29, 0xc3, 0x74, 0x30, 0xc5, 0x8d, 0x2a); - - /// - /// Printers that have been added to the system. This is a virtual folder. - /// - internal static Guid Printers = new Guid( - 0x2c7bbec6, 0xc844, 0x4a0a, 0x91, 0xfa, 0xce, 0xf6, 0xf5, 0x9c, 0xfd, 0xa1); - - /// - /// The Recycle Bin. This is a virtual folder. - /// - internal static Guid RecycleBin = new Guid( - 0xd6d9e004, 0xcd87, 0x442b, 0x9d, 0x57, 0x5e, 0x0a, 0xeb, 0x4f, 0x6f, 0x72); - - /// - /// The software explorer window used by the Add or Remove Programs control panel icon. - /// - internal static Guid SoftwareExplorer = new Guid( - 0xd674391b, 0x52d9, 0x4e07, 0x83, 0x4e, 0x67, 0xc9, 0x86, 0x10, 0xf3, 0x9d); - - /// - /// The folder is a compressed archive, such as a compressed file with a .zip file name extension. - /// - internal static Guid CompressedFolder = new Guid( - 0x80213e82, 0xbcfd, 0x4c4f, 0x88, 0x17, 0xbb, 0x27, 0x60, 0x12, 0x67, 0xa9); - - /// - /// An e-mail-related folder that contains contact information. - /// - internal static Guid Contacts = new Guid( - 0xde2b70ec, 0x9bf7, 0x4a93, 0xbd, 0x3d, 0x24, 0x3f, 0x78, 0x81, 0xd4, 0x92); - - /// - /// A default library view without a more specific template. This value is not supported in Windows 7 and later systems. - /// - internal static Guid Library = new Guid( - 0x4badfc68, 0xc4ac, 0x4716, 0xa0, 0xa0, 0x4d, 0x5d, 0xaa, 0x6b, 0x0f, 0x3e); - - /// - /// The Network Explorer folder. - /// - internal static Guid NetworkExplorer = new Guid( - 0x25cc242b, 0x9a7c, 0x4f51, 0x80, 0xe0, 0x7a, 0x29, 0x28, 0xfe, 0xbe, 0x42); - - /// - /// The folder is the FOLDERID_UsersFiles folder. - /// - internal static Guid UserFiles = new Guid( - 0xcd0fc69b, 0x71e2, 0x46e5, 0x96, 0x90, 0x5b, 0xcd, 0x9f, 0x57, 0xaa, 0xb3); - - /// - /// Windows 7 and later. The folder contains search results, but they are of mixed or no specific type. - /// - internal static Guid GenericSearchResults = new Guid( - 0x7fde1a1e, 0x8b31, 0x49a5, 0x93, 0xb8, 0x6b, 0xe1, 0x4c, 0xfa, 0x49, 0x43); - - /// - /// Windows 7 and later. The folder is a library, but of no specified type. - /// - internal static Guid GenericLibrary = new Guid( - 0x5f4eab9a, 0x6833, 0x4f61, 0x89, 0x9d, 0x31, 0xcf, 0x46, 0x97, 0x9d, 0x49); - - /// - /// Windows 7 and later. The folder contains video files. These can be of mixed format—.wmv, .mov, and others. - /// - internal static Guid Videos = new Guid( - 0x5fa96407, 0x7e77, 0x483c, 0xac, 0x93, 0x69, 0x1d, 0x05, 0x85, 0x0d, 0xe8); - - /// - /// Windows 7 and later. The view shown when the user clicks the Windows Explorer button on the taskbar. - /// - internal static Guid UsersLibraries = new Guid( - 0xc4d98f09, 0x6124, 0x4fe0, 0x99, 0x42, 0x82, 0x64, 0x16, 0x8, 0x2d, 0xa9); - - /// - /// Windows 7 and later. The homegroup view. - /// - internal static Guid OtherUsers = new Guid( - 0xb337fd00, 0x9dd5, 0x4635, 0xa6, 0xd4, 0xda, 0x33, 0xfd, 0x10, 0x2b, 0x7a); - - /// - /// Windows 7 and later. A folder that contains communication-related files such as e-mails, calendar information, and contact information. - /// - internal static Guid Communications = new Guid( - 0x91475fe5, 0x586b, 0x4eba, 0x8d, 0x75, 0xd1, 0x74, 0x34, 0xb8, 0xcd, 0xf6); - - /// - /// Windows 7 and later. The folder contains recorded television broadcasts. - /// - internal static Guid RecordedTV = new Guid( - 0x5557a28f, 0x5da6, 0x4f83, 0x88, 0x09, 0xc2, 0xc9, 0x8a, 0x11, 0xa6, 0xfa); - - /// - /// Windows 7 and later. The folder contains saved game states. - /// - internal static Guid SavedGames = new Guid( - 0xd0363307, 0x28cb, 0x4106, 0x9f, 0x23, 0x29, 0x56, 0xe3, 0xe5, 0xe0, 0xe7); - - /// - /// Windows 7 and later. The folder contains federated search OpenSearch results. - /// - internal static Guid OpenSearch = new Guid( - 0x8faf9629, 0x1980, 0x46ff, 0x80, 0x23, 0x9d, 0xce, 0xab, 0x9c, 0x3e, 0xe3); - - /// - /// Windows 7 and later. Before you search. - /// - internal static Guid SearchConnector = new Guid( - 0x982725ee, 0x6f47, 0x479e, 0xb4, 0x47, 0x81, 0x2b, 0xfa, 0x7d, 0x2e, 0x8f); - - /// - /// Windows 7 and later. A user's Searches folder, normally found at C:\Users\username\Searches. - /// - internal static Guid Searches = new Guid( - 0x0b0ba2e3, 0x405f, 0x415e, 0xa6, 0xee, 0xca, 0xd6, 0x25, 0x20, 0x78, 0x53); - - - static Dictionary types; - - static FolderTypes() - { - types = new Dictionary(); - types.Add(NotSpecified, "Not Specified"); - types.Add(Invalid, "Invalid"); - types.Add(Communications, "Communications"); - types.Add(CompressedFolder, "Compressed Folder"); - types.Add(Contacts, "Contacts"); - types.Add(ControlPanelCategory, "ControlPanel Category"); - types.Add(ControlPanelClassic, "ControlPanel Classic"); - types.Add(Documents, "Documents"); - types.Add(Games, "Games"); - types.Add(GenericSearchResults, "Generic Search Results"); - types.Add(GenericLibrary, "Generic Library"); - types.Add(Library, "Library"); - types.Add(Music, "Music"); - types.Add(MusicIcons, "Music Icons"); - types.Add(NetworkExplorer, "Network Explorer"); - types.Add(OtherUsers, "Other Users"); - types.Add(OpenSearch, "Open Search"); - types.Add(Pictures, "Pictures"); - types.Add(Printers, "Printers"); - types.Add(RecycleBin, "RecycleBin"); - types.Add(RecordedTV, "Recorded TV"); - types.Add(SoftwareExplorer, "Software Explorer"); - types.Add(SavedGames, "Saved Games"); - types.Add(SearchConnector, "Search Connector"); - types.Add(Searches, "Searches"); - types.Add(UsersLibraries, "Users Libraries"); - types.Add(UserFiles, "User Files"); - types.Add(Videos, "Videos"); - } - - internal static string GetFolderType(Guid typeId) - { - if (typeId == Guid.Empty || !types.ContainsKey(typeId)) - return String.Empty; - - return types[typeId]; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/FoldersIdentifiers.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/FoldersIdentifiers.cs deleted file mode 100644 index 58ea90e..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/FoldersIdentifiers.cs +++ /dev/null @@ -1,587 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Reflection; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Contains the GUID identifiers for well-known folders. - /// - internal static class FolderIdentifiers - { - internal static Dictionary folders; - - static FolderIdentifiers() - { - folders = new Dictionary(); - Type folderIDs = typeof(FolderIdentifiers); - - FieldInfo[] fields = folderIDs.GetFields( - BindingFlags.NonPublic | BindingFlags.Static); - - foreach (FieldInfo f in fields) - { - // Ignore dictionary field. - if (f.FieldType == typeof(Guid)) - { - Guid id = (Guid)f.GetValue(null); - string name = f.Name; - folders.Add(id, name); - } - } - } - /// - /// Returns the friendly name for a specified folder. - /// - /// The Guid identifier for a known folder. - /// A value. - internal static string NameForGuid(Guid folderId) - { - if (!folders.ContainsKey(folderId)) - throw new ArgumentException( - "Guid does not identify a known folder.", - "folderId"); - return folders[folderId]; - } - /// - /// Returns a sorted list of name, guid pairs for - /// all known folders. - /// - /// - internal static SortedList GetAllFolders() - { - // Make a copy of the dictionary - // because the Keys and Values collections - // are mutable. - ICollection keys = folders.Keys; - - SortedList slist = new SortedList(); - foreach (Guid g in keys) - { - slist.Add(folders[g], g); - } - return slist; - } - /// - /// Computer - /// - internal static Guid Computer = new Guid(0x0AC0837C, 0xBBF8, 0x452A, 0x85, 0x0D, 0x79, 0xD0, 0x8E, 0x66, 0x7C, 0xA7); - - /// - /// Conflicts - /// - internal static Guid Conflict = new Guid(0x4bfefb45, 0x347d, 0x4006, 0xa5, 0xbe, 0xac, 0x0c, 0xb0, 0x56, 0x71, 0x92); - - /// - /// Control Panel - /// - internal static Guid ControlPanel = new Guid(0x82A74AEB, 0xAEB4, 0x465C, 0xA0, 0x14, 0xD0, 0x97, 0xEE, 0x34, 0x6D, 0x63); - - /// - /// Desktop - /// - internal static Guid Desktop = new Guid(0xB4BFCC3A, 0xDB2C, 0x424C, 0xB0, 0x29, 0x7F, 0xE9, 0x9A, 0x87, 0xC6, 0x41); - - /// - /// Internet Explorer - /// - internal static Guid Internet = new Guid(0x4D9F7874, 0x4E0C, 0x4904, 0x96, 0x7B, 0x40, 0xB0, 0xD2, 0x0C, 0x3E, 0x4B); - - /// - /// Network - /// - internal static Guid Network = new Guid(0xD20BEEC4, 0x5CA8, 0x4905, 0xAE, 0x3B, 0xBF, 0x25, 0x1E, 0xA0, 0x9B, 0x53); - - /// - /// Printers - /// - internal static Guid Printers = new Guid(0x76FC4E2D, 0xD6AD, 0x4519, 0xA6, 0x63, 0x37, 0xBD, 0x56, 0x06, 0x81, 0x85); - - /// - /// Sync Center - /// - internal static Guid SyncManager = new Guid(0x43668BF8, 0xC14E, 0x49B2, 0x97, 0xC9, 0x74, 0x77, 0x84, 0xD7, 0x84, 0xB7); - - /// - /// Network Connections - /// - internal static Guid Connections = new Guid(0x6F0CD92B, 0x2E97, 0x45D1, 0x88, 0xFF, 0xB0, 0xD1, 0x86, 0xB8, 0xDE, 0xDD); - - /// - /// Sync Setup - /// - internal static Guid SyncSetup = new Guid(0xf214138, 0xb1d3, 0x4a90, 0xbb, 0xa9, 0x27, 0xcb, 0xc0, 0xc5, 0x38, 0x9a); - - /// - /// Sync Results - /// - internal static Guid SyncResults = new Guid(0x289a9a43, 0xbe44, 0x4057, 0xa4, 0x1b, 0x58, 0x7a, 0x76, 0xd7, 0xe7, 0xf9); - - /// - /// Recycle Bin - /// - internal static Guid RecycleBin = new Guid(0xB7534046, 0x3ECB, 0x4C18, 0xBE, 0x4E, 0x64, 0xCD, 0x4C, 0xB7, 0xD6, 0xAC); - - /// - /// Fonts - /// - internal static Guid Fonts = new Guid(0xFD228CB7, 0xAE11, 0x4AE3, 0x86, 0x4C, 0x16, 0xF3, 0x91, 0x0A, 0xB8, 0xFE); - - /// - /// Startup - /// - internal static Guid Startup = new Guid(0xB97D20BB, 0xF46A, 0x4C97, 0xBA, 0x10, 0x5E, 0x36, 0x08, 0x43, 0x08, 0x54); - - /// - /// Programs - /// - internal static Guid Programs = new Guid(0xA77F5D77, 0x2E2B, 0x44C3, 0xA6, 0xA2, 0xAB, 0xA6, 0x01, 0x05, 0x4A, 0x51); - - /// - /// Start Menu - /// - internal static Guid StartMenu = new Guid(0x625B53C3, 0xAB48, 0x4EC1, 0xBA, 0x1F, 0xA1, 0xEF, 0x41, 0x46, 0xFC, 0x19); - - /// - /// Recent Items - /// - internal static Guid Recent = new Guid(0xAE50C081, 0xEBD2, 0x438A, 0x86, 0x55, 0x8A, 0x09, 0x2E, 0x34, 0x98, 0x7A); - - /// - /// SendTo - /// - internal static Guid SendTo = new Guid(0x8983036C, 0x27C0, 0x404B, 0x8F, 0x08, 0x10, 0x2D, 0x10, 0xDC, 0xFD, 0x74); - - /// - /// Documents - /// - internal static Guid Documents = new Guid(0xFDD39AD0, 0x238F, 0x46AF, 0xAD, 0xB4, 0x6C, 0x85, 0x48, 0x03, 0x69, 0xC7); - - /// - /// Favorites - /// - internal static Guid Favorites = new Guid(0x1777F761, 0x68AD, 0x4D8A, 0x87, 0xBD, 0x30, 0xB7, 0x59, 0xFA, 0x33, 0xDD); - - /// - /// Network Shortcuts - /// - internal static Guid NetHood = new Guid(0xC5ABBF53, 0xE17F, 0x4121, 0x89, 0x00, 0x86, 0x62, 0x6F, 0xC2, 0xC9, 0x73); - - /// - /// Printer Shortcuts - /// - internal static Guid PrintHood = new Guid(0x9274BD8D, 0xCFD1, 0x41C3, 0xB3, 0x5E, 0xB1, 0x3F, 0x55, 0xA7, 0x58, 0xF4); - - /// - /// Templates - /// - internal static Guid Templates = new Guid(0xA63293E8, 0x664E, 0x48DB, 0xA0, 0x79, 0xDF, 0x75, 0x9E, 0x05, 0x09, 0xF7); - - /// - /// Startup - /// - internal static Guid CommonStartup = new Guid(0x82A5EA35, 0xD9CD, 0x47C5, 0x96, 0x29, 0xE1, 0x5D, 0x2F, 0x71, 0x4E, 0x6E); - - /// - /// Programs - /// - internal static Guid CommonPrograms = new Guid(0x0139D44E, 0x6AFE, 0x49F2, 0x86, 0x90, 0x3D, 0xAF, 0xCA, 0xE6, 0xFF, 0xB8); - - /// - /// Start Menu - /// - internal static Guid CommonStartMenu = new Guid(0xA4115719, 0xD62E, 0x491D, 0xAA, 0x7C, 0xE7, 0x4B, 0x8B, 0xE3, 0xB0, 0x67); - - /// - /// Public Desktop - /// - internal static Guid PublicDesktop = new Guid(0xC4AA340D, 0xF20F, 0x4863, 0xAF, 0xEF, 0xF8, 0x7E, 0xF2, 0xE6, 0xBA, 0x25); - - /// - /// ProgramData - /// - internal static Guid ProgramData = new Guid(0x62AB5D82, 0xFDC1, 0x4DC3, 0xA9, 0xDD, 0x07, 0x0D, 0x1D, 0x49, 0x5D, 0x97); - - /// - /// Templates - /// - internal static Guid CommonTemplates = new Guid(0xB94237E7, 0x57AC, 0x4347, 0x91, 0x51, 0xB0, 0x8C, 0x6C, 0x32, 0xD1, 0xF7); - - /// - /// Public Documents - /// - internal static Guid PublicDocuments = new Guid(0xED4824AF, 0xDCE4, 0x45A8, 0x81, 0xE2, 0xFC, 0x79, 0x65, 0x08, 0x36, 0x34); - - /// - /// Roaming - /// - internal static Guid RoamingAppData = new Guid(0x3EB685DB, 0x65F9, 0x4CF6, 0xA0, 0x3A, 0xE3, 0xEF, 0x65, 0x72, 0x9F, 0x3D); - - /// - /// Local - /// - internal static Guid LocalAppData = new Guid(0xF1B32785, 0x6FBA, 0x4FCF, 0x9D, 0x55, 0x7B, 0x8E, 0x7F, 0x15, 0x70, 0x91); - - /// - /// LocalLow - /// - internal static Guid LocalAppDataLow = new Guid(0xA520A1A4, 0x1780, 0x4FF6, 0xBD, 0x18, 0x16, 0x73, 0x43, 0xC5, 0xAF, 0x16); - - /// - /// Temporary Internet Files - /// - internal static Guid InternetCache = new Guid(0x352481E8, 0x33BE, 0x4251, 0xBA, 0x85, 0x60, 0x07, 0xCA, 0xED, 0xCF, 0x9D); - - /// - /// Cookies - /// - internal static Guid Cookies = new Guid(0x2B0F765D, 0xC0E9, 0x4171, 0x90, 0x8E, 0x08, 0xA6, 0x11, 0xB8, 0x4F, 0xF6); - - /// - /// History - /// - internal static Guid History = new Guid(0xD9DC8A3B, 0xB784, 0x432E, 0xA7, 0x81, 0x5A, 0x11, 0x30, 0xA7, 0x59, 0x63); - - /// - /// System32 - /// - internal static Guid System = new Guid(0x1AC14E77, 0x02E7, 0x4E5D, 0xB7, 0x44, 0x2E, 0xB1, 0xAE, 0x51, 0x98, 0xB7); - - /// - /// System32 - /// - internal static Guid SystemX86 = new Guid(0xD65231B0, 0xB2F1, 0x4857, 0xA4, 0xCE, 0xA8, 0xE7, 0xC6, 0xEA, 0x7D, 0x27); - - /// - /// Windows - /// - internal static Guid Windows = new Guid(0xF38BF404, 0x1D43, 0x42F2, 0x93, 0x05, 0x67, 0xDE, 0x0B, 0x28, 0xFC, 0x23); - - /// - /// The user's username (%USERNAME%) - /// - internal static Guid Profile = new Guid(0x5E6C858F, 0x0E22, 0x4760, 0x9A, 0xFE, 0xEA, 0x33, 0x17, 0xB6, 0x71, 0x73); - - /// - /// Pictures - /// - internal static Guid Pictures = new Guid(0x33E28130, 0x4E1E, 0x4676, 0x83, 0x5A, 0x98, 0x39, 0x5C, 0x3B, 0xC3, 0xBB); - - /// - /// Program Files - /// - internal static Guid ProgramFilesX86 = new Guid(0x7C5A40EF, 0xA0FB, 0x4BFC, 0x87, 0x4A, 0xC0, 0xF2, 0xE0, 0xB9, 0xFA, 0x8E); - - /// - /// Common Files - /// - internal static Guid ProgramFilesCommonX86 = new Guid(0xDE974D24, 0xD9C6, 0x4D3E, 0xBF, 0x91, 0xF4, 0x45, 0x51, 0x20, 0xB9, 0x17); - - /// - /// Program Files - /// - internal static Guid ProgramFilesX64 = new Guid(0x6d809377, 0x6af0, 0x444b, 0x89, 0x57, 0xa3, 0x77, 0x3f, 0x02, 0x20, 0x0e); - - /// - /// Common Files - /// - internal static Guid ProgramFilesCommonX64 = new Guid(0x6365d5a7, 0xf0d, 0x45e5, 0x87, 0xf6, 0xd, 0xa5, 0x6b, 0x6a, 0x4f, 0x7d); - - /// - /// Program Files - /// - internal static Guid ProgramFiles = new Guid(0x905e63b6, 0xc1bf, 0x494e, 0xb2, 0x9c, 0x65, 0xb7, 0x32, 0xd3, 0xd2, 0x1a); - - /// - /// Common Files - /// - internal static Guid ProgramFilesCommon = new Guid(0xF7F1ED05, 0x9F6D, 0x47A2, 0xAA, 0xAE, 0x29, 0xD3, 0x17, 0xC6, 0xF0, 0x66); - - /// - /// Administrative Tools - /// - internal static Guid AdminTools = new Guid(0x724EF170, 0xA42D, 0x4FEF, 0x9F, 0x26, 0xB6, 0x0E, 0x84, 0x6F, 0xBA, 0x4F); - - /// - /// Administrative Tools - /// - internal static Guid CommonAdminTools = new Guid(0xD0384E7D, 0xBAC3, 0x4797, 0x8F, 0x14, 0xCB, 0xA2, 0x29, 0xB3, 0x92, 0xB5); - - /// - /// Music - /// - internal static Guid Music = new Guid(0x4BD8D571, 0x6D19, 0x48D3, 0xBE, 0x97, 0x42, 0x22, 0x20, 0x08, 0x0E, 0x43); - - /// - /// Videos - /// - internal static Guid Videos = new Guid(0x18989B1D, 0x99B5, 0x455B, 0x84, 0x1C, 0xAB, 0x7C, 0x74, 0xE4, 0xDD, 0xFC); - - /// - /// Public Pictures - /// - internal static Guid PublicPictures = new Guid(0xB6EBFB86, 0x6907, 0x413C, 0x9A, 0xF7, 0x4F, 0xC2, 0xAB, 0xF0, 0x7C, 0xC5); - - /// - /// Public Music - /// - internal static Guid PublicMusic = new Guid(0x3214FAB5, 0x9757, 0x4298, 0xBB, 0x61, 0x92, 0xA9, 0xDE, 0xAA, 0x44, 0xFF); - - /// - /// Public Videos - /// - internal static Guid PublicVideos = new Guid(0x2400183A, 0x6185, 0x49FB, 0xA2, 0xD8, 0x4A, 0x39, 0x2A, 0x60, 0x2B, 0xA3); - - /// - /// Resources - /// - internal static Guid ResourceDir = new Guid(0x8AD10C31, 0x2ADB, 0x4296, 0xA8, 0xF7, 0xE4, 0x70, 0x12, 0x32, 0xC9, 0x72); - - /// - /// None - /// - internal static Guid LocalizedResourcesDir = new Guid(0x2A00375E, 0x224C, 0x49DE, 0xB8, 0xD1, 0x44, 0x0D, 0xF7, 0xEF, 0x3D, 0xDC); - - /// - /// OEM Links - /// - internal static Guid CommonOEMLinks = new Guid(0xC1BAE2D0, 0x10DF, 0x4334, 0xBE, 0xDD, 0x7A, 0xA2, 0x0B, 0x22, 0x7A, 0x9D); - - /// - /// Temporary Burn Folder - /// - internal static Guid CDBurning = new Guid(0x9E52AB10, 0xF80D, 0x49DF, 0xAC, 0xB8, 0x43, 0x30, 0xF5, 0x68, 0x78, 0x55); - - /// - /// Users - /// - internal static Guid UserProfiles = new Guid(0x0762D272, 0xC50A, 0x4BB0, 0xA3, 0x82, 0x69, 0x7D, 0xCD, 0x72, 0x9B, 0x80); - - /// - /// Playlists - /// - internal static Guid Playlists = new Guid(0xDE92C1C7, 0x837F, 0x4F69, 0xA3, 0xBB, 0x86, 0xE6, 0x31, 0x20, 0x4A, 0x23); - - /// - /// Sample Playlists - /// - internal static Guid SamplePlaylists = new Guid(0x15CA69B3, 0x30EE, 0x49C1, 0xAC, 0xE1, 0x6B, 0x5E, 0xC3, 0x72, 0xAF, 0xB5); - - /// - /// Sample Music - /// - internal static Guid SampleMusic = new Guid(0xB250C668, 0xF57D, 0x4EE1, 0xA6, 0x3C, 0x29, 0x0E, 0xE7, 0xD1, 0xAA, 0x1F); - - /// - /// Sample Pictures - /// - internal static Guid SamplePictures = new Guid(0xC4900540, 0x2379, 0x4C75, 0x84, 0x4B, 0x64, 0xE6, 0xFA, 0xF8, 0x71, 0x6B); - - /// - /// Sample Videos - /// - internal static Guid SampleVideos = new Guid(0x859EAD94, 0x2E85, 0x48AD, 0xA7, 0x1A, 0x09, 0x69, 0xCB, 0x56, 0xA6, 0xCD); - - /// - /// Slide Shows - /// - internal static Guid PhotoAlbums = new Guid(0x69D2CF90, 0xFC33, 0x4FB7, 0x9A, 0x0C, 0xEB, 0xB0, 0xF0, 0xFC, 0xB4, 0x3C); - - /// - /// Public - /// - internal static Guid Public = new Guid(0xDFDF76A2, 0xC82A, 0x4D63, 0x90, 0x6A, 0x56, 0x44, 0xAC, 0x45, 0x73, 0x85); - - /// - /// Programs and Features - /// - internal static Guid ChangeRemovePrograms = new Guid(0xdf7266ac, 0x9274, 0x4867, 0x8d, 0x55, 0x3b, 0xd6, 0x61, 0xde, 0x87, 0x2d); - - /// - /// Installed Updates - /// - internal static Guid AppUpdates = new Guid(0xa305ce99, 0xf527, 0x492b, 0x8b, 0x1a, 0x7e, 0x76, 0xfa, 0x98, 0xd6, 0xe4); - - /// - /// Get Programs - /// - internal static Guid AddNewPrograms = new Guid(0xde61d971, 0x5ebc, 0x4f02, 0xa3, 0xa9, 0x6c, 0x82, 0x89, 0x5e, 0x5c, 0x04); - - /// - /// Downloads - /// - internal static Guid Downloads = new Guid(0x374de290, 0x123f, 0x4565, 0x91, 0x64, 0x39, 0xc4, 0x92, 0x5e, 0x46, 0x7b); - - /// - /// Public Downloads - /// - internal static Guid PublicDownloads = new Guid(0x3d644c9b, 0x1fb8, 0x4f30, 0x9b, 0x45, 0xf6, 0x70, 0x23, 0x5f, 0x79, 0xc0); - - /// - /// Searches - /// - internal static Guid SavedSearches = new Guid(0x7d1d3a04, 0xdebb, 0x4115, 0x95, 0xcf, 0x2f, 0x29, 0xda, 0x29, 0x20, 0xda); - - /// - /// Quick Launch - /// - internal static Guid QuickLaunch = new Guid(0x52a4f021, 0x7b75, 0x48a9, 0x9f, 0x6b, 0x4b, 0x87, 0xa2, 0x10, 0xbc, 0x8f); - - /// - /// Contacts - /// - internal static Guid Contacts = new Guid(0x56784854, 0xc6cb, 0x462b, 0x81, 0x69, 0x88, 0xe3, 0x50, 0xac, 0xb8, 0x82); - - /// - /// Gadgets - /// - internal static Guid SidebarParts = new Guid(0xa75d362e, 0x50fc, 0x4fb7, 0xac, 0x2c, 0xa8, 0xbe, 0xaa, 0x31, 0x44, 0x93); - - /// - /// Gadgets - /// - internal static Guid SidebarDefaultParts = new Guid(0x7b396e54, 0x9ec5, 0x4300, 0xbe, 0xa, 0x24, 0x82, 0xeb, 0xae, 0x1a, 0x26); - - /// - /// Tree property value folder - /// - internal static Guid TreeProperties = new Guid(0x5b3749ad, 0xb49f, 0x49c1, 0x83, 0xeb, 0x15, 0x37, 0x0f, 0xbd, 0x48, 0x82); - - /// - /// GameExplorer - /// - internal static Guid PublicGameTasks = new Guid(0xdebf2536, 0xe1a8, 0x4c59, 0xb6, 0xa2, 0x41, 0x45, 0x86, 0x47, 0x6a, 0xea); - - /// - /// GameExplorer - /// - internal static Guid GameTasks = new Guid(0x54fae61, 0x4dd8, 0x4787, 0x80, 0xb6, 0x9, 0x2, 0x20, 0xc4, 0xb7, 0x0); - - /// - /// Saved Games - /// - internal static Guid SavedGames = new Guid(0x4c5c32ff, 0xbb9d, 0x43b0, 0xb5, 0xb4, 0x2d, 0x72, 0xe5, 0x4e, 0xaa, 0xa4); - - /// - /// Games - /// - internal static Guid Games = new Guid(0xcac52c1a, 0xb53d, 0x4edc, 0x92, 0xd7, 0x6b, 0x2e, 0x8a, 0xc1, 0x94, 0x34); - - /// - /// Recorded TV - /// - internal static Guid RecordedTV = new Guid(0xbd85e001, 0x112e, 0x431e, 0x98, 0x3b, 0x7b, 0x15, 0xac, 0x09, 0xff, 0xf1); - - /// - /// Microsoft Office Outlook - /// - internal static Guid SearchMapi = new Guid(0x98ec0e18, 0x2098, 0x4d44, 0x86, 0x44, 0x66, 0x97, 0x93, 0x15, 0xa2, 0x81); - - /// - /// Offline Files - /// - internal static Guid SearchCsc = new Guid(0xee32e446, 0x31ca, 0x4aba, 0x81, 0x4f, 0xa5, 0xeb, 0xd2, 0xfd, 0x6d, 0x5e); - - /// - /// Links - /// - internal static Guid Links = new Guid(0xbfb9d5e0, 0xc6a9, 0x404c, 0xb2, 0xb2, 0xae, 0x6d, 0xb6, 0xaf, 0x49, 0x68); - - /// - /// The user's full name (for instance, Jean Philippe Bagel) entered when the user account was created. - /// - internal static Guid UsersFiles = new Guid(0xf3ce0f7c, 0x4901, 0x4acc, 0x86, 0x48, 0xd5, 0xd4, 0x4b, 0x04, 0xef, 0x8f); - - /// - /// Search home - /// - internal static Guid SearchHome = new Guid(0x190337d1, 0xb8ca, 0x4121, 0xa6, 0x39, 0x6d, 0x47, 0x2d, 0x16, 0x97, 0x2a); - - /// - /// Original Images - /// - internal static Guid OriginalImages = new Guid(0x2C36C0AA, 0x5812, 0x4b87, 0xbf, 0xd0, 0x4c, 0xd0, 0xdf, 0xb1, 0x9b, 0x39); - - - #region Win7 KnownFolders Guids - - /// - /// UserProgramFiles - /// - internal static Guid UserProgramFiles = new Guid(0x5cd7aee2, 0x2219, 0x4a67, 0xb8, 0x5d, 0x6c, 0x9c, 0xe1, 0x56, 0x60, 0xcb); - - /// - /// UserProgramFilesCommon - /// - internal static Guid UserProgramFilesCommon = new Guid(0xbcbd3057, 0xca5c, 0x4622, 0xb4, 0x2d, 0xbc, 0x56, 0xdb, 0x0a, 0xe5, 0x16); - - /// - /// Ringtones - /// - internal static Guid Ringtones = new Guid(0xC870044B, 0xF49E, 0x4126, 0xA9, 0xC3, 0xB5, 0x2A, 0x1F, 0xF4, 0x11, 0xE8); - - /// - /// PublicRingtones - /// - internal static Guid PublicRingtones = new Guid(0xE555AB60, 0x153B, 0x4D17, 0x9F, 0x04, 0xA5, 0xFE, 0x99, 0xFC, 0x15, 0xEC); - - /// - /// UsersLibraries - /// - internal static Guid UsersLibraries = new Guid(0xa302545d, 0xdeff, 0x464b, 0xab, 0xe8, 0x61, 0xc8, 0x64, 0x8d, 0x93, 0x9b); - - /// - /// DocumentsLibrary - /// - internal static Guid DocumentsLibrary = new Guid(0x7b0db17d, 0x9cd2, 0x4a93, 0x97, 0x33, 0x46, 0xcc, 0x89, 0x02, 0x2e, 0x7c); - - /// - /// MusicLibrary - /// - internal static Guid MusicLibrary = new Guid(0x2112ab0a, 0xc86a, 0x4ffe, 0xa3, 0x68, 0xd, 0xe9, 0x6e, 0x47, 0x1, 0x2e); - - /// - /// PicturesLibrary - /// - internal static Guid PicturesLibrary = new Guid(0xa990ae9f, 0xa03b, 0x4e80, 0x94, 0xbc, 0x99, 0x12, 0xd7, 0x50, 0x41, 0x4); - - /// - /// VideosLibrary - /// - internal static Guid VideosLibrary = new Guid(0x491e922f, 0x5643, 0x4af4, 0xa7, 0xeb, 0x4e, 0x7a, 0x13, 0x8d, 0x81, 0x74); - - /// - /// RecordedTVLibrary - /// - internal static Guid RecordedTVLibrary = new Guid(0x1a6fdba2, 0xf42d, 0x4358, 0xa7, 0x98, 0xb7, 0x4d, 0x74, 0x59, 0x26, 0xc5); - - /// - /// OtherUsers - /// - internal static Guid OtherUsers = new Guid(0x52528a6b, 0xb9e3, 0x4add, 0xb6, 0xd, 0x58, 0x8c, 0x2d, 0xba, 0x84, 0x2d); - - /// - /// DeviceMetadataStore - /// - internal static Guid DeviceMetadataStore = new Guid(0x5ce4a5e9, 0xe4eb, 0x479d, 0xb8, 0x9f, 0x13, 0x0c, 0x02, 0x88, 0x61, 0x55); - - /// - /// Libraries - /// - internal static Guid Libraries = new Guid(0x1b3ea5dc, 0xb587, 0x4786, 0xb4, 0xef, 0xbd, 0x1d, 0xc3, 0x32, 0xae, 0xae); - - /// - /// UserPinned - /// - internal static Guid UserPinned = new Guid(0x9e3995ab, 0x1f9c, 0x4f13, 0xb8, 0x27, 0x48, 0xb2, 0x4b, 0x6c, 0x71, 0x74); - - /// - /// ImplicitAppShortcuts - /// - internal static Guid ImplicitAppShortcuts = new Guid(0xbcb5256f, 0x79f6, 0x4cee, 0xb7, 0x25, 0xdc, 0x34, 0xe4, 0x2, 0xfd, 0x46); - - #endregion - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/IKnownFolder.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/IKnownFolder.cs deleted file mode 100644 index cb1483d..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/IKnownFolder.cs +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.IO; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a registered or known folder in the system. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification="This will complicate the class hierarchy and naming convention used in the Shell area")] - public interface IKnownFolder : IDisposable, IEnumerable - { - /// - /// Gets the path for this known folder. - /// - string Path - { - get; - } - - /// - /// Gets the category designation for this known folder. - /// - FolderCategory Category - { - get; - } - - /// - /// Gets this known folder's canonical name. - /// - string CanonicalName - { - get; - } - - /// - /// Gets this known folder's description. - /// - string Description - { - get; - } - - /// - /// Gets the unique identifier for this known folder's parent folder. - /// - Guid ParentId - { - get; - } - - /// - /// Gets this known folder's relative path. - /// - string RelativePath - { - get; - } - - /// - /// Gets this known folder's parsing name. - /// - string ParsingName - { - get; - } - - /// - /// Gets this known folder's tool tip text. - /// - string Tooltip - { - get; - } - - /// - /// Gets the resource identifier for this - /// known folder's tool tip text. - /// - string TooltipResourceId - { - get; - } - - /// - /// Gets this known folder's localized name. - /// - string LocalizedName - { - get; - } - - /// - /// Gets the resource identifier for this - /// known folder's localized name. - /// - string LocalizedNameResourceId - { - get; - } - - /// - /// Gets this known folder's security attributes. - /// - string Security - { - get; - } - - /// - /// Gets this known folder's file attributes, - /// such as "read-only". - /// - FileAttributes FileAttributes - { - get; - } - - /// - /// Gets an value that describes this known folder's behaviors. - /// - DefinitionOptions DefinitionOptions - { - get; - } - - /// - /// Gets the unique identifier for this known folder's type. - /// - Guid FolderTypeId - { - get; - } - - /// - /// Gets a string representation of this known folder's type. - /// - string FolderType - { - get; - } - - /// - /// Gets the unique identifier for this known folder. - /// - Guid FolderId - { - get; - } - - /// - /// Gets a value that indicates whether this known folder's path exists on the computer. - /// - /// If this property value is false, - /// the folder might be a virtual folder ( property will - /// be for virtual folders) - bool PathExists - { - get; - } - - /// - /// Gets a value that states whether this known folder - /// can have its path set to a new value, - /// including any restrictions on the redirection. - /// - RedirectionCapabilities Redirection - { - get; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs deleted file mode 100644 index 167a0d1..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderHelper.cs +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Creates the helper class for known folders. - /// - public static class KnownFolderHelper - { - static KnownFolderHelper() - { - // Private constructor to prevent the compiler from generating the default one. - } - - /// - /// Returns the native known folder (IKnownFolderNative) given a PID list - /// - /// - /// - internal static IKnownFolderNative FromPIDL(IntPtr pidl) - { - IKnownFolderManager knownFolderManager = (IKnownFolderManager)new KnownFolderManagerClass(); - IKnownFolderNative knownFolder; - HRESULT hr = knownFolderManager.FindFolderFromIDList(pidl, out knownFolder); - - if (hr != HRESULT.S_OK) - return null; - else - return knownFolder; - } - - /// - /// Returns a known folder given a globally unique identifier. - /// - /// A GUID for the requested known folder. - /// A known folder representing the specified name. - /// Thrown if the given Known Folder ID is invalid. - public static IKnownFolder FromKnownFolderId(Guid knownFolderId) - { - IKnownFolderNative knownFolderNative; - IKnownFolderManager knownFolderManager = (IKnownFolderManager)new KnownFolderManagerClass(); - - HRESULT hr = knownFolderManager.GetFolder(knownFolderId, out knownFolderNative); - - if (hr == HRESULT.S_OK) - { - IKnownFolder kf = GetKnownFolder(knownFolderNative); - - if (kf != null) - return kf; - else - throw new ArgumentException("Given Known Folder ID is invalid.", "knownFolderId"); - } - else - throw Marshal.GetExceptionForHR((int)hr); - } - - /// - /// Returns a known folder given a globally unique identifier. - /// - /// A GUID for the requested known folder. - /// A known folder representing the specified name. Returns null if Known Folder is not found or could not be created. - internal static IKnownFolder FromKnownFolderIdInternal(Guid knownFolderId) - { - IKnownFolderNative knownFolderNative; - IKnownFolderManager knownFolderManager = (IKnownFolderManager)new KnownFolderManagerClass(); - - HRESULT hr = knownFolderManager.GetFolder(knownFolderId, out knownFolderNative); - - if (hr == HRESULT.S_OK) - { - return GetKnownFolder(knownFolderNative); - } - else - return null; - } - - /// - /// Given a native KnownFolder (IKnownFolderNative), create the right type of - /// IKnownFolder object (FileSystemKnownFolder or NonFileSystemKnownFolder) - /// - /// Native Known Folder - /// - private static IKnownFolder GetKnownFolder(IKnownFolderNative knownFolderNative) - { - Debug.Assert(knownFolderNative != null, "Native IKnownFolder should not be null."); - - // Get the native IShellItem2 from the native IKnownFolder - IShellItem2 shellItem; - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - HRESULT hr = knownFolderNative.GetShellItem(0, ref guid, out shellItem); - - if (!CoreErrorHelper.Succeeded((int)hr)) - return null; - - bool isFileSystem = false; - - // If we have a valid IShellItem, try to get the FileSystem attribute. - if (shellItem != null) - { - ShellNativeMethods.SFGAO sfgao; - shellItem.GetAttributes(ShellNativeMethods.SFGAO.SFGAO_FILESYSTEM, out sfgao); - - // Is this item a FileSystem item? - isFileSystem = (sfgao & ShellNativeMethods.SFGAO.SFGAO_FILESYSTEM) != 0; - } - - // If it's FileSystem, create a FileSystemKnownFolder, else NonFileSystemKnownFolder - if (isFileSystem) - { - FileSystemKnownFolder kf = new FileSystemKnownFolder(knownFolderNative); - return kf; - } - else - { - NonFileSystemKnownFolder kf = new NonFileSystemKnownFolder(knownFolderNative); - return kf; - } - - } - - /// - /// Returns the known folder given its canonical name. - /// - /// A non-localized canonical name for the known folder, such as MyComputer. - /// A known folder representing the specified name. - /// Thrown if the given canonical name is invalid or if the KnownFolder could not be created. - public static IKnownFolder FromCanonicalName(string canonicalName) - { - IKnownFolderNative knownFolderNative; - IKnownFolderManager knownFolderManager = (IKnownFolderManager)new KnownFolderManagerClass(); - - knownFolderManager.GetFolderByName(canonicalName, out knownFolderNative); - IKnownFolder kf = KnownFolderHelper.GetKnownFolder(knownFolderNative); - - if (kf != null) - return kf; - else - throw new ArgumentException("Canonical name is invalid.", "canonicalName"); - } - - /// - /// Returns a known folder given its shell path, such as C:\users\public\documents or - /// ::{645FF040-5081-101B-9F08-00AA002F954E} for the Recycle Bin. - /// - /// The path for the requested known folder; either a physical path or a virtual path. - /// A known folder representing the specified name. - public static IKnownFolder FromPath(string path) - { - return KnownFolderHelper.FromParsingName(path); - } - - /// - /// Returns a known folder given its shell namespace parsing name, such as - /// ::{645FF040-5081-101B-9F08-00AA002F954E} for the Recycle Bin. - /// - /// The parsing name (or path) for the requested known folder. - /// A known folder representing the specified name. - /// Thrown if the given parsing name is invalid. - public static IKnownFolder FromParsingName(string parsingName) - { - IntPtr pidl = IntPtr.Zero; - IntPtr pidl2 = IntPtr.Zero; - - try - { - pidl = ShellHelper.PidlFromParsingName(parsingName); - - if (pidl == IntPtr.Zero) - { - throw new ArgumentException("Parsing name is invalid.", "parsingName"); - } - - - // It's probably a special folder, try to get it - IKnownFolderNative knownFolderNative = KnownFolderHelper.FromPIDL(pidl); - - if (knownFolderNative != null) - { - IKnownFolder kf = KnownFolderHelper.GetKnownFolder(knownFolderNative); - - if (kf != null) - return kf; - else - throw new ArgumentException("Parsing name is invalid.", "parsingName"); - } - else - { - // No physical storage was found for this known folder - // We'll try again with a different name - - // try one more time with a trailing \0 - pidl2 = ShellHelper.PidlFromParsingName(parsingName.PadRight(1, '\0')); - - if (pidl2 == IntPtr.Zero) - { - throw new ArgumentException("Parsing name is invalid.", "parsingName"); - } - - IKnownFolder kf = KnownFolderHelper.GetKnownFolder(KnownFolderHelper.FromPIDL(pidl)); - - if (kf != null) - return kf; - else - throw new ArgumentException("Parsing name is invalid.", "parsingName"); - } - } - finally - { - ShellNativeMethods.ILFree(pidl); - ShellNativeMethods.ILFree(pidl2); - } - - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderSettings.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderSettings.cs deleted file mode 100644 index f5894b2..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolderSettings.cs +++ /dev/null @@ -1,299 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Internal class to represent the KnownFolder settings/properties - /// - internal class KnownFolderSettings - { - private FolderProperties knownFolderProperties; - - internal KnownFolderSettings(IKnownFolderNative knownFolderNative) - { - GetFolderProperties(knownFolderNative); - } - - #region Private Methods - - /// - /// Populates a structure that contains - /// this known folder's properties. - /// - private void GetFolderProperties(IKnownFolderNative knownFolderNative) - { - Debug.Assert(knownFolderNative != null); - - KnownFoldersSafeNativeMethods.NativeFolderDefinition nativeFolderDefinition; - knownFolderNative.GetFolderDefinition(out nativeFolderDefinition); - - try - { - knownFolderProperties.category = nativeFolderDefinition.category; - knownFolderProperties.canonicalName = Marshal.PtrToStringUni(nativeFolderDefinition.name); - knownFolderProperties.description = Marshal.PtrToStringUni(nativeFolderDefinition.description); - knownFolderProperties.parentId = nativeFolderDefinition.parentId; - knownFolderProperties.relativePath = Marshal.PtrToStringUni(nativeFolderDefinition.relativePath); - knownFolderProperties.parsingName = Marshal.PtrToStringUni(nativeFolderDefinition.parsingName); - knownFolderProperties.tooltipResourceId = Marshal.PtrToStringUni(nativeFolderDefinition.tooltip); - knownFolderProperties.localizedNameResourceId = Marshal.PtrToStringUni(nativeFolderDefinition.localizedName); - knownFolderProperties.iconResourceId = Marshal.PtrToStringUni(nativeFolderDefinition.icon); - knownFolderProperties.security = Marshal.PtrToStringUni(nativeFolderDefinition.security); - knownFolderProperties.fileAttributes = (System.IO.FileAttributes)nativeFolderDefinition.attributes; - knownFolderProperties.definitionOptions = nativeFolderDefinition.definitionOptions; - knownFolderProperties.folderTypeId = nativeFolderDefinition.folderTypeId; - knownFolderProperties.folderType = FolderTypes.GetFolderType(knownFolderProperties.folderTypeId); - - bool pathExists; - - knownFolderProperties.path = GetPath(out pathExists, knownFolderNative); - knownFolderProperties.pathExists = pathExists; - - knownFolderProperties.redirection = knownFolderNative.GetRedirectionCapabilities(); - - // Turn tooltip, localized name and icon resource IDs - // into the actual resources. - knownFolderProperties.tooltip = CoreHelpers.GetStringResource(knownFolderProperties.tooltipResourceId); - knownFolderProperties.localizedName = CoreHelpers.GetStringResource(knownFolderProperties.localizedNameResourceId); - - knownFolderProperties.folderId = knownFolderNative.GetId(); - - } - finally - { - // Clean up memory. - Marshal.FreeCoTaskMem(nativeFolderDefinition.name); - Marshal.FreeCoTaskMem(nativeFolderDefinition.description); - Marshal.FreeCoTaskMem(nativeFolderDefinition.relativePath); - Marshal.FreeCoTaskMem(nativeFolderDefinition.parsingName); - Marshal.FreeCoTaskMem(nativeFolderDefinition.tooltip); - Marshal.FreeCoTaskMem(nativeFolderDefinition.localizedName); - Marshal.FreeCoTaskMem(nativeFolderDefinition.icon); - Marshal.FreeCoTaskMem(nativeFolderDefinition.security); - } - } - - /// - /// Gets the path of this this known folder. - /// - /// - /// Returns false if the folder is virtual, or a boolean - /// value that indicates whether this known folder exists. - /// - /// Native IKnownFolder reference - /// - /// A containing the path, or if this known folder does not exist. - /// - private string GetPath(out bool fileExists, IKnownFolderNative knownFolderNative) - { - Debug.Assert(knownFolderNative != null); - - string kfPath = String.Empty; - fileExists = true; - - // Virtual folders do not have path. - if (knownFolderProperties.category == FolderCategory.Virtual) - { - fileExists = false; - return kfPath; - } - - try - { - kfPath = knownFolderNative.GetPath(0); - } - catch (System.IO.FileNotFoundException) - { - fileExists = false; - } - catch (System.IO.DirectoryNotFoundException) - { - fileExists = false; - } - - return kfPath; - } - - #endregion - - #region KnownFolder Properties - - /// - /// Gets the path for this known folder. - /// - /// A object. - public string Path - { - get - { - return knownFolderProperties.path; - } - } - - - /// - /// Gets the category designation for this known folder. - /// - /// A value. - public FolderCategory Category - { - get { return knownFolderProperties.category; } - } - - /// - /// Gets this known folder's canonical name. - /// - /// A object. - public string CanonicalName - { - get { return knownFolderProperties.canonicalName; } - } - - /// - /// Gets this known folder's description. - /// - /// A object. - public string Description - { - get { return knownFolderProperties.description; } - } - - /// - /// Gets the unique identifier for this known folder's parent folder. - /// - /// A value. - public Guid ParentId - { - get { return knownFolderProperties.parentId; } - } - - /// - /// Gets this known folder's relative path. - /// - /// A object. - public string RelativePath - { - get { return knownFolderProperties.relativePath; } - } - - /// - /// Gets this known folder's tool tip text. - /// - /// A object. - public string Tooltip - { - get { return knownFolderProperties.tooltip; } - } - /// - /// Gets the resource identifier for this - /// known folder's tool tip text. - /// - /// A object. - public string TooltipResourceId - { - get { return knownFolderProperties.tooltipResourceId; } - } - - /// - /// Gets this known folder's localized name. - /// - /// A object. - public string LocalizedName - { - get { return knownFolderProperties.localizedName; } - } - /// - /// Gets the resource identifier for this - /// known folder's localized name. - /// - /// A object. - public string LocalizedNameResourceId - { - get { return knownFolderProperties.localizedNameResourceId; } - } - - /// - /// Gets this known folder's security attributes. - /// - /// A object. - public string Security - { - get { return knownFolderProperties.security; } - } - - /// - /// Gets this known folder's file attributes, - /// such as "read-only". - /// - /// A value. - public System.IO.FileAttributes FileAttributes - { - get { return knownFolderProperties.fileAttributes; } - } - - /// - /// Gets an value that describes this known folder's behaviors. - /// - /// A value. - public DefinitionOptions DefinitionOptions - { - get { return knownFolderProperties.definitionOptions; } - } - - /// - /// Gets the unique identifier for this known folder's type. - /// - /// A value. - public Guid FolderTypeId - { - get { return knownFolderProperties.folderTypeId; } - } - - /// - /// Gets a string representation of this known folder's type. - /// - /// A object. - public string FolderType - { - get { return knownFolderProperties.folderType; } - } - /// - /// Gets the unique identifier for this known folder. - /// - /// A value. - public Guid FolderId - { - get { return knownFolderProperties.folderId; } - } - - /// - /// Gets a value that indicates whether this known folder's path exists on the computer. - /// - /// A bool value. - /// If this property value is false, - /// the folder might be a virtual folder ( property will - /// be for virtual folders) - public bool PathExists - { - get { return knownFolderProperties.pathExists; } - } - - /// - /// Gets a value that states whether this known folder - /// can have its path set to a new value, - /// including any restrictions on the redirection. - /// - /// A value. - public RedirectionCapabilities Redirection - { - get { return knownFolderProperties.redirection; } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolders.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolders.cs deleted file mode 100644 index ef96e47..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/KnownFolders.cs +++ /dev/null @@ -1,1335 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Defines properties for known folders that identify the path of standard known folders. - /// - public static class KnownFolders - { - /// - /// Gets a strongly-typed read-only collection of all the registered known folders. - /// - public static ICollection All - { - get - { - return GetAllFolders(); - } - } - - private static ReadOnlyCollection GetAllFolders() - { - // Should this method be thread-safe?? (It'll take a while - // to get a list of all the known folders, create the managed wrapper - // and return the read-only collection. - - IList foldersList = new List(); - uint count; - IntPtr folders; - - IKnownFolderManager knownFolderManager = (IKnownFolderManager)new KnownFolderManagerClass(); - knownFolderManager.GetFolderIds(out folders, out count); - - if (count > 0 && folders != IntPtr.Zero) - { - // Loop through all the KnownFolderID elements - for (int i = 0; i < count; i++) - { - // Read the current pointer - IntPtr current = new IntPtr(folders.ToInt64() + (Marshal.SizeOf(typeof(Guid)) * i)); - - // Convert to Guid - Guid knownFolderID = (Guid)Marshal.PtrToStructure(current, typeof(Guid)); - - IKnownFolder kf = null; - - // Get the known folder - kf = KnownFolderHelper.FromKnownFolderIdInternal(knownFolderID); - - // Add to our collection if it's not null (some folders might not exist on the system - // or we could have an exception that resulted in the null return from above method call - if (kf != null) - foldersList.Add(kf); - } - } - - Marshal.FreeCoTaskMem(folders); - - return new ReadOnlyCollection(foldersList); - } - - private static IKnownFolder GetKnownFolder(Guid guid) - { - return KnownFolderHelper.FromKnownFolderId(guid); - } - - #region Default Known Folders - - /// - /// Gets the metadata for the Computer folder. - /// - /// An object. - public static IKnownFolder Computer - { - get - { - return GetKnownFolder( - FolderIdentifiers.Computer); - } - } - - /// - /// Gets the metadata for the Conflict folder. - /// - /// An object. - public static IKnownFolder Conflict - { - get - { - return GetKnownFolder( - FolderIdentifiers.Conflict); - } - } - - /// - /// Gets the metadata for the ControlPanel folder. - /// - /// An object. - public static IKnownFolder ControlPanel - { - get - { - return GetKnownFolder( - FolderIdentifiers.ControlPanel); - } - } - - /// - /// Gets the metadata for the Desktop folder. - /// - /// An object. - public static IKnownFolder Desktop - { - get - { - return GetKnownFolder( - FolderIdentifiers.Desktop); - } - } - - /// - /// Gets the metadata for the Internet folder. - /// - /// An object. - public static IKnownFolder Internet - { - get - { - return GetKnownFolder( - FolderIdentifiers.Internet); - } - } - - /// - /// Gets the metadata for the Network folder. - /// - /// An object. - public static IKnownFolder Network - { - get - { - return GetKnownFolder( - FolderIdentifiers.Network); - } - } - - /// - /// Gets the metadata for the Printers folder. - /// - /// An object. - public static IKnownFolder Printers - { - get - { - return GetKnownFolder( - FolderIdentifiers.Printers); - } - } - - /// - /// Gets the metadata for the SyncManager folder. - /// - /// An object. - public static IKnownFolder SyncManager - { - get - { - return GetKnownFolder( - FolderIdentifiers.SyncManager); - } - } - - /// - /// Gets the metadata for the Connections folder. - /// - /// An object. - public static IKnownFolder Connections - { - get - { - return GetKnownFolder( - FolderIdentifiers.Connections); - } - } - - /// - /// Gets the metadata for the SyncSetup folder. - /// - /// An object. - public static IKnownFolder SyncSetup - { - get - { - return GetKnownFolder( - FolderIdentifiers.SyncSetup); - } - } - - /// - /// Gets the metadata for the SyncResults folder. - /// - /// An object. - public static IKnownFolder SyncResults - { - get - { - return GetKnownFolder( - FolderIdentifiers.SyncResults); - } - } - - /// - /// Gets the metadata for the RecycleBin folder. - /// - /// An object. - public static IKnownFolder RecycleBin - { - get - { - return GetKnownFolder( - FolderIdentifiers.RecycleBin); - } - } - - /// - /// Gets the metadata for the Fonts folder. - /// - /// An object. - public static IKnownFolder Fonts - { - get - { - return GetKnownFolder(FolderIdentifiers.Fonts); - } - } - - /// - /// Gets the metadata for the Startup folder. - /// - /// An object. - public static IKnownFolder Startup - { - get - { - return GetKnownFolder(FolderIdentifiers.Startup); - } - } - - /// - /// Gets the metadata for the Programs folder. - /// - /// An object. - public static IKnownFolder Programs - { - get - { - return GetKnownFolder(FolderIdentifiers.Programs); - } - } - - /// - /// Gets the metadata for the per-user StartMenu folder. - /// - /// An object. - public static IKnownFolder StartMenu - { - get - { - return GetKnownFolder(FolderIdentifiers.StartMenu); - } - } - - /// - /// Gets the metadata for the per-user Recent folder. - /// - /// An object. - public static IKnownFolder Recent - { - get - { - return GetKnownFolder(FolderIdentifiers.Recent); - } - } - - /// - /// Gets the metadata for the per-user SendTo folder. - /// - /// An object. - public static IKnownFolder SendTo - { - get - { - return GetKnownFolder(FolderIdentifiers.SendTo); - } - } - - /// - /// Gets the metadata for the per-user Documents folder. - /// - /// An object. - public static IKnownFolder Documents - { - get - { - return GetKnownFolder(FolderIdentifiers.Documents); - } - } - - /// - /// Gets the metadata for the per-user Favorites folder. - /// - /// An object. - public static IKnownFolder Favorites - { - get - { - return GetKnownFolder(FolderIdentifiers.Favorites); - } - } - - /// - /// Gets the metadata for the NetHood folder. - /// - /// An object. - public static IKnownFolder NetHood - { - get - { - return GetKnownFolder(FolderIdentifiers.NetHood); - } - } - - /// - /// Gets the metadata for the PrintHood folder. - /// - /// An object. - public static IKnownFolder PrintHood - { - get - { - return GetKnownFolder(FolderIdentifiers.PrintHood); - } - } - - /// - /// Gets the metadata for the Templates folder. - /// - /// An object. - public static IKnownFolder Templates - { - get - { - return GetKnownFolder(FolderIdentifiers.Templates); - } - } - - /// - /// Gets the metadata for the CommonStartup folder. - /// - /// An object. - public static IKnownFolder CommonStartup - { - get - { - return GetKnownFolder(FolderIdentifiers.CommonStartup); - } - } - - /// - /// Gets the metadata for the CommonPrograms folder. - /// - /// An object. - public static IKnownFolder CommonPrograms - { - get - { - return GetKnownFolder(FolderIdentifiers.CommonPrograms); - } - } - - /// - /// Gets the metadata for the CommonStartMenu folder. - /// - /// An object. - public static IKnownFolder CommonStartMenu - { - get - { - return GetKnownFolder(FolderIdentifiers.CommonStartMenu); - } - } - - /// - /// Gets the metadata for the PublicDesktop folder. - /// - /// An object. - public static IKnownFolder PublicDesktop - { - get - { - return GetKnownFolder(FolderIdentifiers.PublicDesktop); - } - } - - /// - /// Gets the metadata for the ProgramData folder. - /// - /// An object. - public static IKnownFolder ProgramData - { - get - { - return GetKnownFolder(FolderIdentifiers.ProgramData); - } - } - - /// - /// Gets the metadata for the CommonTemplates folder. - /// - /// An object. - public static IKnownFolder CommonTemplates - { - get - { - return GetKnownFolder(FolderIdentifiers.CommonTemplates); - } - } - - /// - /// Gets the metadata for the PublicDocuments folder. - /// - /// An object. - public static IKnownFolder PublicDocuments - { - get - { - return GetKnownFolder(FolderIdentifiers.PublicDocuments); - } - } - - /// - /// Gets the metadata for the RoamingAppData folder. - /// - /// An object. - public static IKnownFolder RoamingAppData - { - get - { - return GetKnownFolder(FolderIdentifiers.RoamingAppData); - } - } - - /// - /// Gets the metadata for the per-user LocalAppData - /// folder. - /// - /// An object. - public static IKnownFolder LocalAppData - { - get - { - return GetKnownFolder(FolderIdentifiers.LocalAppData); - } - } - - /// - /// Gets the metadata for the LocalAppDataLow folder. - /// - /// An object. - public static IKnownFolder LocalAppDataLow - { - get - { - return GetKnownFolder(FolderIdentifiers.LocalAppDataLow); - } - } - - /// - /// Gets the metadata for the InternetCache folder. - /// - /// An object. - public static IKnownFolder InternetCache - { - get - { - return GetKnownFolder(FolderIdentifiers.InternetCache); - } - } - - /// - /// Gets the metadata for the Cookies folder. - /// - /// An object. - public static IKnownFolder Cookies - { - get - { - return GetKnownFolder(FolderIdentifiers.Cookies); - } - } - - /// - /// Gets the metadata for the History folder. - /// - /// An object. - public static IKnownFolder History - { - get - { - return GetKnownFolder(FolderIdentifiers.History); - } - } - - /// - /// Gets the metadata for the System folder. - /// - /// An object. - public static IKnownFolder System - { - get - { - return GetKnownFolder(FolderIdentifiers.System); - } - } - - /// - /// Gets the metadata for the SystemX86 - /// folder. - /// - /// An object. - public static IKnownFolder SystemX86 - { - get - { - return GetKnownFolder(FolderIdentifiers.SystemX86); - } - } - - /// - /// Gets the metadata for the Windows folder. - /// - /// An object. - public static IKnownFolder Windows - { - get - { - return GetKnownFolder(FolderIdentifiers.Windows); - } - } - - /// - /// Gets the metadata for the Profile folder. - /// - /// An object. - public static IKnownFolder Profile - { - get - { - return GetKnownFolder(FolderIdentifiers.Profile); - } - } - - /// - /// Gets the metadata for the per-user Pictures folder. - /// - /// An object. - public static IKnownFolder Pictures - { - get - { - return GetKnownFolder(FolderIdentifiers.Pictures); - } - } - - /// - /// Gets the metadata for the ProgramFilesX86 folder. - /// - /// An object. - public static IKnownFolder ProgramFilesX86 - { - get - { - return GetKnownFolder(FolderIdentifiers.ProgramFilesX86); - } - } - - /// - /// Gets the metadata for the ProgramFilesCommonX86 folder. - /// - /// An object. - public static IKnownFolder ProgramFilesCommonX86 - { - get - { - return GetKnownFolder(FolderIdentifiers.ProgramFilesCommonX86); - } - } - - /// - /// Gets the metadata for the ProgramsFilesX64 folder. - /// - /// An object. - public static IKnownFolder ProgramFilesX64 - { - get - { - return GetKnownFolder(FolderIdentifiers.ProgramFilesX64); - } - } - - /// - /// Gets the metadata for the ProgramFilesCommonX64 folder. - /// - /// An object. - public static IKnownFolder ProgramFilesCommonX64 - { - get - { - return GetKnownFolder(FolderIdentifiers.ProgramFilesCommonX64); - } - } - - /// - /// Gets the metadata for the ProgramFiles folder. - /// - /// An object. - public static IKnownFolder ProgramFiles - { - get - { - return GetKnownFolder(FolderIdentifiers.ProgramFiles); - } - } - - /// - /// Gets the metadata for the ProgramFilesCommon folder. - /// - /// An object. - public static IKnownFolder ProgramFilesCommon - { - get - { - return GetKnownFolder(FolderIdentifiers.ProgramFilesCommon); - } - } - - /// - /// Gets the metadata for the AdminTools folder. - /// - /// An object. - public static IKnownFolder AdminTools - { - get - { - return GetKnownFolder(FolderIdentifiers.AdminTools); - } - } - - /// - /// Gets the metadata for the CommonAdminTools folder. - /// - /// An object. - public static IKnownFolder CommonAdminTools - { - get - { - return GetKnownFolder(FolderIdentifiers.CommonAdminTools); - } - } - - /// - /// Gets the metadata for the per-user Music folder. - /// - /// An object. - public static IKnownFolder Music - { - get - { - return GetKnownFolder(FolderIdentifiers.Music); - } - } - - /// - /// Gets the metadata for the Videos folder. - /// - /// An object. - public static IKnownFolder Videos - { - get - { - return GetKnownFolder(FolderIdentifiers.Videos); - } - } - - /// - /// Gets the metadata for the PublicPictures folder. - /// - /// An object. - public static IKnownFolder PublicPictures - { - get - { - return GetKnownFolder(FolderIdentifiers.PublicPictures); - } - } - - /// - /// Gets the metadata for the PublicMusic folder. - /// - /// An object. - public static IKnownFolder PublicMusic - { - get - { - return GetKnownFolder(FolderIdentifiers.PublicMusic); - } - } - - /// - /// Gets the metadata for the PublicVideos folder. - /// - /// An object. - public static IKnownFolder PublicVideos - { - get - { - return GetKnownFolder(FolderIdentifiers.PublicVideos); - } - } - - /// - /// Gets the metadata for the ResourceDir folder. - /// - /// An object. - public static IKnownFolder ResourceDir - { - get - { - return GetKnownFolder(FolderIdentifiers.ResourceDir); - } - } - - /// - /// Gets the metadata for the LocalizedResourcesDir folder. - /// - /// An object. - public static IKnownFolder LocalizedResourcesDir - { - get - { - return GetKnownFolder(FolderIdentifiers.LocalizedResourcesDir); - } - } - - /// - /// Gets the metadata for the CommonOEMLinks folder. - /// - /// An object. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "OEM", Justification = "This is following the native API")] - public static IKnownFolder CommonOEMLinks - { - get - { - return GetKnownFolder(FolderIdentifiers.CommonOEMLinks); - } - } - - /// - /// Gets the metadata for the CDBurning folder. - /// - /// An object. - public static IKnownFolder CDBurning - { - get - { - return GetKnownFolder(FolderIdentifiers.CDBurning); - } - } - - /// - /// Gets the metadata for the UserProfiles folder. - /// - /// An object. - public static IKnownFolder UserProfiles - { - get - { - return GetKnownFolder(FolderIdentifiers.UserProfiles); - } - } - - /// - /// Gets the metadata for the Playlists folder. - /// - /// An object. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Playlists", Justification = "This is following the native API")] - public static IKnownFolder Playlists - { - get - { - return GetKnownFolder(FolderIdentifiers.Playlists); - } - } - - /// - /// Gets the metadata for the SamplePlaylists folder. - /// - /// An object. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Playlists", Justification = "This is following the native API")] - public static IKnownFolder SamplePlaylists - { - get - { - return GetKnownFolder(FolderIdentifiers.SamplePlaylists); - } - } - - /// - /// Gets the metadata for the SampleMusic folder. - /// - /// An object. - public static IKnownFolder SampleMusic - { - get - { - return GetKnownFolder(FolderIdentifiers.SampleMusic); - } - } - - /// - /// Gets the metadata for the SamplePictures folder. - /// - /// An object. - public static IKnownFolder SamplePictures - { - get - { - return GetKnownFolder(FolderIdentifiers.SamplePictures); - } - } - - /// - /// Gets the metadata for the SampleVideos folder. - /// - /// An object. - public static IKnownFolder SampleVideos - { - get - { - return GetKnownFolder(FolderIdentifiers.SampleVideos); - } - } - - /// - /// Gets the metadata for the PhotoAlbums folder. - /// - /// An object. - public static IKnownFolder PhotoAlbums - { - get - { - return GetKnownFolder(FolderIdentifiers.PhotoAlbums); - } - } - - /// - /// Gets the metadata for the Public folder. - /// - /// An object. - public static IKnownFolder Public - { - get - { - return GetKnownFolder(FolderIdentifiers.Public); - } - } - - /// - /// Gets the metadata for the ChangeRemovePrograms folder. - /// - /// An object. - public static IKnownFolder ChangeRemovePrograms - { - get - { - return GetKnownFolder(FolderIdentifiers.ChangeRemovePrograms); - } - } - - /// - /// Gets the metadata for the AppUpdates folder. - /// - /// An object. - public static IKnownFolder AppUpdates - { - get - { - return GetKnownFolder(FolderIdentifiers.AppUpdates); - } - } - - /// - /// Gets the metadata for the AddNewPrograms folder. - /// - /// An object. - public static IKnownFolder AddNewPrograms - { - get - { - return GetKnownFolder(FolderIdentifiers.AddNewPrograms); - } - } - - /// - /// Gets the metadata for the per-user Downloads folder. - /// - /// An object. - public static IKnownFolder Downloads - { - get - { - return GetKnownFolder(FolderIdentifiers.Downloads); - } - } - - /// - /// Gets the metadata for the PublicDownloads folder. - /// - /// An object. - public static IKnownFolder PublicDownloads - { - get - { - return GetKnownFolder(FolderIdentifiers.PublicDownloads); - } - } - - /// - /// Gets the metadata for the per-user SavedSearches folder. - /// - /// An object. - public static IKnownFolder SavedSearches - { - get - { - return GetKnownFolder(FolderIdentifiers.SavedSearches); - } - } - - /// - /// Gets the metadata for the per-user QuickLaunch folder. - /// - /// An object. - public static IKnownFolder QuickLaunch - { - get - { - return GetKnownFolder(FolderIdentifiers.QuickLaunch); - } - } - - /// - /// Gets the metadata for the Contacts folder. - /// - /// An object. - public static IKnownFolder Contacts - { - get - { - return GetKnownFolder(FolderIdentifiers.Contacts); - } - } - - /// - /// Gets the metadata for the SidebarParts folder. - /// - /// An object. - public static IKnownFolder SidebarParts - { - get - { - return GetKnownFolder(FolderIdentifiers.SidebarParts); - } - } - - /// - /// Gets the metadata for the SidebarDefaultParts folder. - /// - /// An object. - public static IKnownFolder SidebarDefaultParts - { - get - { - return GetKnownFolder(FolderIdentifiers.SidebarDefaultParts); - } - } - - /// - /// Gets the metadata for the TreeProperties folder. - /// - /// An object. - public static IKnownFolder TreeProperties - { - get - { - return GetKnownFolder(FolderIdentifiers.TreeProperties); - } - } - - /// - /// Gets the metadata for the PublicGameTasks folder. - /// - /// An object. - public static IKnownFolder PublicGameTasks - { - get - { - return GetKnownFolder(FolderIdentifiers.PublicGameTasks); - } - } - - /// - /// Gets the metadata for the GameTasks folder. - /// - /// An object. - public static IKnownFolder GameTasks - { - get - { - return GetKnownFolder(FolderIdentifiers.GameTasks); - } - } - - /// - /// Gets the metadata for the per-user SavedGames folder. - /// - /// An object. - public static IKnownFolder SavedGames - { - get - { - return GetKnownFolder(FolderIdentifiers.SavedGames); - } - } - - /// - /// Gets the metadata for the Games folder. - /// - /// An object. - public static IKnownFolder Games - { - get - { - return GetKnownFolder(FolderIdentifiers.Games); - } - } - - /// - /// Gets the metadata for the RecordedTV folder. - /// - /// An object. - /// This folder is not used. - public static IKnownFolder RecordedTV - { - get - { - return GetKnownFolder(FolderIdentifiers.RecordedTV); - } - } - - /// - /// Gets the metadata for the SearchMapi folder. - /// - /// An object. - public static IKnownFolder SearchMapi - { - get - { - return GetKnownFolder(FolderIdentifiers.SearchMapi); - } - } - - /// - /// Gets the metadata for the SearchCsc folder. - /// - /// An object. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Csc", Justification = "This is following the native API")] - public static IKnownFolder SearchCsc - { - get - { - return GetKnownFolder(FolderIdentifiers.SearchCsc); - } - } - - /// - /// Gets the metadata for the per-user Links folder. - /// - /// An object. - public static IKnownFolder Links - { - get - { - return GetKnownFolder(FolderIdentifiers.Links); - } - } - - /// - /// Gets the metadata for the UsersFiles folder. - /// - /// An object. - public static IKnownFolder UsersFiles - { - get - { - return GetKnownFolder(FolderIdentifiers.UsersFiles); - } - } - - /// - /// Gets the metadata for the SearchHome folder. - /// - /// An object. - public static IKnownFolder SearchHome - { - get - { - return GetKnownFolder(FolderIdentifiers.SearchHome); - } - } - - /// - /// Gets the metadata for the OriginalImages folder. - /// - /// An object. - public static IKnownFolder OriginalImages - { - get - { - return GetKnownFolder(FolderIdentifiers.OriginalImages); - } - } - - /// - /// Gets the metadata for the UserProgramFiles folder. - /// - public static IKnownFolder UserProgramFiles - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.UserProgramFiles); - } - } - - /// - /// Gets the metadata for the UserProgramFilesCommon folder. - /// - public static IKnownFolder UserProgramFilesCommon - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.UserProgramFilesCommon); - } - } - - /// - /// Gets the metadata for the Ringtones folder. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ringtones", Justification = "This is following the native API")] - public static IKnownFolder Ringtones - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.Ringtones); - } - } - - /// - /// Gets the metadata for the PublicRingtones folder. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ringtones", Justification = "This is following the native API")] - public static IKnownFolder PublicRingtones - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.PublicRingtones); - } - } - - /// - /// Gets the metadata for the UsersLibraries folder. - /// - public static IKnownFolder UsersLibraries - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.UsersLibraries); - } - } - - /// - /// Gets the metadata for the DocumentsLibrary folder. - /// - public static IKnownFolder DocumentsLibrary - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.DocumentsLibrary); - } - } - - /// - /// Gets the metadata for the MusicLibrary folder. - /// - public static IKnownFolder MusicLibrary - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.MusicLibrary); - } - } - - /// - /// Gets the metadata for the PicturesLibrary folder. - /// - public static IKnownFolder PicturesLibrary - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.PicturesLibrary); - } - } - - /// - /// Gets the metadata for the VideosLibrary folder. - /// - public static IKnownFolder VideosLibrary - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.VideosLibrary); - } - } - - /// - /// Gets the metadata for the RecordedTVLibrary folder. - /// - public static IKnownFolder RecordedTVLibrary - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.RecordedTVLibrary); - } - } - - /// - /// Gets the metadata for the OtherUsers folder. - /// - public static IKnownFolder OtherUsers - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.OtherUsers); - } - } - - /// - /// Gets the metadata for the DeviceMetadataStore folder. - /// - public static IKnownFolder DeviceMetadataStore - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.DeviceMetadataStore); - } - } - - /// - /// Gets the metadata for the Libraries folder. - /// - public static IKnownFolder Libraries - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.Libraries); - } - } - - /// - ///Gets the metadata for the UserPinned folder. - /// - public static IKnownFolder UserPinned - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.UserPinned); - } - } - - /// - /// Gets the metadata for the ImplicitAppShortcuts folder. - /// - public static IKnownFolder ImplicitAppShortcuts - { - get - { - CoreHelpers.ThrowIfNotWin7(); - return GetKnownFolder(FolderIdentifiers.ImplicitAppShortcuts); - } - } - - #endregion - - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/NonFileSystemKnownFolder.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/NonFileSystemKnownFolder.cs deleted file mode 100644 index 99de303..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/NonFileSystemKnownFolder.cs +++ /dev/null @@ -1,280 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a registered non file system Known Folder - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix", Justification = "This will complicate the class hierarchy and naming convention used in the Shell area")] - public class NonFileSystemKnownFolder : ShellNonFileSystemFolder, IKnownFolder, IDisposable - { - #region Private Fields - - private IKnownFolderNative knownFolderNative; - private KnownFolderSettings knownFolderSettings = null; - - #endregion - - #region Internal Constructors - - internal NonFileSystemKnownFolder(IShellItem2 shellItem) - : base(shellItem) - { - } - - internal NonFileSystemKnownFolder(IKnownFolderNative kf) - { - Debug.Assert(kf != null); - knownFolderNative = kf; - - // Set the native shell item - // and set it on the base class (ShellObject) - Guid guid = new Guid(ShellIIDGuid.IShellItem2); - knownFolderNative.GetShellItem(0, ref guid, out nativeShellItem); - } - - #endregion - - #region Private Members - - private KnownFolderSettings KnownFolderSettings - { - get - { - if (knownFolderNative == null) - { - // We need to get the PIDL either from the NativeShellItem, - // or from base class's property (if someone already set it on us). - // Need to use the PIDL to get the native IKnownFolder interface. - - // Get teh PIDL for the ShellItem - if (nativeShellItem != null && base.PIDL == IntPtr.Zero) - base.PIDL = ShellHelper.PidlFromShellItem(nativeShellItem); - - // If we have a valid PIDL, get the native IKnownFolder - if (base.PIDL != IntPtr.Zero) - knownFolderNative = KnownFolderHelper.FromPIDL(base.PIDL); - - Debug.Assert(knownFolderNative != null); - } - - // If this is the first time this property is being called, - // get the native Folder Defination (KnownFolder properties) - if (knownFolderSettings == null) - knownFolderSettings = new KnownFolderSettings(knownFolderNative); - - return knownFolderSettings; - } - } - - #endregion - - #region IKnownFolder Members - - /// - /// Gets the path for this known folder. - /// - /// A object. - public string Path - { - get { return KnownFolderSettings.Path; } - } - - /// - /// Gets the category designation for this known folder. - /// - /// A value. - public FolderCategory Category - { - get { return KnownFolderSettings.Category; } - } - - /// - /// Gets this known folder's canonical name. - /// - /// A object. - public string CanonicalName - { - get { return KnownFolderSettings.CanonicalName; } - } - - /// - /// Gets this known folder's description. - /// - /// A object. - public string Description - { - get { return KnownFolderSettings.Description; } - } - - /// - /// Gets the unique identifier for this known folder's parent folder. - /// - /// A value. - public Guid ParentId - { - get { return KnownFolderSettings.ParentId; } - } - - /// - /// Gets this known folder's relative path. - /// - /// A object. - public string RelativePath - { - get { return KnownFolderSettings.RelativePath; } - } - - /// - /// Gets this known folder's parsing name. - /// - /// A object. - public override string ParsingName - { - get { return base.ParsingName; } - } - - /// - /// Gets this known folder's tool tip text. - /// - /// A object. - public string Tooltip - { - get { return KnownFolderSettings.Tooltip; } - } - /// - /// Gets the resource identifier for this - /// known folder's tool tip text. - /// - /// A object. - public string TooltipResourceId - { - get { return KnownFolderSettings.TooltipResourceId; } - } - - /// - /// Gets this known folder's localized name. - /// - /// A object. - public string LocalizedName - { - get { return KnownFolderSettings.LocalizedName; } - } - /// - /// Gets the resource identifier for this - /// known folder's localized name. - /// - /// A object. - public string LocalizedNameResourceId - { - get { return KnownFolderSettings.LocalizedNameResourceId; } - } - - /// - /// Gets this known folder's security attributes. - /// - /// A object. - public string Security - { - get { return KnownFolderSettings.Security; } - } - - /// - /// Gets this known folder's file attributes, - /// such as "read-only". - /// - /// A value. - public System.IO.FileAttributes FileAttributes - { - get { return KnownFolderSettings.FileAttributes; } - } - - /// - /// Gets an value that describes this known folder's behaviors. - /// - /// A value. - public DefinitionOptions DefinitionOptions - { - get { return KnownFolderSettings.DefinitionOptions; } - } - - /// - /// Gets the unique identifier for this known folder's type. - /// - /// A value. - public Guid FolderTypeId - { - get { return KnownFolderSettings.FolderTypeId; } - } - - /// - /// Gets a string representation of this known folder's type. - /// - /// A object. - public string FolderType - { - get { return KnownFolderSettings.FolderType; } - } - /// - /// Gets the unique identifier for this known folder. - /// - /// A value. - public Guid FolderId - { - get { return KnownFolderSettings.FolderId; } - } - - /// - /// Gets a value that indicates whether this known folder's path exists on the computer. - /// - /// A bool value. - /// If this property value is false, - /// the folder might be a virtual folder ( property will - /// be for virtual folders) - public bool PathExists - { - get { return KnownFolderSettings.PathExists; } - } - - /// - /// Gets a value that states whether this known folder - /// can have its path set to a new value, - /// including any restrictions on the redirection. - /// - /// A value. - public RedirectionCapabilities Redirection - { - get { return KnownFolderSettings.Redirection; } - } - - #endregion - - #region IDisposable Members - - /// - /// Release resources - /// - /// Indicates that this mothod is being called from Dispose() rather than the finalizer. - protected override void Dispose(bool disposing) - { - if (disposing) - { - knownFolderSettings = null; - } - - if (knownFolderNative != null) - { - Marshal.ReleaseComObject(knownFolderNative); - knownFolderNative = null; - } - - base.Dispose(disposing); - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/RedirectionCapabilities.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/RedirectionCapabilities.cs deleted file mode 100644 index 6d6e0e0..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/RedirectionCapabilities.cs +++ /dev/null @@ -1,47 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Specifies the redirection capabilities for known folders. - /// - public enum RedirectionCapabilities - { - /// - /// Redirection capability is unknown. - /// - None = 0x00, - /// - /// The known folder can be redirected. - /// - AllowAll = 0xff, - /// - /// The known folder can be redirected. - /// Currently, redirection exists only for - /// common and user folders; fixed and virtual folders - /// cannot be redirected. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Redirectable", Justification = "This is following the native API" -)] - Redirectable = 0x1, - /// - /// Redirection is not allowed. - /// - DenyAll = 0xfff00, - /// - /// The folder cannot be redirected because it is - /// already redirected by group policy. - /// - DenyPolicyRedirected = 0x100, - /// - /// The folder cannot be redirected because the policy - /// prohibits redirecting this folder. - /// - DenyPolicy = 0x200, - /// - /// The folder cannot be redirected because the calling - /// application does not have sufficient permissions. - /// - DenyPermissions = 0x400 - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/KnownFolders/RetrievalOptions.cs b/src/External/WindowsAPICodePack/Shell/KnownFolders/RetrievalOptions.cs deleted file mode 100644 index 4842a0d..0000000 --- a/src/External/WindowsAPICodePack/Shell/KnownFolders/RetrievalOptions.cs +++ /dev/null @@ -1,21 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Contains special retrieval options for known folders. - /// - internal enum RetrievalOptions - { - None = 0, - Create = 0x00008000, - DontVerify = 0x00004000, - DontUnexpand = 0x00002000, - NoAlias = 0x00001000, - Init = 0x00000800, - DefaultPath = 0x00000400, - NotParentRelative = 0x00000200 - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Migrated rules for Shell.ruleset b/src/External/WindowsAPICodePack/Shell/Migrated rules for Shell.ruleset deleted file mode 100644 index c66ae37..0000000 --- a/src/External/WindowsAPICodePack/Shell/Migrated rules for Shell.ruleset +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Properties/AssemblyInfo.cs b/src/External/WindowsAPICodePack/Shell/Properties/AssemblyInfo.cs deleted file mode 100644 index 3bee8b9..0000000 --- a/src/External/WindowsAPICodePack/Shell/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Microsoft.WindowsAPICodePack.Shell")] -[assembly: AssemblyDescription("WindowsAPICodePack for Shell")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Microsoft")] -[assembly: AssemblyProduct("Microsoft Windows API Code Pack for .NET Framework")] -[assembly: AssemblyCopyright("Copyright © Microsoft 2009")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("48fe0672-7ff4-48fd-a3fd-83c8fa8c3506")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/IShellProperty.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/IShellProperty.cs deleted file mode 100644 index 8b012d5..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/IShellProperty.cs +++ /dev/null @@ -1,79 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Defines the properties used by a Shell Property. - /// - public interface IShellProperty - { - /// - /// Gets the property key that identifies this property. - /// - PropertyKey PropertyKey - { - get; - } - - /// - /// Gets a formatted, Unicode string representation of a property value. - /// - /// One or more PropertyDescriptionFormat flags - /// chosen to produce the desired display format. - /// The formatted value as a string. - string FormatForDisplay(PropertyDescriptionFormat format); - - /// - /// Get the property description object. - /// - ShellPropertyDescription Description - { - get; - } - - /// - /// Gets the case-sensitive name of the property as it is known to the system, - /// regardless of its localized name. - /// - string CanonicalName - { - get; - } - - /// - /// Gets the value for this property using the generic Object type. - /// - /// - /// To obtain a specific type for this value, use the more strongly-typed - /// Property<T> class. - /// You can only set a value for this type using the Property<T> - /// class. - /// - object ValueAsObject - { - get; - } - - /// - /// Gets the System.Type value for this property. - /// - Type ValueType - { - get; - } - - /// - /// Gets the image reference path and icon index associated with a property value. - /// This API is only available in Windows 7. - /// - IconReference IconReference - { - get; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperties.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperties.cs deleted file mode 100644 index 18e2165..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperties.cs +++ /dev/null @@ -1,272 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Defines a partial class that implements helper methods for retrieving Shell properties - /// using a canonical name, property key, or a strongly-typed property. Also provides - /// access to all the strongly-typed system properties and default properties collections. - /// - public partial class ShellProperties - { - private ShellObject ParentShellObject { get; set; } - private ShellPropertyCollection defaultPropertyCollection = null; - - internal ShellProperties(ShellObject parent) - { - ParentShellObject = parent; - } - - /// - /// Returns a property available in the default property collection using - /// the given property key. - /// - /// The property key. - /// An IShellProperty. - public IShellProperty GetProperty(PropertyKey key) - { - return CreateTypedProperty(key); - } - - /// - /// Returns a property available in the default property collection using - /// the given canonical name. - /// - /// The canonical name. - /// An IShellProperty. - public IShellProperty GetProperty(string canonicalName) - { - return CreateTypedProperty(canonicalName); - } - - /// - /// Returns a strongly typed property available in the default property collection using - /// the given property key. - /// - /// The type of property to retrieve. - /// The property key. - /// A strongly-typed ShellProperty for the given property key. - public ShellProperty GetProperty(PropertyKey key) - { - return CreateTypedProperty(key) as ShellProperty; - } - - /// - /// Returns a strongly typed property available in the default property collection using - /// the given canonical name. - /// - /// The type of property to retrieve. - /// The canonical name. - /// A strongly-typed ShellProperty for the given canonical name. - public ShellProperty GetProperty(string canonicalName) - { - return CreateTypedProperty(canonicalName) as ShellProperty; - } - - private PropertySystem propertySystem = null; - /// - /// Gets all the properties for the system through an accessor. - /// - public PropertySystem System - { - get - { - if (propertySystem == null) - propertySystem = new PropertySystem(ParentShellObject); - - return propertySystem; - } - } - - /// - /// Gets the collection of all the default properties for this item. - /// - public ShellPropertyCollection DefaultPropertyCollection - { - get - { - if (defaultPropertyCollection == null) - defaultPropertyCollection = new ShellPropertyCollection(ParentShellObject); - - return defaultPropertyCollection; - } - } - - /// - /// Returns the shell property writer used when writing multiple properties. - /// - /// A ShellPropertyWriter. - /// Use the Using pattern with the returned ShellPropertyWriter or - /// manually call the Close method on the writer to commit the changes - /// and dispose the writer - public ShellPropertyWriter GetPropertyWriter() - { - return new ShellPropertyWriter(ParentShellObject); - - } - - internal IShellProperty CreateTypedProperty(PropertyKey propKey) - { - ShellPropertyDescription desc = ShellPropertyDescriptionsCache.Cache.GetPropertyDescription(propKey); - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - - internal IShellProperty CreateTypedProperty(PropertyKey propKey) - { - ShellPropertyDescription desc = ShellPropertyDescriptionsCache.Cache.GetPropertyDescription(propKey); - - switch (desc.VarEnumType) - { - case (VarEnum.VT_EMPTY): - case (VarEnum.VT_NULL): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_UI1): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_I2): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_UI2): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_I4): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_UI4): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_I8): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_UI8): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_R8): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_BOOL): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_FILETIME): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_CLSID): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_CF): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_BLOB): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_LPWSTR): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_UNKNOWN): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_STREAM): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI1): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_I2): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI2): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_I4): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI4): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_I8): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI8): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_R8): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_BOOL): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_FILETIME): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_CLSID): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_CF): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_LPWSTR): - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - default: - { - return (new ShellProperty(propKey, desc, ParentShellObject)); - } - } - } - - internal IShellProperty CreateTypedProperty(string canonicalName) - { - // Otherwise, call the native PropertyStore method - PropertyKey propKey; - - int result = PropertySystemNativeMethods.PSGetPropertyKeyFromName(canonicalName, out propKey); - - if (!CoreErrorHelper.Succeeded(result)) - { - throw new ArgumentException( - "This CanonicalName is not valid", - Marshal.GetExceptionForHR(result)); - } - else - { - return CreateTypedProperty(propKey); - } - } - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs deleted file mode 100644 index a008b02..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellProperty.cs +++ /dev/null @@ -1,473 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Reflection; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Defines a strongly-typed property object. - /// All writable property objects must be of this type - /// to be able to call the value setter. - /// - /// The type of this property's value. - /// Because a property value can be empty, only nullable types - /// are allowed. - public class ShellProperty : IShellProperty - { - #region Private Fields - - private PropertyKey propertyKey; - string imageReferencePath = null; - int? imageReferenceIconIndex; - private ShellPropertyDescription description = null; - - // The value was set but truncated in a string value or rounded if a numeric value. - private const int InPlaceStringTruncated = 0x00401A0; - - #endregion - - #region Private Methods - - private ShellObject ParentShellObject { get; set; } - - private IPropertyStore NativePropertyStore { get; set; } - - private void GetImageReference() - { - PropVariant propVar; - - IPropertyStore store = ShellPropertyCollection.CreateDefaultPropertyStore(ParentShellObject); - - store.GetValue(ref propertyKey, out propVar); - - Marshal.ReleaseComObject(store); - store = null; - - string refPath; - ((IPropertyDescription2)Description.NativePropertyDescription).GetImageReferenceForValue( - ref propVar, out refPath); - - if (refPath == null) - { - return; - } - - int index = ShellNativeMethods.PathParseIconLocation(ref refPath); - if (refPath != null) - { - imageReferencePath = refPath; - imageReferenceIconIndex = index; - } - } - - private void StorePropVariantValue(PropVariant propVar) - { - Guid guid = new Guid(ShellIIDGuid.IPropertyStore); - IPropertyStore writablePropStore = null; - try - { - int hr = ParentShellObject.NativeShellItem2.GetPropertyStore( - ShellNativeMethods.GETPROPERTYSTOREFLAGS.GPS_READWRITE, - ref guid, - out writablePropStore); - - if (!CoreErrorHelper.Succeeded(hr)) - { - throw new ExternalException("Unable to get writable property store for this property.", - Marshal.GetExceptionForHR(hr)); - } - - int result = writablePropStore.SetValue(ref propertyKey, ref propVar); - - if (!AllowSetTruncatedValue && (result == InPlaceStringTruncated)) - { - throw new ArgumentOutOfRangeException("propVar", "A value had to be truncated in a string or rounded if a numeric value. Set AllowTruncatedValue to true to prevent this exception."); - } - - if (!CoreErrorHelper.Succeeded(result)) - { - throw new ExternalException("Unable to set property.", Marshal.GetExceptionForHR(result)); - } - - writablePropStore.Commit(); - - } - catch (InvalidComObjectException e) - { - throw new ExternalException("Unable to get writable property store for this property.", e); - } - catch (InvalidCastException) - { - throw new ExternalException("Unable to get writable property store for this property."); - } - finally - { - if (writablePropStore != null) - { - Marshal.ReleaseComObject(writablePropStore); - writablePropStore = null; - } - } - } - - #endregion - - #region Internal Constructor - - /// - /// Constructs a new Property object - /// - /// - /// - /// - internal ShellProperty( - PropertyKey propertyKey, - ShellPropertyDescription description, - ShellObject parent - ) - { - this.propertyKey = propertyKey; - this.description = description; - ParentShellObject = parent; - AllowSetTruncatedValue = false; - } - - /// - /// Constructs a new Property object - /// - /// - /// - /// - internal ShellProperty( - PropertyKey propertyKey, - ShellPropertyDescription description, - IPropertyStore propertyStore - ) - { - this.propertyKey = propertyKey; - this.description = description; - NativePropertyStore = propertyStore; - AllowSetTruncatedValue = false; - } - - #endregion - - #region Public Properties - - /// - /// Gets or sets the strongly-typed value of this property. - /// The value of the property is cleared if the value is set to null. - /// - /// - /// If the property value cannot be retrieved or updated in the Property System - /// If the type of this property is not supported; e.g. writing a binary object. - /// Thrown if is false, and either - /// a string value was truncated or a numeric value was rounded. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)", Justification = "We are not currently handling globalization or localization")] - public T Value - { - get - { - // Make sure we load the correct type - Debug.Assert(ValueType == ShellPropertyDescription.VarEnumToSystemType(Description.VarEnumType)); - - PropVariant propVar = new PropVariant(); - - if (ParentShellObject.NativePropertyStore != null) - { - // If there is a valid property store for this shell object, then use it. - ParentShellObject.NativePropertyStore.GetValue(ref propertyKey, out propVar); - } - else if (ParentShellObject != null) - { - // Use IShellItem2.GetProperty instead of creating a new property store - // The file might be locked. This is probably quicker, and sufficient for what we need - ParentShellObject.NativeShellItem2.GetProperty(ref propertyKey, out propVar); - } - else if (NativePropertyStore != null) - { - NativePropertyStore.GetValue(ref propertyKey, out propVar); - } - - //Get the value - T value; - try - { - value = (T)propVar.Value; - } - finally - { - propVar.Clear(); - } - - return value; - } - - - set - { - // Make sure we use the correct type - Debug.Assert(ValueType == ShellPropertyDescription.VarEnumToSystemType(Description.VarEnumType)); - - if (typeof(T) != ValueType) - { - throw new NotSupportedException( - String.Format("This property only accepts a value of type \"{0}\".", ValueType.Name)); - } - - if (value is Nullable) - { - Type t = typeof(T); - PropertyInfo pi = t.GetProperty("HasValue"); - if (pi != null) - { - bool hasValue = (bool)pi.GetValue(value, null); - if (!hasValue) - { - ClearValue(); - return; - } - } - } - else if (value == null) - { - ClearValue(); - return; - } - - if (ParentShellObject != null) - { - using (ShellPropertyWriter propertyWriter = ParentShellObject.Properties.GetPropertyWriter()) - { - propertyWriter.WriteProperty(this, value, AllowSetTruncatedValue); - } - } - else if (NativePropertyStore != null) - { - throw new InvalidOperationException("The value on this property cannot be set. To set the property value, use the ShellObject that is associated with this property."); - } - } - } - - - #endregion - - #region IProperty Members - - /// - /// Gets the property key identifying this property. - /// - public PropertyKey PropertyKey - { - get - { - return propertyKey; - } - } - /// - /// Returns a formatted, Unicode string representation of a property value. - /// - /// One or more of the PropertyDescriptionFormat flags - /// that indicate the desired format. - /// The formatted value as a string, or null if this property - /// cannot be formatted for display. - /// True if the method successfully locates the formatted string; otherwise - /// False. - public bool TryFormatForDisplay(PropertyDescriptionFormat format, out string formattedString) - { - PropVariant propVar; - - if (Description == null || Description.NativePropertyDescription == null) - { - // We cannot do anything without a property description - formattedString = null; - return false; - } - - IPropertyStore store = ShellPropertyCollection.CreateDefaultPropertyStore(ParentShellObject); - - store.GetValue(ref propertyKey, out propVar); - - // Release the Propertystore - Marshal.ReleaseComObject(store); - store = null; - - HRESULT hr = Description.NativePropertyDescription.FormatForDisplay(ref propVar, ref format, out formattedString); - - // Sometimes, the value cannot be displayed properly, such as for blobs - // or if we get argument exception - if (!CoreErrorHelper.Succeeded((int)hr)) - { - formattedString = null; - return false; - } - else - return true; - } - - /// - /// Returns a formatted, Unicode string representation of a property value. - /// - /// One or more of the PropertyDescriptionFormat flags - /// that indicate the desired format. - /// The formatted value as a string, or null if this property - /// cannot be formatted for display. - public string FormatForDisplay(PropertyDescriptionFormat format) - { - string formattedString; - PropVariant propVar; - - if (Description == null || Description.NativePropertyDescription == null) - { - // We cannot do anything without a property description - return null; - } - - IPropertyStore store = ShellPropertyCollection.CreateDefaultPropertyStore(ParentShellObject); - - store.GetValue(ref propertyKey, out propVar); - - // Release the Propertystore - Marshal.ReleaseComObject(store); - store = null; - - HRESULT hr = Description.NativePropertyDescription.FormatForDisplay(ref propVar, ref format, out formattedString); - - // Sometimes, the value cannot be displayed properly, such as for blobs - // or if we get argument exception - if (!CoreErrorHelper.Succeeded((int)hr)) - throw Marshal.GetExceptionForHR((int)hr); - else - return formattedString; - } - - /// - /// Get the property description object. - /// - public ShellPropertyDescription Description - { - get - { - return description; - } - } - - /// - /// Gets the case-sensitive name of a property as it is known to the system, - /// regardless of its localized name. - /// - public string CanonicalName - { - get - { - return Description.CanonicalName; - } - } - - /// - /// Clears the value of the property. - /// - public void ClearValue() - { - PropVariant propVar = new PropVariant(); - propVar.SetEmptyValue(); - - StorePropVariantValue(propVar); - } - - /// - /// Gets the value for this property using the generic Object type. - /// To obtain a specific type for this value, use the more type strong - /// Property<T> class. - /// Also, you can only set a value for this type using Property<T> - /// - public object ValueAsObject - { - get - { - PropVariant propVar = new PropVariant(); - propVar.Clear(); - - if (ParentShellObject != null) - { - - IPropertyStore store = ShellPropertyCollection.CreateDefaultPropertyStore(ParentShellObject); - - store.GetValue(ref propertyKey, out propVar); - - Marshal.ReleaseComObject(store); - store = null; - } - else if (NativePropertyStore != null) - NativePropertyStore.GetValue(ref propertyKey, out propVar); - - object value = null; - - try - { - value = propVar.Value; - } - finally - { - propVar.Clear(); - } - - return value; - } - } - - /// - /// Gets the associated runtime type. - /// - public Type ValueType - { - get - { - // The type for this object need to match that of the description - Debug.Assert(Description.ValueType == typeof(T)); - - return Description.ValueType; - } - } - - /// - /// Gets the image reference path and icon index associated with a property value (Windows 7 only). - /// - public IconReference IconReference - { - get - { - if (!CoreHelpers.RunningOnWin7) - { - throw new PlatformNotSupportedException("This Property is available on Windows 7 only."); - } - - GetImageReference(); - int index = (imageReferenceIconIndex.HasValue ? imageReferenceIconIndex.Value : -1); - - return new IconReference(imageReferencePath, index); - } - } - - /// - /// Gets or sets a value that determines if a value can be truncated. The default for this property is false. - /// - /// - /// An will be thrown if - /// this property is not set to true, and a property value was set - /// but later truncated. - /// - /// - public bool AllowSetTruncatedValue - { - get; - set; - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyCollection.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyCollection.cs deleted file mode 100644 index 5af7816..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyCollection.cs +++ /dev/null @@ -1,377 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Creates a readonly collection of IProperty objects. - /// - public class ShellPropertyCollection : ReadOnlyCollection, IDisposable - { - #region Internal Constructor - - /// - /// Creates a new Property collection given an IPropertyStore object - /// - /// IPropertyStore - internal ShellPropertyCollection(IPropertyStore nativePropertyStore) - : base(new List()) - { - NativePropertyStore = nativePropertyStore; - AddProperties(nativePropertyStore); - } - - /// - /// Creates a new Property collection given an IShellItem2 native interface - /// - /// Parent ShellObject - internal ShellPropertyCollection(ShellObject parent) - : base(new List()) - { - ParentShellObject = parent; - IPropertyStore nativePropertyStore = null; - try - { - nativePropertyStore = CreateDefaultPropertyStore(ParentShellObject); - AddProperties(nativePropertyStore); - } - finally - { - if (nativePropertyStore != null) - { - Marshal.ReleaseComObject(nativePropertyStore); - nativePropertyStore = null; - } - } - } - - #endregion - - #region Public Constructor - - /// - /// Creates a new ShellPropertyCollection object with the specified file or folder path. - /// - /// The path to the file or folder. - public ShellPropertyCollection(string path) : - this(ShellObjectFactory.Create(path)) - { - } - - #endregion - - #region Private Methods - - private ShellObject ParentShellObject { get; set; } - - private IPropertyStore NativePropertyStore { get; set; } - - private void AddProperties(IPropertyStore nativePropertyStore) - { - uint propertyCount; - PropertyKey propKey; - - // Populate the property collection - nativePropertyStore.GetCount(out propertyCount); - for (uint i = 0; i < propertyCount; i++) - { - nativePropertyStore.GetAt(i, out propKey); - - if (ParentShellObject != null) - Items.Add(ParentShellObject.Properties.CreateTypedProperty(propKey)); - else - Items.Add(CreateTypedProperty(propKey, NativePropertyStore)); - } - } - - internal static IPropertyStore CreateDefaultPropertyStore(ShellObject shellObj) - { - IPropertyStore nativePropertyStore = null; - - Guid guid = new Guid(ShellIIDGuid.IPropertyStore); - int hr = shellObj.NativeShellItem2.GetPropertyStore( - ShellNativeMethods.GETPROPERTYSTOREFLAGS.GPS_BESTEFFORT, - ref guid, - out nativePropertyStore); - - // throw on failure - if (nativePropertyStore == null || !CoreErrorHelper.Succeeded(hr)) - { - Marshal.ThrowExceptionForHR(hr); - } - - return nativePropertyStore; - } - - - - - #endregion - - #region Collection Public Methods - - /// - /// Checks if a property with the given canonical name is available. - /// - /// The canonical name of the property. - /// True if available, false otherwise. - public bool Contains(string canonicalName) - { - if (string.IsNullOrEmpty(canonicalName)) - { - throw new ArgumentException("Argument CanonicalName cannot be null or empty.", "canonicalName"); - } - - return Items. - Where(p => p.CanonicalName == canonicalName). - Count() > 0; - - } - - /// - /// Checks if a property with the given property key is available. - /// - /// The property key. - /// True if available, false otherwise. - public bool Contains(PropertyKey key) - { - return Items. - Where(p => p.PropertyKey == key). - Count() > 0; - } - - /// - /// Gets the property associated with the supplied canonical name string. - /// The canonical name property is case-sensitive. - /// - /// - /// The canonical name. - /// The property associated with the canonical name, if found. - /// Throws IndexOutOfRangeException - /// if no matching property is found. - public IShellProperty this[string canonicalName] - { - get - { - if (string.IsNullOrEmpty(canonicalName)) - { - throw new ArgumentException("Argument CanonicalName cannot be null or empty.", "canonicalName"); - } - - IShellProperty[] props = Items - .Where(p => p.CanonicalName == canonicalName).ToArray(); - - if (props != null && props.Length > 0) - return props[0]; - - throw new IndexOutOfRangeException("This CanonicalName is not a valid index."); - } - } - - /// - /// Gets a property associated with the supplied property key. - /// - /// - /// The property key. - /// The property associated with the property key, if found. - /// Throws IndexOutOfRangeException - /// if no matching property is found. - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1043:UseIntegralOrStringArgumentForIndexers", Justification = "We need the ability to get item from the collection using a property key")] - public IShellProperty this[PropertyKey key] - { - get - { - IShellProperty[] props = - Items - .Where(p => p.PropertyKey == key) - .ToArray(); - - if (props != null && props.Length > 0) - return props[0]; - - throw new IndexOutOfRangeException("This PropertyKey is not a valid index."); - } - } - - #endregion - - // TODO - ShellProperties.cs also has a similar class that is used for creating - // a ShellObject specific IShellProperty. These 2 methods should be combined or moved to a - // common location. - internal static IShellProperty CreateTypedProperty(PropertyKey propKey, IPropertyStore NativePropertyStore) - { - ShellPropertyDescription desc = ShellPropertyDescriptionsCache.Cache.GetPropertyDescription(propKey); - - switch (desc.VarEnumType) - { - case (VarEnum.VT_EMPTY): - case (VarEnum.VT_NULL): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_UI1): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_I2): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_UI2): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_I4): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_UI4): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_I8): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_UI8): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_R8): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_BOOL): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_FILETIME): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_CLSID): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_CF): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_BLOB): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_LPWSTR): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_UNKNOWN): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_STREAM): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI1): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_I2): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI2): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_I4): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI4): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_I8): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_UI8): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_R8): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_BOOL): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_FILETIME): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_CLSID): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_CF): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - case (VarEnum.VT_VECTOR | VarEnum.VT_LPWSTR): - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - default: - { - return (new ShellProperty(propKey, desc, NativePropertyStore)); - } - } - } - - #region IDisposable Members - - /// - /// Release the native and managed objects - /// - /// Indicates that this is being called from Dispose(), rather than the finalizer. - protected virtual void Dispose(bool disposing) - { - if (NativePropertyStore != null) - { - Marshal.ReleaseComObject(NativePropertyStore); - NativePropertyStore = null; - } - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Implement the finalizer. - /// - ~ShellPropertyCollection() - { - Dispose(false); - } - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescription.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescription.cs deleted file mode 100644 index 197a375..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescription.cs +++ /dev/null @@ -1,680 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.InteropServices; -using System.Runtime.InteropServices.ComTypes; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Defines the shell property description information for a property. - /// - public class ShellPropertyDescription : IDisposable - { - #region Private Fields - - private IPropertyDescription nativePropertyDescription = null; - private string canonicalName = null; - private PropertyKey propertyKey; - private string displayName = null; - private string editInvitation = null; - private VarEnum? varEnumType = null; - private PropertyDisplayType? displayType; - private PropertyAggregationType? aggregationTypes; - private uint? defaultColumWidth; - private PropertyTypeFlags? propertyTypeFlags; - private PropertyViewFlags? propertyViewFlags; - private Type valueType = null; - private ReadOnlyCollection propertyEnumTypes = null; - private PropertyColumnState? columnState; - private PropertyConditionType? conditionType; - private PropertyConditionOperation? conditionOperation; - private PropertyGroupingRange? groupingRange; - private PropertySortDescription? sortDescription; - - #endregion - - #region Public Properties - - /// - /// Gets the case-sensitive name of a property as it is known to the system, - /// regardless of its localized name. - /// - public string CanonicalName - { - get - { - if (canonicalName == null) - { - PropertySystemNativeMethods.PSGetNameFromPropertyKey(ref propertyKey, out canonicalName); - } - - return canonicalName; - } - } - - /// - /// Gets the property key identifying the underlying property. - /// - public PropertyKey PropertyKey - { - get - { - return propertyKey; - } - } - - /// - /// Gets the display name of the property as it is shown in any user interface (UI). - /// - public string DisplayName - { - get - { - if (NativePropertyDescription != null && displayName == null) - { - IntPtr dispNameptr = IntPtr.Zero; - - HRESULT hr = NativePropertyDescription.GetDisplayName(out dispNameptr); - - if (CoreErrorHelper.Succeeded((int)hr) && dispNameptr != IntPtr.Zero) - { - displayName = Marshal.PtrToStringUni(dispNameptr); - - // Free the string - Marshal.FreeCoTaskMem(dispNameptr); - } - } - - return displayName; - } - } - - /// - /// Gets the text used in edit controls hosted in various dialog boxes. - /// - public string EditInvitation - { - get - { - if (NativePropertyDescription != null && editInvitation == null) - { - // EditInvitation can be empty, so ignore the HR value, but don't throw an exception - IntPtr ptr = IntPtr.Zero; - - HRESULT hr = NativePropertyDescription.GetEditInvitation(out ptr); - - if (CoreErrorHelper.Succeeded((int)hr) && ptr != IntPtr.Zero) - { - editInvitation = Marshal.PtrToStringUni(ptr); - // Free the string - Marshal.FreeCoTaskMem(ptr); - } - } - - return editInvitation; - } - } - - /// - /// Gets the VarEnum OLE type for this property. - /// - public VarEnum VarEnumType - { - get - { - if (NativePropertyDescription != null && varEnumType == null) - { - VarEnum tempType; - - HRESULT hr = NativePropertyDescription.GetPropertyType(out tempType); - - if(CoreErrorHelper.Succeeded((int)hr)) - varEnumType = tempType; - } - - return varEnumType.HasValue ? varEnumType.Value : default(VarEnum); - } - } - - /// - /// Gets the .NET system type for a value of this property, or - /// null if the value is empty. - /// - public Type ValueType - { - get - { - if (valueType == null) - valueType = VarEnumToSystemType(VarEnumType); - - return valueType; - } - } - - /// - /// Gets the current data type used to display the property. - /// - public PropertyDisplayType DisplayType - { - get - { - if (NativePropertyDescription != null && displayType == null) - { - PropertyDisplayType tempDisplayType; - - HRESULT hr = NativePropertyDescription.GetDisplayType(out tempDisplayType); - - if (CoreErrorHelper.Succeeded((int)hr)) - displayType = tempDisplayType; - } - - return displayType.HasValue ? displayType.Value : default(PropertyDisplayType); - } - } - - /// - /// Gets the default user interface (UI) column width for this property. - /// - public uint DefaultColumWidth - { - get - { - if (NativePropertyDescription != null && !defaultColumWidth.HasValue) - { - uint tempDefaultColumWidth; - - HRESULT hr = NativePropertyDescription.GetDefaultColumnWidth(out tempDefaultColumWidth); - - if(CoreErrorHelper.Succeeded((int)hr)) - defaultColumWidth = tempDefaultColumWidth; - } - - return defaultColumWidth.HasValue ? defaultColumWidth.Value : default(uint); - } - } - - /// - /// Gets a value that describes how the property values are displayed when - /// multiple items are selected in the user interface (UI). - /// - public PropertyAggregationType AggregationTypes - { - get - { - if (NativePropertyDescription != null && aggregationTypes == null) - { - PropertyAggregationType tempAggregationTypes; - - HRESULT hr = NativePropertyDescription.GetAggregationType(out tempAggregationTypes); - - if (CoreErrorHelper.Succeeded((int)hr)) - aggregationTypes = tempAggregationTypes; - } - - return aggregationTypes.HasValue ? aggregationTypes.Value : default(PropertyAggregationType); - } - } - - /// - /// Gets a list of the possible values for this property. - /// - public ReadOnlyCollection PropertyEnumTypes - { - get - { - if (NativePropertyDescription != null && propertyEnumTypes == null) - { - List propEnumTypeList = new List(); - - Guid guid = new Guid(ShellIIDGuid.IPropertyEnumTypeList); - IPropertyEnumTypeList nativeList; - HRESULT hr = NativePropertyDescription.GetEnumTypeList(ref guid, out nativeList); - - if (nativeList != null && CoreErrorHelper.Succeeded((int)hr)) - { - - uint count; - nativeList.GetCount(out count); - guid = new Guid(ShellIIDGuid.IPropertyEnumType); - - for (uint i = 0; i < count; i++) - { - IPropertyEnumType nativeEnumType; - nativeList.GetAt(i, ref guid, out nativeEnumType); - propEnumTypeList.Add(new ShellPropertyEnumType(nativeEnumType)); - } - } - - propertyEnumTypes = new ReadOnlyCollection(propEnumTypeList); - } - - return propertyEnumTypes; - - } - } - - /// - /// Gets the column state flag, which describes how the property - /// should be treated by interfaces or APIs that use this flag. - /// - public PropertyColumnState ColumnState - { - get - { - // If default/first value, try to get it again, otherwise used the cached one. - if (NativePropertyDescription != null && columnState == null) - { - PropertyColumnState state; - - HRESULT hr = NativePropertyDescription.GetColumnState(out state); - - if (CoreErrorHelper.Succeeded((int)hr)) - columnState = state; - } - - return columnState.HasValue ? columnState.Value : default(PropertyColumnState); - } - } - - /// - /// Gets the condition type to use when displaying the property in - /// the query builder user interface (UI). This influences the list - /// of predicate conditions (for example, equals, less than, and - /// contains) that are shown for this property. - /// - /// For more information, see the conditionType attribute - /// of the typeInfo element in the property's .propdesc file. - public PropertyConditionType ConditionType - { - get - { - // If default/first value, try to get it again, otherwise used the cached one. - if (NativePropertyDescription != null && conditionType == null) - { - PropertyConditionType tempConditionType; - PropertyConditionOperation tempConditionOperation; - - HRESULT hr = NativePropertyDescription.GetConditionType(out tempConditionType, out tempConditionOperation); - - if (CoreErrorHelper.Succeeded((int)hr)) - { - conditionOperation = tempConditionOperation; - conditionType = tempConditionType; - } - } - - return conditionType.HasValue ? conditionType.Value : default(PropertyConditionType); - } - } - - /// - /// Gets the default condition operation to use - /// when displaying the property in the query builder user - /// interface (UI). This influences the list of predicate conditions - /// (for example, equals, less than, and contains) that are shown - /// for this property. - /// - /// For more information, see the conditionType attribute of the - /// typeInfo element in the property's .propdesc file. - public PropertyConditionOperation ConditionOperation - { - get - { - // If default/first value, try to get it again, otherwise used the cached one. - if (NativePropertyDescription != null && conditionOperation == null) - { - PropertyConditionType tempConditionType; - PropertyConditionOperation tempConditionOperation; - - HRESULT hr = NativePropertyDescription.GetConditionType(out tempConditionType, out tempConditionOperation); - - if (CoreErrorHelper.Succeeded((int)hr)) - { - conditionOperation = tempConditionOperation; - conditionType = tempConditionType; - } - } - - return conditionOperation.HasValue ? conditionOperation.Value : default(PropertyConditionOperation); - } - } - - /// - /// Gets the method used when a view is grouped by this property. - /// - /// The information retrieved by this method comes from - /// the groupingRange attribute of the typeInfo element in the - /// property's .propdesc file. - public PropertyGroupingRange GroupingRange - { - get - { - // If default/first value, try to get it again, otherwise used the cached one. - if (NativePropertyDescription != null && groupingRange == null) - { - PropertyGroupingRange tempGroupingRange; - - HRESULT hr = NativePropertyDescription.GetGroupingRange(out tempGroupingRange); - - if (CoreErrorHelper.Succeeded((int)hr)) - groupingRange = tempGroupingRange; - } - - return groupingRange.HasValue ? groupingRange.Value : default(PropertyGroupingRange); - } - } - - /// - /// Gets the current sort description flags for the property, - /// which indicate the particular wordings of sort offerings. - /// - /// The settings retrieved by this method are set - /// through the sortDescription attribute of the labelInfo - /// element in the property's .propdesc file. - public PropertySortDescription SortDescription - { - get - { - // If default/first value, try to get it again, otherwise used the cached one. - if (NativePropertyDescription != null && sortDescription == null) - { - PropertySortDescription tempSortDescription; - - HRESULT hr = NativePropertyDescription.GetSortDescription(out tempSortDescription); - - if (CoreErrorHelper.Succeeded((int)hr)) - sortDescription = tempSortDescription; - } - - return sortDescription.HasValue ? sortDescription.Value : default(PropertySortDescription); - } - } - - /// - /// Gets the localized display string that describes the current sort order. - /// - /// Indicates the sort order should - /// reference the string "Z on top"; otherwise, the sort order should reference the string "A on top". - /// The sort description for this property. - /// The string retrieved by this method is determined by flags set in the - /// sortDescription attribute of the labelInfo element in the property's .propdesc file. - public string GetSortDescriptionLabel(bool descending) - { - IntPtr ptr = IntPtr.Zero; - string label = String.Empty; - - if (NativePropertyDescription != null) - { - HRESULT hr = NativePropertyDescription.GetSortDescriptionLabel(descending, out ptr); - - if (CoreErrorHelper.Succeeded((int)hr) && ptr != IntPtr.Zero) - { - label = Marshal.PtrToStringUni(ptr); - // Free the string - Marshal.FreeCoTaskMem(ptr); - } - } - - return label; - } - - /// - /// Gets a set of flags that describe the uses and capabilities of the property. - /// - public PropertyTypeFlags TypeFlags - { - get - { - if (NativePropertyDescription != null && propertyTypeFlags == null) - { - PropertyTypeFlags tempFlags; - - HRESULT hr = NativePropertyDescription.GetTypeFlags(PropertyTypeFlags.MaskAll, out tempFlags); - - propertyTypeFlags = CoreErrorHelper.Succeeded((int)hr) ? tempFlags : default(PropertyTypeFlags); - } - - return propertyTypeFlags.HasValue ? propertyTypeFlags.Value : default(PropertyTypeFlags); - } - } - - /// - /// Gets the current set of flags governing the property's view. - /// - public PropertyViewFlags ViewFlags - { - get - { - if (NativePropertyDescription != null && propertyViewFlags == null) - { - PropertyViewFlags tempFlags; - HRESULT hr = NativePropertyDescription.GetViewFlags(out tempFlags); - - propertyViewFlags = CoreErrorHelper.Succeeded((int)hr) ? tempFlags : default(PropertyViewFlags); - } - - return propertyViewFlags.HasValue ? propertyViewFlags.Value : default(PropertyViewFlags); - } - } - - /// - /// Gets a value that determines if the native property description is present on the system. - /// - public bool HasSystemDescription - { - get { return NativePropertyDescription != null; } - } - - #endregion - - #region Internal Constructor - - internal ShellPropertyDescription(PropertyKey key) - { - this.propertyKey = key; - } - - #endregion - - #region Internal Methods - - static internal Type VarEnumToSystemType(VarEnum VarEnumType) - { - switch (VarEnumType) - { - case (VarEnum.VT_EMPTY): - case (VarEnum.VT_NULL): - - return typeof(Object); - - case (VarEnum.VT_UI1): - - return typeof(Byte?); - - case (VarEnum.VT_I2): - - return typeof(Int16?); - - case (VarEnum.VT_UI2): - - return typeof(UInt16?); - - case (VarEnum.VT_I4): - - return typeof(Int32?); - - case (VarEnum.VT_UI4): - - return typeof(UInt32?); - - case (VarEnum.VT_I8): - - return typeof(Int64?); - - case (VarEnum.VT_UI8): - - return typeof(UInt64?); - - case (VarEnum.VT_R8): - - return typeof(Double?); - - case (VarEnum.VT_BOOL): - - return typeof(Boolean?); - - case (VarEnum.VT_FILETIME): - - return typeof(DateTime?); - - case (VarEnum.VT_CLSID): - - return typeof(IntPtr?); - - case (VarEnum.VT_CF): - - return typeof(IntPtr?); - - case (VarEnum.VT_BLOB): - - return typeof(Byte[]); - - case (VarEnum.VT_LPWSTR): - - return typeof(String); - - case (VarEnum.VT_UNKNOWN): - - return typeof(IntPtr?); - - case (VarEnum.VT_STREAM): - - return typeof(IStream); - - case (VarEnum.VT_VECTOR | VarEnum.VT_UI1): - - return typeof(Byte[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_I2): - - return typeof(Int16[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_UI2): - - return typeof(UInt16[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_I4): - - return typeof(Int32[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_UI4): - - return typeof(UInt32[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_I8): - - return typeof(Int64[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_UI8): - - return typeof(UInt64[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_R8): - - return typeof(Double[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_BOOL): - - return typeof(Boolean[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_FILETIME): - - return typeof(DateTime[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_CLSID): - - return typeof(IntPtr[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_CF): - - return typeof(IntPtr[]); - - case (VarEnum.VT_VECTOR | VarEnum.VT_LPWSTR): - - return typeof(String[]); - - default: - - return typeof(Object); - } - } - - /// - /// Get the native property description COM interface - /// - internal IPropertyDescription NativePropertyDescription - { - get - { - if (nativePropertyDescription == null) - { - Guid guid = new Guid(ShellIIDGuid.IPropertyDescription); - PropertySystemNativeMethods.PSGetPropertyDescription(ref propertyKey, ref guid, out nativePropertyDescription); - } - - return nativePropertyDescription; - } - } - - #endregion - - #region IDisposable Members - - /// - /// Release the native objects - /// - /// Indicates that this is being called from Dispose(), rather than the finalizer. - public void Dispose(bool disposing) - { - if (nativePropertyDescription != null) - { - Marshal.ReleaseComObject(nativePropertyDescription); - nativePropertyDescription = null; - } - - if (disposing) - { - // and the managed ones - canonicalName = null; - displayName = null; - editInvitation = null; - defaultColumWidth = null; - valueType = null; - propertyEnumTypes = null; - } - } - - /// - /// Release the native objects - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Release the native objects - /// - ~ShellPropertyDescription() - { - Dispose(false); - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescriptionsCache.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescriptionsCache.cs deleted file mode 100644 index 0f3880f..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyDescriptionsCache.cs +++ /dev/null @@ -1,36 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Collections.Generic; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - internal class ShellPropertyDescriptionsCache - { - private ShellPropertyDescriptionsCache() { propsDictionary = new Dictionary(); } - private IDictionary propsDictionary = null; - - private static ShellPropertyDescriptionsCache cacheInstance = null; - - public static ShellPropertyDescriptionsCache Cache - { - get - { - if (cacheInstance == null) - { - cacheInstance = new ShellPropertyDescriptionsCache(); - } - return cacheInstance; - } - } - - public ShellPropertyDescription GetPropertyDescription(PropertyKey key) - { - if (!propsDictionary.ContainsKey(key)) - { - propsDictionary.Add(key, new ShellPropertyDescription(key)); - } - return propsDictionary[key]; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnumType.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnumType.cs deleted file mode 100644 index da12902..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnumType.cs +++ /dev/null @@ -1,126 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Defines the enumeration values for a property type. - /// - public class ShellPropertyEnumType - { - #region Private Properties - - private string displayText = null; - private PropEnumType? enumType; - private object minValue = null, setValue = null, enumerationValue = null; - - private IPropertyEnumType NativePropertyEnumType - { - set; - get; - } - - #endregion - - #region Internal Constructor - - internal ShellPropertyEnumType(IPropertyEnumType nativePropertyEnumType) - { - NativePropertyEnumType = nativePropertyEnumType; - } - - #endregion - - #region Public Properties - - /// - /// Gets display text from an enumeration information structure. - /// - public string DisplayText - { - get - { - if (displayText == null) - { - NativePropertyEnumType.GetDisplayText(out displayText); - } - return displayText; - } - } - - /// - /// Gets an enumeration type from an enumeration information structure. - /// - public PropEnumType EnumType - { - get - { - if (!enumType.HasValue) - { - PropEnumType tempEnumType; - NativePropertyEnumType.GetEnumType(out tempEnumType); - enumType = tempEnumType; - } - return enumType.Value; - } - } - - /// - /// Gets a minimum value from an enumeration information structure. - /// - public object RangeMinValue - { - get - { - if (minValue == null) - { - PropVariant propVar; - NativePropertyEnumType.GetRangeMinValue(out propVar); - minValue = propVar.Value; - } - return minValue; - - } - } - - /// - /// Gets a set value from an enumeration information structure. - /// - public object RangeSetValue - { - get - { - if (setValue == null) - { - PropVariant propVar; - NativePropertyEnumType.GetRangeSetValue(out propVar); - setValue = propVar.Value; - } - return setValue; - - } - } - - /// - /// Gets a value from an enumeration information structure. - /// - public object RangeValue - { - get - { - if (enumerationValue == null) - { - PropVariant propVar; - NativePropertyEnumType.GetValue(out propVar); - enumerationValue = propVar.Value; - } - return enumerationValue; - - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnums.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnums.cs deleted file mode 100644 index e831fbb..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyEnums.cs +++ /dev/null @@ -1,722 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - #region Property System Enumerations - - /// - /// Delineates the format of a property string. - /// - /// - /// Typically use one, or a bitwise combination of - /// these flags, to specify the format. Some flags are mutually exclusive, - /// so combinations like ShortTime | LongTime | HideTime are not allowed. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Justification = "This is following the native API"), Flags] - public enum PropertyDescriptionFormat - { - /// - /// The format settings specified in the property's .propdesc file. - /// - Default = 0, - - /// - /// The value preceded with the property's display name. - /// - /// - /// This flag is ignored when the hideLabelPrefix attribute of the labelInfo element - /// in the property's .propinfo file is set to true. - /// - PrefixName = 0x1, - - /// - /// The string treated as a file name. - /// - FileName = 0x2, - - /// - /// The sizes displayed in kilobytes (KB), regardless of size. - /// - /// - /// This flag applies to properties of Integer types and aligns the values in the column. - /// - AlwaysKB = 0x4, - - /// - /// Reserved. - /// - RightToLeft = 0x8, - - /// - /// The time displayed as 'hh:mm am/pm'. - /// - ShortTime = 0x10, - - /// - /// The time displayed as 'hh:mm:ss am/pm'. - /// - LongTime = 0x20, - - /// - /// The time portion of date/time hidden. - /// - HideTime = 64, - - /// - /// The date displayed as 'MM/DD/YY'. For example, '3/21/04'. - /// - ShortDate = 0x80, - - /// - /// The date displayed as 'DayOfWeek Month day, year'. - /// For example, 'Monday, March 21, 2004'. - /// - LongDate = 0x100, - - /// - /// The date portion of date/time hidden. - /// - HideDate = 0x200, - - /// - /// The friendly date descriptions, such as "Yesterday". - /// - RelativeDate = 0x400, - - /// - /// The text displayed in a text box as a cue for the user, such as 'Enter your name'. - /// - /// - /// The invitation text is returned if formatting failed or the value was empty. - /// Invitation text is text displayed in a text box as a cue for the user, - /// Formatting can fail if the data entered - /// is not of an expected type, such as putting alpha characters in - /// a phone number field. - /// - UseEditInvitation = 0x800, - - /// - /// This flag requires UseEditInvitation to also be specified. When the - /// formatting flags are ReadOnly | UseEditInvitation and the algorithm - /// would have shown invitation text, a string is returned that indicates - /// the value is "Unknown" instead of the invitation text. - /// - ReadOnly = 0x1000, - - /// - /// The detection of the reading order is not automatic. Useful when converting - /// to ANSI to omit the Unicode reading order characters. - /// - NoAutoReadingOrder = 0x2000, - - /// - /// Smart display of DateTime values - /// - SmartDateTime = 0x4000 - } - - /// - /// Specifies the display types for a property. - /// - public enum PropertyDisplayType - { - /// - /// The String Display. This is the default if the property doesn't specify a display type. - /// - String = 0, - - /// - /// The Number Display. - /// - Number = 1, - - /// - /// The Boolean Display. - /// - Boolean = 2, - - /// - /// The DateTime Display. - /// - DateTime = 3, - - /// - /// The Enumerated Display. - /// - Enumerated = 4 - } - - /// - /// Property Aggregation Type - /// - public enum PropertyAggregationType - { - /// - /// The string "Multiple Values" is displayed. - /// - Default = 0, - - /// - /// The first value in the selection is displayed. - /// - First = 1, - - /// - /// The sum of the selected values is displayed. This flag is never returned - /// for data types VT_LPWSTR, VT_BOOL, and VT_FILETIME. - /// - Sum = 2, - - /// - /// The numerical average of the selected values is displayed. This flag - /// is never returned for data types VT_LPWSTR, VT_BOOL, and VT_FILETIME. - /// - Average = 3, - - /// - /// The date range of the selected values is displayed. This flag is only - /// returned for values of the VT_FILETIME data type. - /// - DateRange = 4, - - /// - /// A concatenated string of all the values is displayed. The order of - /// individual values in the string is undefined. The concatenated - /// string omits duplicate values; if a value occurs more than once, - /// it only appears a single time in the concatenated string. - /// - Union = 5, - - /// - /// The highest of the selected values is displayed. - /// - Max = 6, - - /// - /// The lowest of the selected values is displayed. - /// - Min = 7 - } - - /// - /// Property Enumeration Types - /// - public enum PropEnumType - { - /// - /// Use DisplayText and either RangeMinValue or RangeSetValue. - /// - DiscreteValue = 0, - - /// - /// Use DisplayText and either RangeMinValue or RangeSetValue - /// - RangedValue = 1, - - /// - /// Use DisplayText - /// - DefaultValue = 2, - - /// - /// Use Value or RangeMinValue - /// - EndRange = 3 - }; - - /// - /// Describes how a property should be treated for display purposes. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1714:FlagsEnumsShouldHavePluralNames"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2217:DoNotMarkEnumsWithFlags"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32", Justification = "This is following the native API"), Flags] - public enum PropertyColumnState : uint - { - /// - /// Default value - /// - DefaultValue = 0x00000000, - - /// - /// The value is displayed as a string. - /// - StringType = 0x00000001, - - /// - /// The value is displayed as an integer. - /// - IntegerType = 0x00000002, - - /// - /// The value is displayed as a date/time. - /// - DateType = 0x00000003, - - /// - /// A mask for display type values StringType, IntegerType, and DateType. - /// - TypeMask = 0x0000000f, - - /// - /// The column should be on by default in Details view. - /// - OnByDefault = 0x00000010, - - /// - /// Will be slow to compute. Perform on a background thread. - /// - Slow = 0x00000020, - - /// - /// Provided by a handler, not the folder. - /// - Extended = 0x00000040, - - /// - /// Not displayed in the context menu, but is listed in the More... dialog. - /// - SecondaryUI = 0x00000080, - - /// - /// Not displayed in the user interface (UI). - /// - Hidden = 0x00000100, - - /// - /// VarCmp produces same result as IShellFolder::CompareIDs. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Perfer", Justification = "This is following the native API")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Cmp", Justification = "This is following the native API")] - PerferVarCmp = 0x00000200, - - /// - /// PSFormatForDisplay produces same result as IShellFolder::CompareIDs. - /// - PreferFormatForDisplay = 0x00000400, - - /// - /// Do not sort folders separately. - /// - NoSortByFolders = 0x00000800, - - /// - /// Only displayed in the UI. - /// - ViewOnly = 0x00010000, - - /// - /// Marks columns with values that should be read in a batch. - /// - BatchRead = 0x00020000, - - /// - /// Grouping is disabled for this column. - /// - NoGroupBy = 0x00040000, - - /// - /// Can't resize the column. - /// - FixedWidth = 0x00001000, - - /// - /// The width is the same in all dots per inch (dpi)s. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "DPI", Justification = "This is following the native API")] - NoDPIScale = 0x00002000, - - /// - /// Fixed width and height ratio. - /// - FixedRatio = 0x00004000, - - /// - /// Filters out new display flags. - /// - DisplayMask = 0x0000F000, - } - - /// - /// Specifies the condition type to use when displaying the property in the query builder user interface (UI). - /// - public enum PropertyConditionType - { - /// - /// The default condition type. - /// - None = 0, - - /// - /// The string type. - /// - String = 1, - - /// - /// The size type. - /// - Size = 2, - - /// - /// The date/time type. - /// - DateTime = 3, - - /// - /// The Boolean type. - /// - Boolean = 4, - - /// - /// The number type. - /// - Number = 5, - } - - /// - /// Provides a set of flags to be used with IConditionFactory, - /// ICondition, and IConditionGenerator to indicate the operation. - /// - public enum PropertyConditionOperation - { - /// - /// The implicit comparison between the value of the property and the value of the constant. - /// - Implicit, - - /// - /// The value of the property and the value of the constant must be equal. - /// - Equal, - - /// - /// The value of the property and the value of the constant must not be equal. - /// - NotEqual, - - /// - /// The value of the property must be less than the value of the constant. - /// - LessThan, - - /// - /// The value of the property must be greater than the value of the constant. - /// - GreaterThan, - - /// - /// The value of the property must be less than or equal to the value of the constant. - /// - LessThanOrEqual, - - /// - /// The value of the property must be greater than or equal to the value of the constant. - /// - GreaterThanOrEqual, - - /// - /// The value of the property must begin with the value of the constant. - /// - ValueStartsWith, - - /// - /// The value of the property must end with the value of the constant. - /// - ValueEndsWith, - - /// - /// The value of the property must contain the value of the constant. - /// - ValueContains, - - /// - /// The value of the property must not contain the value of the constant. - /// - ValueNotContains, - - /// - /// The value of the property must match the value of the constant, where '?' matches any single character and '*' matches any sequence of characters. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "DOS", Justification = "This is following the native API")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1702:CompoundWordsShouldBeCasedCorrectly", MessageId = "WildCards", Justification = "This is following the native API")] - DOSWildCards, - - /// - /// The value of the property must contain a word that is the value of the constant. - /// - WordEqual, - - /// - /// The value of the property must contain a word that begins with the value of the constant. - /// - WordStartsWith, - - /// - /// The application is free to interpret this in any suitable way. - /// - ApplicationSpecific, - } - - /// - /// Specifies the property description grouping ranges. - /// - public enum PropertyGroupingRange - { - /// - /// The individual values. - /// - Discrete = 0, - - /// - /// The static alphanumeric ranges. - /// - Alphanumeric = 1, - - /// - /// The static size ranges. - /// - Size = 2, - - /// - /// The dynamically-created ranges. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Dymamic", Justification = "This is following the native API")] - Dymamic = 3, - - /// - /// The month and year groups. - /// - Date = 4, - - /// - /// The percent groups. - /// - Percent = 5, - - /// - /// The enumerated groups. - /// - Enumerated = 6, - } - - /// - /// Describes the particular wordings of sort offerings. - /// - /// - /// Note that the strings shown are English versions only; - /// localized strings are used for other locales. - /// - public enum PropertySortDescription - { - /// - /// The default ascending or descending property sort, "Sort going up", "Sort going down". - /// - General, - - /// - /// The alphabetical sort, "A on top", "Z on top". - /// - AToZ, - - /// - /// The numerical sort, "Lowest on top", "Highest on top". - /// - LowestToHighest, - - /// - /// The size sort, "Smallest on top", "Largest on top". - /// - SmallestToBiggest, - - /// - /// The chronological sort, "Oldest on top", "Newest on top". - /// - OldestToNewest, - } - - /// - /// Describes the attributes of the typeInfo element in the property's .propdesc file. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue", Justification = "This is following the native API"), Flags] - public enum PropertyTypeFlags : uint - { - /// - /// The property uses the default values for all attributes. - /// - Default = 0x00000000, - - /// - /// The property can have multiple values. - /// - /// - /// These values are stored as a VT_VECTOR in the PROPVARIANT structure. - /// This value is set by the multipleValues attribute of the typeInfo element in the property's .propdesc file. - /// - MultipleValues = 0x00000001, - - /// - /// This property cannot be written to. - /// - /// - /// This value is set by the isInnate attribute of the typeInfo element in the property's .propdesc file. - /// - IsInnate = 0x00000002, - - /// - /// The property is a group heading. - /// - /// - /// This value is set by the isGroup attribute of the typeInfo element in the property's .propdesc file. - /// - IsGroup = 0x00000004, - - /// - /// The user can group by this property. - /// - /// - /// This value is set by the canGroupBy attribute of the typeInfo element in the property's .propdesc file. - /// - CanGroupBy = 0x00000008, - - /// - /// The user can stack by this property. - /// - /// - /// This value is set by the canStackBy attribute of the typeInfo element in the property's .propdesc file. - /// - CanStackBy = 0x00000010, - - /// - /// This property contains a hierarchy. - /// - /// - /// This value is set by the isTreeProperty attribute of the typeInfo element in the property's .propdesc file. - /// - IsTreeProperty = 0x00000020, - - /// - /// Include this property in any full text query that is performed. - /// - /// - /// This value is set by the includeInFullTextQuery attribute of the typeInfo element in the property's .propdesc file. - /// - IncludeInFullTextQuery = 0x00000040, - - /// - /// This property is meant to be viewed by the user. - /// - /// - /// This influences whether the property shows up in the "Choose Columns" dialog, for example. - /// This value is set by the isViewable attribute of the typeInfo element in the property's .propdesc file. - /// - IsViewable = 0x00000080, - - /// - /// This property is included in the list of properties that can be queried. - /// - /// - /// A queryable property must also be viewable. - /// This influences whether the property shows up in the query builder UI. - /// This value is set by the isQueryable attribute of the typeInfo element in the property's .propdesc file. - /// - IsQueryable = 0x00000100, - - /// - /// Used with an innate property (that is, a value calculated from other property values) to indicate that it can be deleted. - /// - /// - /// Windows Vista with Service Pack 1 (SP1) and later. - /// This value is used by the Remove Properties user interface (UI) to determine whether to display a check box next to an property that allows that property to be selected for removal. - /// Note that a property that is not innate can always be purged regardless of the presence or absence of this flag. - /// - CanBePurged = 0x00000200, - - /// - /// This property is owned by the system. - /// - IsSystemProperty = 0x80000000, - - /// - /// A mask used to retrieve all flags. - /// - MaskAll = 0x800001FF, - } - - /// - /// Associates property names with property description list strings. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028:EnumStorageShouldBeInt32"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1008:EnumsShouldHaveZeroValue"), Flags] - public enum PropertyViewFlags : uint - { - /// - /// The property is shown by default. - /// - Default = 0x00000000, - - /// - /// The property is centered. - /// - CenterAlign = 0x00000001, - - /// - /// The property is right aligned. - /// - RightAlign = 0x00000002, - - /// - /// The property is shown as the beginning of the next collection of properties in the view. - /// - BeginNewGroup = 0x00000004, - - /// - /// The remainder of the view area is filled with the content of this property. - /// - FillArea = 0x00000008, - - /// - /// The property is reverse sorted if it is a property in a list of sorted properties. - /// - SortDescending = 0x00000010, - - /// - /// The property is only shown if it is present. - /// - ShowOnlyIfPresent = 0x00000020, - - /// - /// The property is shown by default in a view (where applicable). - /// - ShowByDefault = 0x00000040, - - /// - /// The property is shown by default in primary column selection user interface (UI). - /// - ShowInPrimaryList = 0x00000080, - - /// - /// The property is shown by default in secondary column selection UI. - /// - ShowInSecondaryList = 0x00000100, - - /// - /// The label is hidden if the view is normally inclined to show the label. - /// - HideLabel = 0x00000200, - - /// - /// The property is not displayed as a column in the UI. - /// - Hidden = 0x00000800, - - /// - /// The property is wrapped to the next row. - /// - CanWrap = 0x00001000, - - /// - /// A mask used to retrieve all flags. - /// - MaskAll = 0x000003ff, - } - - #endregion -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs deleted file mode 100644 index 1d6d4f4..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/ShellPropertyWriter.cs +++ /dev/null @@ -1,249 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Creates a property writer capable of setting multiple properties for a given ShellObject. - /// - public class ShellPropertyWriter : IDisposable - { - - private ShellObject parentShellObject = null; - - // Reference to our writable PropertyStore - internal IPropertyStore writablePropStore = null; - - /// - /// The value was set but truncated in a string value or rounded if a numeric value. - /// - protected const int InPlaceStringTruncated = 0x00401A0; - - internal ShellPropertyWriter(ShellObject parent) - { - ParentShellObject = parent; - - // Open the property store for this shell object... - Guid guid = new Guid(ShellIIDGuid.IPropertyStore); - - try - { - int hr = ParentShellObject.NativeShellItem2.GetPropertyStore( - ShellNativeMethods.GETPROPERTYSTOREFLAGS.GPS_READWRITE, - ref guid, - out writablePropStore); - - if (!CoreErrorHelper.Succeeded(hr)) - { - throw new ExternalException("Unable to get writable property store for this property.", - Marshal.GetExceptionForHR(hr)); - } - else - { - // If we succeed in creating a valid property store for this ShellObject, - // then set it on the parent shell object for others to use. - // Once this writer is closed/commited, we will set the - if (ParentShellObject.NativePropertyStore == null) - ParentShellObject.NativePropertyStore = writablePropStore; - } - - } - catch (InvalidComObjectException e) - { - throw new ExternalException("Unable to get writable property store for this property.", e); - } - catch (InvalidCastException) - { - throw new ExternalException("Unable to get writable property store for this property."); - } - } - - /// - /// Reference to parent ShellObject (associated with this writer) - /// - protected ShellObject ParentShellObject - { - get { return parentShellObject; } - private set { parentShellObject = value; } - } - - /// - /// Writes the given property key and value. - /// - /// The property key. - /// The value associated with the key. - public void WriteProperty(PropertyKey key, object value) - { - WriteProperty(key, value, true); - } - - /// - /// Writes the given property key and value. To allow truncation of the given value, set allowTruncatedValue - /// to true. - /// - /// The property key. - /// The value associated with the key. - /// True to allow truncation (default); otherwise False. - /// If the writable property store is already - /// closed. - /// If AllowTruncatedValue is set to false - /// and while setting the value on the property it had to be truncated in a string or rounded in - /// a numeric value. - public void WriteProperty(PropertyKey key, object value, bool allowTruncatedValue) - { - if (writablePropStore == null) - throw new InvalidOperationException("Writeable store has been closed."); - - PropVariant propVar = PropVariant.FromObject(value); - int result = writablePropStore.SetValue(ref key, ref propVar); - - if (!allowTruncatedValue && (result == InPlaceStringTruncated)) - { - // At this point we can't revert back the commit - // so don't commit, close the property store and throw an exception - // to let the user know. - Marshal.ReleaseComObject(writablePropStore); - writablePropStore = null; - - throw new ArgumentOutOfRangeException("value", "A value had to be truncated in a string or rounded if a numeric value. Set AllowTruncatedValue to true to prevent this exception."); - } - - if (!CoreErrorHelper.Succeeded(result)) - { - throw new ExternalException("Unable to set property.", Marshal.GetExceptionForHR(result)); - } - } - - /// - /// Writes the specified property given the canonical name and a value. - /// - /// The canonical name. - /// The property value. - public void WriteProperty(string canonicalName, object value) - { - WriteProperty(canonicalName, value, true); - } - - /// - /// Writes the specified property given the canonical name and a value. To allow truncation of the given value, set allowTruncatedValue - /// to true. - /// - /// The canonical name. - /// The property value. - /// True to allow truncation (default); otherwise False. - /// If the given canonical name is not valid. - public void WriteProperty(string canonicalName, object value, bool allowTruncatedValue) - { - // Get the PropertyKey using the canonicalName passed in - PropertyKey propKey; - - int result = PropertySystemNativeMethods.PSGetPropertyKeyFromName(canonicalName, out propKey); - - if (!CoreErrorHelper.Succeeded(result)) - { - throw new ArgumentException( - "The given CanonicalName is not valid.", - Marshal.GetExceptionForHR(result)); - } - - WriteProperty(propKey, value, allowTruncatedValue); - } - - /// - /// Writes the specified property using an IShellProperty and a value. - /// - /// The property name. - /// The property value. - public void WriteProperty(IShellProperty shellProperty, object value) - { - WriteProperty(shellProperty, value, true); - } - - /// - /// Writes the specified property given an IShellProperty and a value. To allow truncation of the given value, set allowTruncatedValue - /// to true. - /// - /// The property name. - /// The property value. - /// True to allow truncation (default); otherwise False. - public void WriteProperty(IShellProperty shellProperty, object value, bool allowTruncatedValue) - { - WriteProperty(shellProperty.PropertyKey, value, allowTruncatedValue); - } - - /// - /// Writes the specified property using a strongly-typed ShellProperty and a value. - /// - /// The type of the property name. - /// The property name. - /// The property value. - public void WriteProperty(ShellProperty shellProperty, T value) - { - WriteProperty(shellProperty, value, true); - } - /// - /// Writes the specified property given a strongly-typed ShellProperty and a value. To allow truncation of the given value, set allowTruncatedValue - /// to true. - /// - /// The type of the property name. - /// The property name. - /// The property value. - /// True to allow truncation (default); otherwise False. - public void WriteProperty(ShellProperty shellProperty, T value, bool allowTruncatedValue) - { - WriteProperty(shellProperty.PropertyKey, value, allowTruncatedValue); - } - - #region IDisposable Members - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// - /// - ~ShellPropertyWriter() - { - Dispose(false); - } - - /// - /// Release the native and managed objects. - /// - /// true to release both managed and unmanaged resources; false to release only unmanaged resources. - /// - protected virtual void Dispose(bool disposing) - { - Close(); - } - - /// - /// Call this method to commit the writes (calls to WriteProperty method) - /// and dispose off the writer. - /// - public void Close() - { - // Close the property writer (commit, etc) - if (writablePropStore != null) - { - HRESULT hr = writablePropStore.Commit(); - - Marshal.ReleaseComObject(writablePropStore); - writablePropStore = null; - } - - ParentShellObject.NativePropertyStore = null; - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/StronglyTypedProperties.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/StronglyTypedProperties.cs deleted file mode 100644 index 6bd7071..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/StronglyTypedProperties.cs +++ /dev/null @@ -1,16348 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Runtime.InteropServices.ComTypes; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - - /// - /// Base class for all the strongly-typed properties - /// - public abstract class PropertyStoreItems - { - - } - - - public partial class ShellProperties - { - - /// - /// .System Properties - /// - public class PropertySystem : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystem(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.AcquisitionID -- PKEY_AcquisitionID - /// Description: Hash to determine acquisition session. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {65A98875-3C80-40AB-ABBC-EFDAF77DBEE2}, 100 - /// - public ShellProperty AcquisitionID - { - get - { - PropertyKey key = SystemProperties.System.AcquisitionID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ApplicationName -- PKEY_ApplicationName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 18 (PIDSI_APPNAME) - /// - public ShellProperty ApplicationName - { - get - { - PropertyKey key = SystemProperties.System.ApplicationName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Author -- PKEY_Author - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 4 (PIDSI_AUTHOR) - /// - public ShellProperty Author - { - get - { - PropertyKey key = SystemProperties.System.Author; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Capacity -- PKEY_Capacity - /// Description: The amount of total space in bytes. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 3 (PID_VOLUME_CAPACITY) (Filesystem Volume Properties) - /// - public ShellProperty Capacity - { - get - { - PropertyKey key = SystemProperties.System.Capacity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Category -- PKEY_Category - /// Description: Legacy code treats this as VT_LPSTR. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 2 (PIDDSI_CATEGORY) - /// - public ShellProperty Category - { - get - { - PropertyKey key = SystemProperties.System.Category; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Comment -- PKEY_Comment - /// Description: Comments. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 6 (PIDSI_COMMENTS) - /// - public ShellProperty Comment - { - get - { - PropertyKey key = SystemProperties.System.Comment; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Company -- PKEY_Company - /// Description: The company or publisher. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 15 (PIDDSI_COMPANY) - /// - public ShellProperty Company - { - get - { - PropertyKey key = SystemProperties.System.Company; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ComputerName -- PKEY_ComputerName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 5 (PID_COMPUTERNAME) - /// - public ShellProperty ComputerName - { - get - { - PropertyKey key = SystemProperties.System.ComputerName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ContainedItems -- PKEY_ContainedItems - /// Description: The list of type of items, this item contains. For example, this item contains urls, attachments etc. - ///This is represented as a vector array of GUIDs where each GUID represents certain type. - /// - /// Type: Multivalue Guid -- VT_VECTOR | VT_CLSID (For variants: VT_ARRAY | VT_CLSID) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 29 - /// - public ShellProperty ContainedItems - { - get - { - PropertyKey key = SystemProperties.System.ContainedItems; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ContentStatus -- PKEY_ContentStatus - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 27 - /// - public ShellProperty ContentStatus - { - get - { - PropertyKey key = SystemProperties.System.ContentStatus; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ContentType -- PKEY_ContentType - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 26 - /// - public ShellProperty ContentType - { - get - { - PropertyKey key = SystemProperties.System.ContentType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Copyright -- PKEY_Copyright - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 11 (PIDMSI_COPYRIGHT) - /// - public ShellProperty Copyright - { - get - { - PropertyKey key = SystemProperties.System.Copyright; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DateAccessed -- PKEY_DateAccessed - /// Description: The time of the last access to the item. The Indexing Service friendly name is 'access'. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 16 (PID_STG_ACCESSTIME) - /// - public ShellProperty DateAccessed - { - get - { - PropertyKey key = SystemProperties.System.DateAccessed; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DateAcquired -- PKEY_DateAcquired - /// Description: The time the file entered the system via acquisition. This is not the same as System.DateImported. - ///Examples are when pictures are acquired from a camera, or when music is purchased online. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {2CBAA8F5-D81F-47CA-B17A-F8D822300131}, 100 - /// - public ShellProperty DateAcquired - { - get - { - PropertyKey key = SystemProperties.System.DateAcquired; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DateArchived -- PKEY_DateArchived - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {43F8D7B7-A444-4F87-9383-52271C9B915C}, 100 - /// - public ShellProperty DateArchived - { - get - { - PropertyKey key = SystemProperties.System.DateArchived; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DateCompleted -- PKEY_DateCompleted - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {72FAB781-ACDA-43E5-B155-B2434F85E678}, 100 - /// - public ShellProperty DateCompleted - { - get - { - PropertyKey key = SystemProperties.System.DateCompleted; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DateCreated -- PKEY_DateCreated - /// Description: The date and time the item was created. The Indexing Service friendly name is 'create'. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 15 (PID_STG_CREATETIME) - /// - public ShellProperty DateCreated - { - get - { - PropertyKey key = SystemProperties.System.DateCreated; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DateImported -- PKEY_DateImported - /// Description: The time the file is imported into a separate database. This is not the same as System.DateAcquired. (Eg, 2003:05:22 13:55:04) - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 18258 - /// - public ShellProperty DateImported - { - get - { - PropertyKey key = SystemProperties.System.DateImported; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DateModified -- PKEY_DateModified - /// Description: The date and time of the last write to the item. The Indexing Service friendly name is 'write'. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 14 (PID_STG_WRITETIME) - /// - public ShellProperty DateModified - { - get - { - PropertyKey key = SystemProperties.System.DateModified; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DescriptionID -- PKEY_DescriptionID - /// Description: The contents of a SHDESCRIPTIONID structure as a buffer of bytes. - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 2 (PID_DESCRIPTIONID) - /// - public ShellProperty DescriptionID - { - get - { - PropertyKey key = SystemProperties.System.DescriptionID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DueDate -- PKEY_DueDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE}, 100 - /// - public ShellProperty DueDate - { - get - { - PropertyKey key = SystemProperties.System.DueDate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.EndDate -- PKEY_EndDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {C75FAA05-96FD-49E7-9CB4-9F601082D553}, 100 - /// - public ShellProperty EndDate - { - get - { - PropertyKey key = SystemProperties.System.EndDate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileAllocationSize -- PKEY_FileAllocationSize - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 18 (PID_STG_ALLOCSIZE) - /// - public ShellProperty FileAllocationSize - { - get - { - PropertyKey key = SystemProperties.System.FileAllocationSize; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileAttributes -- PKEY_FileAttributes - /// Description: This is the WIN32_FIND_DATA dwFileAttributes for the file-based item. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 13 (PID_STG_ATTRIBUTES) - /// - public ShellProperty FileAttributes - { - get - { - PropertyKey key = SystemProperties.System.FileAttributes; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileCount -- PKEY_FileCount - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 12 - /// - public ShellProperty FileCount - { - get - { - PropertyKey key = SystemProperties.System.FileCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileDescription -- PKEY_FileDescription - /// Description: This is a user-friendly description of the file. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 3 (PIDVSI_FileDescription) - /// - public ShellProperty FileDescription - { - get - { - PropertyKey key = SystemProperties.System.FileDescription; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileExtension -- PKEY_FileExtension - /// Description: This is the file extension of the file based item, including the leading period. - /// - ///If System.FileName is VT_EMPTY, then this property should be too. Otherwise, it should be derived - ///appropriately by the data source from System.FileName. If System.FileName does not have a file - ///extension, this value should be VT_EMPTY. - /// - ///To obtain the type of any item (including an item that is not a file), use System.ItemType. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" ".txt" - /// "\\server\share\mydir\goodnews.doc" ".doc" - /// "\\server\share\numbers.xls" ".xls" - /// "\\server\share\folder" VT_EMPTY - /// "c:\foo\MyFolder" VT_EMPTY - /// [desktop] VT_EMPTY - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}, 100 - /// - public ShellProperty FileExtension - { - get - { - PropertyKey key = SystemProperties.System.FileExtension; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileFRN -- PKEY_FileFRN - /// Description: This is the unique file ID, also known as the File Reference Number. For a given file, this is the same value - ///as is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx(). - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 21 (PID_STG_FRN) - /// - public ShellProperty FileFRN - { - get - { - PropertyKey key = SystemProperties.System.FileFRN; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileName -- PKEY_FileName - /// Description: This is the file name (including extension) of the file. - /// - ///It is possible that the item might not exist on a filesystem (ie, it may not be opened - ///using CreateFile). Nonetheless, if the item is represented as a file from the logical sense - ///(and its name follows standard Win32 file-naming syntax), then the data source should emit this property. - /// - ///If an item is not a file, then the value for this property is VT_EMPTY. See - ///System.ItemNameDisplay. - /// - ///This has the same value as System.ParsingName for items that are provided by the Shell's file folder. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "hello.txt" - /// "\\server\share\mydir\goodnews.doc" "goodnews.doc" - /// "\\server\share\numbers.xls" "numbers.xls" - /// "c:\foo\MyFolder" "MyFolder" - /// (email message) VT_EMPTY - /// (song on portable device) "song.wma" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {41CF5AE0-F75A-4806-BD87-59C7D9248EB9}, 100 - /// - public ShellProperty FileName - { - get - { - PropertyKey key = SystemProperties.System.FileName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileOwner -- PKEY_FileOwner - /// Description: This is the owner of the file, according to the file system. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Misc) {9B174B34-40FF-11D2-A27E-00C04FC30871}, 4 (PID_MISC_OWNER) - /// - public ShellProperty FileOwner - { - get - { - PropertyKey key = SystemProperties.System.FileOwner; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FileVersion -- PKEY_FileVersion - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 4 (PIDVSI_FileVersion) - /// - public ShellProperty FileVersion - { - get - { - PropertyKey key = SystemProperties.System.FileVersion; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FindData -- PKEY_FindData - /// Description: WIN32_FIND_DATAW in buffer of bytes. - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 0 (PID_FINDDATA) - /// - public ShellProperty FindData - { - get - { - PropertyKey key = SystemProperties.System.FindData; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FlagColor -- PKEY_FlagColor - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {67DF94DE-0CA7-4D6F-B792-053A3E4F03CF}, 100 - /// - public ShellProperty FlagColor - { - get - { - PropertyKey key = SystemProperties.System.FlagColor; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FlagColorText -- PKEY_FlagColorText - /// Description: This is the user-friendly form of System.FlagColor. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {45EAE747-8E2A-40AE-8CBF-CA52ABA6152A}, 100 - /// - public ShellProperty FlagColorText - { - get - { - PropertyKey key = SystemProperties.System.FlagColorText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FlagStatus -- PKEY_FlagStatus - /// Description: Status of Flag. Values: (0=none 1=white 2=Red). cdoPR_FLAG_STATUS - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 12 - /// - public ShellProperty FlagStatus - { - get - { - PropertyKey key = SystemProperties.System.FlagStatus; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FlagStatusText -- PKEY_FlagStatusText - /// Description: This is the user-friendly form of System.FlagStatus. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DC54FD2E-189D-4871-AA01-08C2F57A4ABC}, 100 - /// - public ShellProperty FlagStatusText - { - get - { - PropertyKey key = SystemProperties.System.FlagStatusText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FreeSpace -- PKEY_FreeSpace - /// Description: The amount of free space in bytes. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 2 (PID_VOLUME_FREE) (Filesystem Volume Properties) - /// - public ShellProperty FreeSpace - { - get - { - PropertyKey key = SystemProperties.System.FreeSpace; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.FullText -- PKEY_FullText - /// Description: This PKEY is used to specify search terms that should be applied as broadly as possible, - ///across all valid properties for the data source(s) being searched. It should not be - ///emitted from a data source. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {1E3EE840-BC2B-476C-8237-2ACD1A839B22}, 6 - /// - public ShellProperty FullText - { - get - { - PropertyKey key = SystemProperties.System.FullText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Identity -- PKEY_Identity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A26F4AFC-7346-4299-BE47-EB1AE613139F}, 100 - /// - public ShellProperty IdentityProperty - { - get - { - PropertyKey key = SystemProperties.System.IdentityProperty; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ImageParsingName -- PKEY_ImageParsingName - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D7750EE0-C6A4-48EC-B53E-B87B52E6D073}, 100 - /// - public ShellProperty ImageParsingName - { - get - { - PropertyKey key = SystemProperties.System.ImageParsingName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Importance -- PKEY_Importance - /// Description: - /// Type: Int32 -- VT_I4 - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 11 - /// - public ShellProperty Importance - { - get - { - PropertyKey key = SystemProperties.System.Importance; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ImportanceText -- PKEY_ImportanceText - /// Description: This is the user-friendly form of System.Importance. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A3B29791-7713-4E1D-BB40-17DB85F01831}, 100 - /// - public ShellProperty ImportanceText - { - get - { - PropertyKey key = SystemProperties.System.ImportanceText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.InfoTipText -- PKEY_InfoTipText - /// Description: The text (with formatted property values) to show in the infotip. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 17 - /// - public ShellProperty InfoTipText - { - get - { - PropertyKey key = SystemProperties.System.InfoTipText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.InternalName -- PKEY_InternalName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 5 (PIDVSI_InternalName) - /// - public ShellProperty InternalName - { - get - { - PropertyKey key = SystemProperties.System.InternalName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsAttachment -- PKEY_IsAttachment - /// Description: Identifies if this item is an attachment. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {F23F425C-71A1-4FA8-922F-678EA4A60408}, 100 - /// - public ShellProperty IsAttachment - { - get - { - PropertyKey key = SystemProperties.System.IsAttachment; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsDefaultNonOwnerSaveLocation -- PKEY_IsDefaultNonOwnerSaveLocation - /// Description: Identifies the default save location for a library for non-owners of the library - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 5 - /// - public ShellProperty IsDefaultNonOwnerSaveLocation - { - get - { - PropertyKey key = SystemProperties.System.IsDefaultNonOwnerSaveLocation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsDefaultSaveLocation -- PKEY_IsDefaultSaveLocation - /// Description: Identifies the default save location for a library for the owner of the library - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 3 - /// - public ShellProperty IsDefaultSaveLocation - { - get - { - PropertyKey key = SystemProperties.System.IsDefaultSaveLocation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsDeleted -- PKEY_IsDeleted - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D}, 100 - /// - public ShellProperty IsDeleted - { - get - { - PropertyKey key = SystemProperties.System.IsDeleted; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsEncrypted -- PKEY_IsEncrypted - /// Description: Is the item encrypted? - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {90E5E14E-648B-4826-B2AA-ACAF790E3513}, 10 - /// - public ShellProperty IsEncrypted - { - get - { - PropertyKey key = SystemProperties.System.IsEncrypted; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsFlagged -- PKEY_IsFlagged - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {5DA84765-E3FF-4278-86B0-A27967FBDD03}, 100 - /// - public ShellProperty IsFlagged - { - get - { - PropertyKey key = SystemProperties.System.IsFlagged; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsFlaggedComplete -- PKEY_IsFlaggedComplete - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {A6F360D2-55F9-48DE-B909-620E090A647C}, 100 - /// - public ShellProperty IsFlaggedComplete - { - get - { - PropertyKey key = SystemProperties.System.IsFlaggedComplete; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsIncomplete -- PKEY_IsIncomplete - /// Description: Identifies if the message was not completely received for some error condition. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {346C8BD1-2E6A-4C45-89A4-61B78E8E700F}, 100 - /// - public ShellProperty IsIncomplete - { - get - { - PropertyKey key = SystemProperties.System.IsIncomplete; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsLocationSupported -- PKEY_IsLocationSupported - /// Description: A bool value to know if a location is supported (locally indexable, or remotely indexed). - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 8 - /// - public ShellProperty IsLocationSupported - { - get - { - PropertyKey key = SystemProperties.System.IsLocationSupported; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsPinnedToNameSpaceTree -- PKEY_IsPinnedToNameSpaceTree - /// Description: A bool value to know if a shell folder is pinned to the navigation pane - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 2 - /// - public ShellProperty IsPinnedToNameSpaceTree - { - get - { - PropertyKey key = SystemProperties.System.IsPinnedToNameSpaceTree; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsRead -- PKEY_IsRead - /// Description: Has the item been read? - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 10 - /// - public ShellProperty IsRead - { - get - { - PropertyKey key = SystemProperties.System.IsRead; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsSearchOnlyItem -- PKEY_IsSearchOnlyItem - /// Description: Identifies if a location or a library is search only - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 4 - /// - public ShellProperty IsSearchOnlyItem - { - get - { - PropertyKey key = SystemProperties.System.IsSearchOnlyItem; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsSendToTarget -- PKEY_IsSendToTarget - /// Description: Provided by certain shell folders. Return TRUE if the folder is a valid Send To target. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 33 - /// - public ShellProperty IsSendToTarget - { - get - { - PropertyKey key = SystemProperties.System.IsSendToTarget; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IsShared -- PKEY_IsShared - /// Description: Is this item shared? This only checks for ACLs that are not inherited. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 100 - /// - public ShellProperty IsShared - { - get - { - PropertyKey key = SystemProperties.System.IsShared; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemAuthors -- PKEY_ItemAuthors - /// Description: This is the generic list of authors associated with an item. - /// - ///For example, the artist name for a track is the item author. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D0A04F0A-462A-48A4-BB2F-3706E88DBD7D}, 100 - /// - public ShellProperty ItemAuthors - { - get - { - PropertyKey key = SystemProperties.System.ItemAuthors; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemClassType -- PKEY_ItemClassType - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {048658AD-2DB8-41A4-BBB6-AC1EF1207EB1}, 100 - /// - public ShellProperty ItemClassType - { - get - { - PropertyKey key = SystemProperties.System.ItemClassType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemDate -- PKEY_ItemDate - /// Description: This is the main date for an item. The date of interest. - /// - ///For example, for photos this maps to System.Photo.DateTaken. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {F7DB74B4-4287-4103-AFBA-F1B13DCD75CF}, 100 - /// - public ShellProperty ItemDate - { - get - { - PropertyKey key = SystemProperties.System.ItemDate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemFolderNameDisplay -- PKEY_ItemFolderNameDisplay - /// Description: This is the user-friendly display name of the parent folder of an item. - /// - ///If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it - ///should be derived appropriately by the data source from System.ItemFolderPathDisplay. - /// - ///If the folder is a file folder, the value will be localized if a localized name is available. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "bar" - /// "\\server\share\mydir\goodnews.doc" "mydir" - /// "\\server\share\numbers.xls" "share" - /// "c:\foo\MyFolder" "foo" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 2 (PID_STG_DIRECTORY) - /// - public ShellProperty ItemFolderNameDisplay - { - get - { - PropertyKey key = SystemProperties.System.ItemFolderNameDisplay; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemFolderPathDisplay -- PKEY_ItemFolderPathDisplay - /// Description: This is the user-friendly display path of the parent folder of an item. - /// - ///If System.ItemPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should - ///be derived appropriately by the data source from System.ItemPathDisplay. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "c:\foo\bar" - /// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir" - /// "\\server\share\numbers.xls" "\\server\share" - /// "c:\foo\MyFolder" "c:\foo" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 6 - /// - public ShellProperty ItemFolderPathDisplay - { - get - { - PropertyKey key = SystemProperties.System.ItemFolderPathDisplay; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemFolderPathDisplayNarrow -- PKEY_ItemFolderPathDisplayNarrow - /// Description: This is the user-friendly display path of the parent folder of an item. The format of the string - ///should be tailored such that the folder name comes first, to optimize for a narrow viewing column. - /// - ///If the folder is a file folder, the value includes localized names if they are present. - /// - ///If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should - ///be derived appropriately by the data source from System.ItemFolderPathDisplay. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "bar (c:\foo)" - /// "\\server\share\mydir\goodnews.doc" "mydir (\\server\share)" - /// "\\server\share\numbers.xls" "share (\\server)" - /// "c:\foo\MyFolder" "foo (c:\)" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox (/Mailbox Account)" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DABD30ED-0043-4789-A7F8-D013A4736622}, 100 - /// - public ShellProperty ItemFolderPathDisplayNarrow - { - get - { - PropertyKey key = SystemProperties.System.ItemFolderPathDisplayNarrow; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemName -- PKEY_ItemName - /// Description: This is the base-name of the System.ItemNameDisplay. - /// - ///If the item is a file this property - ///includes the extension in all cases, and will be localized if a localized name is available. - /// - ///If the item is a message, then the value of this property does not include the forwarding or - ///reply prefixes (see System.ItemNamePrefix). - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F}, 100 - /// - public ShellProperty ItemName - { - get - { - PropertyKey key = SystemProperties.System.ItemName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemNameDisplay -- PKEY_ItemNameDisplay - /// Description: This is the display name in "most complete" form. This is the best effort unique representation - ///of the name of an item that makes sense for end users to read. It is the concatentation of - ///System.ItemNamePrefix and System.ItemName. - /// - ///If the item is a file this property - ///includes the extension in all cases, and will be localized if a localized name is available. - /// - ///There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property - ///is completely different. Email messages are a key example. If the item is an email message, - ///the item name is likely the subject. In that case, the value must be the concatenation of the - ///System.ItemNamePrefix and System.ItemName. Since the value of System.ItemNamePrefix excludes - ///any trailing whitespace, the concatenation must include a whitespace when generating System.ItemNameDisplay. - /// - ///Note that this property is not guaranteed to be unique, but the idea is to promote the most likely - ///candidate that can be unique and also makes sense for end users. For example, for documents, you - ///might think about using System.Title as the System.ItemNameDisplay, but in practice the title of - ///the documents may not be useful or unique enough to be of value as the sole System.ItemNameDisplay. - ///Instead, providing the value of System.FileName as the value of System.ItemNameDisplay is a better - ///candidate. In Windows Mail, the emails are stored in the file system as .eml files and the - ///System.FileName for those files are not human-friendly as they contain GUIDs. In this example, - ///promoting System.Subject as System.ItemNameDisplay makes more sense. - /// - ///Compatibility notes: - /// - ///Shell folder implementations on Vista: use PKEY_ItemNameDisplay for the name column when - ///you want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get the value of the name. Use - ///another PKEY (like PKEY_ItemName) when you want Explorer to call either the folder's property store or - ///ISF2::GetDetailsEx in order to get the value of the name. - /// - ///Shell folder implementations on XP: the first column needs to be the name column, and Explorer - ///will call ISF::GetDisplayNameOf to get the value of the name. The PKEY/SCID does not matter. - /// - ///Example values: - /// - /// File: "hello.txt" - /// Message: "Re: Let's talk about Tom's argyle socks!" - /// Device folder: "song.wma" - /// Folder: "Documents" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 10 (PID_STG_NAME) - /// - public ShellProperty ItemNameDisplay - { - get - { - PropertyKey key = SystemProperties.System.ItemNameDisplay; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemNamePrefix -- PKEY_ItemNamePrefix - /// Description: This is the prefix of an item, used for email messages. - ///where the subject begins with "Re:" which is the prefix. - /// - ///If the item is a file, then the value of this property is VT_EMPTY. - /// - ///If the item is a message, then the value of this property is the forwarding or reply - ///prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there is no prefix. - /// - ///Example values: - /// - ///System.ItemNamePrefix System.ItemName System.ItemNameDisplay - ///--------------------- ------------------- ---------------------- - ///VT_EMPTY "Great day" "Great day" - ///"Re:" "Great day" "Re: Great day" - ///"Fwd: " "Monthly budget" "Fwd: Monthly budget" - ///VT_EMPTY "accounts.xls" "accounts.xls" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D7313FF1-A77A-401C-8C99-3DBDD68ADD36}, 100 - /// - public ShellProperty ItemNamePrefix - { - get - { - PropertyKey key = SystemProperties.System.ItemNamePrefix; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemParticipants -- PKEY_ItemParticipants - /// Description: This is the generic list of people associated with an item and who contributed - ///to the item. - /// - ///For example, this is the combination of people in the To list, Cc list and - ///sender of an email message. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D4D0AA16-9948-41A4-AA85-D97FF9646993}, 100 - /// - public ShellProperty ItemParticipants - { - get - { - PropertyKey key = SystemProperties.System.ItemParticipants; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemPathDisplay -- PKEY_ItemPathDisplay - /// Description: This is the user-friendly display path to the item. - /// - ///If the item is a file or folder this property - ///includes the extension in all cases, and will be localized if a localized name is available. - /// - ///For other items,this is the user-friendly equivalent, assuming the item exists in hierarchical storage. - /// - ///Unlike System.ItemUrl, this property value does not include the URL scheme. - /// - ///To parse an item path, use System.ItemUrl or System.ParsingPath. To reference shell - ///namespace items using shell APIs, use System.ParsingPath. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "c:\foo\bar\hello.txt" - /// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir\goodnews.doc" - /// "\\server\share\numbers.xls" "\\server\share\numbers.xls" - /// "c:\foo\MyFolder" "c:\foo\MyFolder" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox/'Re: Hello!'" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 7 - /// - public ShellProperty ItemPathDisplay - { - get - { - PropertyKey key = SystemProperties.System.ItemPathDisplay; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemPathDisplayNarrow -- PKEY_ItemPathDisplayNarrow - /// Description: This is the user-friendly display path to the item. The format of the string should be - ///tailored such that the name comes first, to optimize for a narrow viewing column. - /// - ///If the item is a file, the value excludes the file extension, and includes localized names if they are present. - ///If the item is a message, the value includes the System.ItemNamePrefix. - /// - ///To parse an item path, use System.ItemUrl or System.ParsingPath. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "hello (c:\foo\bar)" - /// "\\server\share\mydir\goodnews.doc" "goodnews (\\server\share\mydir)" - /// "\\server\share\folder" "folder (\\server\share)" - /// "c:\foo\MyFolder" "MyFolder (c:\foo)" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Re: Hello! (/Mailbox Account/Inbox)" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 8 - /// - public ShellProperty ItemPathDisplayNarrow - { - get - { - PropertyKey key = SystemProperties.System.ItemPathDisplayNarrow; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemType -- PKEY_ItemType - /// Description: This is the canonical type of the item and is intended to be programmatically - ///parsed. - /// - ///If there is no canonical type, the value is VT_EMPTY. - /// - ///If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same as - ///System.FileExtension. - /// - ///Use System.ItemTypeText when you want to display the type to end users in a view. (If - /// the item is a file, passing the System.ItemType value to PSFormatForDisplay will - /// result in the same value as System.ItemTypeText.) - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" ".txt" - /// "\\server\share\mydir\goodnews.doc" ".doc" - /// "\\server\share\folder" "Directory" - /// "c:\foo\MyFolder" "Directory" - /// [desktop] "Folder" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "MAPI/IPM.Message" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 11 - /// - public ShellProperty ItemType - { - get - { - PropertyKey key = SystemProperties.System.ItemType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemTypeText -- PKEY_ItemTypeText - /// Description: This is the user friendly type name of the item. This is not intended to be - ///programmatically parsed. - /// - ///If System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY. - /// - ///If the item is a file, the value of this property is the same as if you passed the - ///file's System.ItemType value to PSFormatForDisplay. - /// - ///This property should not be confused with System.Kind, where System.Kind is a high-level - ///user friendly kind name. For example, for a document, System.Kind = "Document" and - ///System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document" - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "Text File" - /// "\\server\share\mydir\goodnews.doc" "Microsoft Word Document" - /// "\\server\share\folder" "File Folder" - /// "c:\foo\MyFolder" "File Folder" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 4 (PID_STG_STORAGETYPE) - /// - public ShellProperty ItemTypeText - { - get - { - PropertyKey key = SystemProperties.System.ItemTypeText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ItemUrl -- PKEY_ItemUrl - /// Description: This always represents a well formed URL that points to the item. - /// - ///To reference shell namespace items using shell APIs, use System.ParsingPath. - /// - ///Example values: - /// - /// Files: "file:///c:/foo/bar/hello.txt" - /// "csc://{GUID}/..." - /// Messages: "mapi://..." - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 9 (DISPID_QUERY_VIRTUALPATH) - /// - public ShellProperty ItemUrl - { - get - { - PropertyKey key = SystemProperties.System.ItemUrl; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Keywords -- PKEY_Keywords - /// Description: The keywords for the item. Also referred to as tags. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 5 (PIDSI_KEYWORDS) - /// - public ShellProperty Keywords - { - get - { - PropertyKey key = SystemProperties.System.Keywords; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Kind -- PKEY_Kind - /// Description: System.Kind is used to map extensions to various .Search folders. - ///Extensions are mapped to Kinds at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap - ///The list of kinds is not extensible. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {1E3EE840-BC2B-476C-8237-2ACD1A839B22}, 3 - /// - public ShellProperty Kind - { - get - { - PropertyKey key = SystemProperties.System.Kind; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.KindText -- PKEY_KindText - /// Description: This is the user-friendly form of System.Kind. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F04BEF95-C585-4197-A2B7-DF46FDC9EE6D}, 100 - /// - public ShellProperty KindText - { - get - { - PropertyKey key = SystemProperties.System.KindText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Language -- PKEY_Language - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 28 - /// - public ShellProperty Language - { - get - { - PropertyKey key = SystemProperties.System.Language; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.MileageInformation -- PKEY_MileageInformation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FDF84370-031A-4ADD-9E91-0D775F1C6605}, 100 - /// - public ShellProperty MileageInformation - { - get - { - PropertyKey key = SystemProperties.System.MileageInformation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.MIMEType -- PKEY_MIMEType - /// Description: The MIME type. Eg, for EML files: 'message/rfc822'. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0B63E350-9CCC-11D0-BCDB-00805FCCCE04}, 5 - /// - public ShellProperty MIMEType - { - get - { - PropertyKey key = SystemProperties.System.MIMEType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.NamespaceCLSID -- PKEY_NamespaceCLSID - /// Description: The CLSID of the name space extension for an item, the object that implements IShellFolder for this item - /// - /// Type: Guid -- VT_CLSID - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 6 - /// - public ShellProperty NamespaceCLSID - { - get - { - PropertyKey key = SystemProperties.System.NamespaceCLSID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Null -- PKEY_Null - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {00000000-0000-0000-0000-000000000000}, 0 - /// - public ShellProperty Null - { - get - { - PropertyKey key = SystemProperties.System.Null; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.OfflineAvailability -- PKEY_OfflineAvailability - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A94688B6-7D9F-4570-A648-E3DFC0AB2B3F}, 100 - /// - public ShellProperty OfflineAvailability - { - get - { - PropertyKey key = SystemProperties.System.OfflineAvailability; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.OfflineStatus -- PKEY_OfflineStatus - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6D24888F-4718-4BDA-AFED-EA0FB4386CD8}, 100 - /// - public ShellProperty OfflineStatus - { - get - { - PropertyKey key = SystemProperties.System.OfflineStatus; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.OriginalFileName -- PKEY_OriginalFileName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 6 - /// - public ShellProperty OriginalFileName - { - get - { - PropertyKey key = SystemProperties.System.OriginalFileName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.OwnerSID -- PKEY_OwnerSID - /// Description: SID of the user that owns the library. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 6 - /// - public ShellProperty OwnerSID - { - get - { - PropertyKey key = SystemProperties.System.OwnerSID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ParentalRating -- PKEY_ParentalRating - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 21 (PIDMSI_PARENTAL_RATING) - /// - public ShellProperty ParentalRating - { - get - { - PropertyKey key = SystemProperties.System.ParentalRating; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ParentalRatingReason -- PKEY_ParentalRatingReason - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {10984E0A-F9F2-4321-B7EF-BAF195AF4319}, 100 - /// - public ShellProperty ParentalRatingReason - { - get - { - PropertyKey key = SystemProperties.System.ParentalRatingReason; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ParentalRatingsOrganization -- PKEY_ParentalRatingsOrganization - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A7FE0840-1344-46F0-8D37-52ED712A4BF9}, 100 - /// - public ShellProperty ParentalRatingsOrganization - { - get - { - PropertyKey key = SystemProperties.System.ParentalRatingsOrganization; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ParsingBindContext -- PKEY_ParsingBindContext - /// Description: used to get the IBindCtx for an item for parsing - /// - /// Type: Any -- VT_NULL Legacy code may treat this as VT_UNKNOWN. - /// FormatID: {DFB9A04D-362F-4CA3-B30B-0254B17B5B84}, 100 - /// - public ShellProperty ParsingBindContext - { - get - { - PropertyKey key = SystemProperties.System.ParsingBindContext; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ParsingName -- PKEY_ParsingName - /// Description: The shell namespace name of an item relative to a parent folder. This name may be passed to - ///IShellFolder::ParseDisplayName() of the parent shell folder. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 24 - /// - public ShellProperty ParsingName - { - get - { - PropertyKey key = SystemProperties.System.ParsingName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ParsingPath -- PKEY_ParsingPath - /// Description: This is the shell namespace path to the item. This path may be passed to - ///SHParseDisplayName to parse the path to the correct shell folder. - /// - ///If the item is a file, the value is identical to System.ItemPathDisplay. - /// - ///If the item cannot be accessed through the shell namespace, this value is VT_EMPTY. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 30 - /// - public ShellProperty ParsingPath - { - get - { - PropertyKey key = SystemProperties.System.ParsingPath; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PerceivedType -- PKEY_PerceivedType - /// Description: The perceived type of a shell item, based upon its canonical type. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 9 - /// - public ShellProperty PerceivedType - { - get - { - PropertyKey key = SystemProperties.System.PerceivedType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PercentFull -- PKEY_PercentFull - /// Description: The amount filled as a percentage, multiplied by 100 (ie, the valid range is 0 through 100). - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 5 (Filesystem Volume Properties) - /// - public ShellProperty PercentFull - { - get - { - PropertyKey key = SystemProperties.System.PercentFull; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Priority -- PKEY_Priority - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}, 5 - /// - public ShellProperty Priority - { - get - { - PropertyKey key = SystemProperties.System.Priority; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PriorityText -- PKEY_PriorityText - /// Description: This is the user-friendly form of System.Priority. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D98BE98B-B86B-4095-BF52-9D23B2E0A752}, 100 - /// - public ShellProperty PriorityText - { - get - { - PropertyKey key = SystemProperties.System.PriorityText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Project -- PKEY_Project - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {39A7F922-477C-48DE-8BC8-B28441E342E3}, 100 - /// - public ShellProperty Project - { - get - { - PropertyKey key = SystemProperties.System.Project; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ProviderItemID -- PKEY_ProviderItemID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F21D9941-81F0-471A-ADEE-4E74B49217ED}, 100 - /// - public ShellProperty ProviderItemID - { - get - { - PropertyKey key = SystemProperties.System.ProviderItemID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Rating -- PKEY_Rating - /// Description: Indicates the users preference rating of an item on a scale of 1-99 (1-12 = One Star, - ///13-37 = Two Stars, 38-62 = Three Stars, 63-87 = Four Stars, 88-99 = Five Stars). - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 9 (PIDMSI_RATING) - /// - public ShellProperty Rating - { - get - { - PropertyKey key = SystemProperties.System.Rating; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RatingText -- PKEY_RatingText - /// Description: This is the user-friendly form of System.Rating. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {90197CA7-FD8F-4E8C-9DA3-B57E1E609295}, 100 - /// - public ShellProperty RatingText - { - get - { - PropertyKey key = SystemProperties.System.RatingText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sensitivity -- PKEY_Sensitivity - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {F8D3F6AC-4874-42CB-BE59-AB454B30716A}, 100 - /// - public ShellProperty Sensitivity - { - get - { - PropertyKey key = SystemProperties.System.Sensitivity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.SensitivityText -- PKEY_SensitivityText - /// Description: This is the user-friendly form of System.Sensitivity. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D0C7F054-3F72-4725-8527-129A577CB269}, 100 - /// - public ShellProperty SensitivityText - { - get - { - PropertyKey key = SystemProperties.System.SensitivityText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.SFGAOFlags -- PKEY_SFGAOFlags - /// Description: IShellFolder::GetAttributesOf flags, with SFGAO_PKEYSFGAOMASK attributes masked out. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 25 - /// - public ShellProperty SFGAOFlags - { - get - { - PropertyKey key = SystemProperties.System.SFGAOFlags; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.SharedWith -- PKEY_SharedWith - /// Description: Who is the item shared with? - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 200 - /// - public ShellProperty SharedWith - { - get - { - PropertyKey key = SystemProperties.System.SharedWith; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ShareUserRating -- PKEY_ShareUserRating - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 12 (PIDMSI_SHARE_USER_RATING) - /// - public ShellProperty ShareUserRating - { - get - { - PropertyKey key = SystemProperties.System.ShareUserRating; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.SharingStatus -- PKEY_SharingStatus - /// Description: What is the item's sharing status (not shared, shared, everyone (homegroup or everyone), or private)? - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 300 - /// - public ShellProperty SharingStatus - { - get - { - PropertyKey key = SystemProperties.System.SharingStatus; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.SimpleRating -- PKEY_SimpleRating - /// Description: Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, 3=Three Stars, - ///4=Four Stars, 5=Five Stars) - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A09F084E-AD41-489F-8076-AA5BE3082BCA}, 100 - /// - public ShellProperty SimpleRating - { - get - { - PropertyKey key = SystemProperties.System.SimpleRating; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Size -- PKEY_Size - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE) - /// - public ShellProperty Size - { - get - { - PropertyKey key = SystemProperties.System.Size; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.SoftwareUsed -- PKEY_SoftwareUsed - /// Description: PropertyTagSoftwareUsed - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 305 - /// - public ShellProperty SoftwareUsed - { - get - { - PropertyKey key = SystemProperties.System.SoftwareUsed; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.SourceItem -- PKEY_SourceItem - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {668CDFA5-7A1B-4323-AE4B-E527393A1D81}, 100 - /// - public ShellProperty SourceItem - { - get - { - PropertyKey key = SystemProperties.System.SourceItem; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.StartDate -- PKEY_StartDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE}, 100 - /// - public ShellProperty StartDate - { - get - { - PropertyKey key = SystemProperties.System.StartDate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Status -- PKEY_Status - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_IntSite) {000214A1-0000-0000-C000-000000000046}, 9 - /// - public ShellProperty Status - { - get - { - PropertyKey key = SystemProperties.System.Status; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Subject -- PKEY_Subject - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 3 (PIDSI_SUBJECT) - /// - public ShellProperty Subject - { - get - { - PropertyKey key = SystemProperties.System.Subject; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Thumbnail -- PKEY_Thumbnail - /// Description: A data that represents the thumbnail in VT_CF format. - /// - /// Type: Clipboard -- VT_CF - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 17 (PIDSI_THUMBNAIL) - /// - public ShellProperty Thumbnail - { - get - { - PropertyKey key = SystemProperties.System.Thumbnail; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ThumbnailCacheId -- PKEY_ThumbnailCacheId - /// Description: Unique value that can be used as a key to cache thumbnails. The value changes when the name, volume, or data modified - ///of an item changes. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {446D16B1-8DAD-4870-A748-402EA43D788C}, 100 - /// - public ShellProperty ThumbnailCacheId - { - get - { - PropertyKey key = SystemProperties.System.ThumbnailCacheId; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.ThumbnailStream -- PKEY_ThumbnailStream - /// Description: Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc). - /// - /// Type: Stream -- VT_STREAM - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 27 - /// - public ShellProperty ThumbnailStream - { - get - { - PropertyKey key = SystemProperties.System.ThumbnailStream; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Title -- PKEY_Title - /// Description: Title of item. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 2 (PIDSI_TITLE) - /// - public ShellProperty Title - { - get - { - PropertyKey key = SystemProperties.System.Title; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.TotalFileSize -- PKEY_TotalFileSize - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 14 - /// - public ShellProperty TotalFileSize - { - get - { - PropertyKey key = SystemProperties.System.TotalFileSize; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Trademarks -- PKEY_Trademarks - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 9 (PIDVSI_Trademarks) - /// - public ShellProperty Trademarks - { - get - { - PropertyKey key = SystemProperties.System.Trademarks; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - private PropertySystemAppUserModel internalPropertySystemAppUserModel = null; - /// - /// System.AppUserModel Properties - /// - public PropertySystemAppUserModel AppUserModel - { - get - { - if (internalPropertySystemAppUserModel == null) - { - internalPropertySystemAppUserModel = new PropertySystemAppUserModel(shellObjectParent); - } - - return internalPropertySystemAppUserModel; - } - } - private PropertySystemAudio internalPropertySystemAudio = null; - /// - /// System.Audio Properties - /// - public PropertySystemAudio Audio - { - get - { - if (internalPropertySystemAudio == null) - { - internalPropertySystemAudio = new PropertySystemAudio(shellObjectParent); - } - - return internalPropertySystemAudio; - } - } - private PropertySystemCalendar internalPropertySystemCalendar = null; - /// - /// System.Calendar Properties - /// - public PropertySystemCalendar Calendar - { - get - { - if (internalPropertySystemCalendar == null) - { - internalPropertySystemCalendar = new PropertySystemCalendar(shellObjectParent); - } - - return internalPropertySystemCalendar; - } - } - private PropertySystemCommunication internalPropertySystemCommunication = null; - /// - /// System.Communication Properties - /// - public PropertySystemCommunication Communication - { - get - { - if (internalPropertySystemCommunication == null) - { - internalPropertySystemCommunication = new PropertySystemCommunication(shellObjectParent); - } - - return internalPropertySystemCommunication; - } - } - private PropertySystemComputer internalPropertySystemComputer = null; - /// - /// System.Computer Properties - /// - public PropertySystemComputer Computer - { - get - { - if (internalPropertySystemComputer == null) - { - internalPropertySystemComputer = new PropertySystemComputer(shellObjectParent); - } - - return internalPropertySystemComputer; - } - } - private PropertySystemContact internalPropertySystemContact = null; - /// - /// System.Contact Properties - /// - public PropertySystemContact Contact - { - get - { - if (internalPropertySystemContact == null) - { - internalPropertySystemContact = new PropertySystemContact(shellObjectParent); - } - - return internalPropertySystemContact; - } - } - private PropertySystemDevice internalPropertySystemDevice = null; - /// - /// System.Device Properties - /// - public PropertySystemDevice Device - { - get - { - if (internalPropertySystemDevice == null) - { - internalPropertySystemDevice = new PropertySystemDevice(shellObjectParent); - } - - return internalPropertySystemDevice; - } - } - private PropertySystemDeviceInterface internalPropertySystemDeviceInterface = null; - /// - /// System.DeviceInterface Properties - /// - public PropertySystemDeviceInterface DeviceInterface - { - get - { - if (internalPropertySystemDeviceInterface == null) - { - internalPropertySystemDeviceInterface = new PropertySystemDeviceInterface(shellObjectParent); - } - - return internalPropertySystemDeviceInterface; - } - } - private PropertySystemDevices internalPropertySystemDevices = null; - /// - /// System.Devices Properties - /// - public PropertySystemDevices Devices - { - get - { - if (internalPropertySystemDevices == null) - { - internalPropertySystemDevices = new PropertySystemDevices(shellObjectParent); - } - - return internalPropertySystemDevices; - } - } - private PropertySystemDocument internalPropertySystemDocument = null; - /// - /// System.Document Properties - /// - public PropertySystemDocument Document - { - get - { - if (internalPropertySystemDocument == null) - { - internalPropertySystemDocument = new PropertySystemDocument(shellObjectParent); - } - - return internalPropertySystemDocument; - } - } - private PropertySystemDRM internalPropertySystemDRM = null; - /// - /// System.DRM Properties - /// - public PropertySystemDRM DRM - { - get - { - if (internalPropertySystemDRM == null) - { - internalPropertySystemDRM = new PropertySystemDRM(shellObjectParent); - } - - return internalPropertySystemDRM; - } - } - private PropertySystemGPS internalPropertySystemGPS = null; - /// - /// System.GPS Properties - /// - public PropertySystemGPS GPS - { - get - { - if (internalPropertySystemGPS == null) - { - internalPropertySystemGPS = new PropertySystemGPS(shellObjectParent); - } - - return internalPropertySystemGPS; - } - } - private PropertySystemIdentity internalPropertySystemIdentity = null; - /// - /// System.Identity Properties - /// - public PropertySystemIdentity Identity - { - get - { - if (internalPropertySystemIdentity == null) - { - internalPropertySystemIdentity = new PropertySystemIdentity(shellObjectParent); - } - - return internalPropertySystemIdentity; - } - } - private PropertySystemIdentityProvider internalPropertySystemIdentityProvider = null; - /// - /// System.IdentityProvider Properties - /// - public PropertySystemIdentityProvider IdentityProvider - { - get - { - if (internalPropertySystemIdentityProvider == null) - { - internalPropertySystemIdentityProvider = new PropertySystemIdentityProvider(shellObjectParent); - } - - return internalPropertySystemIdentityProvider; - } - } - private PropertySystemImage internalPropertySystemImage = null; - /// - /// System.Image Properties - /// - public PropertySystemImage Image - { - get - { - if (internalPropertySystemImage == null) - { - internalPropertySystemImage = new PropertySystemImage(shellObjectParent); - } - - return internalPropertySystemImage; - } - } - private PropertySystemJournal internalPropertySystemJournal = null; - /// - /// System.Journal Properties - /// - public PropertySystemJournal Journal - { - get - { - if (internalPropertySystemJournal == null) - { - internalPropertySystemJournal = new PropertySystemJournal(shellObjectParent); - } - - return internalPropertySystemJournal; - } - } - private PropertySystemLayoutPattern internalPropertySystemLayoutPattern = null; - /// - /// System.LayoutPattern Properties - /// - public PropertySystemLayoutPattern LayoutPattern - { - get - { - if (internalPropertySystemLayoutPattern == null) - { - internalPropertySystemLayoutPattern = new PropertySystemLayoutPattern(shellObjectParent); - } - - return internalPropertySystemLayoutPattern; - } - } - private PropertySystemLink internalPropertySystemLink = null; - /// - /// System.Link Properties - /// - public PropertySystemLink Link - { - get - { - if (internalPropertySystemLink == null) - { - internalPropertySystemLink = new PropertySystemLink(shellObjectParent); - } - - return internalPropertySystemLink; - } - } - private PropertySystemMedia internalPropertySystemMedia = null; - /// - /// System.Media Properties - /// - public PropertySystemMedia Media - { - get - { - if (internalPropertySystemMedia == null) - { - internalPropertySystemMedia = new PropertySystemMedia(shellObjectParent); - } - - return internalPropertySystemMedia; - } - } - private PropertySystemMessage internalPropertySystemMessage = null; - /// - /// System.Message Properties - /// - public PropertySystemMessage Message - { - get - { - if (internalPropertySystemMessage == null) - { - internalPropertySystemMessage = new PropertySystemMessage(shellObjectParent); - } - - return internalPropertySystemMessage; - } - } - private PropertySystemMusic internalPropertySystemMusic = null; - /// - /// System.Music Properties - /// - public PropertySystemMusic Music - { - get - { - if (internalPropertySystemMusic == null) - { - internalPropertySystemMusic = new PropertySystemMusic(shellObjectParent); - } - - return internalPropertySystemMusic; - } - } - private PropertySystemNote internalPropertySystemNote = null; - /// - /// System.Note Properties - /// - public PropertySystemNote Note - { - get - { - if (internalPropertySystemNote == null) - { - internalPropertySystemNote = new PropertySystemNote(shellObjectParent); - } - - return internalPropertySystemNote; - } - } - private PropertySystemPhoto internalPropertySystemPhoto = null; - /// - /// System.Photo Properties - /// - public PropertySystemPhoto Photo - { - get - { - if (internalPropertySystemPhoto == null) - { - internalPropertySystemPhoto = new PropertySystemPhoto(shellObjectParent); - } - - return internalPropertySystemPhoto; - } - } - private PropertySystemPropGroup internalPropertySystemPropGroup = null; - /// - /// System.PropGroup Properties - /// - public PropertySystemPropGroup PropGroup - { - get - { - if (internalPropertySystemPropGroup == null) - { - internalPropertySystemPropGroup = new PropertySystemPropGroup(shellObjectParent); - } - - return internalPropertySystemPropGroup; - } - } - private PropertySystemPropList internalPropertySystemPropList = null; - /// - /// System.PropList Properties - /// - public PropertySystemPropList PropList - { - get - { - if (internalPropertySystemPropList == null) - { - internalPropertySystemPropList = new PropertySystemPropList(shellObjectParent); - } - - return internalPropertySystemPropList; - } - } - private PropertySystemRecordedTV internalPropertySystemRecordedTV = null; - /// - /// System.RecordedTV Properties - /// - public PropertySystemRecordedTV RecordedTV - { - get - { - if (internalPropertySystemRecordedTV == null) - { - internalPropertySystemRecordedTV = new PropertySystemRecordedTV(shellObjectParent); - } - - return internalPropertySystemRecordedTV; - } - } - private PropertySystemSearch internalPropertySystemSearch = null; - /// - /// System.Search Properties - /// - public PropertySystemSearch Search - { - get - { - if (internalPropertySystemSearch == null) - { - internalPropertySystemSearch = new PropertySystemSearch(shellObjectParent); - } - - return internalPropertySystemSearch; - } - } - private PropertySystemShell internalPropertySystemShell = null; - /// - /// System.Shell Properties - /// - public PropertySystemShell Shell - { - get - { - if (internalPropertySystemShell == null) - { - internalPropertySystemShell = new PropertySystemShell(shellObjectParent); - } - - return internalPropertySystemShell; - } - } - private PropertySystemSoftware internalPropertySystemSoftware = null; - /// - /// System.Software Properties - /// - public PropertySystemSoftware Software - { - get - { - if (internalPropertySystemSoftware == null) - { - internalPropertySystemSoftware = new PropertySystemSoftware(shellObjectParent); - } - - return internalPropertySystemSoftware; - } - } - private PropertySystemSync internalPropertySystemSync = null; - /// - /// System.Sync Properties - /// - public PropertySystemSync Sync - { - get - { - if (internalPropertySystemSync == null) - { - internalPropertySystemSync = new PropertySystemSync(shellObjectParent); - } - - return internalPropertySystemSync; - } - } - private PropertySystemTask internalPropertySystemTask = null; - /// - /// System.Task Properties - /// - public PropertySystemTask Task - { - get - { - if (internalPropertySystemTask == null) - { - internalPropertySystemTask = new PropertySystemTask(shellObjectParent); - } - - return internalPropertySystemTask; - } - } - private PropertySystemVideo internalPropertySystemVideo = null; - /// - /// System.Video Properties - /// - public PropertySystemVideo Video - { - get - { - if (internalPropertySystemVideo == null) - { - internalPropertySystemVideo = new PropertySystemVideo(shellObjectParent); - } - - return internalPropertySystemVideo; - } - } - private PropertySystemVolume internalPropertySystemVolume = null; - /// - /// System.Volume Properties - /// - public PropertySystemVolume Volume - { - get - { - if (internalPropertySystemVolume == null) - { - internalPropertySystemVolume = new PropertySystemVolume(shellObjectParent); - } - - return internalPropertySystemVolume; - } - } - #endregion - } - - /// - /// System.AppUserModel Properties - /// - public class PropertySystemAppUserModel : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemAppUserModel(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.AppUserModel.ExcludeFromShowInNewInstall -- PKEY_AppUserModel_ExcludeFromShowInNewInstall - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 8 - /// - public ShellProperty ExcludeFromShowInNewInstall - { - get - { - PropertyKey key = SystemProperties.System.AppUserModel.ExcludeFromShowInNewInstall; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.AppUserModel.ID -- PKEY_AppUserModel_ID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 5 - /// - public ShellProperty ID - { - get - { - PropertyKey key = SystemProperties.System.AppUserModel.ID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.AppUserModel.IsDestListSeparator -- PKEY_AppUserModel_IsDestListSeparator - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 6 - /// - public ShellProperty IsDestListSeparator - { - get - { - PropertyKey key = SystemProperties.System.AppUserModel.IsDestListSeparator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.AppUserModel.PreventPinning -- PKEY_AppUserModel_PreventPinning - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 9 - /// - public ShellProperty PreventPinning - { - get - { - PropertyKey key = SystemProperties.System.AppUserModel.PreventPinning; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.AppUserModel.RelaunchCommand -- PKEY_AppUserModel_RelaunchCommand - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 2 - /// - public ShellProperty RelaunchCommand - { - get - { - PropertyKey key = SystemProperties.System.AppUserModel.RelaunchCommand; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.AppUserModel.RelaunchDisplayNameResource -- PKEY_AppUserModel_RelaunchDisplayNameResource - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 4 - /// - public ShellProperty RelaunchDisplayNameResource - { - get - { - PropertyKey key = SystemProperties.System.AppUserModel.RelaunchDisplayNameResource; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.AppUserModel.RelaunchIconResource -- PKEY_AppUserModel_RelaunchIconResource - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 3 - /// - public ShellProperty RelaunchIconResource - { - get - { - PropertyKey key = SystemProperties.System.AppUserModel.RelaunchIconResource; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Audio Properties - /// - public class PropertySystemAudio : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemAudio(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Audio.ChannelCount -- PKEY_Audio_ChannelCount - /// Description: Indicates the channel count for the audio file. Values: 1 (mono), 2 (stereo). - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 7 (PIDASI_CHANNEL_COUNT) - /// - public ShellProperty ChannelCount - { - get - { - PropertyKey key = SystemProperties.System.Audio.ChannelCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.Compression -- PKEY_Audio_Compression - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 10 (PIDASI_COMPRESSION) - /// - public ShellProperty Compression - { - get - { - PropertyKey key = SystemProperties.System.Audio.Compression; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.EncodingBitrate -- PKEY_Audio_EncodingBitrate - /// Description: Indicates the average data rate in Hz for the audio file in "bits per second". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 4 (PIDASI_AVG_DATA_RATE) - /// - public ShellProperty EncodingBitrate - { - get - { - PropertyKey key = SystemProperties.System.Audio.EncodingBitrate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.Format -- PKEY_Audio_Format - /// Description: Indicates the format of the audio file. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_BSTR. - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 2 (PIDASI_FORMAT) - /// - public ShellProperty Format - { - get - { - PropertyKey key = SystemProperties.System.Audio.Format; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.IsVariableBitRate -- PKEY_Audio_IsVariableBitRate - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C}, 100 - /// - public ShellProperty IsVariableBitRate - { - get - { - PropertyKey key = SystemProperties.System.Audio.IsVariableBitRate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.PeakValue -- PKEY_Audio_PeakValue - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E}, 100 - /// - public ShellProperty PeakValue - { - get - { - PropertyKey key = SystemProperties.System.Audio.PeakValue; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.SampleRate -- PKEY_Audio_SampleRate - /// Description: Indicates the audio sample rate for the audio file in "samples per second". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 5 (PIDASI_SAMPLE_RATE) - /// - public ShellProperty SampleRate - { - get - { - PropertyKey key = SystemProperties.System.Audio.SampleRate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.SampleSize -- PKEY_Audio_SampleSize - /// Description: Indicates the audio sample size for the audio file in "bits per sample". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 6 (PIDASI_SAMPLE_SIZE) - /// - public ShellProperty SampleSize - { - get - { - PropertyKey key = SystemProperties.System.Audio.SampleSize; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.StreamName -- PKEY_Audio_StreamName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 9 (PIDASI_STREAM_NAME) - /// - public ShellProperty StreamName - { - get - { - PropertyKey key = SystemProperties.System.Audio.StreamName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Audio.StreamNumber -- PKEY_Audio_StreamNumber - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 8 (PIDASI_STREAM_NUMBER) - /// - public ShellProperty StreamNumber - { - get - { - PropertyKey key = SystemProperties.System.Audio.StreamNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Calendar Properties - /// - public class PropertySystemCalendar : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemCalendar(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Calendar.Duration -- PKEY_Calendar_Duration - /// Description: The duration as specified in a string. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {293CA35A-09AA-4DD2-B180-1FE245728A52}, 100 - /// - public ShellProperty Duration - { - get - { - PropertyKey key = SystemProperties.System.Calendar.Duration; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.IsOnline -- PKEY_Calendar_IsOnline - /// Description: Identifies if the event is an online event. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {BFEE9149-E3E2-49A7-A862-C05988145CEC}, 100 - /// - public ShellProperty IsOnline - { - get - { - PropertyKey key = SystemProperties.System.Calendar.IsOnline; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.IsRecurring -- PKEY_Calendar_IsRecurring - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {315B9C8D-80A9-4EF9-AE16-8E746DA51D70}, 100 - /// - public ShellProperty IsRecurring - { - get - { - PropertyKey key = SystemProperties.System.Calendar.IsRecurring; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.Location -- PKEY_Calendar_Location - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F6272D18-CECC-40B1-B26A-3911717AA7BD}, 100 - /// - public ShellProperty Location - { - get - { - PropertyKey key = SystemProperties.System.Calendar.Location; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.OptionalAttendeeAddresses -- PKEY_Calendar_OptionalAttendeeAddresses - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D55BAE5A-3892-417A-A649-C6AC5AAAEAB3}, 100 - /// - public ShellProperty OptionalAttendeeAddresses - { - get - { - PropertyKey key = SystemProperties.System.Calendar.OptionalAttendeeAddresses; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.OptionalAttendeeNames -- PKEY_Calendar_OptionalAttendeeNames - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {09429607-582D-437F-84C3-DE93A2B24C3C}, 100 - /// - public ShellProperty OptionalAttendeeNames - { - get - { - PropertyKey key = SystemProperties.System.Calendar.OptionalAttendeeNames; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.OrganizerAddress -- PKEY_Calendar_OrganizerAddress - /// Description: Address of the organizer organizing the event. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {744C8242-4DF5-456C-AB9E-014EFB9021E3}, 100 - /// - public ShellProperty OrganizerAddress - { - get - { - PropertyKey key = SystemProperties.System.Calendar.OrganizerAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.OrganizerName -- PKEY_Calendar_OrganizerName - /// Description: Name of the organizer organizing the event. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AAA660F9-9865-458E-B484-01BC7FE3973E}, 100 - /// - public ShellProperty OrganizerName - { - get - { - PropertyKey key = SystemProperties.System.Calendar.OrganizerName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.ReminderTime -- PKEY_Calendar_ReminderTime - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {72FC5BA4-24F9-4011-9F3F-ADD27AFAD818}, 100 - /// - public ShellProperty ReminderTime - { - get - { - PropertyKey key = SystemProperties.System.Calendar.ReminderTime; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.RequiredAttendeeAddresses -- PKEY_Calendar_RequiredAttendeeAddresses - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {0BA7D6C3-568D-4159-AB91-781A91FB71E5}, 100 - /// - public ShellProperty RequiredAttendeeAddresses - { - get - { - PropertyKey key = SystemProperties.System.Calendar.RequiredAttendeeAddresses; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.RequiredAttendeeNames -- PKEY_Calendar_RequiredAttendeeNames - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {B33AF30B-F552-4584-936C-CB93E5CDA29F}, 100 - /// - public ShellProperty RequiredAttendeeNames - { - get - { - PropertyKey key = SystemProperties.System.Calendar.RequiredAttendeeNames; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.Resources -- PKEY_Calendar_Resources - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {00F58A38-C54B-4C40-8696-97235980EAE1}, 100 - /// - public ShellProperty Resources - { - get - { - PropertyKey key = SystemProperties.System.Calendar.Resources; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.ResponseStatus -- PKEY_Calendar_ResponseStatus - /// Description: This property stores the status of the user responses to meetings in her calendar. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {188C1F91-3C40-4132-9EC5-D8B03B72A8A2}, 100 - /// - public ShellProperty ResponseStatus - { - get - { - PropertyKey key = SystemProperties.System.Calendar.ResponseStatus; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.ShowTimeAs -- PKEY_Calendar_ShowTimeAs - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E}, 100 - /// - public ShellProperty ShowTimeAs - { - get - { - PropertyKey key = SystemProperties.System.Calendar.ShowTimeAs; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Calendar.ShowTimeAsText -- PKEY_Calendar_ShowTimeAsText - /// Description: This is the user-friendly form of System.Calendar.ShowTimeAs. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {53DA57CF-62C0-45C4-81DE-7610BCEFD7F5}, 100 - /// - public ShellProperty ShowTimeAsText - { - get - { - PropertyKey key = SystemProperties.System.Calendar.ShowTimeAsText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Communication Properties - /// - public class PropertySystemCommunication : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemCommunication(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Communication.AccountName -- PKEY_Communication_AccountName - /// Description: Account Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 9 - /// - public ShellProperty AccountName - { - get - { - PropertyKey key = SystemProperties.System.Communication.AccountName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.DateItemExpires -- PKEY_Communication_DateItemExpires - /// Description: Date the item expires due to the retention policy. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {428040AC-A177-4C8A-9760-F6F761227F9A}, 100 - /// - public ShellProperty DateItemExpires - { - get - { - PropertyKey key = SystemProperties.System.Communication.DateItemExpires; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.FollowupIconIndex -- PKEY_Communication_FollowupIconIndex - /// Description: This is the icon index used on messages marked for followup. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {83A6347E-6FE4-4F40-BA9C-C4865240D1F4}, 100 - /// - public ShellProperty FollowupIconIndex - { - get - { - PropertyKey key = SystemProperties.System.Communication.FollowupIconIndex; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.HeaderItem -- PKEY_Communication_HeaderItem - /// Description: This property will be true if the item is a header item which means the item hasn't been fully downloaded. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {C9C34F84-2241-4401-B607-BD20ED75AE7F}, 100 - /// - public ShellProperty HeaderItem - { - get - { - PropertyKey key = SystemProperties.System.Communication.HeaderItem; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.PolicyTag -- PKEY_Communication_PolicyTag - /// Description: This a string used to identify the retention policy applied to the item. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {EC0B4191-AB0B-4C66-90B6-C6637CDEBBAB}, 100 - /// - public ShellProperty PolicyTag - { - get - { - PropertyKey key = SystemProperties.System.Communication.PolicyTag; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.SecurityFlags -- PKEY_Communication_SecurityFlags - /// Description: Security flags associated with the item to know if the item is encrypted, signed or DRM enabled. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {8619A4B6-9F4D-4429-8C0F-B996CA59E335}, 100 - /// - public ShellProperty SecurityFlags - { - get - { - PropertyKey key = SystemProperties.System.Communication.SecurityFlags; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.Suffix -- PKEY_Communication_Suffix - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {807B653A-9E91-43EF-8F97-11CE04EE20C5}, 100 - /// - public ShellProperty Suffix - { - get - { - PropertyKey key = SystemProperties.System.Communication.Suffix; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.TaskStatus -- PKEY_Communication_TaskStatus - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999}, 100 - /// - public ShellProperty TaskStatus - { - get - { - PropertyKey key = SystemProperties.System.Communication.TaskStatus; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Communication.TaskStatusText -- PKEY_Communication_TaskStatusText - /// Description: This is the user-friendly form of System.Communication.TaskStatus. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A6744477-C237-475B-A075-54F34498292A}, 100 - /// - public ShellProperty TaskStatusText - { - get - { - PropertyKey key = SystemProperties.System.Communication.TaskStatusText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Computer Properties - /// - public class PropertySystemComputer : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemComputer(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Computer.DecoratedFreeSpace -- PKEY_Computer_DecoratedFreeSpace - /// Description: Free space and total space: "%s free of %s" - /// - /// Type: Multivalue UInt64 -- VT_VECTOR | VT_UI8 (For variants: VT_ARRAY | VT_UI8) - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 7 (Filesystem Volume Properties) - /// - public ShellProperty DecoratedFreeSpace - { - get - { - PropertyKey key = SystemProperties.System.Computer.DecoratedFreeSpace; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Contact Properties - /// - public class PropertySystemContact : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemContact(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Contact.Anniversary -- PKEY_Contact_Anniversary - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {9AD5BADB-CEA7-4470-A03D-B84E51B9949E}, 100 - /// - public ShellProperty Anniversary - { - get - { - PropertyKey key = SystemProperties.System.Contact.Anniversary; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.AssistantName -- PKEY_Contact_AssistantName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CD102C9C-5540-4A88-A6F6-64E4981C8CD1}, 100 - /// - public ShellProperty AssistantName - { - get - { - PropertyKey key = SystemProperties.System.Contact.AssistantName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.AssistantTelephone -- PKEY_Contact_AssistantTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6}, 100 - /// - public ShellProperty AssistantTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.AssistantTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Birthday -- PKEY_Contact_Birthday - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 47 - /// - public ShellProperty Birthday - { - get - { - PropertyKey key = SystemProperties.System.Contact.Birthday; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessAddress -- PKEY_Contact_BusinessAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {730FB6DD-CF7C-426B-A03F-BD166CC9EE24}, 100 - /// - public ShellProperty BusinessAddress - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessAddressCity -- PKEY_Contact_BusinessAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {402B5934-EC5A-48C3-93E6-85E86A2D934E}, 100 - /// - public ShellProperty BusinessAddressCity - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessAddressCity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessAddressCountry -- PKEY_Contact_BusinessAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C}, 100 - /// - public ShellProperty BusinessAddressCountry - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessAddressCountry; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessAddressPostalCode -- PKEY_Contact_BusinessAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80}, 100 - /// - public ShellProperty BusinessAddressPostalCode - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessAddressPostalCode; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessAddressPostOfficeBox -- PKEY_Contact_BusinessAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BC4E71CE-17F9-48D5-BEE9-021DF0EA5409}, 100 - /// - public ShellProperty BusinessAddressPostOfficeBox - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessAddressPostOfficeBox; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessAddressState -- PKEY_Contact_BusinessAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {446F787F-10C4-41CB-A6C4-4D0343551597}, 100 - /// - public ShellProperty BusinessAddressState - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessAddressState; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessAddressStreet -- PKEY_Contact_BusinessAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DDD1460F-C0BF-4553-8CE4-10433C908FB0}, 100 - /// - public ShellProperty BusinessAddressStreet - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessAddressStreet; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessFaxNumber -- PKEY_Contact_BusinessFaxNumber - /// Description: Business fax number of the contact. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {91EFF6F3-2E27-42CA-933E-7C999FBE310B}, 100 - /// - public ShellProperty BusinessFaxNumber - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessFaxNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessHomePage -- PKEY_Contact_BusinessHomePage - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {56310920-2491-4919-99CE-EADB06FAFDB2}, 100 - /// - public ShellProperty BusinessHomePage - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessHomePage; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.BusinessTelephone -- PKEY_Contact_BusinessTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC}, 100 - /// - public ShellProperty BusinessTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.BusinessTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.CallbackTelephone -- PKEY_Contact_CallbackTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BF53D1C3-49E0-4F7F-8567-5A821D8AC542}, 100 - /// - public ShellProperty CallbackTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.CallbackTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.CarTelephone -- PKEY_Contact_CarTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8FDC6DEA-B929-412B-BA90-397A257465FE}, 100 - /// - public ShellProperty CarTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.CarTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Children -- PKEY_Contact_Children - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D4729704-8EF1-43EF-9024-2BD381187FD5}, 100 - /// - public ShellProperty Children - { - get - { - PropertyKey key = SystemProperties.System.Contact.Children; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.CompanyMainTelephone -- PKEY_Contact_CompanyMainTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8589E481-6040-473D-B171-7FA89C2708ED}, 100 - /// - public ShellProperty CompanyMainTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.CompanyMainTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Department -- PKEY_Contact_Department - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC}, 100 - /// - public ShellProperty Department - { - get - { - PropertyKey key = SystemProperties.System.Contact.Department; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.EmailAddress -- PKEY_Contact_EmailAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7}, 100 - /// - public ShellProperty EmailAddress - { - get - { - PropertyKey key = SystemProperties.System.Contact.EmailAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.EmailAddress2 -- PKEY_Contact_EmailAddress2 - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {38965063-EDC8-4268-8491-B7723172CF29}, 100 - /// - public ShellProperty EmailAddress2 - { - get - { - PropertyKey key = SystemProperties.System.Contact.EmailAddress2; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.EmailAddress3 -- PKEY_Contact_EmailAddress3 - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {644D37B4-E1B3-4BAD-B099-7E7C04966ACA}, 100 - /// - public ShellProperty EmailAddress3 - { - get - { - PropertyKey key = SystemProperties.System.Contact.EmailAddress3; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.EmailAddresses -- PKEY_Contact_EmailAddresses - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {84D8F337-981D-44B3-9615-C7596DBA17E3}, 100 - /// - public ShellProperty EmailAddresses - { - get - { - PropertyKey key = SystemProperties.System.Contact.EmailAddresses; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.EmailName -- PKEY_Contact_EmailName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CC6F4F24-6083-4BD4-8754-674D0DE87AB8}, 100 - /// - public ShellProperty EmailName - { - get - { - PropertyKey key = SystemProperties.System.Contact.EmailName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.FileAsName -- PKEY_Contact_FileAsName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB}, 100 - /// - public ShellProperty FileAsName - { - get - { - PropertyKey key = SystemProperties.System.Contact.FileAsName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.FirstName -- PKEY_Contact_FirstName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {14977844-6B49-4AAD-A714-A4513BF60460}, 100 - /// - public ShellProperty FirstName - { - get - { - PropertyKey key = SystemProperties.System.Contact.FirstName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.FullName -- PKEY_Contact_FullName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {635E9051-50A5-4BA2-B9DB-4ED056C77296}, 100 - /// - public ShellProperty FullName - { - get - { - PropertyKey key = SystemProperties.System.Contact.FullName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Gender -- PKEY_Contact_Gender - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}, 100 - /// - public ShellProperty Gender - { - get - { - PropertyKey key = SystemProperties.System.Contact.Gender; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.GenderValue -- PKEY_Contact_GenderValue - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}, 101 - /// - public ShellProperty GenderValue - { - get - { - PropertyKey key = SystemProperties.System.Contact.GenderValue; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Hobbies -- PKEY_Contact_Hobbies - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {5DC2253F-5E11-4ADF-9CFE-910DD01E3E70}, 100 - /// - public ShellProperty Hobbies - { - get - { - PropertyKey key = SystemProperties.System.Contact.Hobbies; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeAddress -- PKEY_Contact_HomeAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {98F98354-617A-46B8-8560-5B1B64BF1F89}, 100 - /// - public ShellProperty HomeAddress - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeAddressCity -- PKEY_Contact_HomeAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 65 - /// - public ShellProperty HomeAddressCity - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeAddressCity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeAddressCountry -- PKEY_Contact_HomeAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85}, 100 - /// - public ShellProperty HomeAddressCountry - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeAddressCountry; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeAddressPostalCode -- PKEY_Contact_HomeAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8AFCC170-8A46-4B53-9EEE-90BAE7151E62}, 100 - /// - public ShellProperty HomeAddressPostalCode - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeAddressPostalCode; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeAddressPostOfficeBox -- PKEY_Contact_HomeAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7B9F6399-0A3F-4B12-89BD-4ADC51C918AF}, 100 - /// - public ShellProperty HomeAddressPostOfficeBox - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeAddressPostOfficeBox; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeAddressState -- PKEY_Contact_HomeAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C89A23D0-7D6D-4EB8-87D4-776A82D493E5}, 100 - /// - public ShellProperty HomeAddressState - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeAddressState; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeAddressStreet -- PKEY_Contact_HomeAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0ADEF160-DB3F-4308-9A21-06237B16FA2A}, 100 - /// - public ShellProperty HomeAddressStreet - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeAddressStreet; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeFaxNumber -- PKEY_Contact_HomeFaxNumber - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {660E04D6-81AB-4977-A09F-82313113AB26}, 100 - /// - public ShellProperty HomeFaxNumber - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeFaxNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.HomeTelephone -- PKEY_Contact_HomeTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 20 - /// - public ShellProperty HomeTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.HomeTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.IMAddress -- PKEY_Contact_IMAddress - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D68DBD8A-3374-4B81-9972-3EC30682DB3D}, 100 - /// - public ShellProperty IMAddress - { - get - { - PropertyKey key = SystemProperties.System.Contact.IMAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Initials -- PKEY_Contact_Initials - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F3D8F40D-50CB-44A2-9718-40CB9119495D}, 100 - /// - public ShellProperty Initials - { - get - { - PropertyKey key = SystemProperties.System.Contact.Initials; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.JobTitle -- PKEY_Contact_JobTitle - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 6 - /// - public ShellProperty JobTitle - { - get - { - PropertyKey key = SystemProperties.System.Contact.JobTitle; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Label -- PKEY_Contact_Label - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {97B0AD89-DF49-49CC-834E-660974FD755B}, 100 - /// - public ShellProperty Label - { - get - { - PropertyKey key = SystemProperties.System.Contact.Label; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.LastName -- PKEY_Contact_LastName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8F367200-C270-457C-B1D4-E07C5BCD90C7}, 100 - /// - public ShellProperty LastName - { - get - { - PropertyKey key = SystemProperties.System.Contact.LastName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.MailingAddress -- PKEY_Contact_MailingAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C0AC206A-827E-4650-95AE-77E2BB74FCC9}, 100 - /// - public ShellProperty MailingAddress - { - get - { - PropertyKey key = SystemProperties.System.Contact.MailingAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.MiddleName -- PKEY_Contact_MiddleName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 71 - /// - public ShellProperty MiddleName - { - get - { - PropertyKey key = SystemProperties.System.Contact.MiddleName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.MobileTelephone -- PKEY_Contact_MobileTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 35 - /// - public ShellProperty MobileTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.MobileTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.NickName -- PKEY_Contact_NickName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 74 - /// - public ShellProperty NickName - { - get - { - PropertyKey key = SystemProperties.System.Contact.NickName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OfficeLocation -- PKEY_Contact_OfficeLocation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 7 - /// - public ShellProperty OfficeLocation - { - get - { - PropertyKey key = SystemProperties.System.Contact.OfficeLocation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OtherAddress -- PKEY_Contact_OtherAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {508161FA-313B-43D5-83A1-C1ACCF68622C}, 100 - /// - public ShellProperty OtherAddress - { - get - { - PropertyKey key = SystemProperties.System.Contact.OtherAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OtherAddressCity -- PKEY_Contact_OtherAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6E682923-7F7B-4F0C-A337-CFCA296687BF}, 100 - /// - public ShellProperty OtherAddressCity - { - get - { - PropertyKey key = SystemProperties.System.Contact.OtherAddressCity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OtherAddressCountry -- PKEY_Contact_OtherAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8F167568-0AAE-4322-8ED9-6055B7B0E398}, 100 - /// - public ShellProperty OtherAddressCountry - { - get - { - PropertyKey key = SystemProperties.System.Contact.OtherAddressCountry; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OtherAddressPostalCode -- PKEY_Contact_OtherAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {95C656C1-2ABF-4148-9ED3-9EC602E3B7CD}, 100 - /// - public ShellProperty OtherAddressPostalCode - { - get - { - PropertyKey key = SystemProperties.System.Contact.OtherAddressPostalCode; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OtherAddressPostOfficeBox -- PKEY_Contact_OtherAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8B26EA41-058F-43F6-AECC-4035681CE977}, 100 - /// - public ShellProperty OtherAddressPostOfficeBox - { - get - { - PropertyKey key = SystemProperties.System.Contact.OtherAddressPostOfficeBox; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OtherAddressState -- PKEY_Contact_OtherAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {71B377D6-E570-425F-A170-809FAE73E54E}, 100 - /// - public ShellProperty OtherAddressState - { - get - { - PropertyKey key = SystemProperties.System.Contact.OtherAddressState; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.OtherAddressStreet -- PKEY_Contact_OtherAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FF962609-B7D6-4999-862D-95180D529AEA}, 100 - /// - public ShellProperty OtherAddressStreet - { - get - { - PropertyKey key = SystemProperties.System.Contact.OtherAddressStreet; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PagerTelephone -- PKEY_Contact_PagerTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D6304E01-F8F5-4F45-8B15-D024A6296789}, 100 - /// - public ShellProperty PagerTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.PagerTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PersonalTitle -- PKEY_Contact_PersonalTitle - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 69 - /// - public ShellProperty PersonalTitle - { - get - { - PropertyKey key = SystemProperties.System.Contact.PersonalTitle; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryAddressCity -- PKEY_Contact_PrimaryAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C8EA94F0-A9E3-4969-A94B-9C62A95324E0}, 100 - /// - public ShellProperty PrimaryAddressCity - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryAddressCity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryAddressCountry -- PKEY_Contact_PrimaryAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E53D799D-0F3F-466E-B2FF-74634A3CB7A4}, 100 - /// - public ShellProperty PrimaryAddressCountry - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryAddressCountry; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryAddressPostalCode -- PKEY_Contact_PrimaryAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {18BBD425-ECFD-46EF-B612-7B4A6034EDA0}, 100 - /// - public ShellProperty PrimaryAddressPostalCode - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryAddressPostalCode; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryAddressPostOfficeBox -- PKEY_Contact_PrimaryAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DE5EF3C7-46E1-484E-9999-62C5308394C1}, 100 - /// - public ShellProperty PrimaryAddressPostOfficeBox - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryAddressPostOfficeBox; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryAddressState -- PKEY_Contact_PrimaryAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F1176DFE-7138-4640-8B4C-AE375DC70A6D}, 100 - /// - public ShellProperty PrimaryAddressState - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryAddressState; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryAddressStreet -- PKEY_Contact_PrimaryAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {63C25B20-96BE-488F-8788-C09C407AD812}, 100 - /// - public ShellProperty PrimaryAddressStreet - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryAddressStreet; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryEmailAddress -- PKEY_Contact_PrimaryEmailAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 48 - /// - public ShellProperty PrimaryEmailAddress - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryEmailAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.PrimaryTelephone -- PKEY_Contact_PrimaryTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 25 - /// - public ShellProperty PrimaryTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.PrimaryTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Profession -- PKEY_Contact_Profession - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9}, 100 - /// - public ShellProperty Profession - { - get - { - PropertyKey key = SystemProperties.System.Contact.Profession; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.SpouseName -- PKEY_Contact_SpouseName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9D2408B6-3167-422B-82B0-F583B7A7CFE3}, 100 - /// - public ShellProperty SpouseName - { - get - { - PropertyKey key = SystemProperties.System.Contact.SpouseName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.Suffix -- PKEY_Contact_Suffix - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 73 - /// - public ShellProperty Suffix - { - get - { - PropertyKey key = SystemProperties.System.Contact.Suffix; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.TelexNumber -- PKEY_Contact_TelexNumber - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C554493C-C1F7-40C1-A76C-EF8C0614003E}, 100 - /// - public ShellProperty TelexNumber - { - get - { - PropertyKey key = SystemProperties.System.Contact.TelexNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.TTYTDDTelephone -- PKEY_Contact_TTYTDDTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AAF16BAC-2B55-45E6-9F6D-415EB94910DF}, 100 - /// - public ShellProperty TTYTDDTelephone - { - get - { - PropertyKey key = SystemProperties.System.Contact.TTYTDDTelephone; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.WebPage -- PKEY_Contact_WebPage - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 18 - /// - public ShellProperty WebPage - { - get - { - PropertyKey key = SystemProperties.System.Contact.WebPage; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - private PropertyContactJA internalPropertyContactJA = null; - /// - /// Contact.JA Properties - /// - public PropertyContactJA JA - { - get - { - if (internalPropertyContactJA == null) - { - internalPropertyContactJA = new PropertyContactJA(shellObjectParent); - } - - return internalPropertyContactJA; - } - } - #endregion - } - - /// - /// Contact.JA Properties - /// - public class PropertyContactJA : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertyContactJA(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Contact.JA.CompanyNamePhonetic -- PKEY_Contact_JA_CompanyNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 2 - /// - public ShellProperty CompanyNamePhonetic - { - get - { - PropertyKey key = SystemProperties.System.Contact.JA.CompanyNamePhonetic; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 3 - /// - public ShellProperty FirstNamePhonetic - { - get - { - PropertyKey key = SystemProperties.System.Contact.JA.FirstNamePhonetic; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 4 - /// - public ShellProperty LastNamePhonetic - { - get - { - PropertyKey key = SystemProperties.System.Contact.JA.LastNamePhonetic; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Device Properties - /// - public class PropertySystemDevice : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemDevice(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Device.PrinterURL -- PKEY_Device_PrinterURL - /// Description: Printer information Printer URL. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0B48F35A-BE6E-4F17-B108-3C4073D1669A}, 15 - /// - public ShellProperty PrinterURL - { - get - { - PropertyKey key = SystemProperties.System.Device.PrinterURL; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.DeviceInterface Properties - /// - public class PropertySystemDeviceInterface : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemDeviceInterface(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.DeviceInterface.PrinterDriverDirectory -- PKEY_DeviceInterface_PrinterDriverDirectory - /// Description: Printer information Printer Driver Directory. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {847C66DE-B8D6-4AF9-ABC3-6F4F926BC039}, 14 - /// - public ShellProperty PrinterDriverDirectory - { - get - { - PropertyKey key = SystemProperties.System.DeviceInterface.PrinterDriverDirectory; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DeviceInterface.PrinterDriverName -- PKEY_DeviceInterface_PrinterDriverName - /// Description: Printer information Driver Name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AFC47170-14F5-498C-8F30-B0D19BE449C6}, 11 - /// - public ShellProperty PrinterDriverName - { - get - { - PropertyKey key = SystemProperties.System.DeviceInterface.PrinterDriverName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DeviceInterface.PrinterName -- PKEY_DeviceInterface_PrinterName - /// Description: Printer information Printer Name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0A7B84EF-0C27-463F-84EF-06C5070001BE}, 10 - /// - public ShellProperty PrinterName - { - get - { - PropertyKey key = SystemProperties.System.DeviceInterface.PrinterName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DeviceInterface.PrinterPortName -- PKEY_DeviceInterface_PrinterPortName - /// Description: Printer information Port Name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {EEC7B761-6F94-41B1-949F-C729720DD13C}, 12 - /// - public ShellProperty PrinterPortName - { - get - { - PropertyKey key = SystemProperties.System.DeviceInterface.PrinterPortName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Devices Properties - /// - public class PropertySystemDevices : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemDevices(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Devices.BatteryLife -- PKEY_Devices_BatteryLife - /// Description: Remaining battery life of the device as an integer between 0 and 100 percent. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 10 - /// - public ShellProperty BatteryLife - { - get - { - PropertyKey key = SystemProperties.System.Devices.BatteryLife; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.BatteryPlusCharging -- PKEY_Devices_BatteryPlusCharging - /// Description: Remaining battery life of the device as an integer between 0 and 100 percent and the device's charging state. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 22 - /// - public ShellProperty BatteryPlusCharging - { - get - { - PropertyKey key = SystemProperties.System.Devices.BatteryPlusCharging; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.BatteryPlusChargingText -- PKEY_Devices_BatteryPlusChargingText - /// Description: Remaining battery life of the device and the device's charging state as a string. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 23 - /// - public ShellProperty BatteryPlusChargingText - { - get - { - PropertyKey key = SystemProperties.System.Devices.BatteryPlusChargingText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Category -- PKEY_Devices_Category_Desc_Singular - /// Description: Singular form of device category. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 91 - /// - public ShellProperty Category - { - get - { - PropertyKey key = SystemProperties.System.Devices.Category; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.CategoryGroup -- PKEY_Devices_CategoryGroup_Desc - /// Description: Plural form of device category. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 94 - /// - public ShellProperty CategoryGroup - { - get - { - PropertyKey key = SystemProperties.System.Devices.CategoryGroup; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.CategoryPlural -- PKEY_Devices_Category_Desc_Plural - /// Description: Plural form of device category. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 92 - /// - public ShellProperty CategoryPlural - { - get - { - PropertyKey key = SystemProperties.System.Devices.CategoryPlural; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.ChargingState -- PKEY_Devices_ChargingState - /// Description: Boolean value representing if the device is currently charging. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 11 - /// - public ShellProperty ChargingState - { - get - { - PropertyKey key = SystemProperties.System.Devices.ChargingState; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Connected -- PKEY_Devices_IsConnected - /// Description: Device connection state. If VARIANT_TRUE, indicates the device is currently connected to the computer. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 55 - /// - public ShellProperty Connected - { - get - { - PropertyKey key = SystemProperties.System.Devices.Connected; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.ContainerId -- PKEY_Devices_ContainerId - /// Description: Device container ID. - /// - /// Type: Guid -- VT_CLSID - /// FormatID: {8C7ED206-3F8A-4827-B3AB-AE9E1FAEFC6C}, 2 - /// - public ShellProperty ContainerId - { - get - { - PropertyKey key = SystemProperties.System.Devices.ContainerId; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.DefaultTooltip -- PKEY_Devices_DefaultTooltip - /// Description: Tooltip for default state - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 153 - /// - public ShellProperty DefaultTooltip - { - get - { - PropertyKey key = SystemProperties.System.Devices.DefaultTooltip; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.DeviceDescription1 -- PKEY_Devices_DeviceDescription1 - /// Description: First line of descriptive text about the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 81 - /// - public ShellProperty DeviceDescription1 - { - get - { - PropertyKey key = SystemProperties.System.Devices.DeviceDescription1; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.DeviceDescription2 -- PKEY_Devices_DeviceDescription2 - /// Description: Second line of descriptive text about the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 82 - /// - public ShellProperty DeviceDescription2 - { - get - { - PropertyKey key = SystemProperties.System.Devices.DeviceDescription2; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.DiscoveryMethod -- PKEY_Devices_DiscoveryMethod - /// Description: Device discovery method. This indicates on what transport or physical connection the device is discovered. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 52 - /// - public ShellProperty DiscoveryMethod - { - get - { - PropertyKey key = SystemProperties.System.Devices.DiscoveryMethod; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.FriendlyName -- PKEY_Devices_FriendlyName - /// Description: Device friendly name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 12288 - /// - public ShellProperty FriendlyName - { - get - { - PropertyKey key = SystemProperties.System.Devices.FriendlyName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.FunctionPaths -- PKEY_Devices_FunctionPaths - /// Description: Available functions for this device. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 3 - /// - public ShellProperty FunctionPaths - { - get - { - PropertyKey key = SystemProperties.System.Devices.FunctionPaths; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.InterfacePaths -- PKEY_Devices_InterfacePaths - /// Description: Available interfaces for this device. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 2 - /// - public ShellProperty InterfacePaths - { - get - { - PropertyKey key = SystemProperties.System.Devices.InterfacePaths; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.IsDefault -- PKEY_Devices_IsDefaultDevice - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 86 - /// - public ShellProperty IsDefault - { - get - { - PropertyKey key = SystemProperties.System.Devices.IsDefault; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.IsNetworkConnected -- PKEY_Devices_IsNetworkDevice - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 85 - /// - public ShellProperty IsNetworkConnected - { - get - { - PropertyKey key = SystemProperties.System.Devices.IsNetworkConnected; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.IsShared -- PKEY_Devices_IsSharedDevice - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 84 - /// - public ShellProperty IsShared - { - get - { - PropertyKey key = SystemProperties.System.Devices.IsShared; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.IsSoftwareInstalling -- PKEY_Devices_IsSoftwareInstalling - /// Description: If VARIANT_TRUE, the device installer is currently installing software. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {83DA6326-97A6-4088-9453-A1923F573B29}, 9 - /// - public ShellProperty IsSoftwareInstalling - { - get - { - PropertyKey key = SystemProperties.System.Devices.IsSoftwareInstalling; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.LaunchDeviceStageFromExplorer -- PKEY_Devices_LaunchDeviceStageFromExplorer - /// Description: Indicates whether to launch Device Stage or not - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 77 - /// - public ShellProperty LaunchDeviceStageFromExplorer - { - get - { - PropertyKey key = SystemProperties.System.Devices.LaunchDeviceStageFromExplorer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.LocalMachine -- PKEY_Devices_IsLocalMachine - /// Description: If VARIANT_TRUE, the device in question is actually the computer. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 70 - /// - public ShellProperty LocalMachine - { - get - { - PropertyKey key = SystemProperties.System.Devices.LocalMachine; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Manufacturer -- PKEY_Devices_Manufacturer - /// Description: Device manufacturer. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8192 - /// - public ShellProperty Manufacturer - { - get - { - PropertyKey key = SystemProperties.System.Devices.Manufacturer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.MissedCalls -- PKEY_Devices_MissedCalls - /// Description: Number of missed calls on the device. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 5 - /// - public ShellProperty MissedCalls - { - get - { - PropertyKey key = SystemProperties.System.Devices.MissedCalls; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.ModelName -- PKEY_Devices_ModelName - /// Description: Model name of the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8194 - /// - public ShellProperty ModelName - { - get - { - PropertyKey key = SystemProperties.System.Devices.ModelName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.ModelNumber -- PKEY_Devices_ModelNumber - /// Description: Model number of the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8195 - /// - public ShellProperty ModelNumber - { - get - { - PropertyKey key = SystemProperties.System.Devices.ModelNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.NetworkedTooltip -- PKEY_Devices_NetworkedTooltip - /// Description: Tooltip for connection state - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 152 - /// - public ShellProperty NetworkedTooltip - { - get - { - PropertyKey key = SystemProperties.System.Devices.NetworkedTooltip; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.NetworkName -- PKEY_Devices_NetworkName - /// Description: Name of the device's network. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 7 - /// - public ShellProperty NetworkName - { - get - { - PropertyKey key = SystemProperties.System.Devices.NetworkName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.NetworkType -- PKEY_Devices_NetworkType - /// Description: String representing the type of the device's network. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 8 - /// - public ShellProperty NetworkType - { - get - { - PropertyKey key = SystemProperties.System.Devices.NetworkType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.NewPictures -- PKEY_Devices_NewPictures - /// Description: Number of new pictures on the device. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 4 - /// - public ShellProperty NewPictures - { - get - { - PropertyKey key = SystemProperties.System.Devices.NewPictures; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Notification -- PKEY_Devices_Notification - /// Description: Device Notification Property. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {06704B0C-E830-4C81-9178-91E4E95A80A0}, 3 - /// - public ShellProperty Notification - { - get - { - PropertyKey key = SystemProperties.System.Devices.Notification; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.NotificationStore -- PKEY_Devices_NotificationStore - /// Description: Device Notification Store. - /// - /// Type: Object -- VT_UNKNOWN - /// FormatID: {06704B0C-E830-4C81-9178-91E4E95A80A0}, 2 - /// - public ShellProperty NotificationStore - { - get - { - PropertyKey key = SystemProperties.System.Devices.NotificationStore; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.NotWorkingProperly -- PKEY_Devices_IsNotWorkingProperly - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 83 - /// - public ShellProperty NotWorkingProperly - { - get - { - PropertyKey key = SystemProperties.System.Devices.NotWorkingProperly; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Paired -- PKEY_Devices_IsPaired - /// Description: Device paired state. If VARIANT_TRUE, indicates the device is not paired with the computer. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 56 - /// - public ShellProperty Paired - { - get - { - PropertyKey key = SystemProperties.System.Devices.Paired; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.PrimaryCategory -- PKEY_Devices_PrimaryCategory - /// Description: Primary category group for this device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 10 - /// - public ShellProperty PrimaryCategory - { - get - { - PropertyKey key = SystemProperties.System.Devices.PrimaryCategory; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Roaming -- PKEY_Devices_Roaming - /// Description: Status indicator used to indicate if the device is roaming. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 9 - /// - public ShellProperty Roaming - { - get - { - PropertyKey key = SystemProperties.System.Devices.Roaming; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.SafeRemovalRequired -- PKEY_Devices_SafeRemovalRequired - /// Description: Indicates if a device requires safe removal or not - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {AFD97640-86A3-4210-B67C-289C41AABE55}, 2 - /// - public ShellProperty SafeRemovalRequired - { - get - { - PropertyKey key = SystemProperties.System.Devices.SafeRemovalRequired; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.SharedTooltip -- PKEY_Devices_SharedTooltip - /// Description: Tooltip for sharing state - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 151 - /// - public ShellProperty SharedTooltip - { - get - { - PropertyKey key = SystemProperties.System.Devices.SharedTooltip; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.SignalStrength -- PKEY_Devices_SignalStrength - /// Description: Device signal strength. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 2 - /// - public ShellProperty SignalStrength - { - get - { - PropertyKey key = SystemProperties.System.Devices.SignalStrength; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Status1 -- PKEY_Devices_Status1 - /// Description: 1st line of device status. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 257 - /// - public ShellProperty Status1 - { - get - { - PropertyKey key = SystemProperties.System.Devices.Status1; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Status2 -- PKEY_Devices_Status2 - /// Description: 2nd line of device status. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 258 - /// - public ShellProperty Status2 - { - get - { - PropertyKey key = SystemProperties.System.Devices.Status2; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.StorageCapacity -- PKEY_Devices_StorageCapacity - /// Description: Total storage capacity of the device. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 12 - /// - public ShellProperty StorageCapacity - { - get - { - PropertyKey key = SystemProperties.System.Devices.StorageCapacity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.StorageFreeSpace -- PKEY_Devices_StorageFreeSpace - /// Description: Total free space of the storage of the device. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 13 - /// - public ShellProperty StorageFreeSpace - { - get - { - PropertyKey key = SystemProperties.System.Devices.StorageFreeSpace; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.StorageFreeSpacePercent -- PKEY_Devices_StorageFreeSpacePercent - /// Description: Total free space of the storage of the device as a percentage. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 14 - /// - public ShellProperty StorageFreeSpacePercent - { - get - { - PropertyKey key = SystemProperties.System.Devices.StorageFreeSpacePercent; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.TextMessages -- PKEY_Devices_TextMessages - /// Description: Number of unread text messages on the device. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 3 - /// - public ShellProperty TextMessages - { - get - { - PropertyKey key = SystemProperties.System.Devices.TextMessages; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Voicemail -- PKEY_Devices_Voicemail - /// Description: Status indicator used to indicate if the device has voicemail. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 6 - /// - public ShellProperty Voicemail - { - get - { - PropertyKey key = SystemProperties.System.Devices.Voicemail; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - private PropertyDevicesNotifications internalPropertyDevicesNotifications = null; - /// - /// Devices.Notifications Properties - /// - public PropertyDevicesNotifications Notifications - { - get - { - if (internalPropertyDevicesNotifications == null) - { - internalPropertyDevicesNotifications = new PropertyDevicesNotifications(shellObjectParent); - } - - return internalPropertyDevicesNotifications; - } - } - #endregion - } - - /// - /// Devices.Notifications Properties - /// - public class PropertyDevicesNotifications : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertyDevicesNotifications(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Devices.Notifications.LowBattery -- PKEY_Devices_Notification_LowBattery - /// Description: Device Low Battery Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {C4C07F2B-8524-4E66-AE3A-A6235F103BEB}, 2 - /// - public ShellProperty LowBattery - { - get - { - PropertyKey key = SystemProperties.System.Devices.Notifications.LowBattery; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Notifications.MissedCall -- PKEY_Devices_Notification_MissedCall - /// Description: Device Missed Call Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {6614EF48-4EFE-4424-9EDA-C79F404EDF3E}, 2 - /// - public ShellProperty MissedCall - { - get - { - PropertyKey key = SystemProperties.System.Devices.Notifications.MissedCall; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Notifications.NewMessage -- PKEY_Devices_Notification_NewMessage - /// Description: Device New Message Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {2BE9260A-2012-4742-A555-F41B638B7DCB}, 2 - /// - public ShellProperty NewMessage - { - get - { - PropertyKey key = SystemProperties.System.Devices.Notifications.NewMessage; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Notifications.NewVoicemail -- PKEY_Devices_Notification_NewVoicemail - /// Description: Device Voicemail Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {59569556-0A08-4212-95B9-FAE2AD6413DB}, 2 - /// - public ShellProperty NewVoicemail - { - get - { - PropertyKey key = SystemProperties.System.Devices.Notifications.NewVoicemail; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Notifications.StorageFull -- PKEY_Devices_Notification_StorageFull - /// Description: Device Storage Full Notification. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 2 - /// - public ShellProperty StorageFull - { - get - { - PropertyKey key = SystemProperties.System.Devices.Notifications.StorageFull; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Devices.Notifications.StorageFullLinkText -- PKEY_Devices_Notification_StorageFullLinkText - /// Description: Link Text for the Device Storage Full Notification. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 3 - /// - public ShellProperty StorageFullLinkText - { - get - { - PropertyKey key = SystemProperties.System.Devices.Notifications.StorageFullLinkText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Document Properties - /// - public class PropertySystemDocument : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemDocument(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Document.ByteCount -- PKEY_Document_ByteCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 4 (PIDDSI_BYTECOUNT) - /// - public ShellProperty ByteCount - { - get - { - PropertyKey key = SystemProperties.System.Document.ByteCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.CharacterCount -- PKEY_Document_CharacterCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 16 (PIDSI_CHARCOUNT) - /// - public ShellProperty CharacterCount - { - get - { - PropertyKey key = SystemProperties.System.Document.CharacterCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.ClientID -- PKEY_Document_ClientID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {276D7BB0-5B34-4FB0-AA4B-158ED12A1809}, 100 - /// - public ShellProperty ClientID - { - get - { - PropertyKey key = SystemProperties.System.Document.ClientID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.Contributor -- PKEY_Document_Contributor - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {F334115E-DA1B-4509-9B3D-119504DC7ABB}, 100 - /// - public ShellProperty Contributor - { - get - { - PropertyKey key = SystemProperties.System.Document.Contributor; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.DateCreated -- PKEY_Document_DateCreated - /// Description: This property is stored in the document, not obtained from the file system. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 12 (PIDSI_CREATE_DTM) - /// - public ShellProperty DateCreated - { - get - { - PropertyKey key = SystemProperties.System.Document.DateCreated; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.DatePrinted -- PKEY_Document_DatePrinted - /// Description: Legacy name: "DocLastPrinted". - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 11 (PIDSI_LASTPRINTED) - /// - public ShellProperty DatePrinted - { - get - { - PropertyKey key = SystemProperties.System.Document.DatePrinted; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.DateSaved -- PKEY_Document_DateSaved - /// Description: Legacy name: "DocLastSavedTm". - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 13 (PIDSI_LASTSAVE_DTM) - /// - public ShellProperty DateSaved - { - get - { - PropertyKey key = SystemProperties.System.Document.DateSaved; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.Division -- PKEY_Document_Division - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {1E005EE6-BF27-428B-B01C-79676ACD2870}, 100 - /// - public ShellProperty Division - { - get - { - PropertyKey key = SystemProperties.System.Document.Division; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.DocumentID -- PKEY_Document_DocumentID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E08805C8-E395-40DF-80D2-54F0D6C43154}, 100 - /// - public ShellProperty DocumentID - { - get - { - PropertyKey key = SystemProperties.System.Document.DocumentID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.HiddenSlideCount -- PKEY_Document_HiddenSlideCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 9 (PIDDSI_HIDDENCOUNT) - /// - public ShellProperty HiddenSlideCount - { - get - { - PropertyKey key = SystemProperties.System.Document.HiddenSlideCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.LastAuthor -- PKEY_Document_LastAuthor - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 8 (PIDSI_LASTAUTHOR) - /// - public ShellProperty LastAuthor - { - get - { - PropertyKey key = SystemProperties.System.Document.LastAuthor; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.LineCount -- PKEY_Document_LineCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 5 (PIDDSI_LINECOUNT) - /// - public ShellProperty LineCount - { - get - { - PropertyKey key = SystemProperties.System.Document.LineCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.Manager -- PKEY_Document_Manager - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 14 (PIDDSI_MANAGER) - /// - public ShellProperty Manager - { - get - { - PropertyKey key = SystemProperties.System.Document.Manager; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.MultimediaClipCount -- PKEY_Document_MultimediaClipCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 10 (PIDDSI_MMCLIPCOUNT) - /// - public ShellProperty MultimediaClipCount - { - get - { - PropertyKey key = SystemProperties.System.Document.MultimediaClipCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.NoteCount -- PKEY_Document_NoteCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 8 (PIDDSI_NOTECOUNT) - /// - public ShellProperty NoteCount - { - get - { - PropertyKey key = SystemProperties.System.Document.NoteCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.PageCount -- PKEY_Document_PageCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 14 (PIDSI_PAGECOUNT) - /// - public ShellProperty PageCount - { - get - { - PropertyKey key = SystemProperties.System.Document.PageCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.ParagraphCount -- PKEY_Document_ParagraphCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 6 (PIDDSI_PARCOUNT) - /// - public ShellProperty ParagraphCount - { - get - { - PropertyKey key = SystemProperties.System.Document.ParagraphCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.PresentationFormat -- PKEY_Document_PresentationFormat - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 3 (PIDDSI_PRESFORMAT) - /// - public ShellProperty PresentationFormat - { - get - { - PropertyKey key = SystemProperties.System.Document.PresentationFormat; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.RevisionNumber -- PKEY_Document_RevisionNumber - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 9 (PIDSI_REVNUMBER) - /// - public ShellProperty RevisionNumber - { - get - { - PropertyKey key = SystemProperties.System.Document.RevisionNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.Security -- PKEY_Document_Security - /// Description: Access control information, from SummaryInfo propset - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 19 - /// - public ShellProperty Security - { - get - { - PropertyKey key = SystemProperties.System.Document.Security; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.SlideCount -- PKEY_Document_SlideCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 7 (PIDDSI_SLIDECOUNT) - /// - public ShellProperty SlideCount - { - get - { - PropertyKey key = SystemProperties.System.Document.SlideCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.Template -- PKEY_Document_Template - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 7 (PIDSI_TEMPLATE) - /// - public ShellProperty Template - { - get - { - PropertyKey key = SystemProperties.System.Document.Template; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.TotalEditingTime -- PKEY_Document_TotalEditingTime - /// Description: 100ns units, not milliseconds. VT_FILETIME for IPropertySetStorage handlers (legacy) - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 10 (PIDSI_EDITTIME) - /// - public ShellProperty TotalEditingTime - { - get - { - PropertyKey key = SystemProperties.System.Document.TotalEditingTime; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.Version -- PKEY_Document_Version - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 29 - /// - public ShellProperty Version - { - get - { - PropertyKey key = SystemProperties.System.Document.Version; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Document.WordCount -- PKEY_Document_WordCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 15 (PIDSI_WORDCOUNT) - /// - public ShellProperty WordCount - { - get - { - PropertyKey key = SystemProperties.System.Document.WordCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.DRM Properties - /// - public class PropertySystemDRM : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemDRM(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.DRM.DatePlayExpires -- PKEY_DRM_DatePlayExpires - /// Description: Indicates when play expires for digital rights management. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 6 (PIDDRSI_PLAYEXPIRES) - /// - public ShellProperty DatePlayExpires - { - get - { - PropertyKey key = SystemProperties.System.DRM.DatePlayExpires; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DRM.DatePlayStarts -- PKEY_DRM_DatePlayStarts - /// Description: Indicates when play starts for digital rights management. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 5 (PIDDRSI_PLAYSTARTS) - /// - public ShellProperty DatePlayStarts - { - get - { - PropertyKey key = SystemProperties.System.DRM.DatePlayStarts; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DRM.Description -- PKEY_DRM_Description - /// Description: Displays the description for digital rights management. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 3 (PIDDRSI_DESCRIPTION) - /// - public ShellProperty Description - { - get - { - PropertyKey key = SystemProperties.System.DRM.Description; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DRM.IsProtected -- PKEY_DRM_IsProtected - /// Description: - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 2 (PIDDRSI_PROTECTED) - /// - public ShellProperty IsProtected - { - get - { - PropertyKey key = SystemProperties.System.DRM.IsProtected; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.DRM.PlayCount -- PKEY_DRM_PlayCount - /// Description: Indicates the play count for digital rights management. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 4 (PIDDRSI_PLAYCOUNT) - /// - public ShellProperty PlayCount - { - get - { - PropertyKey key = SystemProperties.System.DRM.PlayCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.GPS Properties - /// - public class PropertySystemGPS : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemGPS(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.GPS.Altitude -- PKEY_GPS_Altitude - /// Description: Indicates the altitude based on the reference in PKEY_GPS_AltitudeRef. Calculated from PKEY_GPS_AltitudeNumerator and - ///PKEY_GPS_AltitudeDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {827EDB4F-5B73-44A7-891D-FDFFABEA35CA}, 100 - /// - public ShellProperty Altitude - { - get - { - PropertyKey key = SystemProperties.System.GPS.Altitude; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.AltitudeDenominator -- PKEY_GPS_AltitudeDenominator - /// Description: Denominator of PKEY_GPS_Altitude - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {78342DCB-E358-4145-AE9A-6BFE4E0F9F51}, 100 - /// - public ShellProperty AltitudeDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.AltitudeDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.AltitudeNumerator -- PKEY_GPS_AltitudeNumerator - /// Description: Numerator of PKEY_GPS_Altitude - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE}, 100 - /// - public ShellProperty AltitudeNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.AltitudeNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.AltitudeRef -- PKEY_GPS_AltitudeRef - /// Description: Indicates the reference for the altitude property. (eg: above sea level, below sea level, absolute value) - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {46AC629D-75EA-4515-867F-6DC4321C5844}, 100 - /// - public ShellProperty AltitudeRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.AltitudeRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.AreaInformation -- PKEY_GPS_AreaInformation - /// Description: Represents the name of the GPS area - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {972E333E-AC7E-49F1-8ADF-A70D07A9BCAB}, 100 - /// - public ShellProperty AreaInformation - { - get - { - PropertyKey key = SystemProperties.System.GPS.AreaInformation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Date -- PKEY_GPS_Date - /// Description: Date and time of the GPS record - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {3602C812-0F3B-45F0-85AD-603468D69423}, 100 - /// - public ShellProperty Date - { - get - { - PropertyKey key = SystemProperties.System.GPS.Date; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestBearing -- PKEY_GPS_DestBearing - /// Description: Indicates the bearing to the destination point. Calculated from PKEY_GPS_DestBearingNumerator and - ///PKEY_GPS_DestBearingDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA}, 100 - /// - public ShellProperty DestBearing - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestBearing; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestBearingDenominator -- PKEY_GPS_DestBearingDenominator - /// Description: Denominator of PKEY_GPS_DestBearing - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5}, 100 - /// - public ShellProperty DestBearingDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestBearingDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestBearingNumerator -- PKEY_GPS_DestBearingNumerator - /// Description: Numerator of PKEY_GPS_DestBearing - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF}, 100 - /// - public ShellProperty DestBearingNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestBearingNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestBearingRef -- PKEY_GPS_DestBearingRef - /// Description: Indicates the reference used for the giving the bearing to the destination point. (eg: true direction, magnetic direction) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9AB84393-2A0F-4B75-BB22-7279786977CB}, 100 - /// - public ShellProperty DestBearingRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestBearingRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestDistance -- PKEY_GPS_DestDistance - /// Description: Indicates the distance to the destination point. Calculated from PKEY_GPS_DestDistanceNumerator and - ///PKEY_GPS_DestDistanceDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {A93EAE04-6804-4F24-AC81-09B266452118}, 100 - /// - public ShellProperty DestDistance - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestDistance; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestDistanceDenominator -- PKEY_GPS_DestDistanceDenominator - /// Description: Denominator of PKEY_GPS_DestDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7}, 100 - /// - public ShellProperty DestDistanceDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestDistanceDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestDistanceNumerator -- PKEY_GPS_DestDistanceNumerator - /// Description: Numerator of PKEY_GPS_DestDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0}, 100 - /// - public ShellProperty DestDistanceNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestDistanceNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestDistanceRef -- PKEY_GPS_DestDistanceRef - /// Description: Indicates the unit used to express the distance to the destination. (eg: kilometers, miles, knots) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {ED4DF2D3-8695-450B-856F-F5C1C53ACB66}, 100 - /// - public ShellProperty DestDistanceRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestDistanceRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLatitude -- PKEY_GPS_DestLatitude - /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1 - ///is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLatitudeNumerator and - ///PKEY_GPS_DestLatitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {9D1D7CC5-5C39-451C-86B3-928E2D18CC47}, 100 - /// - public ShellProperty DestLatitude - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLatitude; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLatitudeDenominator -- PKEY_GPS_DestLatitudeDenominator - /// Description: Denominator of PKEY_GPS_DestLatitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {3A372292-7FCA-49A7-99D5-E47BB2D4E7AB}, 100 - /// - public ShellProperty DestLatitudeDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLatitudeDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLatitudeNumerator -- PKEY_GPS_DestLatitudeNumerator - /// Description: Numerator of PKEY_GPS_DestLatitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {ECF4B6F6-D5A6-433C-BB92-4076650FC890}, 100 - /// - public ShellProperty DestLatitudeNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLatitudeNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLatitudeRef -- PKEY_GPS_DestLatitudeRef - /// Description: Indicates whether the latitude destination point is north or south latitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CEA820B9-CE61-4885-A128-005D9087C192}, 100 - /// - public ShellProperty DestLatitudeRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLatitudeRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLongitude -- PKEY_GPS_DestLongitude - /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1 - ///is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLongitudeNumerator and - ///PKEY_GPS_DestLongitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {47A96261-CB4C-4807-8AD3-40B9D9DBC6BC}, 100 - /// - public ShellProperty DestLongitude - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLongitude; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLongitudeDenominator -- PKEY_GPS_DestLongitudeDenominator - /// Description: Denominator of PKEY_GPS_DestLongitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {425D69E5-48AD-4900-8D80-6EB6B8D0AC86}, 100 - /// - public ShellProperty DestLongitudeDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLongitudeDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLongitudeNumerator -- PKEY_GPS_DestLongitudeNumerator - /// Description: Numerator of PKEY_GPS_DestLongitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {A3250282-FB6D-48D5-9A89-DBCACE75CCCF}, 100 - /// - public ShellProperty DestLongitudeNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLongitudeNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DestLongitudeRef -- PKEY_GPS_DestLongitudeRef - /// Description: Indicates whether the longitude destination point is east or west longitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128}, 100 - /// - public ShellProperty DestLongitudeRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.DestLongitudeRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Differential -- PKEY_GPS_Differential - /// Description: Indicates whether differential correction was applied to the GPS receiver - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D}, 100 - /// - public ShellProperty Differential - { - get - { - PropertyKey key = SystemProperties.System.GPS.Differential; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DOP -- PKEY_GPS_DOP - /// Description: Indicates the GPS DOP (data degree of precision). Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {0CF8FB02-1837-42F1-A697-A7017AA289B9}, 100 - /// - public ShellProperty DOP - { - get - { - PropertyKey key = SystemProperties.System.GPS.DOP; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DOPDenominator -- PKEY_GPS_DOPDenominator - /// Description: Denominator of PKEY_GPS_DOP - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A0BE94C5-50BA-487B-BD35-0654BE8881ED}, 100 - /// - public ShellProperty DOPDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DOPDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.DOPNumerator -- PKEY_GPS_DOPNumerator - /// Description: Numerator of PKEY_GPS_DOP - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {47166B16-364F-4AA0-9F31-E2AB3DF449C3}, 100 - /// - public ShellProperty DOPNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.DOPNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.ImgDirection -- PKEY_GPS_ImgDirection - /// Description: Indicates direction of the image when it was captured. Calculated from PKEY_GPS_ImgDirectionNumerator and - ///PKEY_GPS_ImgDirectionDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {16473C91-D017-4ED9-BA4D-B6BAA55DBCF8}, 100 - /// - public ShellProperty ImgDirection - { - get - { - PropertyKey key = SystemProperties.System.GPS.ImgDirection; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.ImgDirectionDenominator -- PKEY_GPS_ImgDirectionDenominator - /// Description: Denominator of PKEY_GPS_ImgDirection - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {10B24595-41A2-4E20-93C2-5761C1395F32}, 100 - /// - public ShellProperty ImgDirectionDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.ImgDirectionDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.ImgDirectionNumerator -- PKEY_GPS_ImgDirectionNumerator - /// Description: Numerator of PKEY_GPS_ImgDirection - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {DC5877C7-225F-45F7-BAC7-E81334B6130A}, 100 - /// - public ShellProperty ImgDirectionNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.ImgDirectionNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.ImgDirectionRef -- PKEY_GPS_ImgDirectionRef - /// Description: Indicates reference for giving the direction of the image when it was captured. (eg: true direction, magnetic direction) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5}, 100 - /// - public ShellProperty ImgDirectionRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.ImgDirectionRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Latitude -- PKEY_GPS_Latitude - /// Description: Indicates the latitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2 - ///is the seconds. Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {8727CFFF-4868-4EC6-AD5B-81B98521D1AB}, 100 - /// - public ShellProperty Latitude - { - get - { - PropertyKey key = SystemProperties.System.GPS.Latitude; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.LatitudeDenominator -- PKEY_GPS_LatitudeDenominator - /// Description: Denominator of PKEY_GPS_Latitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {16E634EE-2BFF-497B-BD8A-4341AD39EEB9}, 100 - /// - public ShellProperty LatitudeDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.LatitudeDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.LatitudeNumerator -- PKEY_GPS_LatitudeNumerator - /// Description: Numerator of PKEY_GPS_Latitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2}, 100 - /// - public ShellProperty LatitudeNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.LatitudeNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.LatitudeRef -- PKEY_GPS_LatitudeRef - /// Description: Indicates whether latitude is north or south latitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {029C0252-5B86-46C7-ACA0-2769FFC8E3D4}, 100 - /// - public ShellProperty LatitudeRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.LatitudeRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Longitude -- PKEY_GPS_Longitude - /// Description: Indicates the longitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2 - ///is the seconds. Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {C4C4DBB2-B593-466B-BBDA-D03D27D5E43A}, 100 - /// - public ShellProperty Longitude - { - get - { - PropertyKey key = SystemProperties.System.GPS.Longitude; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.LongitudeDenominator -- PKEY_GPS_LongitudeDenominator - /// Description: Denominator of PKEY_GPS_Longitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {BE6E176C-4534-4D2C-ACE5-31DEDAC1606B}, 100 - /// - public ShellProperty LongitudeDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.LongitudeDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.LongitudeNumerator -- PKEY_GPS_LongitudeNumerator - /// Description: Numerator of PKEY_GPS_Longitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {02B0F689-A914-4E45-821D-1DDA452ED2C4}, 100 - /// - public ShellProperty LongitudeNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.LongitudeNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.LongitudeRef -- PKEY_GPS_LongitudeRef - /// Description: Indicates whether longitude is east or west longitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {33DCF22B-28D5-464C-8035-1EE9EFD25278}, 100 - /// - public ShellProperty LongitudeRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.LongitudeRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.MapDatum -- PKEY_GPS_MapDatum - /// Description: Indicates the geodetic survey data used by the GPS receiver - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {2CA2DAE6-EDDC-407D-BEF1-773942ABFA95}, 100 - /// - public ShellProperty MapDatum - { - get - { - PropertyKey key = SystemProperties.System.GPS.MapDatum; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.MeasureMode -- PKEY_GPS_MeasureMode - /// Description: Indicates the GPS measurement mode. (eg: 2-dimensional, 3-dimensional) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A015ED5D-AAEA-4D58-8A86-3C586920EA0B}, 100 - /// - public ShellProperty MeasureMode - { - get - { - PropertyKey key = SystemProperties.System.GPS.MeasureMode; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.ProcessingMethod -- PKEY_GPS_ProcessingMethod - /// Description: Indicates the name of the method used for location finding - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {59D49E61-840F-4AA9-A939-E2099B7F6399}, 100 - /// - public ShellProperty ProcessingMethod - { - get - { - PropertyKey key = SystemProperties.System.GPS.ProcessingMethod; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Satellites -- PKEY_GPS_Satellites - /// Description: Indicates the GPS satellites used for measurements - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {467EE575-1F25-4557-AD4E-B8B58B0D9C15}, 100 - /// - public ShellProperty Satellites - { - get - { - PropertyKey key = SystemProperties.System.GPS.Satellites; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Speed -- PKEY_GPS_Speed - /// Description: Indicates the speed of the GPS receiver movement. Calculated from PKEY_GPS_SpeedNumerator and - ///PKEY_GPS_SpeedDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {DA5D0862-6E76-4E1B-BABD-70021BD25494}, 100 - /// - public ShellProperty Speed - { - get - { - PropertyKey key = SystemProperties.System.GPS.Speed; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.SpeedDenominator -- PKEY_GPS_SpeedDenominator - /// Description: Denominator of PKEY_GPS_Speed - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7D122D5A-AE5E-4335-8841-D71E7CE72F53}, 100 - /// - public ShellProperty SpeedDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.SpeedDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.SpeedNumerator -- PKEY_GPS_SpeedNumerator - /// Description: Numerator of PKEY_GPS_Speed - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {ACC9CE3D-C213-4942-8B48-6D0820F21C6D}, 100 - /// - public ShellProperty SpeedNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.SpeedNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.SpeedRef -- PKEY_GPS_SpeedRef - /// Description: Indicates the unit used to express the speed of the GPS receiver movement. (eg: kilometers per hour, - ///miles per hour, knots). - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453}, 100 - /// - public ShellProperty SpeedRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.SpeedRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Status -- PKEY_GPS_Status - /// Description: Indicates the status of the GPS receiver when the image was recorded. (eg: measurement in progress, - ///measurement interoperability). - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {125491F4-818F-46B2-91B5-D537753617B2}, 100 - /// - public ShellProperty Status - { - get - { - PropertyKey key = SystemProperties.System.GPS.Status; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.Track -- PKEY_GPS_Track - /// Description: Indicates the direction of the GPS receiver movement. Calculated from PKEY_GPS_TrackNumerator and - ///PKEY_GPS_TrackDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {76C09943-7C33-49E3-9E7E-CDBA872CFADA}, 100 - /// - public ShellProperty Track - { - get - { - PropertyKey key = SystemProperties.System.GPS.Track; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.TrackDenominator -- PKEY_GPS_TrackDenominator - /// Description: Denominator of PKEY_GPS_Track - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {C8D1920C-01F6-40C0-AC86-2F3A4AD00770}, 100 - /// - public ShellProperty TrackDenominator - { - get - { - PropertyKey key = SystemProperties.System.GPS.TrackDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.TrackNumerator -- PKEY_GPS_TrackNumerator - /// Description: Numerator of PKEY_GPS_Track - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {702926F4-44A6-43E1-AE71-45627116893B}, 100 - /// - public ShellProperty TrackNumerator - { - get - { - PropertyKey key = SystemProperties.System.GPS.TrackNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.TrackRef -- PKEY_GPS_TrackRef - /// Description: Indicates reference for the direction of the GPS receiver movement. (eg: true direction, magnetic direction) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {35DBE6FE-44C3-4400-AAAE-D2C799C407E8}, 100 - /// - public ShellProperty TrackRef - { - get - { - PropertyKey key = SystemProperties.System.GPS.TrackRef; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.GPS.VersionID -- PKEY_GPS_VersionID - /// Description: Indicates the version of the GPS information - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: {22704DA4-C6B2-4A99-8E56-F16DF8C92599}, 100 - /// - public ShellProperty VersionID - { - get - { - PropertyKey key = SystemProperties.System.GPS.VersionID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Identity Properties - /// - public class PropertySystemIdentity : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemIdentity(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Identity.Blob -- PKEY_Identity_Blob - /// Description: Blob used to import/export identities - /// - /// Type: Blob -- VT_BLOB - /// FormatID: {8C3B93A4-BAED-1A83-9A32-102EE313F6EB}, 100 - /// - public ShellProperty Blob - { - get - { - PropertyKey key = SystemProperties.System.Identity.Blob; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Identity.DisplayName -- PKEY_Identity_DisplayName - /// Description: Display Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7D683FC9-D155-45A8-BB1F-89D19BCB792F}, 100 - /// - public ShellProperty DisplayName - { - get - { - PropertyKey key = SystemProperties.System.Identity.DisplayName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Identity.IsMeIdentity -- PKEY_Identity_IsMeIdentity - /// Description: Is it Me Identity - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {A4108708-09DF-4377-9DFC-6D99986D5A67}, 100 - /// - public ShellProperty IsMeIdentity - { - get - { - PropertyKey key = SystemProperties.System.Identity.IsMeIdentity; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Identity.PrimaryEmailAddress -- PKEY_Identity_PrimaryEmailAddress - /// Description: Primary Email Address - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FCC16823-BAED-4F24-9B32-A0982117F7FA}, 100 - /// - public ShellProperty PrimaryEmailAddress - { - get - { - PropertyKey key = SystemProperties.System.Identity.PrimaryEmailAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Identity.ProviderID -- PKEY_Identity_ProviderID - /// Description: Provider ID - /// - /// Type: Guid -- VT_CLSID - /// FormatID: {74A7DE49-FA11-4D3D-A006-DB7E08675916}, 100 - /// - public ShellProperty ProviderID - { - get - { - PropertyKey key = SystemProperties.System.Identity.ProviderID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Identity.UniqueID -- PKEY_Identity_UniqueID - /// Description: Unique ID - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E55FC3B0-2B60-4220-918E-B21E8BF16016}, 100 - /// - public ShellProperty UniqueID - { - get - { - PropertyKey key = SystemProperties.System.Identity.UniqueID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Identity.UserName -- PKEY_Identity_UserName - /// Description: Identity User Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C4322503-78CA-49C6-9ACC-A68E2AFD7B6B}, 100 - /// - public ShellProperty UserName - { - get - { - PropertyKey key = SystemProperties.System.Identity.UserName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.IdentityProvider Properties - /// - public class PropertySystemIdentityProvider : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemIdentityProvider(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.IdentityProvider.Name -- PKEY_IdentityProvider_Name - /// Description: Identity Provider Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {B96EFF7B-35CA-4A35-8607-29E3A54C46EA}, 100 - /// - public ShellProperty Name - { - get - { - PropertyKey key = SystemProperties.System.IdentityProvider.Name; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.IdentityProvider.Picture -- PKEY_IdentityProvider_Picture - /// Description: Picture for the Identity Provider - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {2425166F-5642-4864-992F-98FD98F294C3}, 100 - /// - public ShellProperty Picture - { - get - { - PropertyKey key = SystemProperties.System.IdentityProvider.Picture; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Image Properties - /// - public class PropertySystemImage : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemImage(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Image.BitDepth -- PKEY_Image_BitDepth - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 7 (PIDISI_BITDEPTH) - /// - public ShellProperty BitDepth - { - get - { - PropertyKey key = SystemProperties.System.Image.BitDepth; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.ColorSpace -- PKEY_Image_ColorSpace - /// Description: PropertyTagExifColorSpace - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 40961 - /// - public ShellProperty ColorSpace - { - get - { - PropertyKey key = SystemProperties.System.Image.ColorSpace; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.CompressedBitsPerPixel -- PKEY_Image_CompressedBitsPerPixel - /// Description: Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {364B6FA9-37AB-482A-BE2B-AE02F60D4318}, 100 - /// - public ShellProperty CompressedBitsPerPixel - { - get - { - PropertyKey key = SystemProperties.System.Image.CompressedBitsPerPixel; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.CompressedBitsPerPixelDenominator -- PKEY_Image_CompressedBitsPerPixelDenominator - /// Description: Denominator of PKEY_Image_CompressedBitsPerPixel. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {1F8844E1-24AD-4508-9DFD-5326A415CE02}, 100 - /// - public ShellProperty CompressedBitsPerPixelDenominator - { - get - { - PropertyKey key = SystemProperties.System.Image.CompressedBitsPerPixelDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.CompressedBitsPerPixelNumerator -- PKEY_Image_CompressedBitsPerPixelNumerator - /// Description: Numerator of PKEY_Image_CompressedBitsPerPixel. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {D21A7148-D32C-4624-8900-277210F79C0F}, 100 - /// - public ShellProperty CompressedBitsPerPixelNumerator - { - get - { - PropertyKey key = SystemProperties.System.Image.CompressedBitsPerPixelNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.Compression -- PKEY_Image_Compression - /// Description: Indicates the image compression level. PropertyTagCompression. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 259 - /// - public ShellProperty Compression - { - get - { - PropertyKey key = SystemProperties.System.Image.Compression; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.CompressionText -- PKEY_Image_CompressionText - /// Description: This is the user-friendly form of System.Image.Compression. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {3F08E66F-2F44-4BB9-A682-AC35D2562322}, 100 - /// - public ShellProperty CompressionText - { - get - { - PropertyKey key = SystemProperties.System.Image.CompressionText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.Dimensions -- PKEY_Image_Dimensions - /// Description: Indicates the dimensions of the image. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 13 (PIDISI_DIMENSIONS) - /// - public ShellProperty Dimensions - { - get - { - PropertyKey key = SystemProperties.System.Image.Dimensions; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.HorizontalResolution -- PKEY_Image_HorizontalResolution - /// Description: - /// - /// Type: Double -- VT_R8 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 5 (PIDISI_RESOLUTIONX) - /// - public ShellProperty HorizontalResolution - { - get - { - PropertyKey key = SystemProperties.System.Image.HorizontalResolution; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.HorizontalSize -- PKEY_Image_HorizontalSize - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 3 (PIDISI_CX) - /// - public ShellProperty HorizontalSize - { - get - { - PropertyKey key = SystemProperties.System.Image.HorizontalSize; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.ImageID -- PKEY_Image_ImageID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {10DABE05-32AA-4C29-BF1A-63E2D220587F}, 100 - /// - public ShellProperty ImageID - { - get - { - PropertyKey key = SystemProperties.System.Image.ImageID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.ResolutionUnit -- PKEY_Image_ResolutionUnit - /// Description: - /// Type: Int16 -- VT_I2 - /// FormatID: {19B51FA6-1F92-4A5C-AB48-7DF0ABD67444}, 100 - /// - public ShellProperty ResolutionUnit - { - get - { - PropertyKey key = SystemProperties.System.Image.ResolutionUnit; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.VerticalResolution -- PKEY_Image_VerticalResolution - /// Description: - /// - /// Type: Double -- VT_R8 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 6 (PIDISI_RESOLUTIONY) - /// - public ShellProperty VerticalResolution - { - get - { - PropertyKey key = SystemProperties.System.Image.VerticalResolution; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Image.VerticalSize -- PKEY_Image_VerticalSize - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 4 (PIDISI_CY) - /// - public ShellProperty VerticalSize - { - get - { - PropertyKey key = SystemProperties.System.Image.VerticalSize; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Journal Properties - /// - public class PropertySystemJournal : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemJournal(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Journal.Contacts -- PKEY_Journal_Contacts - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1}, 100 - /// - public ShellProperty Contacts - { - get - { - PropertyKey key = SystemProperties.System.Journal.Contacts; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Journal.EntryType -- PKEY_Journal_EntryType - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {95BEB1FC-326D-4644-B396-CD3ED90E6DDF}, 100 - /// - public ShellProperty EntryType - { - get - { - PropertyKey key = SystemProperties.System.Journal.EntryType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.LayoutPattern Properties - /// - public class PropertySystemLayoutPattern : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemLayoutPattern(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.LayoutPattern.ContentViewModeForBrowse -- PKEY_LayoutPattern_ContentViewModeForBrowse - /// Description: Specifies the layout pattern that the content view mode should apply for this item in the context of browsing. - ///Register the regvalue under the name of "ContentViewModeLayoutPatternForBrowse". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 500 - /// - public ShellProperty ContentViewModeForBrowse - { - get - { - PropertyKey key = SystemProperties.System.LayoutPattern.ContentViewModeForBrowse; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.LayoutPattern.ContentViewModeForSearch -- PKEY_LayoutPattern_ContentViewModeForSearch - /// Description: Specifies the layout pattern that the content view mode should apply for this item in the context of searching. - ///Register the regvalue under the name of "ContentViewModeLayoutPatternForSearch". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 501 - /// - public ShellProperty ContentViewModeForSearch - { - get - { - PropertyKey key = SystemProperties.System.LayoutPattern.ContentViewModeForSearch; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Link Properties - /// - public class PropertySystemLink : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemLink(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Link.Arguments -- PKEY_Link_Arguments - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {436F2667-14E2-4FEB-B30A-146C53B5B674}, 100 - /// - public ShellProperty Arguments - { - get - { - PropertyKey key = SystemProperties.System.Link.Arguments; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.Comment -- PKEY_Link_Comment - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 5 - /// - public ShellProperty Comment - { - get - { - PropertyKey key = SystemProperties.System.Link.Comment; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.DateVisited -- PKEY_Link_DateVisited - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 23 (PKEYs relating to URLs. Used by IE History.) - /// - public ShellProperty DateVisited - { - get - { - PropertyKey key = SystemProperties.System.Link.DateVisited; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.Description -- PKEY_Link_Description - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 21 (PKEYs relating to URLs. Used by IE History.) - /// - public ShellProperty Description - { - get - { - PropertyKey key = SystemProperties.System.Link.Description; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.Status -- PKEY_Link_Status - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 3 (PID_LINK_TARGET_TYPE) - /// - public ShellProperty Status - { - get - { - PropertyKey key = SystemProperties.System.Link.Status; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.TargetExtension -- PKEY_Link_TargetExtension - /// Description: The file extension of the link target. See System.File.Extension - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {7A7D76F4-B630-4BD7-95FF-37CC51A975C9}, 2 - /// - public ShellProperty TargetExtension - { - get - { - PropertyKey key = SystemProperties.System.Link.TargetExtension; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.TargetParsingPath -- PKEY_Link_TargetParsingPath - /// Description: This is the shell namespace path to the target of the link item. This path may be passed to - ///SHParseDisplayName to parse the path to the correct shell folder. - /// - ///If the target item is a file, the value is identical to System.ItemPathDisplay. - /// - ///If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 2 (PID_LINK_TARGET) - /// - public ShellProperty TargetParsingPath - { - get - { - PropertyKey key = SystemProperties.System.Link.TargetParsingPath; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.TargetSFGAOFlags -- PKEY_Link_TargetSFGAOFlags - /// Description: IShellFolder::GetAttributesOf flags for the target of a link, with SFGAO_PKEYSFGAOMASK - ///attributes masked out. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 8 - /// - public ShellProperty TargetSFGAOFlags - { - get - { - PropertyKey key = SystemProperties.System.Link.TargetSFGAOFlags; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.TargetSFGAOFlagsStrings -- PKEY_Link_TargetSFGAOFlagsStrings - /// Description: Expresses the SFGAO flags of a link as string values and is used as a query optimization. See - ///PKEY_Shell_SFGAOFlagsStrings for possible values of this. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D6942081-D53B-443D-AD47-5E059D9CD27A}, 3 - /// - public ShellProperty TargetSFGAOFlagsStrings - { - get - { - PropertyKey key = SystemProperties.System.Link.TargetSFGAOFlagsStrings; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Link.TargetUrl -- PKEY_Link_TargetUrl - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 2 (PKEYs relating to URLs. Used by IE History.) - /// - public ShellProperty TargetUrl - { - get - { - PropertyKey key = SystemProperties.System.Link.TargetUrl; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Media Properties - /// - public class PropertySystemMedia : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemMedia(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Media.AuthorUrl -- PKEY_Media_AuthorUrl - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 32 (PIDMSI_AUTHOR_URL) - /// - public ShellProperty AuthorUrl - { - get - { - PropertyKey key = SystemProperties.System.Media.AuthorUrl; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.AverageLevel -- PKEY_Media_AverageLevel - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {09EDD5B6-B301-43C5-9990-D00302EFFD46}, 100 - /// - public ShellProperty AverageLevel - { - get - { - PropertyKey key = SystemProperties.System.Media.AverageLevel; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.ClassPrimaryID -- PKEY_Media_ClassPrimaryID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 13 (PIDMSI_CLASS_PRIMARY_ID) - /// - public ShellProperty ClassPrimaryID - { - get - { - PropertyKey key = SystemProperties.System.Media.ClassPrimaryID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.ClassSecondaryID -- PKEY_Media_ClassSecondaryID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 14 (PIDMSI_CLASS_SECONDARY_ID) - /// - public ShellProperty ClassSecondaryID - { - get - { - PropertyKey key = SystemProperties.System.Media.ClassSecondaryID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.CollectionGroupID -- PKEY_Media_CollectionGroupID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 24 (PIDMSI_COLLECTION_GROUP_ID) - /// - public ShellProperty CollectionGroupID - { - get - { - PropertyKey key = SystemProperties.System.Media.CollectionGroupID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.CollectionID -- PKEY_Media_CollectionID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 25 (PIDMSI_COLLECTION_ID) - /// - public ShellProperty CollectionID - { - get - { - PropertyKey key = SystemProperties.System.Media.CollectionID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.ContentDistributor -- PKEY_Media_ContentDistributor - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 18 (PIDMSI_CONTENTDISTRIBUTOR) - /// - public ShellProperty ContentDistributor - { - get - { - PropertyKey key = SystemProperties.System.Media.ContentDistributor; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.ContentID -- PKEY_Media_ContentID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 26 (PIDMSI_CONTENT_ID) - /// - public ShellProperty ContentID - { - get - { - PropertyKey key = SystemProperties.System.Media.ContentID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.CreatorApplication -- PKEY_Media_CreatorApplication - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 27 (PIDMSI_TOOL_NAME) - /// - public ShellProperty CreatorApplication - { - get - { - PropertyKey key = SystemProperties.System.Media.CreatorApplication; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.CreatorApplicationVersion -- PKEY_Media_CreatorApplicationVersion - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 28 (PIDMSI_TOOL_VERSION) - /// - public ShellProperty CreatorApplicationVersion - { - get - { - PropertyKey key = SystemProperties.System.Media.CreatorApplicationVersion; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.DateEncoded -- PKEY_Media_DateEncoded - /// Description: DateTime is in UTC (in the doc, not file system). - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {2E4B640D-5019-46D8-8881-55414CC5CAA0}, 100 - /// - public ShellProperty DateEncoded - { - get - { - PropertyKey key = SystemProperties.System.Media.DateEncoded; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.DateReleased -- PKEY_Media_DateReleased - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DE41CC29-6971-4290-B472-F59F2E2F31E2}, 100 - /// - public ShellProperty DateReleased - { - get - { - PropertyKey key = SystemProperties.System.Media.DateReleased; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.Duration -- PKEY_Media_Duration - /// Description: 100ns units, not milliseconds - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 3 (PIDASI_TIMELENGTH) - /// - public ShellProperty Duration - { - get - { - PropertyKey key = SystemProperties.System.Media.Duration; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.DVDID -- PKEY_Media_DVDID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 15 (PIDMSI_DVDID) - /// - public ShellProperty DVDID - { - get - { - PropertyKey key = SystemProperties.System.Media.DVDID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.EncodedBy -- PKEY_Media_EncodedBy - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 36 (PIDMSI_ENCODED_BY) - /// - public ShellProperty EncodedBy - { - get - { - PropertyKey key = SystemProperties.System.Media.EncodedBy; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.EncodingSettings -- PKEY_Media_EncodingSettings - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 37 (PIDMSI_ENCODING_SETTINGS) - /// - public ShellProperty EncodingSettings - { - get - { - PropertyKey key = SystemProperties.System.Media.EncodingSettings; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.FrameCount -- PKEY_Media_FrameCount - /// Description: Indicates the frame count for the image. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 12 (PIDISI_FRAMECOUNT) - /// - public ShellProperty FrameCount - { - get - { - PropertyKey key = SystemProperties.System.Media.FrameCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.MCDI -- PKEY_Media_MCDI - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 16 (PIDMSI_MCDI) - /// - public ShellProperty MCDI - { - get - { - PropertyKey key = SystemProperties.System.Media.MCDI; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.MetadataContentProvider -- PKEY_Media_MetadataContentProvider - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 17 (PIDMSI_PROVIDER) - /// - public ShellProperty MetadataContentProvider - { - get - { - PropertyKey key = SystemProperties.System.Media.MetadataContentProvider; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.Producer -- PKEY_Media_Producer - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 22 (PIDMSI_PRODUCER) - /// - public ShellProperty Producer - { - get - { - PropertyKey key = SystemProperties.System.Media.Producer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.PromotionUrl -- PKEY_Media_PromotionUrl - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 33 (PIDMSI_PROMOTION_URL) - /// - public ShellProperty PromotionUrl - { - get - { - PropertyKey key = SystemProperties.System.Media.PromotionUrl; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.ProtectionType -- PKEY_Media_ProtectionType - /// Description: If media is protected, how is it protected? - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 38 - /// - public ShellProperty ProtectionType - { - get - { - PropertyKey key = SystemProperties.System.Media.ProtectionType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.ProviderRating -- PKEY_Media_ProviderRating - /// Description: Rating (0 - 99) supplied by metadata provider - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 39 - /// - public ShellProperty ProviderRating - { - get - { - PropertyKey key = SystemProperties.System.Media.ProviderRating; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.ProviderStyle -- PKEY_Media_ProviderStyle - /// Description: Style of music or video, supplied by metadata provider - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 40 - /// - public ShellProperty ProviderStyle - { - get - { - PropertyKey key = SystemProperties.System.Media.ProviderStyle; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.Publisher -- PKEY_Media_Publisher - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 30 (PIDMSI_PUBLISHER) - /// - public ShellProperty Publisher - { - get - { - PropertyKey key = SystemProperties.System.Media.Publisher; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.SubscriptionContentId -- PKEY_Media_SubscriptionContentId - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9AEBAE7A-9644-487D-A92C-657585ED751A}, 100 - /// - public ShellProperty SubscriptionContentId - { - get - { - PropertyKey key = SystemProperties.System.Media.SubscriptionContentId; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.SubTitle -- PKEY_Media_SubTitle - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 38 (PIDSI_MUSIC_SUB_TITLE) - /// - public ShellProperty SubTitle - { - get - { - PropertyKey key = SystemProperties.System.Media.SubTitle; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.UniqueFileIdentifier -- PKEY_Media_UniqueFileIdentifier - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER) - /// - public ShellProperty UniqueFileIdentifier - { - get - { - PropertyKey key = SystemProperties.System.Media.UniqueFileIdentifier; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.UserNoAutoInfo -- PKEY_Media_UserNoAutoInfo - /// Description: If true, do NOT alter this file's metadata. Set by user. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 41 - /// - public ShellProperty UserNoAutoInfo - { - get - { - PropertyKey key = SystemProperties.System.Media.UserNoAutoInfo; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.UserWebUrl -- PKEY_Media_UserWebUrl - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 34 (PIDMSI_USER_WEB_URL) - /// - public ShellProperty UserWebUrl - { - get - { - PropertyKey key = SystemProperties.System.Media.UserWebUrl; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.Writer -- PKEY_Media_Writer - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 23 (PIDMSI_WRITER) - /// - public ShellProperty Writer - { - get - { - PropertyKey key = SystemProperties.System.Media.Writer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Media.Year -- PKEY_Media_Year - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 5 (PIDSI_MUSIC_YEAR) - /// - public ShellProperty Year - { - get - { - PropertyKey key = SystemProperties.System.Media.Year; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Message Properties - /// - public class PropertySystemMessage : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemMessage(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Message.AttachmentContents -- PKEY_Message_AttachmentContents - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {3143BF7C-80A8-4854-8880-E2E40189BDD0}, 100 - /// - public ShellProperty AttachmentContents - { - get - { - PropertyKey key = SystemProperties.System.Message.AttachmentContents; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.AttachmentNames -- PKEY_Message_AttachmentNames - /// Description: The names of the attachments in a message - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 21 - /// - public ShellProperty AttachmentNames - { - get - { - PropertyKey key = SystemProperties.System.Message.AttachmentNames; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.BccAddress -- PKEY_Message_BccAddress - /// Description: Addresses in Bcc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 2 - /// - public ShellProperty BccAddress - { - get - { - PropertyKey key = SystemProperties.System.Message.BccAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.BccName -- PKEY_Message_BccName - /// Description: person names in Bcc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 3 - /// - public ShellProperty BccName - { - get - { - PropertyKey key = SystemProperties.System.Message.BccName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.CcAddress -- PKEY_Message_CcAddress - /// Description: Addresses in Cc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 4 - /// - public ShellProperty CcAddress - { - get - { - PropertyKey key = SystemProperties.System.Message.CcAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.CcName -- PKEY_Message_CcName - /// Description: person names in Cc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 5 - /// - public ShellProperty CcName - { - get - { - PropertyKey key = SystemProperties.System.Message.CcName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.ConversationID -- PKEY_Message_ConversationID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DC8F80BD-AF1E-4289-85B6-3DFC1B493992}, 100 - /// - public ShellProperty ConversationID - { - get - { - PropertyKey key = SystemProperties.System.Message.ConversationID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.ConversationIndex -- PKEY_Message_ConversationIndex - /// Description: - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: {DC8F80BD-AF1E-4289-85B6-3DFC1B493992}, 101 - /// - public ShellProperty ConversationIndex - { - get - { - PropertyKey key = SystemProperties.System.Message.ConversationIndex; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.DateReceived -- PKEY_Message_DateReceived - /// Description: Date and Time communication was received - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 20 - /// - public ShellProperty DateReceived - { - get - { - PropertyKey key = SystemProperties.System.Message.DateReceived; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.DateSent -- PKEY_Message_DateSent - /// Description: Date and Time communication was sent - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 19 - /// - public ShellProperty DateSent - { - get - { - PropertyKey key = SystemProperties.System.Message.DateSent; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.Flags -- PKEY_Message_Flags - /// Description: These are flags associated with email messages to know if a read receipt is pending, etc. - ///The values stored here by Outlook are defined for PR_MESSAGE_FLAGS on MSDN. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {A82D9EE7-CA67-4312-965E-226BCEA85023}, 100 - /// - public ShellProperty Flags - { - get - { - PropertyKey key = SystemProperties.System.Message.Flags; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.FromAddress -- PKEY_Message_FromAddress - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 13 - /// - public ShellProperty FromAddress - { - get - { - PropertyKey key = SystemProperties.System.Message.FromAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.FromName -- PKEY_Message_FromName - /// Description: Address in from field as person name - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 14 - /// - public ShellProperty FromName - { - get - { - PropertyKey key = SystemProperties.System.Message.FromName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.HasAttachments -- PKEY_Message_HasAttachments - /// Description: - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}, 8 - /// - public ShellProperty HasAttachments - { - get - { - PropertyKey key = SystemProperties.System.Message.HasAttachments; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.IsFwdOrReply -- PKEY_Message_IsFwdOrReply - /// Description: - /// Type: Int32 -- VT_I4 - /// FormatID: {9A9BC088-4F6D-469E-9919-E705412040F9}, 100 - /// - public ShellProperty IsFwdOrReply - { - get - { - PropertyKey key = SystemProperties.System.Message.IsFwdOrReply; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.MessageClass -- PKEY_Message_MessageClass - /// Description: What type of outlook msg this is (meeting, task, mail, etc.) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CD9ED458-08CE-418F-A70E-F912C7BB9C5C}, 103 - /// - public ShellProperty MessageClass - { - get - { - PropertyKey key = SystemProperties.System.Message.MessageClass; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.ProofInProgress -- PKEY_Message_ProofInProgress - /// Description: This property will be true if the message junk email proofing is still in progress. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {9098F33C-9A7D-48A8-8DE5-2E1227A64E91}, 100 - /// - public ShellProperty ProofInProgress - { - get - { - PropertyKey key = SystemProperties.System.Message.ProofInProgress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.SenderAddress -- PKEY_Message_SenderAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0BE1C8E7-1981-4676-AE14-FDD78F05A6E7}, 100 - /// - public ShellProperty SenderAddress - { - get - { - PropertyKey key = SystemProperties.System.Message.SenderAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.SenderName -- PKEY_Message_SenderName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0DA41CFA-D224-4A18-AE2F-596158DB4B3A}, 100 - /// - public ShellProperty SenderName - { - get - { - PropertyKey key = SystemProperties.System.Message.SenderName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.Store -- PKEY_Message_Store - /// Description: The store (aka protocol handler) FILE, MAIL, OUTLOOKEXPRESS - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 15 - /// - public ShellProperty Store - { - get - { - PropertyKey key = SystemProperties.System.Message.Store; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.ToAddress -- PKEY_Message_ToAddress - /// Description: Addresses in To: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 16 - /// - public ShellProperty ToAddress - { - get - { - PropertyKey key = SystemProperties.System.Message.ToAddress; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.ToDoFlags -- PKEY_Message_ToDoFlags - /// Description: Flags associated with a message flagged to know if it's still active, if it was custom flagged, etc. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {1F856A9F-6900-4ABA-9505-2D5F1B4D66CB}, 100 - /// - public ShellProperty ToDoFlags - { - get - { - PropertyKey key = SystemProperties.System.Message.ToDoFlags; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.ToDoTitle -- PKEY_Message_ToDoTitle - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7}, 100 - /// - public ShellProperty ToDoTitle - { - get - { - PropertyKey key = SystemProperties.System.Message.ToDoTitle; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Message.ToName -- PKEY_Message_ToName - /// Description: Person names in To: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 17 - /// - public ShellProperty ToName - { - get - { - PropertyKey key = SystemProperties.System.Message.ToName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Music Properties - /// - public class PropertySystemMusic : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemMusic(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Music.AlbumArtist -- PKEY_Music_AlbumArtist - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 13 (PIDSI_MUSIC_ALBUM_ARTIST) - /// - public ShellProperty AlbumArtist - { - get - { - PropertyKey key = SystemProperties.System.Music.AlbumArtist; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.AlbumID -- PKEY_Music_AlbumID - /// Description: Concatenation of System.Music.AlbumArtist and System.Music.AlbumTitle, suitable for indexing and display. - ///Used to differentiate albums with the same title from different artists. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 100 - /// - public ShellProperty AlbumID - { - get - { - PropertyKey key = SystemProperties.System.Music.AlbumID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.AlbumTitle -- PKEY_Music_AlbumTitle - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 4 (PIDSI_MUSIC_ALBUM) - /// - public ShellProperty AlbumTitle - { - get - { - PropertyKey key = SystemProperties.System.Music.AlbumTitle; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.Artist -- PKEY_Music_Artist - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 2 (PIDSI_MUSIC_ARTIST) - /// - public ShellProperty Artist - { - get - { - PropertyKey key = SystemProperties.System.Music.Artist; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.BeatsPerMinute -- PKEY_Music_BeatsPerMinute - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 35 (PIDSI_MUSIC_BEATS_PER_MINUTE) - /// - public ShellProperty BeatsPerMinute - { - get - { - PropertyKey key = SystemProperties.System.Music.BeatsPerMinute; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.Composer -- PKEY_Music_Composer - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 19 (PIDMSI_COMPOSER) - /// - public ShellProperty Composer - { - get - { - PropertyKey key = SystemProperties.System.Music.Composer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.Conductor -- PKEY_Music_Conductor - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 36 (PIDSI_MUSIC_CONDUCTOR) - /// - public ShellProperty Conductor - { - get - { - PropertyKey key = SystemProperties.System.Music.Conductor; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.ContentGroupDescription -- PKEY_Music_ContentGroupDescription - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 33 (PIDSI_MUSIC_CONTENT_GROUP_DESCRIPTION) - /// - public ShellProperty ContentGroupDescription - { - get - { - PropertyKey key = SystemProperties.System.Music.ContentGroupDescription; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.DisplayArtist -- PKEY_Music_DisplayArtist - /// Description: This property returns the best representation of Album Artist for a given music file - ///based upon AlbumArtist, ContributingArtist and compilation info. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FD122953-FA93-4EF7-92C3-04C946B2F7C8}, 100 - /// - public ShellProperty DisplayArtist - { - get - { - PropertyKey key = SystemProperties.System.Music.DisplayArtist; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.Genre -- PKEY_Music_Genre - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 11 (PIDSI_MUSIC_GENRE) - /// - public ShellProperty Genre - { - get - { - PropertyKey key = SystemProperties.System.Music.Genre; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.InitialKey -- PKEY_Music_InitialKey - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 34 (PIDSI_MUSIC_INITIAL_KEY) - /// - public ShellProperty InitialKey - { - get - { - PropertyKey key = SystemProperties.System.Music.InitialKey; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.IsCompilation -- PKEY_Music_IsCompilation - /// Description: Indicates whether the file is part of a compilation. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {C449D5CB-9EA4-4809-82E8-AF9D59DED6D1}, 100 - /// - public ShellProperty IsCompilation - { - get - { - PropertyKey key = SystemProperties.System.Music.IsCompilation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.Lyrics -- PKEY_Music_Lyrics - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 12 (PIDSI_MUSIC_LYRICS) - /// - public ShellProperty Lyrics - { - get - { - PropertyKey key = SystemProperties.System.Music.Lyrics; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.Mood -- PKEY_Music_Mood - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 39 (PIDSI_MUSIC_MOOD) - /// - public ShellProperty Mood - { - get - { - PropertyKey key = SystemProperties.System.Music.Mood; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.PartOfSet -- PKEY_Music_PartOfSet - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 37 (PIDSI_MUSIC_PART_OF_SET) - /// - public ShellProperty PartOfSet - { - get - { - PropertyKey key = SystemProperties.System.Music.PartOfSet; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.Period -- PKEY_Music_Period - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 31 (PIDMSI_PERIOD) - /// - public ShellProperty Period - { - get - { - PropertyKey key = SystemProperties.System.Music.Period; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.SynchronizedLyrics -- PKEY_Music_SynchronizedLyrics - /// Description: - /// Type: Blob -- VT_BLOB - /// FormatID: {6B223B6A-162E-4AA9-B39F-05D678FC6D77}, 100 - /// - public ShellProperty SynchronizedLyrics - { - get - { - PropertyKey key = SystemProperties.System.Music.SynchronizedLyrics; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Music.TrackNumber -- PKEY_Music_TrackNumber - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 7 (PIDSI_MUSIC_TRACK) - /// - public ShellProperty TrackNumber - { - get - { - PropertyKey key = SystemProperties.System.Music.TrackNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Note Properties - /// - public class PropertySystemNote : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemNote(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Note.Color -- PKEY_Note_Color - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {4776CAFA-BCE4-4CB1-A23E-265E76D8EB11}, 100 - /// - public ShellProperty Color - { - get - { - PropertyKey key = SystemProperties.System.Note.Color; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Note.ColorText -- PKEY_Note_ColorText - /// Description: This is the user-friendly form of System.Note.Color. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {46B4E8DE-CDB2-440D-885C-1658EB65B914}, 100 - /// - public ShellProperty ColorText - { - get - { - PropertyKey key = SystemProperties.System.Note.ColorText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Photo Properties - /// - public class PropertySystemPhoto : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemPhoto(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Photo.Aperture -- PKEY_Photo_Aperture - /// Description: PropertyTagExifAperture. Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37378 - /// - public ShellProperty Aperture - { - get - { - PropertyKey key = SystemProperties.System.Photo.Aperture; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ApertureDenominator -- PKEY_Photo_ApertureDenominator - /// Description: Denominator of PKEY_Photo_Aperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {E1A9A38B-6685-46BD-875E-570DC7AD7320}, 100 - /// - public ShellProperty ApertureDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ApertureDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ApertureNumerator -- PKEY_Photo_ApertureNumerator - /// Description: Numerator of PKEY_Photo_Aperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {0337ECEC-39FB-4581-A0BD-4C4CC51E9914}, 100 - /// - public ShellProperty ApertureNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ApertureNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.Brightness -- PKEY_Photo_Brightness - /// Description: This is the brightness of the photo. - /// - ///Calculated from PKEY_Photo_BrightnessNumerator and PKEY_Photo_BrightnessDenominator. - /// - ///The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of - ///the recorded value is FFFFFFFF.H, "Unknown" should be indicated. - /// - /// Type: Double -- VT_R8 - /// FormatID: {1A701BF6-478C-4361-83AB-3701BB053C58}, 100 (PropertyTagExifBrightness) - /// - public ShellProperty Brightness - { - get - { - PropertyKey key = SystemProperties.System.Photo.Brightness; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.BrightnessDenominator -- PKEY_Photo_BrightnessDenominator - /// Description: Denominator of PKEY_Photo_Brightness - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6EBE6946-2321-440A-90F0-C043EFD32476}, 100 - /// - public ShellProperty BrightnessDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.BrightnessDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.BrightnessNumerator -- PKEY_Photo_BrightnessNumerator - /// Description: Numerator of PKEY_Photo_Brightness - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {9E7D118F-B314-45A0-8CFB-D654B917C9E9}, 100 - /// - public ShellProperty BrightnessNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.BrightnessNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.CameraManufacturer -- PKEY_Photo_CameraManufacturer - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 271 (PropertyTagEquipMake) - /// - public ShellProperty CameraManufacturer - { - get - { - PropertyKey key = SystemProperties.System.Photo.CameraManufacturer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.CameraModel -- PKEY_Photo_CameraModel - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 272 (PropertyTagEquipModel) - /// - public ShellProperty CameraModel - { - get - { - PropertyKey key = SystemProperties.System.Photo.CameraModel; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.CameraSerialNumber -- PKEY_Photo_CameraSerialNumber - /// Description: Serial number of camera that produced this photo - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 273 - /// - public ShellProperty CameraSerialNumber - { - get - { - PropertyKey key = SystemProperties.System.Photo.CameraSerialNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.Contrast -- PKEY_Photo_Contrast - /// Description: This indicates the direction of contrast processing applied by the camera - ///when the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2A785BA9-8D23-4DED-82E6-60A350C86A10}, 100 - /// - public ShellProperty Contrast - { - get - { - PropertyKey key = SystemProperties.System.Photo.Contrast; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ContrastText -- PKEY_Photo_ContrastText - /// Description: This is the user-friendly form of System.Photo.Contrast. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {59DDE9F2-5253-40EA-9A8B-479E96C6249A}, 100 - /// - public ShellProperty ContrastText - { - get - { - PropertyKey key = SystemProperties.System.Photo.ContrastText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.DateTaken -- PKEY_Photo_DateTaken - /// Description: PropertyTagExifDTOrig - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 36867 - /// - public ShellProperty DateTaken - { - get - { - PropertyKey key = SystemProperties.System.Photo.DateTaken; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.DigitalZoom -- PKEY_Photo_DigitalZoom - /// Description: PropertyTagExifDigitalZoom. Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {F85BF840-A925-4BC2-B0C4-8E36B598679E}, 100 - /// - public ShellProperty DigitalZoom - { - get - { - PropertyKey key = SystemProperties.System.Photo.DigitalZoom; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.DigitalZoomDenominator -- PKEY_Photo_DigitalZoomDenominator - /// Description: Denominator of PKEY_Photo_DigitalZoom - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {745BAF0E-E5C1-4CFB-8A1B-D031A0A52393}, 100 - /// - public ShellProperty DigitalZoomDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.DigitalZoomDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.DigitalZoomNumerator -- PKEY_Photo_DigitalZoomNumerator - /// Description: Numerator of PKEY_Photo_DigitalZoom - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {16CBB924-6500-473B-A5BE-F1599BCBE413}, 100 - /// - public ShellProperty DigitalZoomNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.DigitalZoomNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.Event -- PKEY_Photo_Event - /// Description: The event at which the photo was taken - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 18248 - /// - public ShellProperty Event - { - get - { - PropertyKey key = SystemProperties.System.Photo.Event; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.EXIFVersion -- PKEY_Photo_EXIFVersion - /// Description: The EXIF version. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D35F743A-EB2E-47F2-A286-844132CB1427}, 100 - /// - public ShellProperty EXIFVersion - { - get - { - PropertyKey key = SystemProperties.System.Photo.EXIFVersion; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureBias -- PKEY_Photo_ExposureBias - /// Description: PropertyTagExifExposureBias. Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37380 - /// - public ShellProperty ExposureBias - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureBias; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureBiasDenominator -- PKEY_Photo_ExposureBiasDenominator - /// Description: Denominator of PKEY_Photo_ExposureBias - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {AB205E50-04B7-461C-A18C-2F233836E627}, 100 - /// - public ShellProperty ExposureBiasDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureBiasDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureBiasNumerator -- PKEY_Photo_ExposureBiasNumerator - /// Description: Numerator of PKEY_Photo_ExposureBias - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {738BF284-1D87-420B-92CF-5834BF6EF9ED}, 100 - /// - public ShellProperty ExposureBiasNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureBiasNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureIndex -- PKEY_Photo_ExposureIndex - /// Description: PropertyTagExifExposureIndex. Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {967B5AF8-995A-46ED-9E11-35B3C5B9782D}, 100 - /// - public ShellProperty ExposureIndex - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureIndex; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureIndexDenominator -- PKEY_Photo_ExposureIndexDenominator - /// Description: Denominator of PKEY_Photo_ExposureIndex - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {93112F89-C28B-492F-8A9D-4BE2062CEE8A}, 100 - /// - public ShellProperty ExposureIndexDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureIndexDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureIndexNumerator -- PKEY_Photo_ExposureIndexNumerator - /// Description: Numerator of PKEY_Photo_ExposureIndex - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89}, 100 - /// - public ShellProperty ExposureIndexNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureIndexNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureProgram -- PKEY_Photo_ExposureProgram - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 34850 (PropertyTagExifExposureProg) - /// - public ShellProperty ExposureProgram - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureProgram; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureProgramText -- PKEY_Photo_ExposureProgramText - /// Description: This is the user-friendly form of System.Photo.ExposureProgram. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FEC690B7-5F30-4646-AE47-4CAAFBA884A3}, 100 - /// - public ShellProperty ExposureProgramText - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureProgramText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureTime -- PKEY_Photo_ExposureTime - /// Description: PropertyTagExifExposureTime. Calculated from PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 33434 - /// - public ShellProperty ExposureTime - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureTime; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureTimeDenominator -- PKEY_Photo_ExposureTimeDenominator - /// Description: Denominator of PKEY_Photo_ExposureTime - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {55E98597-AD16-42E0-B624-21599A199838}, 100 - /// - public ShellProperty ExposureTimeDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureTimeDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ExposureTimeNumerator -- PKEY_Photo_ExposureTimeNumerator - /// Description: Numerator of PKEY_Photo_ExposureTime - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {257E44E2-9031-4323-AC38-85C552871B2E}, 100 - /// - public ShellProperty ExposureTimeNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ExposureTimeNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.Flash -- PKEY_Photo_Flash - /// Description: PropertyTagExifFlash - /// - /// Type: Byte -- VT_UI1 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37385 - /// - public ShellProperty Flash - { - get - { - PropertyKey key = SystemProperties.System.Photo.Flash; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FlashEnergy -- PKEY_Photo_FlashEnergy - /// Description: PropertyTagExifFlashEnergy. Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 41483 - /// - public ShellProperty FlashEnergy - { - get - { - PropertyKey key = SystemProperties.System.Photo.FlashEnergy; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FlashEnergyDenominator -- PKEY_Photo_FlashEnergyDenominator - /// Description: Denominator of PKEY_Photo_FlashEnergy - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {D7B61C70-6323-49CD-A5FC-C84277162C97}, 100 - /// - public ShellProperty FlashEnergyDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FlashEnergyDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FlashEnergyNumerator -- PKEY_Photo_FlashEnergyNumerator - /// Description: Numerator of PKEY_Photo_FlashEnergy - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC}, 100 - /// - public ShellProperty FlashEnergyNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FlashEnergyNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FlashManufacturer -- PKEY_Photo_FlashManufacturer - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AABAF6C9-E0C5-4719-8585-57B103E584FE}, 100 - /// - public ShellProperty FlashManufacturer - { - get - { - PropertyKey key = SystemProperties.System.Photo.FlashManufacturer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FlashModel -- PKEY_Photo_FlashModel - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FE83BB35-4D1A-42E2-916B-06F3E1AF719E}, 100 - /// - public ShellProperty FlashModel - { - get - { - PropertyKey key = SystemProperties.System.Photo.FlashModel; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FlashText -- PKEY_Photo_FlashText - /// Description: This is the user-friendly form of System.Photo.Flash. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6B8B68F6-200B-47EA-8D25-D8050F57339F}, 100 - /// - public ShellProperty FlashText - { - get - { - PropertyKey key = SystemProperties.System.Photo.FlashText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FNumber -- PKEY_Photo_FNumber - /// Description: PropertyTagExifFNumber. Calculated from PKEY_Photo_FNumberNumerator and PKEY_Photo_FNumberDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 33437 - /// - public ShellProperty FNumber - { - get - { - PropertyKey key = SystemProperties.System.Photo.FNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FNumberDenominator -- PKEY_Photo_FNumberDenominator - /// Description: Denominator of PKEY_Photo_FNumber - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {E92A2496-223B-4463-A4E3-30EABBA79D80}, 100 - /// - public ShellProperty FNumberDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FNumberDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FNumberNumerator -- PKEY_Photo_FNumberNumerator - /// Description: Numerator of PKEY_Photo_FNumber - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {1B97738A-FDFC-462F-9D93-1957E08BE90C}, 100 - /// - public ShellProperty FNumberNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FNumberNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalLength -- PKEY_Photo_FocalLength - /// Description: PropertyTagExifFocalLength. Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37386 - /// - public ShellProperty FocalLength - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalLength; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalLengthDenominator -- PKEY_Photo_FocalLengthDenominator - /// Description: Denominator of PKEY_Photo_FocalLength - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {305BC615-DCA1-44A5-9FD4-10C0BA79412E}, 100 - /// - public ShellProperty FocalLengthDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalLengthDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalLengthInFilm -- PKEY_Photo_FocalLengthInFilm - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {A0E74609-B84D-4F49-B860-462BD9971F98}, 100 - /// - public ShellProperty FocalLengthInFilm - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalLengthInFilm; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalLengthNumerator -- PKEY_Photo_FocalLengthNumerator - /// Description: Numerator of PKEY_Photo_FocalLength - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A}, 100 - /// - public ShellProperty FocalLengthNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalLengthNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalPlaneXResolution -- PKEY_Photo_FocalPlaneXResolution - /// Description: PropertyTagExifFocalXRes. Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and - ///PKEY_Photo_FocalPlaneXResolutionDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {CFC08D97-C6F7-4484-89DD-EBEF4356FE76}, 100 - /// - public ShellProperty FocalPlaneXResolution - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalPlaneXResolution; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalPlaneXResolutionDenominator -- PKEY_Photo_FocalPlaneXResolutionDenominator - /// Description: Denominator of PKEY_Photo_FocalPlaneXResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {0933F3F5-4786-4F46-A8E8-D64DD37FA521}, 100 - /// - public ShellProperty FocalPlaneXResolutionDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalPlaneXResolutionDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalPlaneXResolutionNumerator -- PKEY_Photo_FocalPlaneXResolutionNumerator - /// Description: Numerator of PKEY_Photo_FocalPlaneXResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {DCCB10AF-B4E2-4B88-95F9-031B4D5AB490}, 100 - /// - public ShellProperty FocalPlaneXResolutionNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalPlaneXResolutionNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalPlaneYResolution -- PKEY_Photo_FocalPlaneYResolution - /// Description: PropertyTagExifFocalYRes. Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and - ///PKEY_Photo_FocalPlaneYResolutionDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1}, 100 - /// - public ShellProperty FocalPlaneYResolution - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalPlaneYResolution; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalPlaneYResolutionDenominator -- PKEY_Photo_FocalPlaneYResolutionDenominator - /// Description: Denominator of PKEY_Photo_FocalPlaneYResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {1D6179A6-A876-4031-B013-3347B2B64DC8}, 100 - /// - public ShellProperty FocalPlaneYResolutionDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalPlaneYResolutionDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.FocalPlaneYResolutionNumerator -- PKEY_Photo_FocalPlaneYResolutionNumerator - /// Description: Numerator of PKEY_Photo_FocalPlaneYResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A2E541C5-4440-4BA8-867E-75CFC06828CD}, 100 - /// - public ShellProperty FocalPlaneYResolutionNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.FocalPlaneYResolutionNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.GainControl -- PKEY_Photo_GainControl - /// Description: This indicates the degree of overall image gain adjustment. - /// - ///Calculated from PKEY_Photo_GainControlNumerator and PKEY_Photo_GainControlDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {FA304789-00C7-4D80-904A-1E4DCC7265AA}, 100 (PropertyTagExifGainControl) - /// - public ShellProperty GainControl - { - get - { - PropertyKey key = SystemProperties.System.Photo.GainControl; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.GainControlDenominator -- PKEY_Photo_GainControlDenominator - /// Description: Denominator of PKEY_Photo_GainControl - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {42864DFD-9DA4-4F77-BDED-4AAD7B256735}, 100 - /// - public ShellProperty GainControlDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.GainControlDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.GainControlNumerator -- PKEY_Photo_GainControlNumerator - /// Description: Numerator of PKEY_Photo_GainControl - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E}, 100 - /// - public ShellProperty GainControlNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.GainControlNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.GainControlText -- PKEY_Photo_GainControlText - /// Description: This is the user-friendly form of System.Photo.GainControl. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C06238B2-0BF9-4279-A723-25856715CB9D}, 100 - /// - public ShellProperty GainControlText - { - get - { - PropertyKey key = SystemProperties.System.Photo.GainControlText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ISOSpeed -- PKEY_Photo_ISOSpeed - /// Description: PropertyTagExifISOSpeed - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 34855 - /// - public ShellProperty ISOSpeed - { - get - { - PropertyKey key = SystemProperties.System.Photo.ISOSpeed; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.LensManufacturer -- PKEY_Photo_LensManufacturer - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E6DDCAF7-29C5-4F0A-9A68-D19412EC7090}, 100 - /// - public ShellProperty LensManufacturer - { - get - { - PropertyKey key = SystemProperties.System.Photo.LensManufacturer; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.LensModel -- PKEY_Photo_LensModel - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E1277516-2B5F-4869-89B1-2E585BD38B7A}, 100 - /// - public ShellProperty LensModel - { - get - { - PropertyKey key = SystemProperties.System.Photo.LensModel; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.LightSource -- PKEY_Photo_LightSource - /// Description: PropertyTagExifLightSource - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37384 - /// - public ShellProperty LightSource - { - get - { - PropertyKey key = SystemProperties.System.Photo.LightSource; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.MakerNote -- PKEY_Photo_MakerNote - /// Description: - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: {FA303353-B659-4052-85E9-BCAC79549B84}, 100 - /// - public ShellProperty MakerNote - { - get - { - PropertyKey key = SystemProperties.System.Photo.MakerNote; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.MakerNoteOffset -- PKEY_Photo_MakerNoteOffset - /// Description: - /// Type: UInt64 -- VT_UI8 - /// FormatID: {813F4124-34E6-4D17-AB3E-6B1F3C2247A1}, 100 - /// - public ShellProperty MakerNoteOffset - { - get - { - PropertyKey key = SystemProperties.System.Photo.MakerNoteOffset; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.MaxAperture -- PKEY_Photo_MaxAperture - /// Description: Calculated from PKEY_Photo_MaxApertureNumerator and PKEY_Photo_MaxApertureDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E}, 100 - /// - public ShellProperty MaxAperture - { - get - { - PropertyKey key = SystemProperties.System.Photo.MaxAperture; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.MaxApertureDenominator -- PKEY_Photo_MaxApertureDenominator - /// Description: Denominator of PKEY_Photo_MaxAperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {C77724D4-601F-46C5-9B89-C53F93BCEB77}, 100 - /// - public ShellProperty MaxApertureDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.MaxApertureDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.MaxApertureNumerator -- PKEY_Photo_MaxApertureNumerator - /// Description: Numerator of PKEY_Photo_MaxAperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {C107E191-A459-44C5-9AE6-B952AD4B906D}, 100 - /// - public ShellProperty MaxApertureNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.MaxApertureNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.MeteringMode -- PKEY_Photo_MeteringMode - /// Description: PropertyTagExifMeteringMode - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37383 - /// - public ShellProperty MeteringMode - { - get - { - PropertyKey key = SystemProperties.System.Photo.MeteringMode; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.MeteringModeText -- PKEY_Photo_MeteringModeText - /// Description: This is the user-friendly form of System.Photo.MeteringMode. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F628FD8C-7BA8-465A-A65B-C5AA79263A9E}, 100 - /// - public ShellProperty MeteringModeText - { - get - { - PropertyKey key = SystemProperties.System.Photo.MeteringModeText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.Orientation -- PKEY_Photo_Orientation - /// Description: This is the image orientation viewed in terms of rows and columns. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 274 (PropertyTagOrientation) - /// - public ShellProperty Orientation - { - get - { - PropertyKey key = SystemProperties.System.Photo.Orientation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.OrientationText -- PKEY_Photo_OrientationText - /// Description: This is the user-friendly form of System.Photo.Orientation. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A9EA193C-C511-498A-A06B-58E2776DCC28}, 100 - /// - public ShellProperty OrientationText - { - get - { - PropertyKey key = SystemProperties.System.Photo.OrientationText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.PeopleNames -- PKEY_Photo_PeopleNames - /// Description: The people tags on an image. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: {E8309B6E-084C-49B4-B1FC-90A80331B638}, 100 - /// - public ShellProperty PeopleNames - { - get - { - PropertyKey key = SystemProperties.System.Photo.PeopleNames; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.PhotometricInterpretation -- PKEY_Photo_PhotometricInterpretation - /// Description: This is the pixel composition. In JPEG compressed data, a JPEG marker is used - ///instead of this property. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {341796F1-1DF9-4B1C-A564-91BDEFA43877}, 100 - /// - public ShellProperty PhotometricInterpretation - { - get - { - PropertyKey key = SystemProperties.System.Photo.PhotometricInterpretation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.PhotometricInterpretationText -- PKEY_Photo_PhotometricInterpretationText - /// Description: This is the user-friendly form of System.Photo.PhotometricInterpretation. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {821437D6-9EAB-4765-A589-3B1CBBD22A61}, 100 - /// - public ShellProperty PhotometricInterpretationText - { - get - { - PropertyKey key = SystemProperties.System.Photo.PhotometricInterpretationText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ProgramMode -- PKEY_Photo_ProgramMode - /// Description: This is the class of the program used by the camera to set exposure when the - ///picture is taken. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6D217F6D-3F6A-4825-B470-5F03CA2FBE9B}, 100 - /// - public ShellProperty ProgramMode - { - get - { - PropertyKey key = SystemProperties.System.Photo.ProgramMode; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ProgramModeText -- PKEY_Photo_ProgramModeText - /// Description: This is the user-friendly form of System.Photo.ProgramMode. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7FE3AA27-2648-42F3-89B0-454E5CB150C3}, 100 - /// - public ShellProperty ProgramModeText - { - get - { - PropertyKey key = SystemProperties.System.Photo.ProgramModeText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.RelatedSoundFile -- PKEY_Photo_RelatedSoundFile - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {318A6B45-087F-4DC2-B8CC-05359551FC9E}, 100 - /// - public ShellProperty RelatedSoundFile - { - get - { - PropertyKey key = SystemProperties.System.Photo.RelatedSoundFile; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.Saturation -- PKEY_Photo_Saturation - /// Description: This indicates the direction of saturation processing applied by the camera when - ///the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {49237325-A95A-4F67-B211-816B2D45D2E0}, 100 - /// - public ShellProperty Saturation - { - get - { - PropertyKey key = SystemProperties.System.Photo.Saturation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.SaturationText -- PKEY_Photo_SaturationText - /// Description: This is the user-friendly form of System.Photo.Saturation. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {61478C08-B600-4A84-BBE4-E99C45F0A072}, 100 - /// - public ShellProperty SaturationText - { - get - { - PropertyKey key = SystemProperties.System.Photo.SaturationText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.Sharpness -- PKEY_Photo_Sharpness - /// Description: This indicates the direction of sharpness processing applied by the camera when - ///the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {FC6976DB-8349-4970-AE97-B3C5316A08F0}, 100 - /// - public ShellProperty Sharpness - { - get - { - PropertyKey key = SystemProperties.System.Photo.Sharpness; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.SharpnessText -- PKEY_Photo_SharpnessText - /// Description: This is the user-friendly form of System.Photo.Sharpness. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {51EC3F47-DD50-421D-8769-334F50424B1E}, 100 - /// - public ShellProperty SharpnessText - { - get - { - PropertyKey key = SystemProperties.System.Photo.SharpnessText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ShutterSpeed -- PKEY_Photo_ShutterSpeed - /// Description: PropertyTagExifShutterSpeed. Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37377 - /// - public ShellProperty ShutterSpeed - { - get - { - PropertyKey key = SystemProperties.System.Photo.ShutterSpeed; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ShutterSpeedDenominator -- PKEY_Photo_ShutterSpeedDenominator - /// Description: Denominator of PKEY_Photo_ShutterSpeed - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {E13D8975-81C7-4948-AE3F-37CAE11E8FF7}, 100 - /// - public ShellProperty ShutterSpeedDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ShutterSpeedDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.ShutterSpeedNumerator -- PKEY_Photo_ShutterSpeedNumerator - /// Description: Numerator of PKEY_Photo_ShutterSpeed - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {16EA4042-D6F4-4BCA-8349-7C78D30FB333}, 100 - /// - public ShellProperty ShutterSpeedNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.ShutterSpeedNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.SubjectDistance -- PKEY_Photo_SubjectDistance - /// Description: PropertyTagExifSubjectDist. Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37382 - /// - public ShellProperty SubjectDistance - { - get - { - PropertyKey key = SystemProperties.System.Photo.SubjectDistance; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.SubjectDistanceDenominator -- PKEY_Photo_SubjectDistanceDenominator - /// Description: Denominator of PKEY_Photo_SubjectDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {0C840A88-B043-466D-9766-D4B26DA3FA77}, 100 - /// - public ShellProperty SubjectDistanceDenominator - { - get - { - PropertyKey key = SystemProperties.System.Photo.SubjectDistanceDenominator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.SubjectDistanceNumerator -- PKEY_Photo_SubjectDistanceNumerator - /// Description: Numerator of PKEY_Photo_SubjectDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {8AF4961C-F526-43E5-AA81-DB768219178D}, 100 - /// - public ShellProperty SubjectDistanceNumerator - { - get - { - PropertyKey key = SystemProperties.System.Photo.SubjectDistanceNumerator; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.TagViewAggregate -- PKEY_Photo_TagViewAggregate - /// Description: A read-only aggregation of tag-like properties for use in building views. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: {B812F15D-C2D8-4BBF-BACD-79744346113F}, 100 - /// - public ShellProperty TagViewAggregate - { - get - { - PropertyKey key = SystemProperties.System.Photo.TagViewAggregate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.TranscodedForSync -- PKEY_Photo_TranscodedForSync - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9A8EBB75-6458-4E82-BACB-35C0095B03BB}, 100 - /// - public ShellProperty TranscodedForSync - { - get - { - PropertyKey key = SystemProperties.System.Photo.TranscodedForSync; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.WhiteBalance -- PKEY_Photo_WhiteBalance - /// Description: This indicates the white balance mode set when the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9}, 100 - /// - public ShellProperty WhiteBalance - { - get - { - PropertyKey key = SystemProperties.System.Photo.WhiteBalance; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Photo.WhiteBalanceText -- PKEY_Photo_WhiteBalanceText - /// Description: This is the user-friendly form of System.Photo.WhiteBalance. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6336B95E-C7A7-426D-86FD-7AE3D39C84B4}, 100 - /// - public ShellProperty WhiteBalanceText - { - get - { - PropertyKey key = SystemProperties.System.Photo.WhiteBalanceText; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.PropGroup Properties - /// - public class PropertySystemPropGroup : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemPropGroup(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.PropGroup.Advanced -- PKEY_PropGroup_Advanced - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {900A403B-097B-4B95-8AE2-071FDAEEB118}, 100 - /// - public ShellProperty Advanced - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Advanced; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Audio -- PKEY_PropGroup_Audio - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {2804D469-788F-48AA-8570-71B9C187E138}, 100 - /// - public ShellProperty Audio - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Audio; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Calendar -- PKEY_PropGroup_Calendar - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {9973D2B5-BFD8-438A-BA94-5349B293181A}, 100 - /// - public ShellProperty Calendar - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Calendar; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Camera -- PKEY_PropGroup_Camera - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {DE00DE32-547E-4981-AD4B-542F2E9007D8}, 100 - /// - public ShellProperty Camera - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Camera; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Contact -- PKEY_PropGroup_Contact - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {DF975FD3-250A-4004-858F-34E29A3E37AA}, 100 - /// - public ShellProperty Contact - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Contact; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Content -- PKEY_PropGroup_Content - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {D0DAB0BA-368A-4050-A882-6C010FD19A4F}, 100 - /// - public ShellProperty Content - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Content; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Description -- PKEY_PropGroup_Description - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {8969B275-9475-4E00-A887-FF93B8B41E44}, 100 - /// - public ShellProperty Description - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Description; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.FileSystem -- PKEY_PropGroup_FileSystem - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E}, 100 - /// - public ShellProperty FileSystem - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.FileSystem; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.General -- PKEY_PropGroup_General - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {CC301630-B192-4C22-B372-9F4C6D338E07}, 100 - /// - public ShellProperty General - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.General; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.GPS -- PKEY_PropGroup_GPS - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {F3713ADA-90E3-4E11-AAE5-FDC17685B9BE}, 100 - /// - public ShellProperty GPS - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.GPS; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Image -- PKEY_PropGroup_Image - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {E3690A87-0FA8-4A2A-9A9F-FCE8827055AC}, 100 - /// - public ShellProperty Image - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Image; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Media -- PKEY_PropGroup_Media - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {61872CF7-6B5E-4B4B-AC2D-59DA84459248}, 100 - /// - public ShellProperty Media - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Media; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.MediaAdvanced -- PKEY_PropGroup_MediaAdvanced - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {8859A284-DE7E-4642-99BA-D431D044B1EC}, 100 - /// - public ShellProperty MediaAdvanced - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.MediaAdvanced; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Message -- PKEY_PropGroup_Message - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {7FD7259D-16B4-4135-9F97-7C96ECD2FA9E}, 100 - /// - public ShellProperty Message - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Message; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Music -- PKEY_PropGroup_Music - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {68DD6094-7216-40F1-A029-43FE7127043F}, 100 - /// - public ShellProperty Music - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Music; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Origin -- PKEY_PropGroup_Origin - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {2598D2FB-5569-4367-95DF-5CD3A177E1A5}, 100 - /// - public ShellProperty Origin - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Origin; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.PhotoAdvanced -- PKEY_PropGroup_PhotoAdvanced - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF}, 100 - /// - public ShellProperty PhotoAdvanced - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.PhotoAdvanced; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.RecordedTV -- PKEY_PropGroup_RecordedTV - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {E7B33238-6584-4170-A5C0-AC25EFD9DA56}, 100 - /// - public ShellProperty RecordedTV - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.RecordedTV; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropGroup.Video -- PKEY_PropGroup_Video - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {BEBE0920-7671-4C54-A3EB-49FDDFC191EE}, 100 - /// - public ShellProperty Video - { - get - { - PropertyKey key = SystemProperties.System.PropGroup.Video; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.PropList Properties - /// - public class PropertySystemPropList : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemPropList(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.PropList.ConflictPrompt -- PKEY_PropList_ConflictPrompt - /// Description: The list of properties to show in the file operation conflict resolution dialog. Properties with empty - ///values will not be displayed. Register under the regvalue of "ConflictPrompt". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 11 - /// - public ShellProperty ConflictPrompt - { - get - { - PropertyKey key = SystemProperties.System.PropList.ConflictPrompt; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.ContentViewModeForBrowse -- PKEY_PropList_ContentViewModeForBrowse - /// Description: The list of properties to show in the content view mode of an item in the context of browsing. - ///Register the regvalue under the name of "ContentViewModeForBrowse". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 13 - /// - public ShellProperty ContentViewModeForBrowse - { - get - { - PropertyKey key = SystemProperties.System.PropList.ContentViewModeForBrowse; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.ContentViewModeForSearch -- PKEY_PropList_ContentViewModeForSearch - /// Description: The list of properties to show in the content view mode of an item in the context of searching. - ///Register the regvalue under the name of "ContentViewModeForSearch". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 14 - /// - public ShellProperty ContentViewModeForSearch - { - get - { - PropertyKey key = SystemProperties.System.PropList.ContentViewModeForSearch; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.ExtendedTileInfo -- PKEY_PropList_ExtendedTileInfo - /// Description: The list of properties to show in the listview on extended tiles. Register under the regvalue of - ///"ExtendedTileInfo". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 9 - /// - public ShellProperty ExtendedTileInfo - { - get - { - PropertyKey key = SystemProperties.System.PropList.ExtendedTileInfo; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.FileOperationPrompt -- PKEY_PropList_FileOperationPrompt - /// Description: The list of properties to show in the file operation confirmation dialog. Properties with empty values - ///will not be displayed. If this list is not specified, then the InfoTip property list is used instead. - ///Register under the regvalue of "FileOperationPrompt". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 10 - /// - public ShellProperty FileOperationPrompt - { - get - { - PropertyKey key = SystemProperties.System.PropList.FileOperationPrompt; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.FullDetails -- PKEY_PropList_FullDetails - /// Description: The list of all the properties to show in the details page. Property groups can be included in this list - ///in order to more easily organize the UI. Register under the regvalue of "FullDetails". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 2 - /// - public ShellProperty FullDetails - { - get - { - PropertyKey key = SystemProperties.System.PropList.FullDetails; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.InfoTip -- PKEY_PropList_InfoTip - /// Description: The list of properties to show in the infotip. Properties with empty values will not be displayed. Register - ///under the regvalue of "InfoTip". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 4 (PID_PROPLIST_INFOTIP) - /// - public ShellProperty InfoTip - { - get - { - PropertyKey key = SystemProperties.System.PropList.InfoTip; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.NonPersonal -- PKEY_PropList_NonPersonal - /// Description: The list of properties that are considered 'non-personal'. When told to remove all non-personal properties - ///from a given file, the system will leave these particular properties untouched. Register under the regvalue - ///of "NonPersonal". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49D1091F-082E-493F-B23F-D2308AA9668C}, 100 - /// - public ShellProperty NonPersonal - { - get - { - PropertyKey key = SystemProperties.System.PropList.NonPersonal; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.PreviewDetails -- PKEY_PropList_PreviewDetails - /// Description: The list of properties to display in the preview pane. Register under the regvalue of "PreviewDetails". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 8 - /// - public ShellProperty PreviewDetails - { - get - { - PropertyKey key = SystemProperties.System.PropList.PreviewDetails; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.PreviewTitle -- PKEY_PropList_PreviewTitle - /// Description: The one or two properties to display in the preview pane title section. The optional second property is - ///displayed as a subtitle. Register under the regvalue of "PreviewTitle". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 6 - /// - public ShellProperty PreviewTitle - { - get - { - PropertyKey key = SystemProperties.System.PropList.PreviewTitle; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.QuickTip -- PKEY_PropList_QuickTip - /// Description: The list of properties to show in the infotip when the item is on a slow network. Properties with empty - ///values will not be displayed. Register under the regvalue of "QuickTip". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 5 (PID_PROPLIST_QUICKTIP) - /// - public ShellProperty QuickTip - { - get - { - PropertyKey key = SystemProperties.System.PropList.QuickTip; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.TileInfo -- PKEY_PropList_TileInfo - /// Description: The list of properties to show in the listview on tiles. Register under the regvalue of "TileInfo". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 3 (PID_PROPLIST_TILEINFO) - /// - public ShellProperty TileInfo - { - get - { - PropertyKey key = SystemProperties.System.PropList.TileInfo; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.PropList.XPDetailsPanel -- PKEY_PropList_XPDetailsPanel - /// Description: The list of properties to display in the XP webview details panel. Obsolete. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_WebView) {F2275480-F782-4291-BD94-F13693513AEC}, 0 (PID_DISPLAY_PROPERTIES) - /// - public ShellProperty XPDetailsPanel - { - get - { - PropertyKey key = SystemProperties.System.PropList.XPDetailsPanel; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.RecordedTV Properties - /// - public class PropertySystemRecordedTV : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemRecordedTV(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.RecordedTV.ChannelNumber -- PKEY_RecordedTV_ChannelNumber - /// Description: Example: 42 - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 7 - /// - public ShellProperty ChannelNumber - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.ChannelNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.Credits -- PKEY_RecordedTV_Credits - /// Description: Example: "Don Messick/Frank Welker/Casey Kasem/Heather North/Nicole Jaffe;;;" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 4 - /// - public ShellProperty Credits - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.Credits; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.DateContentExpires -- PKEY_RecordedTV_DateContentExpires - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 15 - /// - public ShellProperty DateContentExpires - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.DateContentExpires; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.EpisodeName -- PKEY_RecordedTV_EpisodeName - /// Description: Example: "Nowhere to Hyde" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 2 - /// - public ShellProperty EpisodeName - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.EpisodeName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.IsATSCContent -- PKEY_RecordedTV_IsATSCContent - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 16 - /// - public ShellProperty IsATSCContent - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.IsATSCContent; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.IsClosedCaptioningAvailable -- PKEY_RecordedTV_IsClosedCaptioningAvailable - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 12 - /// - public ShellProperty IsClosedCaptioningAvailable - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.IsClosedCaptioningAvailable; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.IsDTVContent -- PKEY_RecordedTV_IsDTVContent - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 17 - /// - public ShellProperty IsDTVContent - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.IsDTVContent; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.IsHDContent -- PKEY_RecordedTV_IsHDContent - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 18 - /// - public ShellProperty IsHDContent - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.IsHDContent; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.IsRepeatBroadcast -- PKEY_RecordedTV_IsRepeatBroadcast - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 13 - /// - public ShellProperty IsRepeatBroadcast - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.IsRepeatBroadcast; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.IsSAP -- PKEY_RecordedTV_IsSAP - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 14 - /// - public ShellProperty IsSAP - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.IsSAP; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.NetworkAffiliation -- PKEY_RecordedTV_NetworkAffiliation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {2C53C813-FB63-4E22-A1AB-0B331CA1E273}, 100 - /// - public ShellProperty NetworkAffiliation - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.NetworkAffiliation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.OriginalBroadcastDate -- PKEY_RecordedTV_OriginalBroadcastDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {4684FE97-8765-4842-9C13-F006447B178C}, 100 - /// - public ShellProperty OriginalBroadcastDate - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.OriginalBroadcastDate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.ProgramDescription -- PKEY_RecordedTV_ProgramDescription - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 3 - /// - public ShellProperty ProgramDescription - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.ProgramDescription; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.RecordingTime -- PKEY_RecordedTV_RecordingTime - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {A5477F61-7A82-4ECA-9DDE-98B69B2479B3}, 100 - /// - public ShellProperty RecordingTime - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.RecordingTime; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.StationCallSign -- PKEY_RecordedTV_StationCallSign - /// Description: Example: "TOONP" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 5 - /// - public ShellProperty StationCallSign - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.StationCallSign; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.RecordedTV.StationName -- PKEY_RecordedTV_StationName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493}, 100 - /// - public ShellProperty StationName - { - get - { - PropertyKey key = SystemProperties.System.RecordedTV.StationName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Search Properties - /// - public class PropertySystemSearch : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemSearch(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Search.AutoSummary -- PKEY_Search_AutoSummary - /// Description: General Summary of the document. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 2 - /// - public ShellProperty AutoSummary - { - get - { - PropertyKey key = SystemProperties.System.Search.AutoSummary; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.ContainerHash -- PKEY_Search_ContainerHash - /// Description: Hash code used to identify attachments to be deleted based on a common container url - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BCEEE283-35DF-4D53-826A-F36A3EEFC6BE}, 100 - /// - public ShellProperty ContainerHash - { - get - { - PropertyKey key = SystemProperties.System.Search.ContainerHash; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.Contents -- PKEY_Search_Contents - /// Description: The contents of the item. This property is for query restrictions only; it cannot be retrieved in a - ///query result. The Indexing Service friendly name is 'contents'. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 19 (PID_STG_CONTENTS) - /// - public ShellProperty Contents - { - get - { - PropertyKey key = SystemProperties.System.Search.Contents; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.EntryID -- PKEY_Search_EntryID - /// Description: The entry ID for an item within a given catalog in the Windows Search Index. - ///This value may be recycled, and therefore is not considered unique over time. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 5 (PROPID_QUERY_WORKID) - /// - public ShellProperty EntryID - { - get - { - PropertyKey key = SystemProperties.System.Search.EntryID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.ExtendedProperties -- PKEY_Search_ExtendedProperties - /// Description: - /// Type: Blob -- VT_BLOB - /// FormatID: {7B03B546-FA4F-4A52-A2FE-03D5311E5865}, 100 - /// - public ShellProperty ExtendedProperties - { - get - { - PropertyKey key = SystemProperties.System.Search.ExtendedProperties; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.GatherTime -- PKEY_Search_GatherTime - /// Description: The Datetime that the Windows Search Gatherer process last pushed properties of this document to the Windows Search Gatherer Plugins. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {0B63E350-9CCC-11D0-BCDB-00805FCCCE04}, 8 - /// - public ShellProperty GatherTime - { - get - { - PropertyKey key = SystemProperties.System.Search.GatherTime; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.HitCount -- PKEY_Search_HitCount - /// Description: When using CONTAINS over the Windows Search Index, this is the number of matches of the term. - ///If there are multiple CONTAINS, an AND computes the min number of hits and an OR the max number of hits. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 4 (PROPID_QUERY_HITCOUNT) - /// - public ShellProperty HitCount - { - get - { - PropertyKey key = SystemProperties.System.Search.HitCount; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.IsClosedDirectory -- PKEY_Search_IsClosedDirectory - /// Description: If this property is emitted with a value of TRUE, then it indicates that this URL's last modified time applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well. For example, this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last modified time of that email. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 23 - /// - public ShellProperty IsClosedDirectory - { - get - { - PropertyKey key = SystemProperties.System.Search.IsClosedDirectory; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.IsFullyContained -- PKEY_Search_IsFullyContained - /// Description: Any child URL of a URL which has System.Search.IsClosedDirectory=TRUE must emit System.Search.IsFullyContained=TRUE. This ensures that the URL is not deleted at the end of a crawl because it hasn't been visited (which is the normal mechanism for detecting deletes). For example an email attachment would emit this property - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 24 - /// - public ShellProperty IsFullyContained - { - get - { - PropertyKey key = SystemProperties.System.Search.IsFullyContained; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.QueryFocusedSummary -- PKEY_Search_QueryFocusedSummary - /// Description: Query Focused Summary of the document. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 3 - /// - public ShellProperty QueryFocusedSummary - { - get - { - PropertyKey key = SystemProperties.System.Search.QueryFocusedSummary; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.QueryFocusedSummaryWithFallback -- PKEY_Search_QueryFocusedSummaryWithFallback - /// Description: Query Focused Summary of the document, if none is available it returns the AutoSummary. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 4 - /// - public ShellProperty QueryFocusedSummaryWithFallback - { - get - { - PropertyKey key = SystemProperties.System.Search.QueryFocusedSummaryWithFallback; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.Rank -- PKEY_Search_Rank - /// Description: Relevance rank of row. Ranges from 0-1000. Larger numbers = better matches. Query-time only. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 3 (PROPID_QUERY_RANK) - /// - public ShellProperty Rank - { - get - { - PropertyKey key = SystemProperties.System.Search.Rank; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.Store -- PKEY_Search_Store - /// Description: The identifier for the protocol handler that produced this item. (E.g. MAPI, CSC, FILE etc.) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A06992B3-8CAF-4ED7-A547-B259E32AC9FC}, 100 - /// - public ShellProperty Store - { - get - { - PropertyKey key = SystemProperties.System.Search.Store; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.UrlToIndex -- PKEY_Search_UrlToIndex - /// Description: This property should be emitted by a container IFilter for each child URL within the container. The children will eventually be crawled by the indexer if they are within scope. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 2 - /// - public ShellProperty UrlToIndex - { - get - { - PropertyKey key = SystemProperties.System.Search.UrlToIndex; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Search.UrlToIndexWithModificationTime -- PKEY_Search_UrlToIndexWithModificationTime - /// Description: This property is the same as System.Search.UrlToIndex except that it includes the time the URL was last modified. This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask for this information to determine if the content needs to be indexed again. The property is a vector with two elements, a VT_LPWSTR with the URL and a VT_FILETIME for the last modified time. - /// - /// Type: Multivalue Any -- VT_VECTOR | VT_NULL (For variants: VT_ARRAY | VT_NULL) - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 12 - /// - public ShellProperty UrlToIndexWithModificationTime - { - get - { - PropertyKey key = SystemProperties.System.Search.UrlToIndexWithModificationTime; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Shell Properties - /// - public class PropertySystemShell : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemShell(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Shell.OmitFromView -- PKEY_Shell_OmitFromView - /// Description: Set this to a string value of 'True' to omit this item from shell views - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DE35258C-C695-4CBC-B982-38B0AD24CED0}, 2 - /// - public ShellProperty OmitFromView - { - get - { - PropertyKey key = SystemProperties.System.Shell.OmitFromView; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Shell.SFGAOFlagsStrings -- PKEY_Shell_SFGAOFlagsStrings - /// Description: Expresses the SFGAO flags as string values and is used as a query optimization. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D6942081-D53B-443D-AD47-5E059D9CD27A}, 2 - /// - public ShellProperty SFGAOFlagsStrings - { - get - { - PropertyKey key = SystemProperties.System.Shell.SFGAOFlagsStrings; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Software Properties - /// - public class PropertySystemSoftware : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemSoftware(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Software.DateLastUsed -- PKEY_Software_DateLastUsed - /// Description: - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {841E4F90-FF59-4D16-8947-E81BBFFAB36D}, 16 - /// - public ShellProperty DateLastUsed - { - get - { - PropertyKey key = SystemProperties.System.Software.DateLastUsed; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Software.ProductName -- PKEY_Software_ProductName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 7 - /// - public ShellProperty ProductName - { - get - { - PropertyKey key = SystemProperties.System.Software.ProductName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Sync Properties - /// - public class PropertySystemSync : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemSync(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Sync.Comments -- PKEY_Sync_Comments - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 13 - /// - public ShellProperty Comments - { - get - { - PropertyKey key = SystemProperties.System.Sync.Comments; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.ConflictDescription -- PKEY_Sync_ConflictDescription - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 4 - /// - public ShellProperty ConflictDescription - { - get - { - PropertyKey key = SystemProperties.System.Sync.ConflictDescription; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.ConflictFirstLocation -- PKEY_Sync_ConflictFirstLocation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 6 - /// - public ShellProperty ConflictFirstLocation - { - get - { - PropertyKey key = SystemProperties.System.Sync.ConflictFirstLocation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.ConflictSecondLocation -- PKEY_Sync_ConflictSecondLocation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 7 - /// - public ShellProperty ConflictSecondLocation - { - get - { - PropertyKey key = SystemProperties.System.Sync.ConflictSecondLocation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.HandlerCollectionID -- PKEY_Sync_HandlerCollectionID - /// Description: - /// Type: Guid -- VT_CLSID - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 2 - /// - public ShellProperty HandlerCollectionID - { - get - { - PropertyKey key = SystemProperties.System.Sync.HandlerCollectionID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.HandlerID -- PKEY_Sync_HandlerID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 3 - /// - public ShellProperty HandlerID - { - get - { - PropertyKey key = SystemProperties.System.Sync.HandlerID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.HandlerName -- PKEY_Sync_HandlerName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 2 - /// - public ShellProperty HandlerName - { - get - { - PropertyKey key = SystemProperties.System.Sync.HandlerName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.HandlerType -- PKEY_Sync_HandlerType - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 8 - /// - public ShellProperty HandlerType - { - get - { - PropertyKey key = SystemProperties.System.Sync.HandlerType; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.HandlerTypeLabel -- PKEY_Sync_HandlerTypeLabel - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 9 - /// - public ShellProperty HandlerTypeLabel - { - get - { - PropertyKey key = SystemProperties.System.Sync.HandlerTypeLabel; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.ItemID -- PKEY_Sync_ItemID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 6 - /// - public ShellProperty ItemID - { - get - { - PropertyKey key = SystemProperties.System.Sync.ItemID; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.ItemName -- PKEY_Sync_ItemName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 3 - /// - public ShellProperty ItemName - { - get - { - PropertyKey key = SystemProperties.System.Sync.ItemName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.ProgressPercentage -- PKEY_Sync_ProgressPercentage - /// Description: An integer value between 0 and 100 representing the percentage completed. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 23 - /// - public ShellProperty ProgressPercentage - { - get - { - PropertyKey key = SystemProperties.System.Sync.ProgressPercentage; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.State -- PKEY_Sync_State - /// Description: Sync state. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 24 - /// - public ShellProperty State - { - get - { - PropertyKey key = SystemProperties.System.Sync.State; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Sync.Status -- PKEY_Sync_Status - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 10 - /// - public ShellProperty Status - { - get - { - PropertyKey key = SystemProperties.System.Sync.Status; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Task Properties - /// - public class PropertySystemTask : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemTask(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Task.BillingInformation -- PKEY_Task_BillingInformation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D37D52C6-261C-4303-82B3-08B926AC6F12}, 100 - /// - public ShellProperty BillingInformation - { - get - { - PropertyKey key = SystemProperties.System.Task.BillingInformation; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Task.CompletionStatus -- PKEY_Task_CompletionStatus - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {084D8A0A-E6D5-40DE-BF1F-C8820E7C877C}, 100 - /// - public ShellProperty CompletionStatus - { - get - { - PropertyKey key = SystemProperties.System.Task.CompletionStatus; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Task.Owner -- PKEY_Task_Owner - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0}, 100 - /// - public ShellProperty Owner - { - get - { - PropertyKey key = SystemProperties.System.Task.Owner; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Video Properties - /// - public class PropertySystemVideo : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemVideo(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Video.Compression -- PKEY_Video_Compression - /// Description: Indicates the level of compression for the video stream. "Compression". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 10 (PIDVSI_COMPRESSION) - /// - public ShellProperty Compression - { - get - { - PropertyKey key = SystemProperties.System.Video.Compression; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.Director -- PKEY_Video_Director - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 20 (PIDMSI_DIRECTOR) - /// - public ShellProperty Director - { - get - { - PropertyKey key = SystemProperties.System.Video.Director; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.EncodingBitrate -- PKEY_Video_EncodingBitrate - /// Description: Indicates the data rate in "bits per second" for the video stream. "DataRate". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 8 (PIDVSI_DATA_RATE) - /// - public ShellProperty EncodingBitrate - { - get - { - PropertyKey key = SystemProperties.System.Video.EncodingBitrate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.FourCC -- PKEY_Video_FourCC - /// Description: Indicates the 4CC for the video stream. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 44 - /// - public ShellProperty FourCC - { - get - { - PropertyKey key = SystemProperties.System.Video.FourCC; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.FrameHeight -- PKEY_Video_FrameHeight - /// Description: Indicates the frame height for the video stream. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 4 - /// - public ShellProperty FrameHeight - { - get - { - PropertyKey key = SystemProperties.System.Video.FrameHeight; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.FrameRate -- PKEY_Video_FrameRate - /// Description: Indicates the frame rate in "frames per millisecond" for the video stream. "FrameRate". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 6 (PIDVSI_FRAME_RATE) - /// - public ShellProperty FrameRate - { - get - { - PropertyKey key = SystemProperties.System.Video.FrameRate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.FrameWidth -- PKEY_Video_FrameWidth - /// Description: Indicates the frame width for the video stream. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 3 - /// - public ShellProperty FrameWidth - { - get - { - PropertyKey key = SystemProperties.System.Video.FrameWidth; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.HorizontalAspectRatio -- PKEY_Video_HorizontalAspectRatio - /// Description: Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY, - ///like 16:9. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 42 - /// - public ShellProperty HorizontalAspectRatio - { - get - { - PropertyKey key = SystemProperties.System.Video.HorizontalAspectRatio; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.SampleSize -- PKEY_Video_SampleSize - /// Description: Indicates the sample size in bits for the video stream. "SampleSize". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 9 (PIDVSI_SAMPLE_SIZE) - /// - public ShellProperty SampleSize - { - get - { - PropertyKey key = SystemProperties.System.Video.SampleSize; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.StreamName -- PKEY_Video_StreamName - /// Description: Indicates the name for the video stream. "StreamName". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 2 (PIDVSI_STREAM_NAME) - /// - public ShellProperty StreamName - { - get - { - PropertyKey key = SystemProperties.System.Video.StreamName; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.StreamNumber -- PKEY_Video_StreamNumber - /// Description: "Stream Number". - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 11 (PIDVSI_STREAM_NUMBER) - /// - public ShellProperty StreamNumber - { - get - { - PropertyKey key = SystemProperties.System.Video.StreamNumber; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.TotalBitrate -- PKEY_Video_TotalBitrate - /// Description: Indicates the total data rate in "bits per second" for all video and audio streams. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 43 (PIDVSI_TOTAL_BITRATE) - /// - public ShellProperty TotalBitrate - { - get - { - PropertyKey key = SystemProperties.System.Video.TotalBitrate; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.TranscodedForSync -- PKEY_Video_TranscodedForSync - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 46 - /// - public ShellProperty TranscodedForSync - { - get - { - PropertyKey key = SystemProperties.System.Video.TranscodedForSync; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Video.VerticalAspectRatio -- PKEY_Video_VerticalAspectRatio - /// Description: Indicates the vertical portion of the aspect ratio. The Y portion of - ///XX:YY, like 16:9. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 45 - /// - public ShellProperty VerticalAspectRatio - { - get - { - PropertyKey key = SystemProperties.System.Video.VerticalAspectRatio; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - - /// - /// System.Volume Properties - /// - public class PropertySystemVolume : PropertyStoreItems - { - - - private ShellObject shellObjectParent = null; - private Hashtable hashtable = new Hashtable(); - - internal PropertySystemVolume(ShellObject parent) - { - shellObjectParent = parent; - } - - #region Properties - - /// - /// Name: System.Volume.FileSystem -- PKEY_Volume_FileSystem - /// Description: Indicates the filesystem of the volume. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 4 (PID_VOLUME_FILESYSTEM) (Filesystem Volume Properties) - /// - public ShellProperty FileSystem - { - get - { - PropertyKey key = SystemProperties.System.Volume.FileSystem; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Volume.IsMappedDrive -- PKEY_Volume_IsMappedDrive - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {149C0B69-2C2D-48FC-808F-D318D78C4636}, 2 - /// - public ShellProperty IsMappedDrive - { - get - { - PropertyKey key = SystemProperties.System.Volume.IsMappedDrive; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - - /// - /// Name: System.Volume.IsRoot -- PKEY_Volume_IsRoot - /// Description: - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 10 (Filesystem Volume Properties) - /// - public ShellProperty IsRoot - { - get - { - PropertyKey key = SystemProperties.System.Volume.IsRoot; - - if (!hashtable.ContainsKey(key)) - { - hashtable.Add(key, shellObjectParent.Properties.CreateTypedProperty(key)); - } - - return hashtable[key] as ShellProperty; - } - } - #endregion - - - #region sub-namespaces - #endregion - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/SystemProperties.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/SystemProperties.cs deleted file mode 100644 index 6dbe850..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/SystemProperties.cs +++ /dev/null @@ -1,12345 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - - - /// - /// Provides easy access to all the system properties (property keys and their descriptions) - /// - public static class SystemProperties - { - - /// - /// Returns the property description for a given property key. - /// - /// Property key of the property whose description is required. - /// Property Description for a given property key - public static ShellPropertyDescription GetPropertyDescription(PropertyKey propertyKey) - { - return ShellPropertyDescriptionsCache.Cache.GetPropertyDescription(propertyKey); - } - - - /// - /// Gets the property description for a given property's canonical name. - /// - /// Canonical name of the property whose description is required. - /// Property Description for a given property key - public static ShellPropertyDescription GetPropertyDescription(string canonicalName) - { - PropertyKey propKey; - - int result = PropertySystemNativeMethods.PSGetPropertyKeyFromName(canonicalName, out propKey); - - if (!CoreErrorHelper.Succeeded(result)) - { - throw new ArgumentException("This CanonicalName is not valid", Marshal.GetExceptionForHR(result)); - } - else - { - return ShellPropertyDescriptionsCache.Cache.GetPropertyDescription(propKey); - } - } - - /// - /// System Properties - /// - public static class System - { - - - #region Properties - - /// - /// Name: System.AcquisitionID -- PKEY_AcquisitionID - /// Description: Hash to determine acquisition session. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {65A98875-3C80-40AB-ABBC-EFDAF77DBEE2}, 100 - /// - public static PropertyKey AcquisitionID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{65A98875-3C80-40AB-ABBC-EFDAF77DBEE2}"), 100); - - return key; - } - } - - /// - /// Name: System.ApplicationName -- PKEY_ApplicationName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 18 (PIDSI_APPNAME) - /// - public static PropertyKey ApplicationName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 18); - - return key; - } - } - - /// - /// Name: System.Author -- PKEY_Author - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 4 (PIDSI_AUTHOR) - /// - public static PropertyKey Author - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 4); - - return key; - } - } - - /// - /// Name: System.Capacity -- PKEY_Capacity - /// Description: The amount of total space in bytes. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 3 (PID_VOLUME_CAPACITY) (Filesystem Volume Properties) - /// - public static PropertyKey Capacity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 3); - - return key; - } - } - - /// - /// Name: System.Category -- PKEY_Category - /// Description: Legacy code treats this as VT_LPSTR. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 2 (PIDDSI_CATEGORY) - /// - public static PropertyKey Category - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 2); - - return key; - } - } - - /// - /// Name: System.Comment -- PKEY_Comment - /// Description: Comments. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 6 (PIDSI_COMMENTS) - /// - public static PropertyKey Comment - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 6); - - return key; - } - } - - /// - /// Name: System.Company -- PKEY_Company - /// Description: The company or publisher. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 15 (PIDDSI_COMPANY) - /// - public static PropertyKey Company - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 15); - - return key; - } - } - - /// - /// Name: System.ComputerName -- PKEY_ComputerName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 5 (PID_COMPUTERNAME) - /// - public static PropertyKey ComputerName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 5); - - return key; - } - } - - /// - /// Name: System.ContainedItems -- PKEY_ContainedItems - /// Description: The list of type of items, this item contains. For example, this item contains urls, attachments etc. - ///This is represented as a vector array of GUIDs where each GUID represents certain type. - /// - /// Type: Multivalue Guid -- VT_VECTOR | VT_CLSID (For variants: VT_ARRAY | VT_CLSID) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 29 - /// - public static PropertyKey ContainedItems - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 29); - - return key; - } - } - - /// - /// Name: System.ContentStatus -- PKEY_ContentStatus - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 27 - /// - public static PropertyKey ContentStatus - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 27); - - return key; - } - } - - /// - /// Name: System.ContentType -- PKEY_ContentType - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 26 - /// - public static PropertyKey ContentType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 26); - - return key; - } - } - - /// - /// Name: System.Copyright -- PKEY_Copyright - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 11 (PIDMSI_COPYRIGHT) - /// - public static PropertyKey Copyright - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 11); - - return key; - } - } - - /// - /// Name: System.DateAccessed -- PKEY_DateAccessed - /// Description: The time of the last access to the item. The Indexing Service friendly name is 'access'. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 16 (PID_STG_ACCESSTIME) - /// - public static PropertyKey DateAccessed - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 16); - - return key; - } - } - - /// - /// Name: System.DateAcquired -- PKEY_DateAcquired - /// Description: The time the file entered the system via acquisition. This is not the same as System.DateImported. - ///Examples are when pictures are acquired from a camera, or when music is purchased online. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {2CBAA8F5-D81F-47CA-B17A-F8D822300131}, 100 - /// - public static PropertyKey DateAcquired - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2CBAA8F5-D81F-47CA-B17A-F8D822300131}"), 100); - - return key; - } - } - - /// - /// Name: System.DateArchived -- PKEY_DateArchived - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {43F8D7B7-A444-4F87-9383-52271C9B915C}, 100 - /// - public static PropertyKey DateArchived - { - get - { - PropertyKey key = new PropertyKey(new Guid("{43F8D7B7-A444-4F87-9383-52271C9B915C}"), 100); - - return key; - } - } - - /// - /// Name: System.DateCompleted -- PKEY_DateCompleted - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {72FAB781-ACDA-43E5-B155-B2434F85E678}, 100 - /// - public static PropertyKey DateCompleted - { - get - { - PropertyKey key = new PropertyKey(new Guid("{72FAB781-ACDA-43E5-B155-B2434F85E678}"), 100); - - return key; - } - } - - /// - /// Name: System.DateCreated -- PKEY_DateCreated - /// Description: The date and time the item was created. The Indexing Service friendly name is 'create'. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 15 (PID_STG_CREATETIME) - /// - public static PropertyKey DateCreated - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 15); - - return key; - } - } - - /// - /// Name: System.DateImported -- PKEY_DateImported - /// Description: The time the file is imported into a separate database. This is not the same as System.DateAcquired. (Eg, 2003:05:22 13:55:04) - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 18258 - /// - public static PropertyKey DateImported - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 18258); - - return key; - } - } - - /// - /// Name: System.DateModified -- PKEY_DateModified - /// Description: The date and time of the last write to the item. The Indexing Service friendly name is 'write'. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 14 (PID_STG_WRITETIME) - /// - public static PropertyKey DateModified - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 14); - - return key; - } - } - - /// - /// Name: System.DescriptionID -- PKEY_DescriptionID - /// Description: The contents of a SHDESCRIPTIONID structure as a buffer of bytes. - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 2 (PID_DESCRIPTIONID) - /// - public static PropertyKey DescriptionID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 2); - - return key; - } - } - - /// - /// Name: System.DueDate -- PKEY_DueDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE}, 100 - /// - public static PropertyKey DueDate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{3F8472B5-E0AF-4DB2-8071-C53FE76AE7CE}"), 100); - - return key; - } - } - - /// - /// Name: System.EndDate -- PKEY_EndDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {C75FAA05-96FD-49E7-9CB4-9F601082D553}, 100 - /// - public static PropertyKey EndDate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C75FAA05-96FD-49E7-9CB4-9F601082D553}"), 100); - - return key; - } - } - - /// - /// Name: System.FileAllocationSize -- PKEY_FileAllocationSize - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 18 (PID_STG_ALLOCSIZE) - /// - public static PropertyKey FileAllocationSize - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 18); - - return key; - } - } - - /// - /// Name: System.FileAttributes -- PKEY_FileAttributes - /// Description: This is the WIN32_FIND_DATA dwFileAttributes for the file-based item. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 13 (PID_STG_ATTRIBUTES) - /// - public static PropertyKey FileAttributes - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 13); - - return key; - } - } - - /// - /// Name: System.FileCount -- PKEY_FileCount - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 12 - /// - public static PropertyKey FileCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 12); - - return key; - } - } - - /// - /// Name: System.FileDescription -- PKEY_FileDescription - /// Description: This is a user-friendly description of the file. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 3 (PIDVSI_FileDescription) - /// - public static PropertyKey FileDescription - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 3); - - return key; - } - } - - /// - /// Name: System.FileExtension -- PKEY_FileExtension - /// Description: This is the file extension of the file based item, including the leading period. - /// - ///If System.FileName is VT_EMPTY, then this property should be too. Otherwise, it should be derived - ///appropriately by the data source from System.FileName. If System.FileName does not have a file - ///extension, this value should be VT_EMPTY. - /// - ///To obtain the type of any item (including an item that is not a file), use System.ItemType. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" ".txt" - /// "\\server\share\mydir\goodnews.doc" ".doc" - /// "\\server\share\numbers.xls" ".xls" - /// "\\server\share\folder" VT_EMPTY - /// "c:\foo\MyFolder" VT_EMPTY - /// [desktop] VT_EMPTY - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}, 100 - /// - public static PropertyKey FileExtension - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E4F10A3C-49E6-405D-8288-A23BD4EEAA6C}"), 100); - - return key; - } - } - - /// - /// Name: System.FileFRN -- PKEY_FileFRN - /// Description: This is the unique file ID, also known as the File Reference Number. For a given file, this is the same value - ///as is found in the structure variable FILE_ID_BOTH_DIR_INFO.FileId, via GetFileInformationByHandleEx(). - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 21 (PID_STG_FRN) - /// - public static PropertyKey FileFRN - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 21); - - return key; - } - } - - /// - /// Name: System.FileName -- PKEY_FileName - /// Description: This is the file name (including extension) of the file. - /// - ///It is possible that the item might not exist on a filesystem (ie, it may not be opened - ///using CreateFile). Nonetheless, if the item is represented as a file from the logical sense - ///(and its name follows standard Win32 file-naming syntax), then the data source should emit this property. - /// - ///If an item is not a file, then the value for this property is VT_EMPTY. See - ///System.ItemNameDisplay. - /// - ///This has the same value as System.ParsingName for items that are provided by the Shell's file folder. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "hello.txt" - /// "\\server\share\mydir\goodnews.doc" "goodnews.doc" - /// "\\server\share\numbers.xls" "numbers.xls" - /// "c:\foo\MyFolder" "MyFolder" - /// (email message) VT_EMPTY - /// (song on portable device) "song.wma" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {41CF5AE0-F75A-4806-BD87-59C7D9248EB9}, 100 - /// - public static PropertyKey FileName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{41CF5AE0-F75A-4806-BD87-59C7D9248EB9}"), 100); - - return key; - } - } - - /// - /// Name: System.FileOwner -- PKEY_FileOwner - /// Description: This is the owner of the file, according to the file system. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Misc) {9B174B34-40FF-11D2-A27E-00C04FC30871}, 4 (PID_MISC_OWNER) - /// - public static PropertyKey FileOwner - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9B174B34-40FF-11D2-A27E-00C04FC30871}"), 4); - - return key; - } - } - - /// - /// Name: System.FileVersion -- PKEY_FileVersion - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 4 (PIDVSI_FileVersion) - /// - public static PropertyKey FileVersion - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 4); - - return key; - } - } - - /// - /// Name: System.FindData -- PKEY_FindData - /// Description: WIN32_FIND_DATAW in buffer of bytes. - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 0 (PID_FINDDATA) - /// - public static PropertyKey FindData - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 0); - - return key; - } - } - - /// - /// Name: System.FlagColor -- PKEY_FlagColor - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {67DF94DE-0CA7-4D6F-B792-053A3E4F03CF}, 100 - /// - public static PropertyKey FlagColor - { - get - { - PropertyKey key = new PropertyKey(new Guid("{67DF94DE-0CA7-4D6F-B792-053A3E4F03CF}"), 100); - - return key; - } - } - - /// - /// Name: System.FlagColorText -- PKEY_FlagColorText - /// Description: This is the user-friendly form of System.FlagColor. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {45EAE747-8E2A-40AE-8CBF-CA52ABA6152A}, 100 - /// - public static PropertyKey FlagColorText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{45EAE747-8E2A-40AE-8CBF-CA52ABA6152A}"), 100); - - return key; - } - } - - /// - /// Name: System.FlagStatus -- PKEY_FlagStatus - /// Description: Status of Flag. Values: (0=none 1=white 2=Red). cdoPR_FLAG_STATUS - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 12 - /// - public static PropertyKey FlagStatus - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 12); - - return key; - } - } - - /// - /// Name: System.FlagStatusText -- PKEY_FlagStatusText - /// Description: This is the user-friendly form of System.FlagStatus. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DC54FD2E-189D-4871-AA01-08C2F57A4ABC}, 100 - /// - public static PropertyKey FlagStatusText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DC54FD2E-189D-4871-AA01-08C2F57A4ABC}"), 100); - - return key; - } - } - - /// - /// Name: System.FreeSpace -- PKEY_FreeSpace - /// Description: The amount of free space in bytes. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 2 (PID_VOLUME_FREE) (Filesystem Volume Properties) - /// - public static PropertyKey FreeSpace - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 2); - - return key; - } - } - - /// - /// Name: System.FullText -- PKEY_FullText - /// Description: This PKEY is used to specify search terms that should be applied as broadly as possible, - ///across all valid properties for the data source(s) being searched. It should not be - ///emitted from a data source. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {1E3EE840-BC2B-476C-8237-2ACD1A839B22}, 6 - /// - public static PropertyKey FullText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1E3EE840-BC2B-476C-8237-2ACD1A839B22}"), 6); - - return key; - } - } - - /// - /// Name: System.Identity -- PKEY_Identity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A26F4AFC-7346-4299-BE47-EB1AE613139F}, 100 - /// - public static PropertyKey IdentityProperty - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A26F4AFC-7346-4299-BE47-EB1AE613139F}"), 100); - - return key; - } - } - - /// - /// Name: System.ImageParsingName -- PKEY_ImageParsingName - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D7750EE0-C6A4-48EC-B53E-B87B52E6D073}, 100 - /// - public static PropertyKey ImageParsingName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D7750EE0-C6A4-48EC-B53E-B87B52E6D073}"), 100); - - return key; - } - } - - /// - /// Name: System.Importance -- PKEY_Importance - /// Description: - /// Type: Int32 -- VT_I4 - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 11 - /// - public static PropertyKey Importance - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 11); - - return key; - } - } - - /// - /// Name: System.ImportanceText -- PKEY_ImportanceText - /// Description: This is the user-friendly form of System.Importance. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A3B29791-7713-4E1D-BB40-17DB85F01831}, 100 - /// - public static PropertyKey ImportanceText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A3B29791-7713-4E1D-BB40-17DB85F01831}"), 100); - - return key; - } - } - - /// - /// Name: System.InfoTipText -- PKEY_InfoTipText - /// Description: The text (with formatted property values) to show in the infotip. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 17 - /// - public static PropertyKey InfoTipText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 17); - - return key; - } - } - - /// - /// Name: System.InternalName -- PKEY_InternalName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 5 (PIDVSI_InternalName) - /// - public static PropertyKey InternalName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 5); - - return key; - } - } - - /// - /// Name: System.IsAttachment -- PKEY_IsAttachment - /// Description: Identifies if this item is an attachment. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {F23F425C-71A1-4FA8-922F-678EA4A60408}, 100 - /// - public static PropertyKey IsAttachment - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F23F425C-71A1-4FA8-922F-678EA4A60408}"), 100); - - return key; - } - } - - /// - /// Name: System.IsDefaultNonOwnerSaveLocation -- PKEY_IsDefaultNonOwnerSaveLocation - /// Description: Identifies the default save location for a library for non-owners of the library - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 5 - /// - public static PropertyKey IsDefaultNonOwnerSaveLocation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 5); - - return key; - } - } - - /// - /// Name: System.IsDefaultSaveLocation -- PKEY_IsDefaultSaveLocation - /// Description: Identifies the default save location for a library for the owner of the library - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 3 - /// - public static PropertyKey IsDefaultSaveLocation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 3); - - return key; - } - } - - /// - /// Name: System.IsDeleted -- PKEY_IsDeleted - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D}, 100 - /// - public static PropertyKey IsDeleted - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5CDA5FC8-33EE-4FF3-9094-AE7BD8868C4D}"), 100); - - return key; - } - } - - /// - /// Name: System.IsEncrypted -- PKEY_IsEncrypted - /// Description: Is the item encrypted? - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {90E5E14E-648B-4826-B2AA-ACAF790E3513}, 10 - /// - public static PropertyKey IsEncrypted - { - get - { - PropertyKey key = new PropertyKey(new Guid("{90E5E14E-648B-4826-B2AA-ACAF790E3513}"), 10); - - return key; - } - } - - /// - /// Name: System.IsFlagged -- PKEY_IsFlagged - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {5DA84765-E3FF-4278-86B0-A27967FBDD03}, 100 - /// - public static PropertyKey IsFlagged - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5DA84765-E3FF-4278-86B0-A27967FBDD03}"), 100); - - return key; - } - } - - /// - /// Name: System.IsFlaggedComplete -- PKEY_IsFlaggedComplete - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {A6F360D2-55F9-48DE-B909-620E090A647C}, 100 - /// - public static PropertyKey IsFlaggedComplete - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A6F360D2-55F9-48DE-B909-620E090A647C}"), 100); - - return key; - } - } - - /// - /// Name: System.IsIncomplete -- PKEY_IsIncomplete - /// Description: Identifies if the message was not completely received for some error condition. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {346C8BD1-2E6A-4C45-89A4-61B78E8E700F}, 100 - /// - public static PropertyKey IsIncomplete - { - get - { - PropertyKey key = new PropertyKey(new Guid("{346C8BD1-2E6A-4C45-89A4-61B78E8E700F}"), 100); - - return key; - } - } - - /// - /// Name: System.IsLocationSupported -- PKEY_IsLocationSupported - /// Description: A bool value to know if a location is supported (locally indexable, or remotely indexed). - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 8 - /// - public static PropertyKey IsLocationSupported - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 8); - - return key; - } - } - - /// - /// Name: System.IsPinnedToNameSpaceTree -- PKEY_IsPinnedToNameSpaceTree - /// Description: A bool value to know if a shell folder is pinned to the navigation pane - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 2 - /// - public static PropertyKey IsPinnedToNameSpaceTree - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 2); - - return key; - } - } - - /// - /// Name: System.IsRead -- PKEY_IsRead - /// Description: Has the item been read? - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 10 - /// - public static PropertyKey IsRead - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 10); - - return key; - } - } - - /// - /// Name: System.IsSearchOnlyItem -- PKEY_IsSearchOnlyItem - /// Description: Identifies if a location or a library is search only - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 4 - /// - public static PropertyKey IsSearchOnlyItem - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 4); - - return key; - } - } - - /// - /// Name: System.IsSendToTarget -- PKEY_IsSendToTarget - /// Description: Provided by certain shell folders. Return TRUE if the folder is a valid Send To target. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 33 - /// - public static PropertyKey IsSendToTarget - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 33); - - return key; - } - } - - /// - /// Name: System.IsShared -- PKEY_IsShared - /// Description: Is this item shared? This only checks for ACLs that are not inherited. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 100 - /// - public static PropertyKey IsShared - { - get - { - PropertyKey key = new PropertyKey(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemAuthors -- PKEY_ItemAuthors - /// Description: This is the generic list of authors associated with an item. - /// - ///For example, the artist name for a track is the item author. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D0A04F0A-462A-48A4-BB2F-3706E88DBD7D}, 100 - /// - public static PropertyKey ItemAuthors - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D0A04F0A-462A-48A4-BB2F-3706E88DBD7D}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemClassType -- PKEY_ItemClassType - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {048658AD-2DB8-41A4-BBB6-AC1EF1207EB1}, 100 - /// - public static PropertyKey ItemClassType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{048658AD-2DB8-41A4-BBB6-AC1EF1207EB1}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemDate -- PKEY_ItemDate - /// Description: This is the main date for an item. The date of interest. - /// - ///For example, for photos this maps to System.Photo.DateTaken. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {F7DB74B4-4287-4103-AFBA-F1B13DCD75CF}, 100 - /// - public static PropertyKey ItemDate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F7DB74B4-4287-4103-AFBA-F1B13DCD75CF}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemFolderNameDisplay -- PKEY_ItemFolderNameDisplay - /// Description: This is the user-friendly display name of the parent folder of an item. - /// - ///If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it - ///should be derived appropriately by the data source from System.ItemFolderPathDisplay. - /// - ///If the folder is a file folder, the value will be localized if a localized name is available. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "bar" - /// "\\server\share\mydir\goodnews.doc" "mydir" - /// "\\server\share\numbers.xls" "share" - /// "c:\foo\MyFolder" "foo" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 2 (PID_STG_DIRECTORY) - /// - public static PropertyKey ItemFolderNameDisplay - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 2); - - return key; - } - } - - /// - /// Name: System.ItemFolderPathDisplay -- PKEY_ItemFolderPathDisplay - /// Description: This is the user-friendly display path of the parent folder of an item. - /// - ///If System.ItemPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should - ///be derived appropriately by the data source from System.ItemPathDisplay. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "c:\foo\bar" - /// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir" - /// "\\server\share\numbers.xls" "\\server\share" - /// "c:\foo\MyFolder" "c:\foo" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 6 - /// - public static PropertyKey ItemFolderPathDisplay - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 6); - - return key; - } - } - - /// - /// Name: System.ItemFolderPathDisplayNarrow -- PKEY_ItemFolderPathDisplayNarrow - /// Description: This is the user-friendly display path of the parent folder of an item. The format of the string - ///should be tailored such that the folder name comes first, to optimize for a narrow viewing column. - /// - ///If the folder is a file folder, the value includes localized names if they are present. - /// - ///If System.ItemFolderPathDisplay is VT_EMPTY, then this property should be too. Otherwise, it should - ///be derived appropriately by the data source from System.ItemFolderPathDisplay. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "bar (c:\foo)" - /// "\\server\share\mydir\goodnews.doc" "mydir (\\server\share)" - /// "\\server\share\numbers.xls" "share (\\server)" - /// "c:\foo\MyFolder" "foo (c:\)" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Inbox (/Mailbox Account)" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DABD30ED-0043-4789-A7F8-D013A4736622}, 100 - /// - public static PropertyKey ItemFolderPathDisplayNarrow - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DABD30ED-0043-4789-A7F8-D013A4736622}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemName -- PKEY_ItemName - /// Description: This is the base-name of the System.ItemNameDisplay. - /// - ///If the item is a file this property - ///includes the extension in all cases, and will be localized if a localized name is available. - /// - ///If the item is a message, then the value of this property does not include the forwarding or - ///reply prefixes (see System.ItemNamePrefix). - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F}, 100 - /// - public static PropertyKey ItemName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6B8DA074-3B5C-43BC-886F-0A2CDCE00B6F}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemNameDisplay -- PKEY_ItemNameDisplay - /// Description: This is the display name in "most complete" form. This is the best effort unique representation - ///of the name of an item that makes sense for end users to read. It is the concatentation of - ///System.ItemNamePrefix and System.ItemName. - /// - ///If the item is a file this property - ///includes the extension in all cases, and will be localized if a localized name is available. - /// - ///There are acceptable cases when System.FileName is not VT_EMPTY, yet the value of this property - ///is completely different. Email messages are a key example. If the item is an email message, - ///the item name is likely the subject. In that case, the value must be the concatenation of the - ///System.ItemNamePrefix and System.ItemName. Since the value of System.ItemNamePrefix excludes - ///any trailing whitespace, the concatenation must include a whitespace when generating System.ItemNameDisplay. - /// - ///Note that this property is not guaranteed to be unique, but the idea is to promote the most likely - ///candidate that can be unique and also makes sense for end users. For example, for documents, you - ///might think about using System.Title as the System.ItemNameDisplay, but in practice the title of - ///the documents may not be useful or unique enough to be of value as the sole System.ItemNameDisplay. - ///Instead, providing the value of System.FileName as the value of System.ItemNameDisplay is a better - ///candidate. In Windows Mail, the emails are stored in the file system as .eml files and the - ///System.FileName for those files are not human-friendly as they contain GUIDs. In this example, - ///promoting System.Subject as System.ItemNameDisplay makes more sense. - /// - ///Compatibility notes: - /// - ///Shell folder implementations on Vista: use PKEY_ItemNameDisplay for the name column when - ///you want Explorer to call ISF::GetDisplayNameOf(SHGDN_NORMAL) to get the value of the name. Use - ///another PKEY (like PKEY_ItemName) when you want Explorer to call either the folder's property store or - ///ISF2::GetDetailsEx in order to get the value of the name. - /// - ///Shell folder implementations on XP: the first column needs to be the name column, and Explorer - ///will call ISF::GetDisplayNameOf to get the value of the name. The PKEY/SCID does not matter. - /// - ///Example values: - /// - /// File: "hello.txt" - /// Message: "Re: Let's talk about Tom's argyle socks!" - /// Device folder: "song.wma" - /// Folder: "Documents" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 10 (PID_STG_NAME) - /// - public static PropertyKey ItemNameDisplay - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 10); - - return key; - } - } - - /// - /// Name: System.ItemNamePrefix -- PKEY_ItemNamePrefix - /// Description: This is the prefix of an item, used for email messages. - ///where the subject begins with "Re:" which is the prefix. - /// - ///If the item is a file, then the value of this property is VT_EMPTY. - /// - ///If the item is a message, then the value of this property is the forwarding or reply - ///prefixes (including delimiting colon, but no whitespace), or VT_EMPTY if there is no prefix. - /// - ///Example values: - /// - ///System.ItemNamePrefix System.ItemName System.ItemNameDisplay - ///--------------------- ------------------- ---------------------- - ///VT_EMPTY "Great day" "Great day" - ///"Re:" "Great day" "Re: Great day" - ///"Fwd: " "Monthly budget" "Fwd: Monthly budget" - ///VT_EMPTY "accounts.xls" "accounts.xls" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D7313FF1-A77A-401C-8C99-3DBDD68ADD36}, 100 - /// - public static PropertyKey ItemNamePrefix - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D7313FF1-A77A-401C-8C99-3DBDD68ADD36}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemParticipants -- PKEY_ItemParticipants - /// Description: This is the generic list of people associated with an item and who contributed - ///to the item. - /// - ///For example, this is the combination of people in the To list, Cc list and - ///sender of an email message. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D4D0AA16-9948-41A4-AA85-D97FF9646993}, 100 - /// - public static PropertyKey ItemParticipants - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D4D0AA16-9948-41A4-AA85-D97FF9646993}"), 100); - - return key; - } - } - - /// - /// Name: System.ItemPathDisplay -- PKEY_ItemPathDisplay - /// Description: This is the user-friendly display path to the item. - /// - ///If the item is a file or folder this property - ///includes the extension in all cases, and will be localized if a localized name is available. - /// - ///For other items,this is the user-friendly equivalent, assuming the item exists in hierarchical storage. - /// - ///Unlike System.ItemUrl, this property value does not include the URL scheme. - /// - ///To parse an item path, use System.ItemUrl or System.ParsingPath. To reference shell - ///namespace items using shell APIs, use System.ParsingPath. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "c:\foo\bar\hello.txt" - /// "\\server\share\mydir\goodnews.doc" "\\server\share\mydir\goodnews.doc" - /// "\\server\share\numbers.xls" "\\server\share\numbers.xls" - /// "c:\foo\MyFolder" "c:\foo\MyFolder" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "/Mailbox Account/Inbox/'Re: Hello!'" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 7 - /// - public static PropertyKey ItemPathDisplay - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 7); - - return key; - } - } - - /// - /// Name: System.ItemPathDisplayNarrow -- PKEY_ItemPathDisplayNarrow - /// Description: This is the user-friendly display path to the item. The format of the string should be - ///tailored such that the name comes first, to optimize for a narrow viewing column. - /// - ///If the item is a file, the value excludes the file extension, and includes localized names if they are present. - ///If the item is a message, the value includes the System.ItemNamePrefix. - /// - ///To parse an item path, use System.ItemUrl or System.ParsingPath. - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "hello (c:\foo\bar)" - /// "\\server\share\mydir\goodnews.doc" "goodnews (\\server\share\mydir)" - /// "\\server\share\folder" "folder (\\server\share)" - /// "c:\foo\MyFolder" "MyFolder (c:\foo)" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Re: Hello! (/Mailbox Account/Inbox)" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 8 - /// - public static PropertyKey ItemPathDisplayNarrow - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 8); - - return key; - } - } - - /// - /// Name: System.ItemType -- PKEY_ItemType - /// Description: This is the canonical type of the item and is intended to be programmatically - ///parsed. - /// - ///If there is no canonical type, the value is VT_EMPTY. - /// - ///If the item is a file (ie, System.FileName is not VT_EMPTY), the value is the same as - ///System.FileExtension. - /// - ///Use System.ItemTypeText when you want to display the type to end users in a view. (If - /// the item is a file, passing the System.ItemType value to PSFormatForDisplay will - /// result in the same value as System.ItemTypeText.) - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" ".txt" - /// "\\server\share\mydir\goodnews.doc" ".doc" - /// "\\server\share\folder" "Directory" - /// "c:\foo\MyFolder" "Directory" - /// [desktop] "Folder" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "MAPI/IPM.Message" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 11 - /// - public static PropertyKey ItemType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 11); - - return key; - } - } - - /// - /// Name: System.ItemTypeText -- PKEY_ItemTypeText - /// Description: This is the user friendly type name of the item. This is not intended to be - ///programmatically parsed. - /// - ///If System.ItemType is VT_EMPTY, the value of this property is also VT_EMPTY. - /// - ///If the item is a file, the value of this property is the same as if you passed the - ///file's System.ItemType value to PSFormatForDisplay. - /// - ///This property should not be confused with System.Kind, where System.Kind is a high-level - ///user friendly kind name. For example, for a document, System.Kind = "Document" and - ///System.Item.Type = ".doc" and System.Item.TypeText = "Microsoft Word Document" - /// - ///Example values: - /// - /// If the path is... The property value is... - /// ----------------- ------------------------ - /// "c:\foo\bar\hello.txt" "Text File" - /// "\\server\share\mydir\goodnews.doc" "Microsoft Word Document" - /// "\\server\share\folder" "File Folder" - /// "c:\foo\MyFolder" "File Folder" - /// "/Mailbox Account/Inbox/'Re: Hello!'" "Outlook E-Mail Message" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 4 (PID_STG_STORAGETYPE) - /// - public static PropertyKey ItemTypeText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 4); - - return key; - } - } - - /// - /// Name: System.ItemUrl -- PKEY_ItemUrl - /// Description: This always represents a well formed URL that points to the item. - /// - ///To reference shell namespace items using shell APIs, use System.ParsingPath. - /// - ///Example values: - /// - /// Files: "file:///c:/foo/bar/hello.txt" - /// "csc://{GUID}/..." - /// Messages: "mapi://..." - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 9 (DISPID_QUERY_VIRTUALPATH) - /// - public static PropertyKey ItemUrl - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 9); - - return key; - } - } - - /// - /// Name: System.Keywords -- PKEY_Keywords - /// Description: The keywords for the item. Also referred to as tags. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 5 (PIDSI_KEYWORDS) - /// - public static PropertyKey Keywords - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 5); - - return key; - } - } - - /// - /// Name: System.Kind -- PKEY_Kind - /// Description: System.Kind is used to map extensions to various .Search folders. - ///Extensions are mapped to Kinds at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap - ///The list of kinds is not extensible. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {1E3EE840-BC2B-476C-8237-2ACD1A839B22}, 3 - /// - public static PropertyKey Kind - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1E3EE840-BC2B-476C-8237-2ACD1A839B22}"), 3); - - return key; - } - } - - /// - /// Name: System.KindText -- PKEY_KindText - /// Description: This is the user-friendly form of System.Kind. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F04BEF95-C585-4197-A2B7-DF46FDC9EE6D}, 100 - /// - public static PropertyKey KindText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F04BEF95-C585-4197-A2B7-DF46FDC9EE6D}"), 100); - - return key; - } - } - - /// - /// Name: System.Language -- PKEY_Language - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 28 - /// - public static PropertyKey Language - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 28); - - return key; - } - } - - /// - /// Name: System.MileageInformation -- PKEY_MileageInformation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FDF84370-031A-4ADD-9E91-0D775F1C6605}, 100 - /// - public static PropertyKey MileageInformation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FDF84370-031A-4ADD-9E91-0D775F1C6605}"), 100); - - return key; - } - } - - /// - /// Name: System.MIMEType -- PKEY_MIMEType - /// Description: The MIME type. Eg, for EML files: 'message/rfc822'. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0B63E350-9CCC-11D0-BCDB-00805FCCCE04}, 5 - /// - public static PropertyKey MIMEType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0B63E350-9CCC-11D0-BCDB-00805FCCCE04}"), 5); - - return key; - } - } - - /// - /// Name: System.NamespaceCLSID -- PKEY_NamespaceCLSID - /// Description: The CLSID of the name space extension for an item, the object that implements IShellFolder for this item - /// - /// Type: Guid -- VT_CLSID - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 6 - /// - public static PropertyKey NamespaceCLSID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 6); - - return key; - } - } - - /// - /// Name: System.Null -- PKEY_Null - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {00000000-0000-0000-0000-000000000000}, 0 - /// - public static PropertyKey Null - { - get - { - PropertyKey key = new PropertyKey(new Guid("{00000000-0000-0000-0000-000000000000}"), 0); - - return key; - } - } - - /// - /// Name: System.OfflineAvailability -- PKEY_OfflineAvailability - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A94688B6-7D9F-4570-A648-E3DFC0AB2B3F}, 100 - /// - public static PropertyKey OfflineAvailability - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A94688B6-7D9F-4570-A648-E3DFC0AB2B3F}"), 100); - - return key; - } - } - - /// - /// Name: System.OfflineStatus -- PKEY_OfflineStatus - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6D24888F-4718-4BDA-AFED-EA0FB4386CD8}, 100 - /// - public static PropertyKey OfflineStatus - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D24888F-4718-4BDA-AFED-EA0FB4386CD8}"), 100); - - return key; - } - } - - /// - /// Name: System.OriginalFileName -- PKEY_OriginalFileName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 6 - /// - public static PropertyKey OriginalFileName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 6); - - return key; - } - } - - /// - /// Name: System.OwnerSID -- PKEY_OwnerSID - /// Description: SID of the user that owns the library. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}, 6 - /// - public static PropertyKey OwnerSID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5D76B67F-9B3D-44BB-B6AE-25DA4F638A67}"), 6); - - return key; - } - } - - /// - /// Name: System.ParentalRating -- PKEY_ParentalRating - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 21 (PIDMSI_PARENTAL_RATING) - /// - public static PropertyKey ParentalRating - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 21); - - return key; - } - } - - /// - /// Name: System.ParentalRatingReason -- PKEY_ParentalRatingReason - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {10984E0A-F9F2-4321-B7EF-BAF195AF4319}, 100 - /// - public static PropertyKey ParentalRatingReason - { - get - { - PropertyKey key = new PropertyKey(new Guid("{10984E0A-F9F2-4321-B7EF-BAF195AF4319}"), 100); - - return key; - } - } - - /// - /// Name: System.ParentalRatingsOrganization -- PKEY_ParentalRatingsOrganization - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A7FE0840-1344-46F0-8D37-52ED712A4BF9}, 100 - /// - public static PropertyKey ParentalRatingsOrganization - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A7FE0840-1344-46F0-8D37-52ED712A4BF9}"), 100); - - return key; - } - } - - /// - /// Name: System.ParsingBindContext -- PKEY_ParsingBindContext - /// Description: used to get the IBindCtx for an item for parsing - /// - /// Type: Any -- VT_NULL Legacy code may treat this as VT_UNKNOWN. - /// FormatID: {DFB9A04D-362F-4CA3-B30B-0254B17B5B84}, 100 - /// - public static PropertyKey ParsingBindContext - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DFB9A04D-362F-4CA3-B30B-0254B17B5B84}"), 100); - - return key; - } - } - - /// - /// Name: System.ParsingName -- PKEY_ParsingName - /// Description: The shell namespace name of an item relative to a parent folder. This name may be passed to - ///IShellFolder::ParseDisplayName() of the parent shell folder. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 24 - /// - public static PropertyKey ParsingName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 24); - - return key; - } - } - - /// - /// Name: System.ParsingPath -- PKEY_ParsingPath - /// Description: This is the shell namespace path to the item. This path may be passed to - ///SHParseDisplayName to parse the path to the correct shell folder. - /// - ///If the item is a file, the value is identical to System.ItemPathDisplay. - /// - ///If the item cannot be accessed through the shell namespace, this value is VT_EMPTY. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 30 - /// - public static PropertyKey ParsingPath - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 30); - - return key; - } - } - - /// - /// Name: System.PerceivedType -- PKEY_PerceivedType - /// Description: The perceived type of a shell item, based upon its canonical type. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 9 - /// - public static PropertyKey PerceivedType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 9); - - return key; - } - } - - /// - /// Name: System.PercentFull -- PKEY_PercentFull - /// Description: The amount filled as a percentage, multiplied by 100 (ie, the valid range is 0 through 100). - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 5 (Filesystem Volume Properties) - /// - public static PropertyKey PercentFull - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 5); - - return key; - } - } - - /// - /// Name: System.Priority -- PKEY_Priority - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}, 5 - /// - public static PropertyKey Priority - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}"), 5); - - return key; - } - } - - /// - /// Name: System.PriorityText -- PKEY_PriorityText - /// Description: This is the user-friendly form of System.Priority. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D98BE98B-B86B-4095-BF52-9D23B2E0A752}, 100 - /// - public static PropertyKey PriorityText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D98BE98B-B86B-4095-BF52-9D23B2E0A752}"), 100); - - return key; - } - } - - /// - /// Name: System.Project -- PKEY_Project - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {39A7F922-477C-48DE-8BC8-B28441E342E3}, 100 - /// - public static PropertyKey Project - { - get - { - PropertyKey key = new PropertyKey(new Guid("{39A7F922-477C-48DE-8BC8-B28441E342E3}"), 100); - - return key; - } - } - - /// - /// Name: System.ProviderItemID -- PKEY_ProviderItemID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F21D9941-81F0-471A-ADEE-4E74B49217ED}, 100 - /// - public static PropertyKey ProviderItemID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F21D9941-81F0-471A-ADEE-4E74B49217ED}"), 100); - - return key; - } - } - - /// - /// Name: System.Rating -- PKEY_Rating - /// Description: Indicates the users preference rating of an item on a scale of 1-99 (1-12 = One Star, - ///13-37 = Two Stars, 38-62 = Three Stars, 63-87 = Four Stars, 88-99 = Five Stars). - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 9 (PIDMSI_RATING) - /// - public static PropertyKey Rating - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 9); - - return key; - } - } - - /// - /// Name: System.RatingText -- PKEY_RatingText - /// Description: This is the user-friendly form of System.Rating. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {90197CA7-FD8F-4E8C-9DA3-B57E1E609295}, 100 - /// - public static PropertyKey RatingText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{90197CA7-FD8F-4E8C-9DA3-B57E1E609295}"), 100); - - return key; - } - } - - /// - /// Name: System.Sensitivity -- PKEY_Sensitivity - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {F8D3F6AC-4874-42CB-BE59-AB454B30716A}, 100 - /// - public static PropertyKey Sensitivity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F8D3F6AC-4874-42CB-BE59-AB454B30716A}"), 100); - - return key; - } - } - - /// - /// Name: System.SensitivityText -- PKEY_SensitivityText - /// Description: This is the user-friendly form of System.Sensitivity. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D0C7F054-3F72-4725-8527-129A577CB269}, 100 - /// - public static PropertyKey SensitivityText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D0C7F054-3F72-4725-8527-129A577CB269}"), 100); - - return key; - } - } - - /// - /// Name: System.SFGAOFlags -- PKEY_SFGAOFlags - /// Description: IShellFolder::GetAttributesOf flags, with SFGAO_PKEYSFGAOMASK attributes masked out. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 25 - /// - public static PropertyKey SFGAOFlags - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 25); - - return key; - } - } - - /// - /// Name: System.SharedWith -- PKEY_SharedWith - /// Description: Who is the item shared with? - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 200 - /// - public static PropertyKey SharedWith - { - get - { - PropertyKey key = new PropertyKey(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 200); - - return key; - } - } - - /// - /// Name: System.ShareUserRating -- PKEY_ShareUserRating - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 12 (PIDMSI_SHARE_USER_RATING) - /// - public static PropertyKey ShareUserRating - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 12); - - return key; - } - } - - /// - /// Name: System.SharingStatus -- PKEY_SharingStatus - /// Description: What is the item's sharing status (not shared, shared, everyone (homegroup or everyone), or private)? - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}, 300 - /// - public static PropertyKey SharingStatus - { - get - { - PropertyKey key = new PropertyKey(new Guid("{EF884C5B-2BFE-41BB-AAE5-76EEDF4F9902}"), 300); - - return key; - } - } - - /// - /// Name: System.SimpleRating -- PKEY_SimpleRating - /// Description: Indicates the users preference rating of an item on a scale of 0-5 (0=unrated, 1=One Star, 2=Two Stars, 3=Three Stars, - ///4=Four Stars, 5=Five Stars) - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A09F084E-AD41-489F-8076-AA5BE3082BCA}, 100 - /// - public static PropertyKey SimpleRating - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A09F084E-AD41-489F-8076-AA5BE3082BCA}"), 100); - - return key; - } - } - - /// - /// Name: System.Size -- PKEY_Size - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 12 (PID_STG_SIZE) - /// - public static PropertyKey Size - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 12); - - return key; - } - } - - /// - /// Name: System.SoftwareUsed -- PKEY_SoftwareUsed - /// Description: PropertyTagSoftwareUsed - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 305 - /// - public static PropertyKey SoftwareUsed - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 305); - - return key; - } - } - - /// - /// Name: System.SourceItem -- PKEY_SourceItem - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {668CDFA5-7A1B-4323-AE4B-E527393A1D81}, 100 - /// - public static PropertyKey SourceItem - { - get - { - PropertyKey key = new PropertyKey(new Guid("{668CDFA5-7A1B-4323-AE4B-E527393A1D81}"), 100); - - return key; - } - } - - /// - /// Name: System.StartDate -- PKEY_StartDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE}, 100 - /// - public static PropertyKey StartDate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{48FD6EC8-8A12-4CDF-A03E-4EC5A511EDDE}"), 100); - - return key; - } - } - - /// - /// Name: System.Status -- PKEY_Status - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_IntSite) {000214A1-0000-0000-C000-000000000046}, 9 - /// - public static PropertyKey Status - { - get - { - PropertyKey key = new PropertyKey(new Guid("{000214A1-0000-0000-C000-000000000046}"), 9); - - return key; - } - } - - /// - /// Name: System.Subject -- PKEY_Subject - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 3 (PIDSI_SUBJECT) - /// - public static PropertyKey Subject - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 3); - - return key; - } - } - - /// - /// Name: System.Thumbnail -- PKEY_Thumbnail - /// Description: A data that represents the thumbnail in VT_CF format. - /// - /// Type: Clipboard -- VT_CF - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 17 (PIDSI_THUMBNAIL) - /// - public static PropertyKey Thumbnail - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 17); - - return key; - } - } - - /// - /// Name: System.ThumbnailCacheId -- PKEY_ThumbnailCacheId - /// Description: Unique value that can be used as a key to cache thumbnails. The value changes when the name, volume, or data modified - ///of an item changes. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {446D16B1-8DAD-4870-A748-402EA43D788C}, 100 - /// - public static PropertyKey ThumbnailCacheId - { - get - { - PropertyKey key = new PropertyKey(new Guid("{446D16B1-8DAD-4870-A748-402EA43D788C}"), 100); - - return key; - } - } - - /// - /// Name: System.ThumbnailStream -- PKEY_ThumbnailStream - /// Description: Data that represents the thumbnail in VT_STREAM format that GDI+/WindowsCodecs supports (jpg, png, etc). - /// - /// Type: Stream -- VT_STREAM - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 27 - /// - public static PropertyKey ThumbnailStream - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 27); - - return key; - } - } - - /// - /// Name: System.Title -- PKEY_Title - /// Description: Title of item. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 2 (PIDSI_TITLE) - /// - public static PropertyKey Title - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 2); - - return key; - } - } - - /// - /// Name: System.TotalFileSize -- PKEY_TotalFileSize - /// Description: - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_ShellDetails) {28636AA6-953D-11D2-B5D6-00C04FD918D0}, 14 - /// - public static PropertyKey TotalFileSize - { - get - { - PropertyKey key = new PropertyKey(new Guid("{28636AA6-953D-11D2-B5D6-00C04FD918D0}"), 14); - - return key; - } - } - - /// - /// Name: System.Trademarks -- PKEY_Trademarks - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 9 (PIDVSI_Trademarks) - /// - public static PropertyKey Trademarks - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 9); - - return key; - } - } - #endregion - - - #region sub-classes - - /// - /// AppUserModel Properties - /// - public static class AppUserModel - { - - - #region Properties - - /// - /// Name: System.AppUserModel.ExcludeFromShowInNewInstall -- PKEY_AppUserModel_ExcludeFromShowInNewInstall - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 8 - /// - public static PropertyKey ExcludeFromShowInNewInstall - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 8); - - return key; - } - } - - /// - /// Name: System.AppUserModel.ID -- PKEY_AppUserModel_ID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 5 - /// - public static PropertyKey ID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 5); - - return key; - } - } - - /// - /// Name: System.AppUserModel.IsDestListSeparator -- PKEY_AppUserModel_IsDestListSeparator - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 6 - /// - public static PropertyKey IsDestListSeparator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 6); - - return key; - } - } - - /// - /// Name: System.AppUserModel.PreventPinning -- PKEY_AppUserModel_PreventPinning - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 9 - /// - public static PropertyKey PreventPinning - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 9); - - return key; - } - } - - /// - /// Name: System.AppUserModel.RelaunchCommand -- PKEY_AppUserModel_RelaunchCommand - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 2 - /// - public static PropertyKey RelaunchCommand - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 2); - - return key; - } - } - - /// - /// Name: System.AppUserModel.RelaunchDisplayNameResource -- PKEY_AppUserModel_RelaunchDisplayNameResource - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 4 - /// - public static PropertyKey RelaunchDisplayNameResource - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 4); - - return key; - } - } - - /// - /// Name: System.AppUserModel.RelaunchIconResource -- PKEY_AppUserModel_RelaunchIconResource - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}, 3 - /// - public static PropertyKey RelaunchIconResource - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3}"), 3); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Audio Properties - /// - public static class Audio - { - - - #region Properties - - /// - /// Name: System.Audio.ChannelCount -- PKEY_Audio_ChannelCount - /// Description: Indicates the channel count for the audio file. Values: 1 (mono), 2 (stereo). - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 7 (PIDASI_CHANNEL_COUNT) - /// - public static PropertyKey ChannelCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 7); - - return key; - } - } - - /// - /// Name: System.Audio.Compression -- PKEY_Audio_Compression - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 10 (PIDASI_COMPRESSION) - /// - public static PropertyKey Compression - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 10); - - return key; - } - } - - /// - /// Name: System.Audio.EncodingBitrate -- PKEY_Audio_EncodingBitrate - /// Description: Indicates the average data rate in Hz for the audio file in "bits per second". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 4 (PIDASI_AVG_DATA_RATE) - /// - public static PropertyKey EncodingBitrate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 4); - - return key; - } - } - - /// - /// Name: System.Audio.Format -- PKEY_Audio_Format - /// Description: Indicates the format of the audio file. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) Legacy code may treat this as VT_BSTR. - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 2 (PIDASI_FORMAT) - /// - public static PropertyKey Format - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 2); - - return key; - } - } - - /// - /// Name: System.Audio.IsVariableBitRate -- PKEY_Audio_IsVariableBitRate - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C}, 100 - /// - public static PropertyKey IsVariableBitRate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E6822FEE-8C17-4D62-823C-8E9CFCBD1D5C}"), 100); - - return key; - } - } - - /// - /// Name: System.Audio.PeakValue -- PKEY_Audio_PeakValue - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E}, 100 - /// - public static PropertyKey PeakValue - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2579E5D0-1116-4084-BD9A-9B4F7CB4DF5E}"), 100); - - return key; - } - } - - /// - /// Name: System.Audio.SampleRate -- PKEY_Audio_SampleRate - /// Description: Indicates the audio sample rate for the audio file in "samples per second". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 5 (PIDASI_SAMPLE_RATE) - /// - public static PropertyKey SampleRate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 5); - - return key; - } - } - - /// - /// Name: System.Audio.SampleSize -- PKEY_Audio_SampleSize - /// Description: Indicates the audio sample size for the audio file in "bits per sample". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 6 (PIDASI_SAMPLE_SIZE) - /// - public static PropertyKey SampleSize - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 6); - - return key; - } - } - - /// - /// Name: System.Audio.StreamName -- PKEY_Audio_StreamName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 9 (PIDASI_STREAM_NAME) - /// - public static PropertyKey StreamName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 9); - - return key; - } - } - - /// - /// Name: System.Audio.StreamNumber -- PKEY_Audio_StreamNumber - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 8 (PIDASI_STREAM_NUMBER) - /// - public static PropertyKey StreamNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 8); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Calendar Properties - /// - public static class Calendar - { - - - #region Properties - - /// - /// Name: System.Calendar.Duration -- PKEY_Calendar_Duration - /// Description: The duration as specified in a string. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {293CA35A-09AA-4DD2-B180-1FE245728A52}, 100 - /// - public static PropertyKey Duration - { - get - { - PropertyKey key = new PropertyKey(new Guid("{293CA35A-09AA-4DD2-B180-1FE245728A52}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.IsOnline -- PKEY_Calendar_IsOnline - /// Description: Identifies if the event is an online event. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {BFEE9149-E3E2-49A7-A862-C05988145CEC}, 100 - /// - public static PropertyKey IsOnline - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BFEE9149-E3E2-49A7-A862-C05988145CEC}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.IsRecurring -- PKEY_Calendar_IsRecurring - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {315B9C8D-80A9-4EF9-AE16-8E746DA51D70}, 100 - /// - public static PropertyKey IsRecurring - { - get - { - PropertyKey key = new PropertyKey(new Guid("{315B9C8D-80A9-4EF9-AE16-8E746DA51D70}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.Location -- PKEY_Calendar_Location - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F6272D18-CECC-40B1-B26A-3911717AA7BD}, 100 - /// - public static PropertyKey Location - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F6272D18-CECC-40B1-B26A-3911717AA7BD}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.OptionalAttendeeAddresses -- PKEY_Calendar_OptionalAttendeeAddresses - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D55BAE5A-3892-417A-A649-C6AC5AAAEAB3}, 100 - /// - public static PropertyKey OptionalAttendeeAddresses - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D55BAE5A-3892-417A-A649-C6AC5AAAEAB3}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.OptionalAttendeeNames -- PKEY_Calendar_OptionalAttendeeNames - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {09429607-582D-437F-84C3-DE93A2B24C3C}, 100 - /// - public static PropertyKey OptionalAttendeeNames - { - get - { - PropertyKey key = new PropertyKey(new Guid("{09429607-582D-437F-84C3-DE93A2B24C3C}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.OrganizerAddress -- PKEY_Calendar_OrganizerAddress - /// Description: Address of the organizer organizing the event. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {744C8242-4DF5-456C-AB9E-014EFB9021E3}, 100 - /// - public static PropertyKey OrganizerAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{744C8242-4DF5-456C-AB9E-014EFB9021E3}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.OrganizerName -- PKEY_Calendar_OrganizerName - /// Description: Name of the organizer organizing the event. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AAA660F9-9865-458E-B484-01BC7FE3973E}, 100 - /// - public static PropertyKey OrganizerName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AAA660F9-9865-458E-B484-01BC7FE3973E}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.ReminderTime -- PKEY_Calendar_ReminderTime - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {72FC5BA4-24F9-4011-9F3F-ADD27AFAD818}, 100 - /// - public static PropertyKey ReminderTime - { - get - { - PropertyKey key = new PropertyKey(new Guid("{72FC5BA4-24F9-4011-9F3F-ADD27AFAD818}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.RequiredAttendeeAddresses -- PKEY_Calendar_RequiredAttendeeAddresses - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {0BA7D6C3-568D-4159-AB91-781A91FB71E5}, 100 - /// - public static PropertyKey RequiredAttendeeAddresses - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0BA7D6C3-568D-4159-AB91-781A91FB71E5}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.RequiredAttendeeNames -- PKEY_Calendar_RequiredAttendeeNames - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {B33AF30B-F552-4584-936C-CB93E5CDA29F}, 100 - /// - public static PropertyKey RequiredAttendeeNames - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B33AF30B-F552-4584-936C-CB93E5CDA29F}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.Resources -- PKEY_Calendar_Resources - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {00F58A38-C54B-4C40-8696-97235980EAE1}, 100 - /// - public static PropertyKey Resources - { - get - { - PropertyKey key = new PropertyKey(new Guid("{00F58A38-C54B-4C40-8696-97235980EAE1}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.ResponseStatus -- PKEY_Calendar_ResponseStatus - /// Description: This property stores the status of the user responses to meetings in her calendar. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {188C1F91-3C40-4132-9EC5-D8B03B72A8A2}, 100 - /// - public static PropertyKey ResponseStatus - { - get - { - PropertyKey key = new PropertyKey(new Guid("{188C1F91-3C40-4132-9EC5-D8B03B72A8A2}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.ShowTimeAs -- PKEY_Calendar_ShowTimeAs - /// Description: - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E}, 100 - /// - public static PropertyKey ShowTimeAs - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5BF396D4-5EB2-466F-BDE9-2FB3F2361D6E}"), 100); - - return key; - } - } - - /// - /// Name: System.Calendar.ShowTimeAsText -- PKEY_Calendar_ShowTimeAsText - /// Description: This is the user-friendly form of System.Calendar.ShowTimeAs. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {53DA57CF-62C0-45C4-81DE-7610BCEFD7F5}, 100 - /// - public static PropertyKey ShowTimeAsText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{53DA57CF-62C0-45C4-81DE-7610BCEFD7F5}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Communication Properties - /// - public static class Communication - { - - - #region Properties - - /// - /// Name: System.Communication.AccountName -- PKEY_Communication_AccountName - /// Description: Account Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 9 - /// - public static PropertyKey AccountName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 9); - - return key; - } - } - - /// - /// Name: System.Communication.DateItemExpires -- PKEY_Communication_DateItemExpires - /// Description: Date the item expires due to the retention policy. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {428040AC-A177-4C8A-9760-F6F761227F9A}, 100 - /// - public static PropertyKey DateItemExpires - { - get - { - PropertyKey key = new PropertyKey(new Guid("{428040AC-A177-4C8A-9760-F6F761227F9A}"), 100); - - return key; - } - } - - /// - /// Name: System.Communication.FollowupIconIndex -- PKEY_Communication_FollowupIconIndex - /// Description: This is the icon index used on messages marked for followup. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {83A6347E-6FE4-4F40-BA9C-C4865240D1F4}, 100 - /// - public static PropertyKey FollowupIconIndex - { - get - { - PropertyKey key = new PropertyKey(new Guid("{83A6347E-6FE4-4F40-BA9C-C4865240D1F4}"), 100); - - return key; - } - } - - /// - /// Name: System.Communication.HeaderItem -- PKEY_Communication_HeaderItem - /// Description: This property will be true if the item is a header item which means the item hasn't been fully downloaded. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {C9C34F84-2241-4401-B607-BD20ED75AE7F}, 100 - /// - public static PropertyKey HeaderItem - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9C34F84-2241-4401-B607-BD20ED75AE7F}"), 100); - - return key; - } - } - - /// - /// Name: System.Communication.PolicyTag -- PKEY_Communication_PolicyTag - /// Description: This a string used to identify the retention policy applied to the item. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {EC0B4191-AB0B-4C66-90B6-C6637CDEBBAB}, 100 - /// - public static PropertyKey PolicyTag - { - get - { - PropertyKey key = new PropertyKey(new Guid("{EC0B4191-AB0B-4C66-90B6-C6637CDEBBAB}"), 100); - - return key; - } - } - - /// - /// Name: System.Communication.SecurityFlags -- PKEY_Communication_SecurityFlags - /// Description: Security flags associated with the item to know if the item is encrypted, signed or DRM enabled. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {8619A4B6-9F4D-4429-8C0F-B996CA59E335}, 100 - /// - public static PropertyKey SecurityFlags - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8619A4B6-9F4D-4429-8C0F-B996CA59E335}"), 100); - - return key; - } - } - - /// - /// Name: System.Communication.Suffix -- PKEY_Communication_Suffix - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {807B653A-9E91-43EF-8F97-11CE04EE20C5}, 100 - /// - public static PropertyKey Suffix - { - get - { - PropertyKey key = new PropertyKey(new Guid("{807B653A-9E91-43EF-8F97-11CE04EE20C5}"), 100); - - return key; - } - } - - /// - /// Name: System.Communication.TaskStatus -- PKEY_Communication_TaskStatus - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999}, 100 - /// - public static PropertyKey TaskStatus - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BE1A72C6-9A1D-46B7-AFE7-AFAF8CEF4999}"), 100); - - return key; - } - } - - /// - /// Name: System.Communication.TaskStatusText -- PKEY_Communication_TaskStatusText - /// Description: This is the user-friendly form of System.Communication.TaskStatus. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A6744477-C237-475B-A075-54F34498292A}, 100 - /// - public static PropertyKey TaskStatusText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A6744477-C237-475B-A075-54F34498292A}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Computer Properties - /// - public static class Computer - { - - - #region Properties - - /// - /// Name: System.Computer.DecoratedFreeSpace -- PKEY_Computer_DecoratedFreeSpace - /// Description: Free space and total space: "%s free of %s" - /// - /// Type: Multivalue UInt64 -- VT_VECTOR | VT_UI8 (For variants: VT_ARRAY | VT_UI8) - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 7 (Filesystem Volume Properties) - /// - public static PropertyKey DecoratedFreeSpace - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 7); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Contact Properties - /// - public static class Contact - { - - - #region Properties - - /// - /// Name: System.Contact.Anniversary -- PKEY_Contact_Anniversary - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {9AD5BADB-CEA7-4470-A03D-B84E51B9949E}, 100 - /// - public static PropertyKey Anniversary - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9AD5BADB-CEA7-4470-A03D-B84E51B9949E}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.AssistantName -- PKEY_Contact_AssistantName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CD102C9C-5540-4A88-A6F6-64E4981C8CD1}, 100 - /// - public static PropertyKey AssistantName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CD102C9C-5540-4A88-A6F6-64E4981C8CD1}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.AssistantTelephone -- PKEY_Contact_AssistantTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6}, 100 - /// - public static PropertyKey AssistantTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9A93244D-A7AD-4FF8-9B99-45EE4CC09AF6}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.Birthday -- PKEY_Contact_Birthday - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 47 - /// - public static PropertyKey Birthday - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 47); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessAddress -- PKEY_Contact_BusinessAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {730FB6DD-CF7C-426B-A03F-BD166CC9EE24}, 100 - /// - public static PropertyKey BusinessAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{730FB6DD-CF7C-426B-A03F-BD166CC9EE24}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessAddressCity -- PKEY_Contact_BusinessAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {402B5934-EC5A-48C3-93E6-85E86A2D934E}, 100 - /// - public static PropertyKey BusinessAddressCity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{402B5934-EC5A-48C3-93E6-85E86A2D934E}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessAddressCountry -- PKEY_Contact_BusinessAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C}, 100 - /// - public static PropertyKey BusinessAddressCountry - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B0B87314-FCF6-4FEB-8DFF-A50DA6AF561C}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessAddressPostalCode -- PKEY_Contact_BusinessAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80}, 100 - /// - public static PropertyKey BusinessAddressPostalCode - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E1D4A09E-D758-4CD1-B6EC-34A8B5A73F80}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessAddressPostOfficeBox -- PKEY_Contact_BusinessAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BC4E71CE-17F9-48D5-BEE9-021DF0EA5409}, 100 - /// - public static PropertyKey BusinessAddressPostOfficeBox - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BC4E71CE-17F9-48D5-BEE9-021DF0EA5409}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessAddressState -- PKEY_Contact_BusinessAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {446F787F-10C4-41CB-A6C4-4D0343551597}, 100 - /// - public static PropertyKey BusinessAddressState - { - get - { - PropertyKey key = new PropertyKey(new Guid("{446F787F-10C4-41CB-A6C4-4D0343551597}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessAddressStreet -- PKEY_Contact_BusinessAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DDD1460F-C0BF-4553-8CE4-10433C908FB0}, 100 - /// - public static PropertyKey BusinessAddressStreet - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DDD1460F-C0BF-4553-8CE4-10433C908FB0}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessFaxNumber -- PKEY_Contact_BusinessFaxNumber - /// Description: Business fax number of the contact. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {91EFF6F3-2E27-42CA-933E-7C999FBE310B}, 100 - /// - public static PropertyKey BusinessFaxNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{91EFF6F3-2E27-42CA-933E-7C999FBE310B}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessHomePage -- PKEY_Contact_BusinessHomePage - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {56310920-2491-4919-99CE-EADB06FAFDB2}, 100 - /// - public static PropertyKey BusinessHomePage - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56310920-2491-4919-99CE-EADB06FAFDB2}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.BusinessTelephone -- PKEY_Contact_BusinessTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC}, 100 - /// - public static PropertyKey BusinessTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6A15E5A0-0A1E-4CD7-BB8C-D2F1B0C929BC}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.CallbackTelephone -- PKEY_Contact_CallbackTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BF53D1C3-49E0-4F7F-8567-5A821D8AC542}, 100 - /// - public static PropertyKey CallbackTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BF53D1C3-49E0-4F7F-8567-5A821D8AC542}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.CarTelephone -- PKEY_Contact_CarTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8FDC6DEA-B929-412B-BA90-397A257465FE}, 100 - /// - public static PropertyKey CarTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8FDC6DEA-B929-412B-BA90-397A257465FE}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.Children -- PKEY_Contact_Children - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D4729704-8EF1-43EF-9024-2BD381187FD5}, 100 - /// - public static PropertyKey Children - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D4729704-8EF1-43EF-9024-2BD381187FD5}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.CompanyMainTelephone -- PKEY_Contact_CompanyMainTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8589E481-6040-473D-B171-7FA89C2708ED}, 100 - /// - public static PropertyKey CompanyMainTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8589E481-6040-473D-B171-7FA89C2708ED}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.Department -- PKEY_Contact_Department - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC}, 100 - /// - public static PropertyKey Department - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FC9F7306-FF8F-4D49-9FB6-3FFE5C0951EC}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.EmailAddress -- PKEY_Contact_EmailAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7}, 100 - /// - public static PropertyKey EmailAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F8FA7FA3-D12B-4785-8A4E-691A94F7A3E7}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.EmailAddress2 -- PKEY_Contact_EmailAddress2 - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {38965063-EDC8-4268-8491-B7723172CF29}, 100 - /// - public static PropertyKey EmailAddress2 - { - get - { - PropertyKey key = new PropertyKey(new Guid("{38965063-EDC8-4268-8491-B7723172CF29}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.EmailAddress3 -- PKEY_Contact_EmailAddress3 - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {644D37B4-E1B3-4BAD-B099-7E7C04966ACA}, 100 - /// - public static PropertyKey EmailAddress3 - { - get - { - PropertyKey key = new PropertyKey(new Guid("{644D37B4-E1B3-4BAD-B099-7E7C04966ACA}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.EmailAddresses -- PKEY_Contact_EmailAddresses - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {84D8F337-981D-44B3-9615-C7596DBA17E3}, 100 - /// - public static PropertyKey EmailAddresses - { - get - { - PropertyKey key = new PropertyKey(new Guid("{84D8F337-981D-44B3-9615-C7596DBA17E3}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.EmailName -- PKEY_Contact_EmailName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CC6F4F24-6083-4BD4-8754-674D0DE87AB8}, 100 - /// - public static PropertyKey EmailName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CC6F4F24-6083-4BD4-8754-674D0DE87AB8}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.FileAsName -- PKEY_Contact_FileAsName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB}, 100 - /// - public static PropertyKey FileAsName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F1A24AA7-9CA7-40F6-89EC-97DEF9FFE8DB}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.FirstName -- PKEY_Contact_FirstName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {14977844-6B49-4AAD-A714-A4513BF60460}, 100 - /// - public static PropertyKey FirstName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14977844-6B49-4AAD-A714-A4513BF60460}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.FullName -- PKEY_Contact_FullName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {635E9051-50A5-4BA2-B9DB-4ED056C77296}, 100 - /// - public static PropertyKey FullName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{635E9051-50A5-4BA2-B9DB-4ED056C77296}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.Gender -- PKEY_Contact_Gender - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}, 100 - /// - public static PropertyKey Gender - { - get - { - PropertyKey key = new PropertyKey(new Guid("{3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.GenderValue -- PKEY_Contact_GenderValue - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}, 101 - /// - public static PropertyKey GenderValue - { - get - { - PropertyKey key = new PropertyKey(new Guid("{3C8CEE58-D4F0-4CF9-B756-4E5D24447BCD}"), 101); - - return key; - } - } - - /// - /// Name: System.Contact.Hobbies -- PKEY_Contact_Hobbies - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {5DC2253F-5E11-4ADF-9CFE-910DD01E3E70}, 100 - /// - public static PropertyKey Hobbies - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5DC2253F-5E11-4ADF-9CFE-910DD01E3E70}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeAddress -- PKEY_Contact_HomeAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {98F98354-617A-46B8-8560-5B1B64BF1F89}, 100 - /// - public static PropertyKey HomeAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{98F98354-617A-46B8-8560-5B1B64BF1F89}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeAddressCity -- PKEY_Contact_HomeAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 65 - /// - public static PropertyKey HomeAddressCity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 65); - - return key; - } - } - - /// - /// Name: System.Contact.HomeAddressCountry -- PKEY_Contact_HomeAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85}, 100 - /// - public static PropertyKey HomeAddressCountry - { - get - { - PropertyKey key = new PropertyKey(new Guid("{08A65AA1-F4C9-43DD-9DDF-A33D8E7EAD85}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeAddressPostalCode -- PKEY_Contact_HomeAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8AFCC170-8A46-4B53-9EEE-90BAE7151E62}, 100 - /// - public static PropertyKey HomeAddressPostalCode - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8AFCC170-8A46-4B53-9EEE-90BAE7151E62}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeAddressPostOfficeBox -- PKEY_Contact_HomeAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7B9F6399-0A3F-4B12-89BD-4ADC51C918AF}, 100 - /// - public static PropertyKey HomeAddressPostOfficeBox - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7B9F6399-0A3F-4B12-89BD-4ADC51C918AF}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeAddressState -- PKEY_Contact_HomeAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C89A23D0-7D6D-4EB8-87D4-776A82D493E5}, 100 - /// - public static PropertyKey HomeAddressState - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C89A23D0-7D6D-4EB8-87D4-776A82D493E5}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeAddressStreet -- PKEY_Contact_HomeAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0ADEF160-DB3F-4308-9A21-06237B16FA2A}, 100 - /// - public static PropertyKey HomeAddressStreet - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0ADEF160-DB3F-4308-9A21-06237B16FA2A}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeFaxNumber -- PKEY_Contact_HomeFaxNumber - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {660E04D6-81AB-4977-A09F-82313113AB26}, 100 - /// - public static PropertyKey HomeFaxNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{660E04D6-81AB-4977-A09F-82313113AB26}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.HomeTelephone -- PKEY_Contact_HomeTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 20 - /// - public static PropertyKey HomeTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 20); - - return key; - } - } - - /// - /// Name: System.Contact.IMAddress -- PKEY_Contact_IMAddress - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D68DBD8A-3374-4B81-9972-3EC30682DB3D}, 100 - /// - public static PropertyKey IMAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D68DBD8A-3374-4B81-9972-3EC30682DB3D}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.Initials -- PKEY_Contact_Initials - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F3D8F40D-50CB-44A2-9718-40CB9119495D}, 100 - /// - public static PropertyKey Initials - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F3D8F40D-50CB-44A2-9718-40CB9119495D}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.JobTitle -- PKEY_Contact_JobTitle - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 6 - /// - public static PropertyKey JobTitle - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 6); - - return key; - } - } - - /// - /// Name: System.Contact.Label -- PKEY_Contact_Label - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {97B0AD89-DF49-49CC-834E-660974FD755B}, 100 - /// - public static PropertyKey Label - { - get - { - PropertyKey key = new PropertyKey(new Guid("{97B0AD89-DF49-49CC-834E-660974FD755B}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.LastName -- PKEY_Contact_LastName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8F367200-C270-457C-B1D4-E07C5BCD90C7}, 100 - /// - public static PropertyKey LastName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8F367200-C270-457C-B1D4-E07C5BCD90C7}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.MailingAddress -- PKEY_Contact_MailingAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C0AC206A-827E-4650-95AE-77E2BB74FCC9}, 100 - /// - public static PropertyKey MailingAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C0AC206A-827E-4650-95AE-77E2BB74FCC9}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.MiddleName -- PKEY_Contact_MiddleName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 71 - /// - public static PropertyKey MiddleName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 71); - - return key; - } - } - - /// - /// Name: System.Contact.MobileTelephone -- PKEY_Contact_MobileTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 35 - /// - public static PropertyKey MobileTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 35); - - return key; - } - } - - /// - /// Name: System.Contact.NickName -- PKEY_Contact_NickName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 74 - /// - public static PropertyKey NickName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 74); - - return key; - } - } - - /// - /// Name: System.Contact.OfficeLocation -- PKEY_Contact_OfficeLocation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 7 - /// - public static PropertyKey OfficeLocation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 7); - - return key; - } - } - - /// - /// Name: System.Contact.OtherAddress -- PKEY_Contact_OtherAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {508161FA-313B-43D5-83A1-C1ACCF68622C}, 100 - /// - public static PropertyKey OtherAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{508161FA-313B-43D5-83A1-C1ACCF68622C}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.OtherAddressCity -- PKEY_Contact_OtherAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6E682923-7F7B-4F0C-A337-CFCA296687BF}, 100 - /// - public static PropertyKey OtherAddressCity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6E682923-7F7B-4F0C-A337-CFCA296687BF}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.OtherAddressCountry -- PKEY_Contact_OtherAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8F167568-0AAE-4322-8ED9-6055B7B0E398}, 100 - /// - public static PropertyKey OtherAddressCountry - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8F167568-0AAE-4322-8ED9-6055B7B0E398}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.OtherAddressPostalCode -- PKEY_Contact_OtherAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {95C656C1-2ABF-4148-9ED3-9EC602E3B7CD}, 100 - /// - public static PropertyKey OtherAddressPostalCode - { - get - { - PropertyKey key = new PropertyKey(new Guid("{95C656C1-2ABF-4148-9ED3-9EC602E3B7CD}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.OtherAddressPostOfficeBox -- PKEY_Contact_OtherAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {8B26EA41-058F-43F6-AECC-4035681CE977}, 100 - /// - public static PropertyKey OtherAddressPostOfficeBox - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8B26EA41-058F-43F6-AECC-4035681CE977}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.OtherAddressState -- PKEY_Contact_OtherAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {71B377D6-E570-425F-A170-809FAE73E54E}, 100 - /// - public static PropertyKey OtherAddressState - { - get - { - PropertyKey key = new PropertyKey(new Guid("{71B377D6-E570-425F-A170-809FAE73E54E}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.OtherAddressStreet -- PKEY_Contact_OtherAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FF962609-B7D6-4999-862D-95180D529AEA}, 100 - /// - public static PropertyKey OtherAddressStreet - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FF962609-B7D6-4999-862D-95180D529AEA}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PagerTelephone -- PKEY_Contact_PagerTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D6304E01-F8F5-4F45-8B15-D024A6296789}, 100 - /// - public static PropertyKey PagerTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D6304E01-F8F5-4F45-8B15-D024A6296789}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PersonalTitle -- PKEY_Contact_PersonalTitle - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 69 - /// - public static PropertyKey PersonalTitle - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 69); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryAddressCity -- PKEY_Contact_PrimaryAddressCity - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C8EA94F0-A9E3-4969-A94B-9C62A95324E0}, 100 - /// - public static PropertyKey PrimaryAddressCity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C8EA94F0-A9E3-4969-A94B-9C62A95324E0}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryAddressCountry -- PKEY_Contact_PrimaryAddressCountry - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E53D799D-0F3F-466E-B2FF-74634A3CB7A4}, 100 - /// - public static PropertyKey PrimaryAddressCountry - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E53D799D-0F3F-466E-B2FF-74634A3CB7A4}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryAddressPostalCode -- PKEY_Contact_PrimaryAddressPostalCode - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {18BBD425-ECFD-46EF-B612-7B4A6034EDA0}, 100 - /// - public static PropertyKey PrimaryAddressPostalCode - { - get - { - PropertyKey key = new PropertyKey(new Guid("{18BBD425-ECFD-46EF-B612-7B4A6034EDA0}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryAddressPostOfficeBox -- PKEY_Contact_PrimaryAddressPostOfficeBox - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DE5EF3C7-46E1-484E-9999-62C5308394C1}, 100 - /// - public static PropertyKey PrimaryAddressPostOfficeBox - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DE5EF3C7-46E1-484E-9999-62C5308394C1}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryAddressState -- PKEY_Contact_PrimaryAddressState - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F1176DFE-7138-4640-8B4C-AE375DC70A6D}, 100 - /// - public static PropertyKey PrimaryAddressState - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F1176DFE-7138-4640-8B4C-AE375DC70A6D}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryAddressStreet -- PKEY_Contact_PrimaryAddressStreet - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {63C25B20-96BE-488F-8788-C09C407AD812}, 100 - /// - public static PropertyKey PrimaryAddressStreet - { - get - { - PropertyKey key = new PropertyKey(new Guid("{63C25B20-96BE-488F-8788-C09C407AD812}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryEmailAddress -- PKEY_Contact_PrimaryEmailAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 48 - /// - public static PropertyKey PrimaryEmailAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 48); - - return key; - } - } - - /// - /// Name: System.Contact.PrimaryTelephone -- PKEY_Contact_PrimaryTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 25 - /// - public static PropertyKey PrimaryTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 25); - - return key; - } - } - - /// - /// Name: System.Contact.Profession -- PKEY_Contact_Profession - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9}, 100 - /// - public static PropertyKey Profession - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7268AF55-1CE4-4F6E-A41F-B6E4EF10E4A9}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.SpouseName -- PKEY_Contact_SpouseName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9D2408B6-3167-422B-82B0-F583B7A7CFE3}, 100 - /// - public static PropertyKey SpouseName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9D2408B6-3167-422B-82B0-F583B7A7CFE3}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.Suffix -- PKEY_Contact_Suffix - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {176DC63C-2688-4E89-8143-A347800F25E9}, 73 - /// - public static PropertyKey Suffix - { - get - { - PropertyKey key = new PropertyKey(new Guid("{176DC63C-2688-4E89-8143-A347800F25E9}"), 73); - - return key; - } - } - - /// - /// Name: System.Contact.TelexNumber -- PKEY_Contact_TelexNumber - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C554493C-C1F7-40C1-A76C-EF8C0614003E}, 100 - /// - public static PropertyKey TelexNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C554493C-C1F7-40C1-A76C-EF8C0614003E}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.TTYTDDTelephone -- PKEY_Contact_TTYTDDTelephone - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AAF16BAC-2B55-45E6-9F6D-415EB94910DF}, 100 - /// - public static PropertyKey TTYTDDTelephone - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AAF16BAC-2B55-45E6-9F6D-415EB94910DF}"), 100); - - return key; - } - } - - /// - /// Name: System.Contact.WebPage -- PKEY_Contact_WebPage - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 18 - /// - public static PropertyKey WebPage - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 18); - - return key; - } - } - #endregion - - - #region sub-classes - - /// - /// JA Properties - /// - public static class JA - { - - - #region Properties - - /// - /// Name: System.Contact.JA.CompanyNamePhonetic -- PKEY_Contact_JA_CompanyNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 2 - /// - public static PropertyKey CompanyNamePhonetic - { - get - { - PropertyKey key = new PropertyKey(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 2); - - return key; - } - } - - /// - /// Name: System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 3 - /// - public static PropertyKey FirstNamePhonetic - { - get - { - PropertyKey key = new PropertyKey(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 3); - - return key; - } - } - - /// - /// Name: System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 4 - /// - public static PropertyKey LastNamePhonetic - { - get - { - PropertyKey key = new PropertyKey(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 4); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - #endregion - } - - /// - /// JA Properties - /// - public static class JA - { - - - #region Properties - - /// - /// Name: System.Contact.JA.CompanyNamePhonetic -- PKEY_Contact_JA_CompanyNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 2 - /// - public static PropertyKey CompanyNamePhonetic - { - get - { - PropertyKey key = new PropertyKey(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 2); - - return key; - } - } - - /// - /// Name: System.Contact.JA.FirstNamePhonetic -- PKEY_Contact_JA_FirstNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 3 - /// - public static PropertyKey FirstNamePhonetic - { - get - { - PropertyKey key = new PropertyKey(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 3); - - return key; - } - } - - /// - /// Name: System.Contact.JA.LastNamePhonetic -- PKEY_Contact_JA_LastNamePhonetic - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {897B3694-FE9E-43E6-8066-260F590C0100}, 4 - /// - public static PropertyKey LastNamePhonetic - { - get - { - PropertyKey key = new PropertyKey(new Guid("{897B3694-FE9E-43E6-8066-260F590C0100}"), 4); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Device Properties - /// - public static class Device - { - - - #region Properties - - /// - /// Name: System.Device.PrinterURL -- PKEY_Device_PrinterURL - /// Description: Printer information Printer URL. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0B48F35A-BE6E-4F17-B108-3C4073D1669A}, 15 - /// - public static PropertyKey PrinterURL - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0B48F35A-BE6E-4F17-B108-3C4073D1669A}"), 15); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// DeviceInterface Properties - /// - public static class DeviceInterface - { - - - #region Properties - - /// - /// Name: System.DeviceInterface.PrinterDriverDirectory -- PKEY_DeviceInterface_PrinterDriverDirectory - /// Description: Printer information Printer Driver Directory. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {847C66DE-B8D6-4AF9-ABC3-6F4F926BC039}, 14 - /// - public static PropertyKey PrinterDriverDirectory - { - get - { - PropertyKey key = new PropertyKey(new Guid("{847C66DE-B8D6-4AF9-ABC3-6F4F926BC039}"), 14); - - return key; - } - } - - /// - /// Name: System.DeviceInterface.PrinterDriverName -- PKEY_DeviceInterface_PrinterDriverName - /// Description: Printer information Driver Name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AFC47170-14F5-498C-8F30-B0D19BE449C6}, 11 - /// - public static PropertyKey PrinterDriverName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AFC47170-14F5-498C-8F30-B0D19BE449C6}"), 11); - - return key; - } - } - - /// - /// Name: System.DeviceInterface.PrinterName -- PKEY_DeviceInterface_PrinterName - /// Description: Printer information Printer Name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0A7B84EF-0C27-463F-84EF-06C5070001BE}, 10 - /// - public static PropertyKey PrinterName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0A7B84EF-0C27-463F-84EF-06C5070001BE}"), 10); - - return key; - } - } - - /// - /// Name: System.DeviceInterface.PrinterPortName -- PKEY_DeviceInterface_PrinterPortName - /// Description: Printer information Port Name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {EEC7B761-6F94-41B1-949F-C729720DD13C}, 12 - /// - public static PropertyKey PrinterPortName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{EEC7B761-6F94-41B1-949F-C729720DD13C}"), 12); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Devices Properties - /// - public static class Devices - { - - - #region Properties - - /// - /// Name: System.Devices.BatteryLife -- PKEY_Devices_BatteryLife - /// Description: Remaining battery life of the device as an integer between 0 and 100 percent. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 10 - /// - public static PropertyKey BatteryLife - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 10); - - return key; - } - } - - /// - /// Name: System.Devices.BatteryPlusCharging -- PKEY_Devices_BatteryPlusCharging - /// Description: Remaining battery life of the device as an integer between 0 and 100 percent and the device's charging state. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 22 - /// - public static PropertyKey BatteryPlusCharging - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 22); - - return key; - } - } - - /// - /// Name: System.Devices.BatteryPlusChargingText -- PKEY_Devices_BatteryPlusChargingText - /// Description: Remaining battery life of the device and the device's charging state as a string. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 23 - /// - public static PropertyKey BatteryPlusChargingText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 23); - - return key; - } - } - - /// - /// Name: System.Devices.Category -- PKEY_Devices_Category_Desc_Singular - /// Description: Singular form of device category. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 91 - /// - public static PropertyKey Category - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 91); - - return key; - } - } - - /// - /// Name: System.Devices.CategoryGroup -- PKEY_Devices_CategoryGroup_Desc - /// Description: Plural form of device category. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 94 - /// - public static PropertyKey CategoryGroup - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 94); - - return key; - } - } - - /// - /// Name: System.Devices.CategoryPlural -- PKEY_Devices_Category_Desc_Plural - /// Description: Plural form of device category. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 92 - /// - public static PropertyKey CategoryPlural - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 92); - - return key; - } - } - - /// - /// Name: System.Devices.ChargingState -- PKEY_Devices_ChargingState - /// Description: Boolean value representing if the device is currently charging. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 11 - /// - public static PropertyKey ChargingState - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 11); - - return key; - } - } - - /// - /// Name: System.Devices.Connected -- PKEY_Devices_IsConnected - /// Description: Device connection state. If VARIANT_TRUE, indicates the device is currently connected to the computer. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 55 - /// - public static PropertyKey Connected - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 55); - - return key; - } - } - - /// - /// Name: System.Devices.ContainerId -- PKEY_Devices_ContainerId - /// Description: Device container ID. - /// - /// Type: Guid -- VT_CLSID - /// FormatID: {8C7ED206-3F8A-4827-B3AB-AE9E1FAEFC6C}, 2 - /// - public static PropertyKey ContainerId - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8C7ED206-3F8A-4827-B3AB-AE9E1FAEFC6C}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.DefaultTooltip -- PKEY_Devices_DefaultTooltip - /// Description: Tooltip for default state - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 153 - /// - public static PropertyKey DefaultTooltip - { - get - { - PropertyKey key = new PropertyKey(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 153); - - return key; - } - } - - /// - /// Name: System.Devices.DeviceDescription1 -- PKEY_Devices_DeviceDescription1 - /// Description: First line of descriptive text about the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 81 - /// - public static PropertyKey DeviceDescription1 - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 81); - - return key; - } - } - - /// - /// Name: System.Devices.DeviceDescription2 -- PKEY_Devices_DeviceDescription2 - /// Description: Second line of descriptive text about the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 82 - /// - public static PropertyKey DeviceDescription2 - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 82); - - return key; - } - } - - /// - /// Name: System.Devices.DiscoveryMethod -- PKEY_Devices_DiscoveryMethod - /// Description: Device discovery method. This indicates on what transport or physical connection the device is discovered. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 52 - /// - public static PropertyKey DiscoveryMethod - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 52); - - return key; - } - } - - /// - /// Name: System.Devices.FriendlyName -- PKEY_Devices_FriendlyName - /// Description: Device friendly name. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 12288 - /// - public static PropertyKey FriendlyName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 12288); - - return key; - } - } - - /// - /// Name: System.Devices.FunctionPaths -- PKEY_Devices_FunctionPaths - /// Description: Available functions for this device. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 3 - /// - public static PropertyKey FunctionPaths - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 3); - - return key; - } - } - - /// - /// Name: System.Devices.InterfacePaths -- PKEY_Devices_InterfacePaths - /// Description: Available interfaces for this device. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 2 - /// - public static PropertyKey InterfacePaths - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.IsDefault -- PKEY_Devices_IsDefaultDevice - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 86 - /// - public static PropertyKey IsDefault - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 86); - - return key; - } - } - - /// - /// Name: System.Devices.IsNetworkConnected -- PKEY_Devices_IsNetworkDevice - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 85 - /// - public static PropertyKey IsNetworkConnected - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 85); - - return key; - } - } - - /// - /// Name: System.Devices.IsShared -- PKEY_Devices_IsSharedDevice - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 84 - /// - public static PropertyKey IsShared - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 84); - - return key; - } - } - - /// - /// Name: System.Devices.IsSoftwareInstalling -- PKEY_Devices_IsSoftwareInstalling - /// Description: If VARIANT_TRUE, the device installer is currently installing software. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {83DA6326-97A6-4088-9453-A1923F573B29}, 9 - /// - public static PropertyKey IsSoftwareInstalling - { - get - { - PropertyKey key = new PropertyKey(new Guid("{83DA6326-97A6-4088-9453-A1923F573B29}"), 9); - - return key; - } - } - - /// - /// Name: System.Devices.LaunchDeviceStageFromExplorer -- PKEY_Devices_LaunchDeviceStageFromExplorer - /// Description: Indicates whether to launch Device Stage or not - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 77 - /// - public static PropertyKey LaunchDeviceStageFromExplorer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 77); - - return key; - } - } - - /// - /// Name: System.Devices.LocalMachine -- PKEY_Devices_IsLocalMachine - /// Description: If VARIANT_TRUE, the device in question is actually the computer. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 70 - /// - public static PropertyKey LocalMachine - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 70); - - return key; - } - } - - /// - /// Name: System.Devices.Manufacturer -- PKEY_Devices_Manufacturer - /// Description: Device manufacturer. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8192 - /// - public static PropertyKey Manufacturer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8192); - - return key; - } - } - - /// - /// Name: System.Devices.MissedCalls -- PKEY_Devices_MissedCalls - /// Description: Number of missed calls on the device. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 5 - /// - public static PropertyKey MissedCalls - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 5); - - return key; - } - } - - /// - /// Name: System.Devices.ModelName -- PKEY_Devices_ModelName - /// Description: Model name of the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8194 - /// - public static PropertyKey ModelName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8194); - - return key; - } - } - - /// - /// Name: System.Devices.ModelNumber -- PKEY_Devices_ModelNumber - /// Description: Model number of the device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {656A3BB3-ECC0-43FD-8477-4AE0404A96CD}, 8195 - /// - public static PropertyKey ModelNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{656A3BB3-ECC0-43FD-8477-4AE0404A96CD}"), 8195); - - return key; - } - } - - /// - /// Name: System.Devices.NetworkedTooltip -- PKEY_Devices_NetworkedTooltip - /// Description: Tooltip for connection state - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 152 - /// - public static PropertyKey NetworkedTooltip - { - get - { - PropertyKey key = new PropertyKey(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 152); - - return key; - } - } - - /// - /// Name: System.Devices.NetworkName -- PKEY_Devices_NetworkName - /// Description: Name of the device's network. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 7 - /// - public static PropertyKey NetworkName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 7); - - return key; - } - } - - /// - /// Name: System.Devices.NetworkType -- PKEY_Devices_NetworkType - /// Description: String representing the type of the device's network. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 8 - /// - public static PropertyKey NetworkType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 8); - - return key; - } - } - - /// - /// Name: System.Devices.NewPictures -- PKEY_Devices_NewPictures - /// Description: Number of new pictures on the device. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 4 - /// - public static PropertyKey NewPictures - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 4); - - return key; - } - } - - /// - /// Name: System.Devices.Notification -- PKEY_Devices_Notification - /// Description: Device Notification Property. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {06704B0C-E830-4C81-9178-91E4E95A80A0}, 3 - /// - public static PropertyKey Notification - { - get - { - PropertyKey key = new PropertyKey(new Guid("{06704B0C-E830-4C81-9178-91E4E95A80A0}"), 3); - - return key; - } - } - - /// - /// Name: System.Devices.NotificationStore -- PKEY_Devices_NotificationStore - /// Description: Device Notification Store. - /// - /// Type: Object -- VT_UNKNOWN - /// FormatID: {06704B0C-E830-4C81-9178-91E4E95A80A0}, 2 - /// - public static PropertyKey NotificationStore - { - get - { - PropertyKey key = new PropertyKey(new Guid("{06704B0C-E830-4C81-9178-91E4E95A80A0}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.NotWorkingProperly -- PKEY_Devices_IsNotWorkingProperly - /// Description: If VARIANT_TRUE, the device is not working properly. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 83 - /// - public static PropertyKey NotWorkingProperly - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 83); - - return key; - } - } - - /// - /// Name: System.Devices.Paired -- PKEY_Devices_IsPaired - /// Description: Device paired state. If VARIANT_TRUE, indicates the device is not paired with the computer. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {78C34FC8-104A-4ACA-9EA4-524D52996E57}, 56 - /// - public static PropertyKey Paired - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78C34FC8-104A-4ACA-9EA4-524D52996E57}"), 56); - - return key; - } - } - - /// - /// Name: System.Devices.PrimaryCategory -- PKEY_Devices_PrimaryCategory - /// Description: Primary category group for this device. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 10 - /// - public static PropertyKey PrimaryCategory - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 10); - - return key; - } - } - - /// - /// Name: System.Devices.Roaming -- PKEY_Devices_Roaming - /// Description: Status indicator used to indicate if the device is roaming. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 9 - /// - public static PropertyKey Roaming - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 9); - - return key; - } - } - - /// - /// Name: System.Devices.SafeRemovalRequired -- PKEY_Devices_SafeRemovalRequired - /// Description: Indicates if a device requires safe removal or not - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {AFD97640-86A3-4210-B67C-289C41AABE55}, 2 - /// - public static PropertyKey SafeRemovalRequired - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AFD97640-86A3-4210-B67C-289C41AABE55}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.SharedTooltip -- PKEY_Devices_SharedTooltip - /// Description: Tooltip for sharing state - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {880F70A2-6082-47AC-8AAB-A739D1A300C3}, 151 - /// - public static PropertyKey SharedTooltip - { - get - { - PropertyKey key = new PropertyKey(new Guid("{880F70A2-6082-47AC-8AAB-A739D1A300C3}"), 151); - - return key; - } - } - - /// - /// Name: System.Devices.SignalStrength -- PKEY_Devices_SignalStrength - /// Description: Device signal strength. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 2 - /// - public static PropertyKey SignalStrength - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Status1 -- PKEY_Devices_Status1 - /// Description: 1st line of device status. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 257 - /// - public static PropertyKey Status1 - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 257); - - return key; - } - } - - /// - /// Name: System.Devices.Status2 -- PKEY_Devices_Status2 - /// Description: 2nd line of device status. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D08DD4C0-3A9E-462E-8290-7B636B2576B9}, 258 - /// - public static PropertyKey Status2 - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D08DD4C0-3A9E-462E-8290-7B636B2576B9}"), 258); - - return key; - } - } - - /// - /// Name: System.Devices.StorageCapacity -- PKEY_Devices_StorageCapacity - /// Description: Total storage capacity of the device. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 12 - /// - public static PropertyKey StorageCapacity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 12); - - return key; - } - } - - /// - /// Name: System.Devices.StorageFreeSpace -- PKEY_Devices_StorageFreeSpace - /// Description: Total free space of the storage of the device. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 13 - /// - public static PropertyKey StorageFreeSpace - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 13); - - return key; - } - } - - /// - /// Name: System.Devices.StorageFreeSpacePercent -- PKEY_Devices_StorageFreeSpacePercent - /// Description: Total free space of the storage of the device as a percentage. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 14 - /// - public static PropertyKey StorageFreeSpacePercent - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 14); - - return key; - } - } - - /// - /// Name: System.Devices.TextMessages -- PKEY_Devices_TextMessages - /// Description: Number of unread text messages on the device. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 3 - /// - public static PropertyKey TextMessages - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 3); - - return key; - } - } - - /// - /// Name: System.Devices.Voicemail -- PKEY_Devices_Voicemail - /// Description: Status indicator used to indicate if the device has voicemail. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {49CD1F76-5626-4B17-A4E8-18B4AA1A2213}, 6 - /// - public static PropertyKey Voicemail - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49CD1F76-5626-4B17-A4E8-18B4AA1A2213}"), 6); - - return key; - } - } - #endregion - - - #region sub-classes - - /// - /// Notifications Properties - /// - public static class Notifications - { - - - #region Properties - - /// - /// Name: System.Devices.Notifications.LowBattery -- PKEY_Devices_Notification_LowBattery - /// Description: Device Low Battery Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {C4C07F2B-8524-4E66-AE3A-A6235F103BEB}, 2 - /// - public static PropertyKey LowBattery - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C4C07F2B-8524-4E66-AE3A-A6235F103BEB}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.MissedCall -- PKEY_Devices_Notification_MissedCall - /// Description: Device Missed Call Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {6614EF48-4EFE-4424-9EDA-C79F404EDF3E}, 2 - /// - public static PropertyKey MissedCall - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6614EF48-4EFE-4424-9EDA-C79F404EDF3E}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.NewMessage -- PKEY_Devices_Notification_NewMessage - /// Description: Device New Message Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {2BE9260A-2012-4742-A555-F41B638B7DCB}, 2 - /// - public static PropertyKey NewMessage - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2BE9260A-2012-4742-A555-F41B638B7DCB}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.NewVoicemail -- PKEY_Devices_Notification_NewVoicemail - /// Description: Device Voicemail Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {59569556-0A08-4212-95B9-FAE2AD6413DB}, 2 - /// - public static PropertyKey NewVoicemail - { - get - { - PropertyKey key = new PropertyKey(new Guid("{59569556-0A08-4212-95B9-FAE2AD6413DB}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.StorageFull -- PKEY_Devices_Notification_StorageFull - /// Description: Device Storage Full Notification. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 2 - /// - public static PropertyKey StorageFull - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.StorageFullLinkText -- PKEY_Devices_Notification_StorageFullLinkText - /// Description: Link Text for the Device Storage Full Notification. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 3 - /// - public static PropertyKey StorageFullLinkText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 3); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - #endregion - } - - /// - /// Notifications Properties - /// - public static class Notifications - { - - - #region Properties - - /// - /// Name: System.Devices.Notifications.LowBattery -- PKEY_Devices_Notification_LowBattery - /// Description: Device Low Battery Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {C4C07F2B-8524-4E66-AE3A-A6235F103BEB}, 2 - /// - public static PropertyKey LowBattery - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C4C07F2B-8524-4E66-AE3A-A6235F103BEB}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.MissedCall -- PKEY_Devices_Notification_MissedCall - /// Description: Device Missed Call Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {6614EF48-4EFE-4424-9EDA-C79F404EDF3E}, 2 - /// - public static PropertyKey MissedCall - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6614EF48-4EFE-4424-9EDA-C79F404EDF3E}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.NewMessage -- PKEY_Devices_Notification_NewMessage - /// Description: Device New Message Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {2BE9260A-2012-4742-A555-F41B638B7DCB}, 2 - /// - public static PropertyKey NewMessage - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2BE9260A-2012-4742-A555-F41B638B7DCB}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.NewVoicemail -- PKEY_Devices_Notification_NewVoicemail - /// Description: Device Voicemail Notification. - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {59569556-0A08-4212-95B9-FAE2AD6413DB}, 2 - /// - public static PropertyKey NewVoicemail - { - get - { - PropertyKey key = new PropertyKey(new Guid("{59569556-0A08-4212-95B9-FAE2AD6413DB}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.StorageFull -- PKEY_Devices_Notification_StorageFull - /// Description: Device Storage Full Notification. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 2 - /// - public static PropertyKey StorageFull - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 2); - - return key; - } - } - - /// - /// Name: System.Devices.Notifications.StorageFullLinkText -- PKEY_Devices_Notification_StorageFullLinkText - /// Description: Link Text for the Device Storage Full Notification. - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: {A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}, 3 - /// - public static PropertyKey StorageFullLinkText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A0E00EE1-F0C7-4D41-B8E7-26A7BD8D38B0}"), 3); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Document Properties - /// - public static class Document - { - - - #region Properties - - /// - /// Name: System.Document.ByteCount -- PKEY_Document_ByteCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 4 (PIDDSI_BYTECOUNT) - /// - public static PropertyKey ByteCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 4); - - return key; - } - } - - /// - /// Name: System.Document.CharacterCount -- PKEY_Document_CharacterCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 16 (PIDSI_CHARCOUNT) - /// - public static PropertyKey CharacterCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 16); - - return key; - } - } - - /// - /// Name: System.Document.ClientID -- PKEY_Document_ClientID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {276D7BB0-5B34-4FB0-AA4B-158ED12A1809}, 100 - /// - public static PropertyKey ClientID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{276D7BB0-5B34-4FB0-AA4B-158ED12A1809}"), 100); - - return key; - } - } - - /// - /// Name: System.Document.Contributor -- PKEY_Document_Contributor - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {F334115E-DA1B-4509-9B3D-119504DC7ABB}, 100 - /// - public static PropertyKey Contributor - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F334115E-DA1B-4509-9B3D-119504DC7ABB}"), 100); - - return key; - } - } - - /// - /// Name: System.Document.DateCreated -- PKEY_Document_DateCreated - /// Description: This property is stored in the document, not obtained from the file system. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 12 (PIDSI_CREATE_DTM) - /// - public static PropertyKey DateCreated - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 12); - - return key; - } - } - - /// - /// Name: System.Document.DatePrinted -- PKEY_Document_DatePrinted - /// Description: Legacy name: "DocLastPrinted". - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 11 (PIDSI_LASTPRINTED) - /// - public static PropertyKey DatePrinted - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 11); - - return key; - } - } - - /// - /// Name: System.Document.DateSaved -- PKEY_Document_DateSaved - /// Description: Legacy name: "DocLastSavedTm". - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 13 (PIDSI_LASTSAVE_DTM) - /// - public static PropertyKey DateSaved - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 13); - - return key; - } - } - - /// - /// Name: System.Document.Division -- PKEY_Document_Division - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {1E005EE6-BF27-428B-B01C-79676ACD2870}, 100 - /// - public static PropertyKey Division - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1E005EE6-BF27-428B-B01C-79676ACD2870}"), 100); - - return key; - } - } - - /// - /// Name: System.Document.DocumentID -- PKEY_Document_DocumentID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E08805C8-E395-40DF-80D2-54F0D6C43154}, 100 - /// - public static PropertyKey DocumentID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E08805C8-E395-40DF-80D2-54F0D6C43154}"), 100); - - return key; - } - } - - /// - /// Name: System.Document.HiddenSlideCount -- PKEY_Document_HiddenSlideCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 9 (PIDDSI_HIDDENCOUNT) - /// - public static PropertyKey HiddenSlideCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 9); - - return key; - } - } - - /// - /// Name: System.Document.LastAuthor -- PKEY_Document_LastAuthor - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 8 (PIDSI_LASTAUTHOR) - /// - public static PropertyKey LastAuthor - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 8); - - return key; - } - } - - /// - /// Name: System.Document.LineCount -- PKEY_Document_LineCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 5 (PIDDSI_LINECOUNT) - /// - public static PropertyKey LineCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 5); - - return key; - } - } - - /// - /// Name: System.Document.Manager -- PKEY_Document_Manager - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 14 (PIDDSI_MANAGER) - /// - public static PropertyKey Manager - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 14); - - return key; - } - } - - /// - /// Name: System.Document.MultimediaClipCount -- PKEY_Document_MultimediaClipCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 10 (PIDDSI_MMCLIPCOUNT) - /// - public static PropertyKey MultimediaClipCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 10); - - return key; - } - } - - /// - /// Name: System.Document.NoteCount -- PKEY_Document_NoteCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 8 (PIDDSI_NOTECOUNT) - /// - public static PropertyKey NoteCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 8); - - return key; - } - } - - /// - /// Name: System.Document.PageCount -- PKEY_Document_PageCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 14 (PIDSI_PAGECOUNT) - /// - public static PropertyKey PageCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 14); - - return key; - } - } - - /// - /// Name: System.Document.ParagraphCount -- PKEY_Document_ParagraphCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 6 (PIDDSI_PARCOUNT) - /// - public static PropertyKey ParagraphCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 6); - - return key; - } - } - - /// - /// Name: System.Document.PresentationFormat -- PKEY_Document_PresentationFormat - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 3 (PIDDSI_PRESFORMAT) - /// - public static PropertyKey PresentationFormat - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 3); - - return key; - } - } - - /// - /// Name: System.Document.RevisionNumber -- PKEY_Document_RevisionNumber - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 9 (PIDSI_REVNUMBER) - /// - public static PropertyKey RevisionNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 9); - - return key; - } - } - - /// - /// Name: System.Document.Security -- PKEY_Document_Security - /// Description: Access control information, from SummaryInfo propset - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 19 - /// - public static PropertyKey Security - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 19); - - return key; - } - } - - /// - /// Name: System.Document.SlideCount -- PKEY_Document_SlideCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 7 (PIDDSI_SLIDECOUNT) - /// - public static PropertyKey SlideCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 7); - - return key; - } - } - - /// - /// Name: System.Document.Template -- PKEY_Document_Template - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 7 (PIDSI_TEMPLATE) - /// - public static PropertyKey Template - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 7); - - return key; - } - } - - /// - /// Name: System.Document.TotalEditingTime -- PKEY_Document_TotalEditingTime - /// Description: 100ns units, not milliseconds. VT_FILETIME for IPropertySetStorage handlers (legacy) - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 10 (PIDSI_EDITTIME) - /// - public static PropertyKey TotalEditingTime - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 10); - - return key; - } - } - - /// - /// Name: System.Document.Version -- PKEY_Document_Version - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DocumentSummaryInformation) {D5CDD502-2E9C-101B-9397-08002B2CF9AE}, 29 - /// - public static PropertyKey Version - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D5CDD502-2E9C-101B-9397-08002B2CF9AE}"), 29); - - return key; - } - } - - /// - /// Name: System.Document.WordCount -- PKEY_Document_WordCount - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_SummaryInformation) {F29F85E0-4FF9-1068-AB91-08002B27B3D9}, 15 (PIDSI_WORDCOUNT) - /// - public static PropertyKey WordCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F29F85E0-4FF9-1068-AB91-08002B27B3D9}"), 15); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// DRM Properties - /// - public static class DRM - { - - - #region Properties - - /// - /// Name: System.DRM.DatePlayExpires -- PKEY_DRM_DatePlayExpires - /// Description: Indicates when play expires for digital rights management. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 6 (PIDDRSI_PLAYEXPIRES) - /// - public static PropertyKey DatePlayExpires - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 6); - - return key; - } - } - - /// - /// Name: System.DRM.DatePlayStarts -- PKEY_DRM_DatePlayStarts - /// Description: Indicates when play starts for digital rights management. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 5 (PIDDRSI_PLAYSTARTS) - /// - public static PropertyKey DatePlayStarts - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 5); - - return key; - } - } - - /// - /// Name: System.DRM.Description -- PKEY_DRM_Description - /// Description: Displays the description for digital rights management. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 3 (PIDDRSI_DESCRIPTION) - /// - public static PropertyKey Description - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 3); - - return key; - } - } - - /// - /// Name: System.DRM.IsProtected -- PKEY_DRM_IsProtected - /// Description: - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 2 (PIDDRSI_PROTECTED) - /// - public static PropertyKey IsProtected - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 2); - - return key; - } - } - - /// - /// Name: System.DRM.PlayCount -- PKEY_DRM_PlayCount - /// Description: Indicates the play count for digital rights management. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_DRM) {AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}, 4 (PIDDRSI_PLAYCOUNT) - /// - public static PropertyKey PlayCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AEAC19E4-89AE-4508-B9B7-BB867ABEE2ED}"), 4); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// GPS Properties - /// - public static class GPS - { - - - #region Properties - - /// - /// Name: System.GPS.Altitude -- PKEY_GPS_Altitude - /// Description: Indicates the altitude based on the reference in PKEY_GPS_AltitudeRef. Calculated from PKEY_GPS_AltitudeNumerator and - ///PKEY_GPS_AltitudeDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {827EDB4F-5B73-44A7-891D-FDFFABEA35CA}, 100 - /// - public static PropertyKey Altitude - { - get - { - PropertyKey key = new PropertyKey(new Guid("{827EDB4F-5B73-44A7-891D-FDFFABEA35CA}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.AltitudeDenominator -- PKEY_GPS_AltitudeDenominator - /// Description: Denominator of PKEY_GPS_Altitude - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {78342DCB-E358-4145-AE9A-6BFE4E0F9F51}, 100 - /// - public static PropertyKey AltitudeDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{78342DCB-E358-4145-AE9A-6BFE4E0F9F51}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.AltitudeNumerator -- PKEY_GPS_AltitudeNumerator - /// Description: Numerator of PKEY_GPS_Altitude - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE}, 100 - /// - public static PropertyKey AltitudeNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2DAD1EB7-816D-40D3-9EC3-C9773BE2AADE}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.AltitudeRef -- PKEY_GPS_AltitudeRef - /// Description: Indicates the reference for the altitude property. (eg: above sea level, below sea level, absolute value) - /// - /// Type: Byte -- VT_UI1 - /// FormatID: {46AC629D-75EA-4515-867F-6DC4321C5844}, 100 - /// - public static PropertyKey AltitudeRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{46AC629D-75EA-4515-867F-6DC4321C5844}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.AreaInformation -- PKEY_GPS_AreaInformation - /// Description: Represents the name of the GPS area - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {972E333E-AC7E-49F1-8ADF-A70D07A9BCAB}, 100 - /// - public static PropertyKey AreaInformation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{972E333E-AC7E-49F1-8ADF-A70D07A9BCAB}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Date -- PKEY_GPS_Date - /// Description: Date and time of the GPS record - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {3602C812-0F3B-45F0-85AD-603468D69423}, 100 - /// - public static PropertyKey Date - { - get - { - PropertyKey key = new PropertyKey(new Guid("{3602C812-0F3B-45F0-85AD-603468D69423}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestBearing -- PKEY_GPS_DestBearing - /// Description: Indicates the bearing to the destination point. Calculated from PKEY_GPS_DestBearingNumerator and - ///PKEY_GPS_DestBearingDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA}, 100 - /// - public static PropertyKey DestBearing - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C66D4B3C-E888-47CC-B99F-9DCA3EE34DEA}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestBearingDenominator -- PKEY_GPS_DestBearingDenominator - /// Description: Denominator of PKEY_GPS_DestBearing - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5}, 100 - /// - public static PropertyKey DestBearingDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7ABCF4F8-7C3F-4988-AC91-8D2C2E97ECA5}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestBearingNumerator -- PKEY_GPS_DestBearingNumerator - /// Description: Numerator of PKEY_GPS_DestBearing - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF}, 100 - /// - public static PropertyKey DestBearingNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BA3B1DA9-86EE-4B5D-A2A4-A271A429F0CF}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestBearingRef -- PKEY_GPS_DestBearingRef - /// Description: Indicates the reference used for the giving the bearing to the destination point. (eg: true direction, magnetic direction) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9AB84393-2A0F-4B75-BB22-7279786977CB}, 100 - /// - public static PropertyKey DestBearingRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9AB84393-2A0F-4B75-BB22-7279786977CB}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestDistance -- PKEY_GPS_DestDistance - /// Description: Indicates the distance to the destination point. Calculated from PKEY_GPS_DestDistanceNumerator and - ///PKEY_GPS_DestDistanceDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {A93EAE04-6804-4F24-AC81-09B266452118}, 100 - /// - public static PropertyKey DestDistance - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A93EAE04-6804-4F24-AC81-09B266452118}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestDistanceDenominator -- PKEY_GPS_DestDistanceDenominator - /// Description: Denominator of PKEY_GPS_DestDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7}, 100 - /// - public static PropertyKey DestDistanceDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9BC2C99B-AC71-4127-9D1C-2596D0D7DCB7}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestDistanceNumerator -- PKEY_GPS_DestDistanceNumerator - /// Description: Numerator of PKEY_GPS_DestDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0}, 100 - /// - public static PropertyKey DestDistanceNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2BDA47DA-08C6-4FE1-80BC-A72FC517C5D0}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestDistanceRef -- PKEY_GPS_DestDistanceRef - /// Description: Indicates the unit used to express the distance to the destination. (eg: kilometers, miles, knots) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {ED4DF2D3-8695-450B-856F-F5C1C53ACB66}, 100 - /// - public static PropertyKey DestDistanceRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{ED4DF2D3-8695-450B-856F-F5C1C53ACB66}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLatitude -- PKEY_GPS_DestLatitude - /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1 - ///is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLatitudeNumerator and - ///PKEY_GPS_DestLatitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {9D1D7CC5-5C39-451C-86B3-928E2D18CC47}, 100 - /// - public static PropertyKey DestLatitude - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9D1D7CC5-5C39-451C-86B3-928E2D18CC47}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLatitudeDenominator -- PKEY_GPS_DestLatitudeDenominator - /// Description: Denominator of PKEY_GPS_DestLatitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {3A372292-7FCA-49A7-99D5-E47BB2D4E7AB}, 100 - /// - public static PropertyKey DestLatitudeDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{3A372292-7FCA-49A7-99D5-E47BB2D4E7AB}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLatitudeNumerator -- PKEY_GPS_DestLatitudeNumerator - /// Description: Numerator of PKEY_GPS_DestLatitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {ECF4B6F6-D5A6-433C-BB92-4076650FC890}, 100 - /// - public static PropertyKey DestLatitudeNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{ECF4B6F6-D5A6-433C-BB92-4076650FC890}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLatitudeRef -- PKEY_GPS_DestLatitudeRef - /// Description: Indicates whether the latitude destination point is north or south latitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CEA820B9-CE61-4885-A128-005D9087C192}, 100 - /// - public static PropertyKey DestLatitudeRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CEA820B9-CE61-4885-A128-005D9087C192}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLongitude -- PKEY_GPS_DestLongitude - /// Description: Indicates the latitude of the destination point. This is an array of three values. Index 0 is the degrees, index 1 - ///is the minutes, index 2 is the seconds. Each is calculated from the values in PKEY_GPS_DestLongitudeNumerator and - ///PKEY_GPS_DestLongitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {47A96261-CB4C-4807-8AD3-40B9D9DBC6BC}, 100 - /// - public static PropertyKey DestLongitude - { - get - { - PropertyKey key = new PropertyKey(new Guid("{47A96261-CB4C-4807-8AD3-40B9D9DBC6BC}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLongitudeDenominator -- PKEY_GPS_DestLongitudeDenominator - /// Description: Denominator of PKEY_GPS_DestLongitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {425D69E5-48AD-4900-8D80-6EB6B8D0AC86}, 100 - /// - public static PropertyKey DestLongitudeDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{425D69E5-48AD-4900-8D80-6EB6B8D0AC86}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLongitudeNumerator -- PKEY_GPS_DestLongitudeNumerator - /// Description: Numerator of PKEY_GPS_DestLongitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {A3250282-FB6D-48D5-9A89-DBCACE75CCCF}, 100 - /// - public static PropertyKey DestLongitudeNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A3250282-FB6D-48D5-9A89-DBCACE75CCCF}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DestLongitudeRef -- PKEY_GPS_DestLongitudeRef - /// Description: Indicates whether the longitude destination point is east or west longitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128}, 100 - /// - public static PropertyKey DestLongitudeRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{182C1EA6-7C1C-4083-AB4B-AC6C9F4ED128}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Differential -- PKEY_GPS_Differential - /// Description: Indicates whether differential correction was applied to the GPS receiver - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D}, 100 - /// - public static PropertyKey Differential - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AAF4EE25-BD3B-4DD7-BFC4-47F77BB00F6D}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DOP -- PKEY_GPS_DOP - /// Description: Indicates the GPS DOP (data degree of precision). Calculated from PKEY_GPS_DOPNumerator and PKEY_GPS_DOPDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {0CF8FB02-1837-42F1-A697-A7017AA289B9}, 100 - /// - public static PropertyKey DOP - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CF8FB02-1837-42F1-A697-A7017AA289B9}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DOPDenominator -- PKEY_GPS_DOPDenominator - /// Description: Denominator of PKEY_GPS_DOP - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A0BE94C5-50BA-487B-BD35-0654BE8881ED}, 100 - /// - public static PropertyKey DOPDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A0BE94C5-50BA-487B-BD35-0654BE8881ED}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.DOPNumerator -- PKEY_GPS_DOPNumerator - /// Description: Numerator of PKEY_GPS_DOP - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {47166B16-364F-4AA0-9F31-E2AB3DF449C3}, 100 - /// - public static PropertyKey DOPNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{47166B16-364F-4AA0-9F31-E2AB3DF449C3}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.ImgDirection -- PKEY_GPS_ImgDirection - /// Description: Indicates direction of the image when it was captured. Calculated from PKEY_GPS_ImgDirectionNumerator and - ///PKEY_GPS_ImgDirectionDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {16473C91-D017-4ED9-BA4D-B6BAA55DBCF8}, 100 - /// - public static PropertyKey ImgDirection - { - get - { - PropertyKey key = new PropertyKey(new Guid("{16473C91-D017-4ED9-BA4D-B6BAA55DBCF8}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.ImgDirectionDenominator -- PKEY_GPS_ImgDirectionDenominator - /// Description: Denominator of PKEY_GPS_ImgDirection - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {10B24595-41A2-4E20-93C2-5761C1395F32}, 100 - /// - public static PropertyKey ImgDirectionDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{10B24595-41A2-4E20-93C2-5761C1395F32}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.ImgDirectionNumerator -- PKEY_GPS_ImgDirectionNumerator - /// Description: Numerator of PKEY_GPS_ImgDirection - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {DC5877C7-225F-45F7-BAC7-E81334B6130A}, 100 - /// - public static PropertyKey ImgDirectionNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DC5877C7-225F-45F7-BAC7-E81334B6130A}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.ImgDirectionRef -- PKEY_GPS_ImgDirectionRef - /// Description: Indicates reference for giving the direction of the image when it was captured. (eg: true direction, magnetic direction) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5}, 100 - /// - public static PropertyKey ImgDirectionRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A4AAA5B7-1AD0-445F-811A-0F8F6E67F6B5}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Latitude -- PKEY_GPS_Latitude - /// Description: Indicates the latitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2 - ///is the seconds. Each is calculated from the values in PKEY_GPS_LatitudeNumerator and PKEY_GPS_LatitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {8727CFFF-4868-4EC6-AD5B-81B98521D1AB}, 100 - /// - public static PropertyKey Latitude - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8727CFFF-4868-4EC6-AD5B-81B98521D1AB}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.LatitudeDenominator -- PKEY_GPS_LatitudeDenominator - /// Description: Denominator of PKEY_GPS_Latitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {16E634EE-2BFF-497B-BD8A-4341AD39EEB9}, 100 - /// - public static PropertyKey LatitudeDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{16E634EE-2BFF-497B-BD8A-4341AD39EEB9}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.LatitudeNumerator -- PKEY_GPS_LatitudeNumerator - /// Description: Numerator of PKEY_GPS_Latitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2}, 100 - /// - public static PropertyKey LatitudeNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7DDAAAD1-CCC8-41AE-B750-B2CB8031AEA2}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.LatitudeRef -- PKEY_GPS_LatitudeRef - /// Description: Indicates whether latitude is north or south latitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {029C0252-5B86-46C7-ACA0-2769FFC8E3D4}, 100 - /// - public static PropertyKey LatitudeRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{029C0252-5B86-46C7-ACA0-2769FFC8E3D4}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Longitude -- PKEY_GPS_Longitude - /// Description: Indicates the longitude. This is an array of three values. Index 0 is the degrees, index 1 is the minutes, index 2 - ///is the seconds. Each is calculated from the values in PKEY_GPS_LongitudeNumerator and PKEY_GPS_LongitudeDenominator. - /// - /// Type: Multivalue Double -- VT_VECTOR | VT_R8 (For variants: VT_ARRAY | VT_R8) - /// FormatID: {C4C4DBB2-B593-466B-BBDA-D03D27D5E43A}, 100 - /// - public static PropertyKey Longitude - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C4C4DBB2-B593-466B-BBDA-D03D27D5E43A}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.LongitudeDenominator -- PKEY_GPS_LongitudeDenominator - /// Description: Denominator of PKEY_GPS_Longitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {BE6E176C-4534-4D2C-ACE5-31DEDAC1606B}, 100 - /// - public static PropertyKey LongitudeDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BE6E176C-4534-4D2C-ACE5-31DEDAC1606B}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.LongitudeNumerator -- PKEY_GPS_LongitudeNumerator - /// Description: Numerator of PKEY_GPS_Longitude - /// - /// Type: Multivalue UInt32 -- VT_VECTOR | VT_UI4 (For variants: VT_ARRAY | VT_UI4) - /// FormatID: {02B0F689-A914-4E45-821D-1DDA452ED2C4}, 100 - /// - public static PropertyKey LongitudeNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{02B0F689-A914-4E45-821D-1DDA452ED2C4}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.LongitudeRef -- PKEY_GPS_LongitudeRef - /// Description: Indicates whether longitude is east or west longitude - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {33DCF22B-28D5-464C-8035-1EE9EFD25278}, 100 - /// - public static PropertyKey LongitudeRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{33DCF22B-28D5-464C-8035-1EE9EFD25278}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.MapDatum -- PKEY_GPS_MapDatum - /// Description: Indicates the geodetic survey data used by the GPS receiver - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {2CA2DAE6-EDDC-407D-BEF1-773942ABFA95}, 100 - /// - public static PropertyKey MapDatum - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2CA2DAE6-EDDC-407D-BEF1-773942ABFA95}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.MeasureMode -- PKEY_GPS_MeasureMode - /// Description: Indicates the GPS measurement mode. (eg: 2-dimensional, 3-dimensional) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A015ED5D-AAEA-4D58-8A86-3C586920EA0B}, 100 - /// - public static PropertyKey MeasureMode - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A015ED5D-AAEA-4D58-8A86-3C586920EA0B}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.ProcessingMethod -- PKEY_GPS_ProcessingMethod - /// Description: Indicates the name of the method used for location finding - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {59D49E61-840F-4AA9-A939-E2099B7F6399}, 100 - /// - public static PropertyKey ProcessingMethod - { - get - { - PropertyKey key = new PropertyKey(new Guid("{59D49E61-840F-4AA9-A939-E2099B7F6399}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Satellites -- PKEY_GPS_Satellites - /// Description: Indicates the GPS satellites used for measurements - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {467EE575-1F25-4557-AD4E-B8B58B0D9C15}, 100 - /// - public static PropertyKey Satellites - { - get - { - PropertyKey key = new PropertyKey(new Guid("{467EE575-1F25-4557-AD4E-B8B58B0D9C15}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Speed -- PKEY_GPS_Speed - /// Description: Indicates the speed of the GPS receiver movement. Calculated from PKEY_GPS_SpeedNumerator and - ///PKEY_GPS_SpeedDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {DA5D0862-6E76-4E1B-BABD-70021BD25494}, 100 - /// - public static PropertyKey Speed - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DA5D0862-6E76-4E1B-BABD-70021BD25494}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.SpeedDenominator -- PKEY_GPS_SpeedDenominator - /// Description: Denominator of PKEY_GPS_Speed - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7D122D5A-AE5E-4335-8841-D71E7CE72F53}, 100 - /// - public static PropertyKey SpeedDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7D122D5A-AE5E-4335-8841-D71E7CE72F53}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.SpeedNumerator -- PKEY_GPS_SpeedNumerator - /// Description: Numerator of PKEY_GPS_Speed - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {ACC9CE3D-C213-4942-8B48-6D0820F21C6D}, 100 - /// - public static PropertyKey SpeedNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{ACC9CE3D-C213-4942-8B48-6D0820F21C6D}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.SpeedRef -- PKEY_GPS_SpeedRef - /// Description: Indicates the unit used to express the speed of the GPS receiver movement. (eg: kilometers per hour, - ///miles per hour, knots). - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453}, 100 - /// - public static PropertyKey SpeedRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{ECF7F4C9-544F-4D6D-9D98-8AD79ADAF453}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Status -- PKEY_GPS_Status - /// Description: Indicates the status of the GPS receiver when the image was recorded. (eg: measurement in progress, - ///measurement interoperability). - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {125491F4-818F-46B2-91B5-D537753617B2}, 100 - /// - public static PropertyKey Status - { - get - { - PropertyKey key = new PropertyKey(new Guid("{125491F4-818F-46B2-91B5-D537753617B2}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.Track -- PKEY_GPS_Track - /// Description: Indicates the direction of the GPS receiver movement. Calculated from PKEY_GPS_TrackNumerator and - ///PKEY_GPS_TrackDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {76C09943-7C33-49E3-9E7E-CDBA872CFADA}, 100 - /// - public static PropertyKey Track - { - get - { - PropertyKey key = new PropertyKey(new Guid("{76C09943-7C33-49E3-9E7E-CDBA872CFADA}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.TrackDenominator -- PKEY_GPS_TrackDenominator - /// Description: Denominator of PKEY_GPS_Track - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {C8D1920C-01F6-40C0-AC86-2F3A4AD00770}, 100 - /// - public static PropertyKey TrackDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C8D1920C-01F6-40C0-AC86-2F3A4AD00770}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.TrackNumerator -- PKEY_GPS_TrackNumerator - /// Description: Numerator of PKEY_GPS_Track - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {702926F4-44A6-43E1-AE71-45627116893B}, 100 - /// - public static PropertyKey TrackNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{702926F4-44A6-43E1-AE71-45627116893B}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.TrackRef -- PKEY_GPS_TrackRef - /// Description: Indicates reference for the direction of the GPS receiver movement. (eg: true direction, magnetic direction) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {35DBE6FE-44C3-4400-AAAE-D2C799C407E8}, 100 - /// - public static PropertyKey TrackRef - { - get - { - PropertyKey key = new PropertyKey(new Guid("{35DBE6FE-44C3-4400-AAAE-D2C799C407E8}"), 100); - - return key; - } - } - - /// - /// Name: System.GPS.VersionID -- PKEY_GPS_VersionID - /// Description: Indicates the version of the GPS information - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: {22704DA4-C6B2-4A99-8E56-F16DF8C92599}, 100 - /// - public static PropertyKey VersionID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{22704DA4-C6B2-4A99-8E56-F16DF8C92599}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Identity Properties - /// - public static class Identity - { - - - #region Properties - - /// - /// Name: System.Identity.Blob -- PKEY_Identity_Blob - /// Description: Blob used to import/export identities - /// - /// Type: Blob -- VT_BLOB - /// FormatID: {8C3B93A4-BAED-1A83-9A32-102EE313F6EB}, 100 - /// - public static PropertyKey Blob - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8C3B93A4-BAED-1A83-9A32-102EE313F6EB}"), 100); - - return key; - } - } - - /// - /// Name: System.Identity.DisplayName -- PKEY_Identity_DisplayName - /// Description: Display Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7D683FC9-D155-45A8-BB1F-89D19BCB792F}, 100 - /// - public static PropertyKey DisplayName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7D683FC9-D155-45A8-BB1F-89D19BCB792F}"), 100); - - return key; - } - } - - /// - /// Name: System.Identity.IsMeIdentity -- PKEY_Identity_IsMeIdentity - /// Description: Is it Me Identity - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {A4108708-09DF-4377-9DFC-6D99986D5A67}, 100 - /// - public static PropertyKey IsMeIdentity - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A4108708-09DF-4377-9DFC-6D99986D5A67}"), 100); - - return key; - } - } - - /// - /// Name: System.Identity.PrimaryEmailAddress -- PKEY_Identity_PrimaryEmailAddress - /// Description: Primary Email Address - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FCC16823-BAED-4F24-9B32-A0982117F7FA}, 100 - /// - public static PropertyKey PrimaryEmailAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FCC16823-BAED-4F24-9B32-A0982117F7FA}"), 100); - - return key; - } - } - - /// - /// Name: System.Identity.ProviderID -- PKEY_Identity_ProviderID - /// Description: Provider ID - /// - /// Type: Guid -- VT_CLSID - /// FormatID: {74A7DE49-FA11-4D3D-A006-DB7E08675916}, 100 - /// - public static PropertyKey ProviderID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{74A7DE49-FA11-4D3D-A006-DB7E08675916}"), 100); - - return key; - } - } - - /// - /// Name: System.Identity.UniqueID -- PKEY_Identity_UniqueID - /// Description: Unique ID - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E55FC3B0-2B60-4220-918E-B21E8BF16016}, 100 - /// - public static PropertyKey UniqueID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E55FC3B0-2B60-4220-918E-B21E8BF16016}"), 100); - - return key; - } - } - - /// - /// Name: System.Identity.UserName -- PKEY_Identity_UserName - /// Description: Identity User Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C4322503-78CA-49C6-9ACC-A68E2AFD7B6B}, 100 - /// - public static PropertyKey UserName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C4322503-78CA-49C6-9ACC-A68E2AFD7B6B}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// IdentityProvider Properties - /// - public static class IdentityProvider - { - - - #region Properties - - /// - /// Name: System.IdentityProvider.Name -- PKEY_IdentityProvider_Name - /// Description: Identity Provider Name - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {B96EFF7B-35CA-4A35-8607-29E3A54C46EA}, 100 - /// - public static PropertyKey Name - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B96EFF7B-35CA-4A35-8607-29E3A54C46EA}"), 100); - - return key; - } - } - - /// - /// Name: System.IdentityProvider.Picture -- PKEY_IdentityProvider_Picture - /// Description: Picture for the Identity Provider - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {2425166F-5642-4864-992F-98FD98F294C3}, 100 - /// - public static PropertyKey Picture - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2425166F-5642-4864-992F-98FD98F294C3}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Image Properties - /// - public static class Image - { - - - #region Properties - - /// - /// Name: System.Image.BitDepth -- PKEY_Image_BitDepth - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 7 (PIDISI_BITDEPTH) - /// - public static PropertyKey BitDepth - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 7); - - return key; - } - } - - /// - /// Name: System.Image.ColorSpace -- PKEY_Image_ColorSpace - /// Description: PropertyTagExifColorSpace - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 40961 - /// - public static PropertyKey ColorSpace - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 40961); - - return key; - } - } - - /// - /// Name: System.Image.CompressedBitsPerPixel -- PKEY_Image_CompressedBitsPerPixel - /// Description: Calculated from PKEY_Image_CompressedBitsPerPixelNumerator and PKEY_Image_CompressedBitsPerPixelDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {364B6FA9-37AB-482A-BE2B-AE02F60D4318}, 100 - /// - public static PropertyKey CompressedBitsPerPixel - { - get - { - PropertyKey key = new PropertyKey(new Guid("{364B6FA9-37AB-482A-BE2B-AE02F60D4318}"), 100); - - return key; - } - } - - /// - /// Name: System.Image.CompressedBitsPerPixelDenominator -- PKEY_Image_CompressedBitsPerPixelDenominator - /// Description: Denominator of PKEY_Image_CompressedBitsPerPixel. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {1F8844E1-24AD-4508-9DFD-5326A415CE02}, 100 - /// - public static PropertyKey CompressedBitsPerPixelDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1F8844E1-24AD-4508-9DFD-5326A415CE02}"), 100); - - return key; - } - } - - /// - /// Name: System.Image.CompressedBitsPerPixelNumerator -- PKEY_Image_CompressedBitsPerPixelNumerator - /// Description: Numerator of PKEY_Image_CompressedBitsPerPixel. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {D21A7148-D32C-4624-8900-277210F79C0F}, 100 - /// - public static PropertyKey CompressedBitsPerPixelNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D21A7148-D32C-4624-8900-277210F79C0F}"), 100); - - return key; - } - } - - /// - /// Name: System.Image.Compression -- PKEY_Image_Compression - /// Description: Indicates the image compression level. PropertyTagCompression. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 259 - /// - public static PropertyKey Compression - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 259); - - return key; - } - } - - /// - /// Name: System.Image.CompressionText -- PKEY_Image_CompressionText - /// Description: This is the user-friendly form of System.Image.Compression. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {3F08E66F-2F44-4BB9-A682-AC35D2562322}, 100 - /// - public static PropertyKey CompressionText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{3F08E66F-2F44-4BB9-A682-AC35D2562322}"), 100); - - return key; - } - } - - /// - /// Name: System.Image.Dimensions -- PKEY_Image_Dimensions - /// Description: Indicates the dimensions of the image. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 13 (PIDISI_DIMENSIONS) - /// - public static PropertyKey Dimensions - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 13); - - return key; - } - } - - /// - /// Name: System.Image.HorizontalResolution -- PKEY_Image_HorizontalResolution - /// Description: - /// - /// Type: Double -- VT_R8 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 5 (PIDISI_RESOLUTIONX) - /// - public static PropertyKey HorizontalResolution - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 5); - - return key; - } - } - - /// - /// Name: System.Image.HorizontalSize -- PKEY_Image_HorizontalSize - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 3 (PIDISI_CX) - /// - public static PropertyKey HorizontalSize - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 3); - - return key; - } - } - - /// - /// Name: System.Image.ImageID -- PKEY_Image_ImageID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {10DABE05-32AA-4C29-BF1A-63E2D220587F}, 100 - /// - public static PropertyKey ImageID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{10DABE05-32AA-4C29-BF1A-63E2D220587F}"), 100); - - return key; - } - } - - /// - /// Name: System.Image.ResolutionUnit -- PKEY_Image_ResolutionUnit - /// Description: - /// Type: Int16 -- VT_I2 - /// FormatID: {19B51FA6-1F92-4A5C-AB48-7DF0ABD67444}, 100 - /// - public static PropertyKey ResolutionUnit - { - get - { - PropertyKey key = new PropertyKey(new Guid("{19B51FA6-1F92-4A5C-AB48-7DF0ABD67444}"), 100); - - return key; - } - } - - /// - /// Name: System.Image.VerticalResolution -- PKEY_Image_VerticalResolution - /// Description: - /// - /// Type: Double -- VT_R8 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 6 (PIDISI_RESOLUTIONY) - /// - public static PropertyKey VerticalResolution - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 6); - - return key; - } - } - - /// - /// Name: System.Image.VerticalSize -- PKEY_Image_VerticalSize - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 4 (PIDISI_CY) - /// - public static PropertyKey VerticalSize - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 4); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Journal Properties - /// - public static class Journal - { - - - #region Properties - - /// - /// Name: System.Journal.Contacts -- PKEY_Journal_Contacts - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1}, 100 - /// - public static PropertyKey Contacts - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DEA7C82C-1D89-4A66-9427-A4E3DEBABCB1}"), 100); - - return key; - } - } - - /// - /// Name: System.Journal.EntryType -- PKEY_Journal_EntryType - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {95BEB1FC-326D-4644-B396-CD3ED90E6DDF}, 100 - /// - public static PropertyKey EntryType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{95BEB1FC-326D-4644-B396-CD3ED90E6DDF}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// LayoutPattern Properties - /// - public static class LayoutPattern - { - - - #region Properties - - /// - /// Name: System.LayoutPattern.ContentViewModeForBrowse -- PKEY_LayoutPattern_ContentViewModeForBrowse - /// Description: Specifies the layout pattern that the content view mode should apply for this item in the context of browsing. - ///Register the regvalue under the name of "ContentViewModeLayoutPatternForBrowse". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 500 - /// - public static PropertyKey ContentViewModeForBrowse - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 500); - - return key; - } - } - - /// - /// Name: System.LayoutPattern.ContentViewModeForSearch -- PKEY_LayoutPattern_ContentViewModeForSearch - /// Description: Specifies the layout pattern that the content view mode should apply for this item in the context of searching. - ///Register the regvalue under the name of "ContentViewModeLayoutPatternForSearch". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 501 - /// - public static PropertyKey ContentViewModeForSearch - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 501); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Link Properties - /// - public static class Link - { - - - #region Properties - - /// - /// Name: System.Link.Arguments -- PKEY_Link_Arguments - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {436F2667-14E2-4FEB-B30A-146C53B5B674}, 100 - /// - public static PropertyKey Arguments - { - get - { - PropertyKey key = new PropertyKey(new Guid("{436F2667-14E2-4FEB-B30A-146C53B5B674}"), 100); - - return key; - } - } - - /// - /// Name: System.Link.Comment -- PKEY_Link_Comment - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 5 - /// - public static PropertyKey Comment - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 5); - - return key; - } - } - - /// - /// Name: System.Link.DateVisited -- PKEY_Link_DateVisited - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 23 (PKEYs relating to URLs. Used by IE History.) - /// - public static PropertyKey DateVisited - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 23); - - return key; - } - } - - /// - /// Name: System.Link.Description -- PKEY_Link_Description - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 21 (PKEYs relating to URLs. Used by IE History.) - /// - public static PropertyKey Description - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 21); - - return key; - } - } - - /// - /// Name: System.Link.Status -- PKEY_Link_Status - /// Description: - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 3 (PID_LINK_TARGET_TYPE) - /// - public static PropertyKey Status - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 3); - - return key; - } - } - - /// - /// Name: System.Link.TargetExtension -- PKEY_Link_TargetExtension - /// Description: The file extension of the link target. See System.File.Extension - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {7A7D76F4-B630-4BD7-95FF-37CC51A975C9}, 2 - /// - public static PropertyKey TargetExtension - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7A7D76F4-B630-4BD7-95FF-37CC51A975C9}"), 2); - - return key; - } - } - - /// - /// Name: System.Link.TargetParsingPath -- PKEY_Link_TargetParsingPath - /// Description: This is the shell namespace path to the target of the link item. This path may be passed to - ///SHParseDisplayName to parse the path to the correct shell folder. - /// - ///If the target item is a file, the value is identical to System.ItemPathDisplay. - /// - ///If the target item cannot be accessed through the shell namespace, this value is VT_EMPTY. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 2 (PID_LINK_TARGET) - /// - public static PropertyKey TargetParsingPath - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 2); - - return key; - } - } - - /// - /// Name: System.Link.TargetSFGAOFlags -- PKEY_Link_TargetSFGAOFlags - /// Description: IShellFolder::GetAttributesOf flags for the target of a link, with SFGAO_PKEYSFGAOMASK - ///attributes masked out. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_LINK) {B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}, 8 - /// - public static PropertyKey TargetSFGAOFlags - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B9B4B3FC-2B51-4A42-B5D8-324146AFCF25}"), 8); - - return key; - } - } - - /// - /// Name: System.Link.TargetSFGAOFlagsStrings -- PKEY_Link_TargetSFGAOFlagsStrings - /// Description: Expresses the SFGAO flags of a link as string values and is used as a query optimization. See - ///PKEY_Shell_SFGAOFlagsStrings for possible values of this. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D6942081-D53B-443D-AD47-5E059D9CD27A}, 3 - /// - public static PropertyKey TargetSFGAOFlagsStrings - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D6942081-D53B-443D-AD47-5E059D9CD27A}"), 3); - - return key; - } - } - - /// - /// Name: System.Link.TargetUrl -- PKEY_Link_TargetUrl - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {5CBF2787-48CF-4208-B90E-EE5E5D420294}, 2 (PKEYs relating to URLs. Used by IE History.) - /// - public static PropertyKey TargetUrl - { - get - { - PropertyKey key = new PropertyKey(new Guid("{5CBF2787-48CF-4208-B90E-EE5E5D420294}"), 2); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Media Properties - /// - public static class Media - { - - - #region Properties - - /// - /// Name: System.Media.AuthorUrl -- PKEY_Media_AuthorUrl - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 32 (PIDMSI_AUTHOR_URL) - /// - public static PropertyKey AuthorUrl - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 32); - - return key; - } - } - - /// - /// Name: System.Media.AverageLevel -- PKEY_Media_AverageLevel - /// Description: - /// Type: UInt32 -- VT_UI4 - /// FormatID: {09EDD5B6-B301-43C5-9990-D00302EFFD46}, 100 - /// - public static PropertyKey AverageLevel - { - get - { - PropertyKey key = new PropertyKey(new Guid("{09EDD5B6-B301-43C5-9990-D00302EFFD46}"), 100); - - return key; - } - } - - /// - /// Name: System.Media.ClassPrimaryID -- PKEY_Media_ClassPrimaryID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 13 (PIDMSI_CLASS_PRIMARY_ID) - /// - public static PropertyKey ClassPrimaryID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 13); - - return key; - } - } - - /// - /// Name: System.Media.ClassSecondaryID -- PKEY_Media_ClassSecondaryID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 14 (PIDMSI_CLASS_SECONDARY_ID) - /// - public static PropertyKey ClassSecondaryID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 14); - - return key; - } - } - - /// - /// Name: System.Media.CollectionGroupID -- PKEY_Media_CollectionGroupID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 24 (PIDMSI_COLLECTION_GROUP_ID) - /// - public static PropertyKey CollectionGroupID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 24); - - return key; - } - } - - /// - /// Name: System.Media.CollectionID -- PKEY_Media_CollectionID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 25 (PIDMSI_COLLECTION_ID) - /// - public static PropertyKey CollectionID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 25); - - return key; - } - } - - /// - /// Name: System.Media.ContentDistributor -- PKEY_Media_ContentDistributor - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 18 (PIDMSI_CONTENTDISTRIBUTOR) - /// - public static PropertyKey ContentDistributor - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 18); - - return key; - } - } - - /// - /// Name: System.Media.ContentID -- PKEY_Media_ContentID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 26 (PIDMSI_CONTENT_ID) - /// - public static PropertyKey ContentID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 26); - - return key; - } - } - - /// - /// Name: System.Media.CreatorApplication -- PKEY_Media_CreatorApplication - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 27 (PIDMSI_TOOL_NAME) - /// - public static PropertyKey CreatorApplication - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 27); - - return key; - } - } - - /// - /// Name: System.Media.CreatorApplicationVersion -- PKEY_Media_CreatorApplicationVersion - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 28 (PIDMSI_TOOL_VERSION) - /// - public static PropertyKey CreatorApplicationVersion - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 28); - - return key; - } - } - - /// - /// Name: System.Media.DateEncoded -- PKEY_Media_DateEncoded - /// Description: DateTime is in UTC (in the doc, not file system). - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {2E4B640D-5019-46D8-8881-55414CC5CAA0}, 100 - /// - public static PropertyKey DateEncoded - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2E4B640D-5019-46D8-8881-55414CC5CAA0}"), 100); - - return key; - } - } - - /// - /// Name: System.Media.DateReleased -- PKEY_Media_DateReleased - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DE41CC29-6971-4290-B472-F59F2E2F31E2}, 100 - /// - public static PropertyKey DateReleased - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DE41CC29-6971-4290-B472-F59F2E2F31E2}"), 100); - - return key; - } - } - - /// - /// Name: System.Media.Duration -- PKEY_Media_Duration - /// Description: 100ns units, not milliseconds - /// - /// Type: UInt64 -- VT_UI8 - /// FormatID: (FMTID_AudioSummaryInformation) {64440490-4C8B-11D1-8B70-080036B11A03}, 3 (PIDASI_TIMELENGTH) - /// - public static PropertyKey Duration - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440490-4C8B-11D1-8B70-080036B11A03}"), 3); - - return key; - } - } - - /// - /// Name: System.Media.DVDID -- PKEY_Media_DVDID - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 15 (PIDMSI_DVDID) - /// - public static PropertyKey DVDID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 15); - - return key; - } - } - - /// - /// Name: System.Media.EncodedBy -- PKEY_Media_EncodedBy - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 36 (PIDMSI_ENCODED_BY) - /// - public static PropertyKey EncodedBy - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 36); - - return key; - } - } - - /// - /// Name: System.Media.EncodingSettings -- PKEY_Media_EncodingSettings - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 37 (PIDMSI_ENCODING_SETTINGS) - /// - public static PropertyKey EncodingSettings - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 37); - - return key; - } - } - - /// - /// Name: System.Media.FrameCount -- PKEY_Media_FrameCount - /// Description: Indicates the frame count for the image. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (PSGUID_IMAGESUMMARYINFORMATION) {6444048F-4C8B-11D1-8B70-080036B11A03}, 12 (PIDISI_FRAMECOUNT) - /// - public static PropertyKey FrameCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6444048F-4C8B-11D1-8B70-080036B11A03}"), 12); - - return key; - } - } - - /// - /// Name: System.Media.MCDI -- PKEY_Media_MCDI - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 16 (PIDMSI_MCDI) - /// - public static PropertyKey MCDI - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 16); - - return key; - } - } - - /// - /// Name: System.Media.MetadataContentProvider -- PKEY_Media_MetadataContentProvider - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 17 (PIDMSI_PROVIDER) - /// - public static PropertyKey MetadataContentProvider - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 17); - - return key; - } - } - - /// - /// Name: System.Media.Producer -- PKEY_Media_Producer - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 22 (PIDMSI_PRODUCER) - /// - public static PropertyKey Producer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 22); - - return key; - } - } - - /// - /// Name: System.Media.PromotionUrl -- PKEY_Media_PromotionUrl - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 33 (PIDMSI_PROMOTION_URL) - /// - public static PropertyKey PromotionUrl - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 33); - - return key; - } - } - - /// - /// Name: System.Media.ProtectionType -- PKEY_Media_ProtectionType - /// Description: If media is protected, how is it protected? - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 38 - /// - public static PropertyKey ProtectionType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 38); - - return key; - } - } - - /// - /// Name: System.Media.ProviderRating -- PKEY_Media_ProviderRating - /// Description: Rating (0 - 99) supplied by metadata provider - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 39 - /// - public static PropertyKey ProviderRating - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 39); - - return key; - } - } - - /// - /// Name: System.Media.ProviderStyle -- PKEY_Media_ProviderStyle - /// Description: Style of music or video, supplied by metadata provider - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 40 - /// - public static PropertyKey ProviderStyle - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 40); - - return key; - } - } - - /// - /// Name: System.Media.Publisher -- PKEY_Media_Publisher - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 30 (PIDMSI_PUBLISHER) - /// - public static PropertyKey Publisher - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 30); - - return key; - } - } - - /// - /// Name: System.Media.SubscriptionContentId -- PKEY_Media_SubscriptionContentId - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {9AEBAE7A-9644-487D-A92C-657585ED751A}, 100 - /// - public static PropertyKey SubscriptionContentId - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9AEBAE7A-9644-487D-A92C-657585ED751A}"), 100); - - return key; - } - } - - /// - /// Name: System.Media.SubTitle -- PKEY_Media_SubTitle - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 38 (PIDSI_MUSIC_SUB_TITLE) - /// - public static PropertyKey SubTitle - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 38); - - return key; - } - } - - /// - /// Name: System.Media.UniqueFileIdentifier -- PKEY_Media_UniqueFileIdentifier - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 35 (PIDMSI_UNIQUE_FILE_IDENTIFIER) - /// - public static PropertyKey UniqueFileIdentifier - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 35); - - return key; - } - } - - /// - /// Name: System.Media.UserNoAutoInfo -- PKEY_Media_UserNoAutoInfo - /// Description: If true, do NOT alter this file's metadata. Set by user. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 41 - /// - public static PropertyKey UserNoAutoInfo - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 41); - - return key; - } - } - - /// - /// Name: System.Media.UserWebUrl -- PKEY_Media_UserWebUrl - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 34 (PIDMSI_USER_WEB_URL) - /// - public static PropertyKey UserWebUrl - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 34); - - return key; - } - } - - /// - /// Name: System.Media.Writer -- PKEY_Media_Writer - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 23 (PIDMSI_WRITER) - /// - public static PropertyKey Writer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 23); - - return key; - } - } - - /// - /// Name: System.Media.Year -- PKEY_Media_Year - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 5 (PIDSI_MUSIC_YEAR) - /// - public static PropertyKey Year - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 5); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Message Properties - /// - public static class Message - { - - - #region Properties - - /// - /// Name: System.Message.AttachmentContents -- PKEY_Message_AttachmentContents - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {3143BF7C-80A8-4854-8880-E2E40189BDD0}, 100 - /// - public static PropertyKey AttachmentContents - { - get - { - PropertyKey key = new PropertyKey(new Guid("{3143BF7C-80A8-4854-8880-E2E40189BDD0}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.AttachmentNames -- PKEY_Message_AttachmentNames - /// Description: The names of the attachments in a message - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 21 - /// - public static PropertyKey AttachmentNames - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 21); - - return key; - } - } - - /// - /// Name: System.Message.BccAddress -- PKEY_Message_BccAddress - /// Description: Addresses in Bcc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 2 - /// - public static PropertyKey BccAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 2); - - return key; - } - } - - /// - /// Name: System.Message.BccName -- PKEY_Message_BccName - /// Description: person names in Bcc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 3 - /// - public static PropertyKey BccName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 3); - - return key; - } - } - - /// - /// Name: System.Message.CcAddress -- PKEY_Message_CcAddress - /// Description: Addresses in Cc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 4 - /// - public static PropertyKey CcAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 4); - - return key; - } - } - - /// - /// Name: System.Message.CcName -- PKEY_Message_CcName - /// Description: person names in Cc: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 5 - /// - public static PropertyKey CcName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 5); - - return key; - } - } - - /// - /// Name: System.Message.ConversationID -- PKEY_Message_ConversationID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DC8F80BD-AF1E-4289-85B6-3DFC1B493992}, 100 - /// - public static PropertyKey ConversationID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DC8F80BD-AF1E-4289-85B6-3DFC1B493992}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.ConversationIndex -- PKEY_Message_ConversationIndex - /// Description: - /// - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: {DC8F80BD-AF1E-4289-85B6-3DFC1B493992}, 101 - /// - public static PropertyKey ConversationIndex - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DC8F80BD-AF1E-4289-85B6-3DFC1B493992}"), 101); - - return key; - } - } - - /// - /// Name: System.Message.DateReceived -- PKEY_Message_DateReceived - /// Description: Date and Time communication was received - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 20 - /// - public static PropertyKey DateReceived - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 20); - - return key; - } - } - - /// - /// Name: System.Message.DateSent -- PKEY_Message_DateSent - /// Description: Date and Time communication was sent - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 19 - /// - public static PropertyKey DateSent - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 19); - - return key; - } - } - - /// - /// Name: System.Message.Flags -- PKEY_Message_Flags - /// Description: These are flags associated with email messages to know if a read receipt is pending, etc. - ///The values stored here by Outlook are defined for PR_MESSAGE_FLAGS on MSDN. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {A82D9EE7-CA67-4312-965E-226BCEA85023}, 100 - /// - public static PropertyKey Flags - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A82D9EE7-CA67-4312-965E-226BCEA85023}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.FromAddress -- PKEY_Message_FromAddress - /// Description: - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 13 - /// - public static PropertyKey FromAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 13); - - return key; - } - } - - /// - /// Name: System.Message.FromName -- PKEY_Message_FromName - /// Description: Address in from field as person name - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 14 - /// - public static PropertyKey FromName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 14); - - return key; - } - } - - /// - /// Name: System.Message.HasAttachments -- PKEY_Message_HasAttachments - /// Description: - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}, 8 - /// - public static PropertyKey HasAttachments - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9C1FCF74-2D97-41BA-B4AE-CB2E3661A6E4}"), 8); - - return key; - } - } - - /// - /// Name: System.Message.IsFwdOrReply -- PKEY_Message_IsFwdOrReply - /// Description: - /// Type: Int32 -- VT_I4 - /// FormatID: {9A9BC088-4F6D-469E-9919-E705412040F9}, 100 - /// - public static PropertyKey IsFwdOrReply - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9A9BC088-4F6D-469E-9919-E705412040F9}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.MessageClass -- PKEY_Message_MessageClass - /// Description: What type of outlook msg this is (meeting, task, mail, etc.) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CD9ED458-08CE-418F-A70E-F912C7BB9C5C}, 103 - /// - public static PropertyKey MessageClass - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CD9ED458-08CE-418F-A70E-F912C7BB9C5C}"), 103); - - return key; - } - } - - /// - /// Name: System.Message.ProofInProgress -- PKEY_Message_ProofInProgress - /// Description: This property will be true if the message junk email proofing is still in progress. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {9098F33C-9A7D-48A8-8DE5-2E1227A64E91}, 100 - /// - public static PropertyKey ProofInProgress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9098F33C-9A7D-48A8-8DE5-2E1227A64E91}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.SenderAddress -- PKEY_Message_SenderAddress - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0BE1C8E7-1981-4676-AE14-FDD78F05A6E7}, 100 - /// - public static PropertyKey SenderAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0BE1C8E7-1981-4676-AE14-FDD78F05A6E7}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.SenderName -- PKEY_Message_SenderName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0DA41CFA-D224-4A18-AE2F-596158DB4B3A}, 100 - /// - public static PropertyKey SenderName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0DA41CFA-D224-4A18-AE2F-596158DB4B3A}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.Store -- PKEY_Message_Store - /// Description: The store (aka protocol handler) FILE, MAIL, OUTLOOKEXPRESS - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 15 - /// - public static PropertyKey Store - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 15); - - return key; - } - } - - /// - /// Name: System.Message.ToAddress -- PKEY_Message_ToAddress - /// Description: Addresses in To: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 16 - /// - public static PropertyKey ToAddress - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 16); - - return key; - } - } - - /// - /// Name: System.Message.ToDoFlags -- PKEY_Message_ToDoFlags - /// Description: Flags associated with a message flagged to know if it's still active, if it was custom flagged, etc. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {1F856A9F-6900-4ABA-9505-2D5F1B4D66CB}, 100 - /// - public static PropertyKey ToDoFlags - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1F856A9F-6900-4ABA-9505-2D5F1B4D66CB}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.ToDoTitle -- PKEY_Message_ToDoTitle - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7}, 100 - /// - public static PropertyKey ToDoTitle - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BCCC8A3C-8CEF-42E5-9B1C-C69079398BC7}"), 100); - - return key; - } - } - - /// - /// Name: System.Message.ToName -- PKEY_Message_ToName - /// Description: Person names in To: field - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}, 17 - /// - public static PropertyKey ToName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3E0584C-B788-4A5A-BB20-7F5A44C9ACDD}"), 17); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Music Properties - /// - public static class Music - { - - - #region Properties - - /// - /// Name: System.Music.AlbumArtist -- PKEY_Music_AlbumArtist - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 13 (PIDSI_MUSIC_ALBUM_ARTIST) - /// - public static PropertyKey AlbumArtist - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 13); - - return key; - } - } - - /// - /// Name: System.Music.AlbumID -- PKEY_Music_AlbumID - /// Description: Concatenation of System.Music.AlbumArtist and System.Music.AlbumTitle, suitable for indexing and display. - ///Used to differentiate albums with the same title from different artists. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 100 - /// - public static PropertyKey AlbumID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 100); - - return key; - } - } - - /// - /// Name: System.Music.AlbumTitle -- PKEY_Music_AlbumTitle - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 4 (PIDSI_MUSIC_ALBUM) - /// - public static PropertyKey AlbumTitle - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 4); - - return key; - } - } - - /// - /// Name: System.Music.Artist -- PKEY_Music_Artist - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 2 (PIDSI_MUSIC_ARTIST) - /// - public static PropertyKey Artist - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 2); - - return key; - } - } - - /// - /// Name: System.Music.BeatsPerMinute -- PKEY_Music_BeatsPerMinute - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 35 (PIDSI_MUSIC_BEATS_PER_MINUTE) - /// - public static PropertyKey BeatsPerMinute - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 35); - - return key; - } - } - - /// - /// Name: System.Music.Composer -- PKEY_Music_Composer - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 19 (PIDMSI_COMPOSER) - /// - public static PropertyKey Composer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 19); - - return key; - } - } - - /// - /// Name: System.Music.Conductor -- PKEY_Music_Conductor - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 36 (PIDSI_MUSIC_CONDUCTOR) - /// - public static PropertyKey Conductor - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 36); - - return key; - } - } - - /// - /// Name: System.Music.ContentGroupDescription -- PKEY_Music_ContentGroupDescription - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 33 (PIDSI_MUSIC_CONTENT_GROUP_DESCRIPTION) - /// - public static PropertyKey ContentGroupDescription - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 33); - - return key; - } - } - - /// - /// Name: System.Music.DisplayArtist -- PKEY_Music_DisplayArtist - /// Description: This property returns the best representation of Album Artist for a given music file - ///based upon AlbumArtist, ContributingArtist and compilation info. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FD122953-FA93-4EF7-92C3-04C946B2F7C8}, 100 - /// - public static PropertyKey DisplayArtist - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FD122953-FA93-4EF7-92C3-04C946B2F7C8}"), 100); - - return key; - } - } - - /// - /// Name: System.Music.Genre -- PKEY_Music_Genre - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 11 (PIDSI_MUSIC_GENRE) - /// - public static PropertyKey Genre - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 11); - - return key; - } - } - - /// - /// Name: System.Music.InitialKey -- PKEY_Music_InitialKey - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 34 (PIDSI_MUSIC_INITIAL_KEY) - /// - public static PropertyKey InitialKey - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 34); - - return key; - } - } - - /// - /// Name: System.Music.IsCompilation -- PKEY_Music_IsCompilation - /// Description: Indicates whether the file is part of a compilation. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {C449D5CB-9EA4-4809-82E8-AF9D59DED6D1}, 100 - /// - public static PropertyKey IsCompilation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C449D5CB-9EA4-4809-82E8-AF9D59DED6D1}"), 100); - - return key; - } - } - - /// - /// Name: System.Music.Lyrics -- PKEY_Music_Lyrics - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 12 (PIDSI_MUSIC_LYRICS) - /// - public static PropertyKey Lyrics - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 12); - - return key; - } - } - - /// - /// Name: System.Music.Mood -- PKEY_Music_Mood - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 39 (PIDSI_MUSIC_MOOD) - /// - public static PropertyKey Mood - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 39); - - return key; - } - } - - /// - /// Name: System.Music.PartOfSet -- PKEY_Music_PartOfSet - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 37 (PIDSI_MUSIC_PART_OF_SET) - /// - public static PropertyKey PartOfSet - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 37); - - return key; - } - } - - /// - /// Name: System.Music.Period -- PKEY_Music_Period - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 31 (PIDMSI_PERIOD) - /// - public static PropertyKey Period - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 31); - - return key; - } - } - - /// - /// Name: System.Music.SynchronizedLyrics -- PKEY_Music_SynchronizedLyrics - /// Description: - /// Type: Blob -- VT_BLOB - /// FormatID: {6B223B6A-162E-4AA9-B39F-05D678FC6D77}, 100 - /// - public static PropertyKey SynchronizedLyrics - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6B223B6A-162E-4AA9-B39F-05D678FC6D77}"), 100); - - return key; - } - } - - /// - /// Name: System.Music.TrackNumber -- PKEY_Music_TrackNumber - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_MUSIC) {56A3372E-CE9C-11D2-9F0E-006097C686F6}, 7 (PIDSI_MUSIC_TRACK) - /// - public static PropertyKey TrackNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{56A3372E-CE9C-11D2-9F0E-006097C686F6}"), 7); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Note Properties - /// - public static class Note - { - - - #region Properties - - /// - /// Name: System.Note.Color -- PKEY_Note_Color - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {4776CAFA-BCE4-4CB1-A23E-265E76D8EB11}, 100 - /// - public static PropertyKey Color - { - get - { - PropertyKey key = new PropertyKey(new Guid("{4776CAFA-BCE4-4CB1-A23E-265E76D8EB11}"), 100); - - return key; - } - } - - /// - /// Name: System.Note.ColorText -- PKEY_Note_ColorText - /// Description: This is the user-friendly form of System.Note.Color. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {46B4E8DE-CDB2-440D-885C-1658EB65B914}, 100 - /// - public static PropertyKey ColorText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{46B4E8DE-CDB2-440D-885C-1658EB65B914}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Photo Properties - /// - public static class Photo - { - - - #region Properties - - /// - /// Name: System.Photo.Aperture -- PKEY_Photo_Aperture - /// Description: PropertyTagExifAperture. Calculated from PKEY_Photo_ApertureNumerator and PKEY_Photo_ApertureDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37378 - /// - public static PropertyKey Aperture - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37378); - - return key; - } - } - - /// - /// Name: System.Photo.ApertureDenominator -- PKEY_Photo_ApertureDenominator - /// Description: Denominator of PKEY_Photo_Aperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {E1A9A38B-6685-46BD-875E-570DC7AD7320}, 100 - /// - public static PropertyKey ApertureDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E1A9A38B-6685-46BD-875E-570DC7AD7320}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ApertureNumerator -- PKEY_Photo_ApertureNumerator - /// Description: Numerator of PKEY_Photo_Aperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {0337ECEC-39FB-4581-A0BD-4C4CC51E9914}, 100 - /// - public static PropertyKey ApertureNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0337ECEC-39FB-4581-A0BD-4C4CC51E9914}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.Brightness -- PKEY_Photo_Brightness - /// Description: This is the brightness of the photo. - /// - ///Calculated from PKEY_Photo_BrightnessNumerator and PKEY_Photo_BrightnessDenominator. - /// - ///The units are "APEX", normally in the range of -99.99 to 99.99. If the numerator of - ///the recorded value is FFFFFFFF.H, "Unknown" should be indicated. - /// - /// Type: Double -- VT_R8 - /// FormatID: {1A701BF6-478C-4361-83AB-3701BB053C58}, 100 (PropertyTagExifBrightness) - /// - public static PropertyKey Brightness - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1A701BF6-478C-4361-83AB-3701BB053C58}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.BrightnessDenominator -- PKEY_Photo_BrightnessDenominator - /// Description: Denominator of PKEY_Photo_Brightness - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6EBE6946-2321-440A-90F0-C043EFD32476}, 100 - /// - public static PropertyKey BrightnessDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6EBE6946-2321-440A-90F0-C043EFD32476}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.BrightnessNumerator -- PKEY_Photo_BrightnessNumerator - /// Description: Numerator of PKEY_Photo_Brightness - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {9E7D118F-B314-45A0-8CFB-D654B917C9E9}, 100 - /// - public static PropertyKey BrightnessNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9E7D118F-B314-45A0-8CFB-D654B917C9E9}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.CameraManufacturer -- PKEY_Photo_CameraManufacturer - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 271 (PropertyTagEquipMake) - /// - public static PropertyKey CameraManufacturer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 271); - - return key; - } - } - - /// - /// Name: System.Photo.CameraModel -- PKEY_Photo_CameraModel - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 272 (PropertyTagEquipModel) - /// - public static PropertyKey CameraModel - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 272); - - return key; - } - } - - /// - /// Name: System.Photo.CameraSerialNumber -- PKEY_Photo_CameraSerialNumber - /// Description: Serial number of camera that produced this photo - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 273 - /// - public static PropertyKey CameraSerialNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 273); - - return key; - } - } - - /// - /// Name: System.Photo.Contrast -- PKEY_Photo_Contrast - /// Description: This indicates the direction of contrast processing applied by the camera - ///when the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {2A785BA9-8D23-4DED-82E6-60A350C86A10}, 100 - /// - public static PropertyKey Contrast - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2A785BA9-8D23-4DED-82E6-60A350C86A10}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ContrastText -- PKEY_Photo_ContrastText - /// Description: This is the user-friendly form of System.Photo.Contrast. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {59DDE9F2-5253-40EA-9A8B-479E96C6249A}, 100 - /// - public static PropertyKey ContrastText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{59DDE9F2-5253-40EA-9A8B-479E96C6249A}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.DateTaken -- PKEY_Photo_DateTaken - /// Description: PropertyTagExifDTOrig - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 36867 - /// - public static PropertyKey DateTaken - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 36867); - - return key; - } - } - - /// - /// Name: System.Photo.DigitalZoom -- PKEY_Photo_DigitalZoom - /// Description: PropertyTagExifDigitalZoom. Calculated from PKEY_Photo_DigitalZoomNumerator and PKEY_Photo_DigitalZoomDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {F85BF840-A925-4BC2-B0C4-8E36B598679E}, 100 - /// - public static PropertyKey DigitalZoom - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F85BF840-A925-4BC2-B0C4-8E36B598679E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.DigitalZoomDenominator -- PKEY_Photo_DigitalZoomDenominator - /// Description: Denominator of PKEY_Photo_DigitalZoom - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {745BAF0E-E5C1-4CFB-8A1B-D031A0A52393}, 100 - /// - public static PropertyKey DigitalZoomDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{745BAF0E-E5C1-4CFB-8A1B-D031A0A52393}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.DigitalZoomNumerator -- PKEY_Photo_DigitalZoomNumerator - /// Description: Numerator of PKEY_Photo_DigitalZoom - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {16CBB924-6500-473B-A5BE-F1599BCBE413}, 100 - /// - public static PropertyKey DigitalZoomNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{16CBB924-6500-473B-A5BE-F1599BCBE413}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.Event -- PKEY_Photo_Event - /// Description: The event at which the photo was taken - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 18248 - /// - public static PropertyKey Event - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 18248); - - return key; - } - } - - /// - /// Name: System.Photo.EXIFVersion -- PKEY_Photo_EXIFVersion - /// Description: The EXIF version. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D35F743A-EB2E-47F2-A286-844132CB1427}, 100 - /// - public static PropertyKey EXIFVersion - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D35F743A-EB2E-47F2-A286-844132CB1427}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureBias -- PKEY_Photo_ExposureBias - /// Description: PropertyTagExifExposureBias. Calculated from PKEY_Photo_ExposureBiasNumerator and PKEY_Photo_ExposureBiasDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37380 - /// - public static PropertyKey ExposureBias - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37380); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureBiasDenominator -- PKEY_Photo_ExposureBiasDenominator - /// Description: Denominator of PKEY_Photo_ExposureBias - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {AB205E50-04B7-461C-A18C-2F233836E627}, 100 - /// - public static PropertyKey ExposureBiasDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AB205E50-04B7-461C-A18C-2F233836E627}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureBiasNumerator -- PKEY_Photo_ExposureBiasNumerator - /// Description: Numerator of PKEY_Photo_ExposureBias - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {738BF284-1D87-420B-92CF-5834BF6EF9ED}, 100 - /// - public static PropertyKey ExposureBiasNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{738BF284-1D87-420B-92CF-5834BF6EF9ED}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureIndex -- PKEY_Photo_ExposureIndex - /// Description: PropertyTagExifExposureIndex. Calculated from PKEY_Photo_ExposureIndexNumerator and PKEY_Photo_ExposureIndexDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {967B5AF8-995A-46ED-9E11-35B3C5B9782D}, 100 - /// - public static PropertyKey ExposureIndex - { - get - { - PropertyKey key = new PropertyKey(new Guid("{967B5AF8-995A-46ED-9E11-35B3C5B9782D}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureIndexDenominator -- PKEY_Photo_ExposureIndexDenominator - /// Description: Denominator of PKEY_Photo_ExposureIndex - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {93112F89-C28B-492F-8A9D-4BE2062CEE8A}, 100 - /// - public static PropertyKey ExposureIndexDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{93112F89-C28B-492F-8A9D-4BE2062CEE8A}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureIndexNumerator -- PKEY_Photo_ExposureIndexNumerator - /// Description: Numerator of PKEY_Photo_ExposureIndex - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89}, 100 - /// - public static PropertyKey ExposureIndexNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CDEDCF30-8919-44DF-8F4C-4EB2FFDB8D89}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureProgram -- PKEY_Photo_ExposureProgram - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 34850 (PropertyTagExifExposureProg) - /// - public static PropertyKey ExposureProgram - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 34850); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureProgramText -- PKEY_Photo_ExposureProgramText - /// Description: This is the user-friendly form of System.Photo.ExposureProgram. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FEC690B7-5F30-4646-AE47-4CAAFBA884A3}, 100 - /// - public static PropertyKey ExposureProgramText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FEC690B7-5F30-4646-AE47-4CAAFBA884A3}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureTime -- PKEY_Photo_ExposureTime - /// Description: PropertyTagExifExposureTime. Calculated from PKEY_Photo_ExposureTimeNumerator and PKEY_Photo_ExposureTimeDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 33434 - /// - public static PropertyKey ExposureTime - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 33434); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureTimeDenominator -- PKEY_Photo_ExposureTimeDenominator - /// Description: Denominator of PKEY_Photo_ExposureTime - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {55E98597-AD16-42E0-B624-21599A199838}, 100 - /// - public static PropertyKey ExposureTimeDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{55E98597-AD16-42E0-B624-21599A199838}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ExposureTimeNumerator -- PKEY_Photo_ExposureTimeNumerator - /// Description: Numerator of PKEY_Photo_ExposureTime - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {257E44E2-9031-4323-AC38-85C552871B2E}, 100 - /// - public static PropertyKey ExposureTimeNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{257E44E2-9031-4323-AC38-85C552871B2E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.Flash -- PKEY_Photo_Flash - /// Description: PropertyTagExifFlash - /// - /// Type: Byte -- VT_UI1 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37385 - /// - public static PropertyKey Flash - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37385); - - return key; - } - } - - /// - /// Name: System.Photo.FlashEnergy -- PKEY_Photo_FlashEnergy - /// Description: PropertyTagExifFlashEnergy. Calculated from PKEY_Photo_FlashEnergyNumerator and PKEY_Photo_FlashEnergyDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 41483 - /// - public static PropertyKey FlashEnergy - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 41483); - - return key; - } - } - - /// - /// Name: System.Photo.FlashEnergyDenominator -- PKEY_Photo_FlashEnergyDenominator - /// Description: Denominator of PKEY_Photo_FlashEnergy - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {D7B61C70-6323-49CD-A5FC-C84277162C97}, 100 - /// - public static PropertyKey FlashEnergyDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D7B61C70-6323-49CD-A5FC-C84277162C97}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FlashEnergyNumerator -- PKEY_Photo_FlashEnergyNumerator - /// Description: Numerator of PKEY_Photo_FlashEnergy - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC}, 100 - /// - public static PropertyKey FlashEnergyNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FCAD3D3D-0858-400F-AAA3-2F66CCE2A6BC}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FlashManufacturer -- PKEY_Photo_FlashManufacturer - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {AABAF6C9-E0C5-4719-8585-57B103E584FE}, 100 - /// - public static PropertyKey FlashManufacturer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{AABAF6C9-E0C5-4719-8585-57B103E584FE}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FlashModel -- PKEY_Photo_FlashModel - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {FE83BB35-4D1A-42E2-916B-06F3E1AF719E}, 100 - /// - public static PropertyKey FlashModel - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FE83BB35-4D1A-42E2-916B-06F3E1AF719E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FlashText -- PKEY_Photo_FlashText - /// Description: This is the user-friendly form of System.Photo.Flash. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6B8B68F6-200B-47EA-8D25-D8050F57339F}, 100 - /// - public static PropertyKey FlashText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6B8B68F6-200B-47EA-8D25-D8050F57339F}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FNumber -- PKEY_Photo_FNumber - /// Description: PropertyTagExifFNumber. Calculated from PKEY_Photo_FNumberNumerator and PKEY_Photo_FNumberDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 33437 - /// - public static PropertyKey FNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 33437); - - return key; - } - } - - /// - /// Name: System.Photo.FNumberDenominator -- PKEY_Photo_FNumberDenominator - /// Description: Denominator of PKEY_Photo_FNumber - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {E92A2496-223B-4463-A4E3-30EABBA79D80}, 100 - /// - public static PropertyKey FNumberDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E92A2496-223B-4463-A4E3-30EABBA79D80}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FNumberNumerator -- PKEY_Photo_FNumberNumerator - /// Description: Numerator of PKEY_Photo_FNumber - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {1B97738A-FDFC-462F-9D93-1957E08BE90C}, 100 - /// - public static PropertyKey FNumberNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1B97738A-FDFC-462F-9D93-1957E08BE90C}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalLength -- PKEY_Photo_FocalLength - /// Description: PropertyTagExifFocalLength. Calculated from PKEY_Photo_FocalLengthNumerator and PKEY_Photo_FocalLengthDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37386 - /// - public static PropertyKey FocalLength - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37386); - - return key; - } - } - - /// - /// Name: System.Photo.FocalLengthDenominator -- PKEY_Photo_FocalLengthDenominator - /// Description: Denominator of PKEY_Photo_FocalLength - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {305BC615-DCA1-44A5-9FD4-10C0BA79412E}, 100 - /// - public static PropertyKey FocalLengthDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{305BC615-DCA1-44A5-9FD4-10C0BA79412E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalLengthInFilm -- PKEY_Photo_FocalLengthInFilm - /// Description: - /// Type: UInt16 -- VT_UI2 - /// FormatID: {A0E74609-B84D-4F49-B860-462BD9971F98}, 100 - /// - public static PropertyKey FocalLengthInFilm - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A0E74609-B84D-4F49-B860-462BD9971F98}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalLengthNumerator -- PKEY_Photo_FocalLengthNumerator - /// Description: Numerator of PKEY_Photo_FocalLength - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A}, 100 - /// - public static PropertyKey FocalLengthNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{776B6B3B-1E3D-4B0C-9A0E-8FBAF2A8492A}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalPlaneXResolution -- PKEY_Photo_FocalPlaneXResolution - /// Description: PropertyTagExifFocalXRes. Calculated from PKEY_Photo_FocalPlaneXResolutionNumerator and - ///PKEY_Photo_FocalPlaneXResolutionDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {CFC08D97-C6F7-4484-89DD-EBEF4356FE76}, 100 - /// - public static PropertyKey FocalPlaneXResolution - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CFC08D97-C6F7-4484-89DD-EBEF4356FE76}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalPlaneXResolutionDenominator -- PKEY_Photo_FocalPlaneXResolutionDenominator - /// Description: Denominator of PKEY_Photo_FocalPlaneXResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {0933F3F5-4786-4F46-A8E8-D64DD37FA521}, 100 - /// - public static PropertyKey FocalPlaneXResolutionDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0933F3F5-4786-4F46-A8E8-D64DD37FA521}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalPlaneXResolutionNumerator -- PKEY_Photo_FocalPlaneXResolutionNumerator - /// Description: Numerator of PKEY_Photo_FocalPlaneXResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {DCCB10AF-B4E2-4B88-95F9-031B4D5AB490}, 100 - /// - public static PropertyKey FocalPlaneXResolutionNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DCCB10AF-B4E2-4B88-95F9-031B4D5AB490}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalPlaneYResolution -- PKEY_Photo_FocalPlaneYResolution - /// Description: PropertyTagExifFocalYRes. Calculated from PKEY_Photo_FocalPlaneYResolutionNumerator and - ///PKEY_Photo_FocalPlaneYResolutionDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1}, 100 - /// - public static PropertyKey FocalPlaneYResolution - { - get - { - PropertyKey key = new PropertyKey(new Guid("{4FFFE4D0-914F-4AC4-8D6F-C9C61DE169B1}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalPlaneYResolutionDenominator -- PKEY_Photo_FocalPlaneYResolutionDenominator - /// Description: Denominator of PKEY_Photo_FocalPlaneYResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {1D6179A6-A876-4031-B013-3347B2B64DC8}, 100 - /// - public static PropertyKey FocalPlaneYResolutionDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1D6179A6-A876-4031-B013-3347B2B64DC8}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.FocalPlaneYResolutionNumerator -- PKEY_Photo_FocalPlaneYResolutionNumerator - /// Description: Numerator of PKEY_Photo_FocalPlaneYResolution - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {A2E541C5-4440-4BA8-867E-75CFC06828CD}, 100 - /// - public static PropertyKey FocalPlaneYResolutionNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A2E541C5-4440-4BA8-867E-75CFC06828CD}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.GainControl -- PKEY_Photo_GainControl - /// Description: This indicates the degree of overall image gain adjustment. - /// - ///Calculated from PKEY_Photo_GainControlNumerator and PKEY_Photo_GainControlDenominator. - /// - /// Type: Double -- VT_R8 - /// FormatID: {FA304789-00C7-4D80-904A-1E4DCC7265AA}, 100 (PropertyTagExifGainControl) - /// - public static PropertyKey GainControl - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FA304789-00C7-4D80-904A-1E4DCC7265AA}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.GainControlDenominator -- PKEY_Photo_GainControlDenominator - /// Description: Denominator of PKEY_Photo_GainControl - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {42864DFD-9DA4-4F77-BDED-4AAD7B256735}, 100 - /// - public static PropertyKey GainControlDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{42864DFD-9DA4-4F77-BDED-4AAD7B256735}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.GainControlNumerator -- PKEY_Photo_GainControlNumerator - /// Description: Numerator of PKEY_Photo_GainControl - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E}, 100 - /// - public static PropertyKey GainControlNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8E8ECF7C-B7B8-4EB8-A63F-0EE715C96F9E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.GainControlText -- PKEY_Photo_GainControlText - /// Description: This is the user-friendly form of System.Photo.GainControl. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C06238B2-0BF9-4279-A723-25856715CB9D}, 100 - /// - public static PropertyKey GainControlText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C06238B2-0BF9-4279-A723-25856715CB9D}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ISOSpeed -- PKEY_Photo_ISOSpeed - /// Description: PropertyTagExifISOSpeed - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 34855 - /// - public static PropertyKey ISOSpeed - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 34855); - - return key; - } - } - - /// - /// Name: System.Photo.LensManufacturer -- PKEY_Photo_LensManufacturer - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E6DDCAF7-29C5-4F0A-9A68-D19412EC7090}, 100 - /// - public static PropertyKey LensManufacturer - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E6DDCAF7-29C5-4F0A-9A68-D19412EC7090}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.LensModel -- PKEY_Photo_LensModel - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {E1277516-2B5F-4869-89B1-2E585BD38B7A}, 100 - /// - public static PropertyKey LensModel - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E1277516-2B5F-4869-89B1-2E585BD38B7A}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.LightSource -- PKEY_Photo_LightSource - /// Description: PropertyTagExifLightSource - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37384 - /// - public static PropertyKey LightSource - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37384); - - return key; - } - } - - /// - /// Name: System.Photo.MakerNote -- PKEY_Photo_MakerNote - /// Description: - /// Type: Buffer -- VT_VECTOR | VT_UI1 (For variants: VT_ARRAY | VT_UI1) - /// FormatID: {FA303353-B659-4052-85E9-BCAC79549B84}, 100 - /// - public static PropertyKey MakerNote - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FA303353-B659-4052-85E9-BCAC79549B84}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.MakerNoteOffset -- PKEY_Photo_MakerNoteOffset - /// Description: - /// Type: UInt64 -- VT_UI8 - /// FormatID: {813F4124-34E6-4D17-AB3E-6B1F3C2247A1}, 100 - /// - public static PropertyKey MakerNoteOffset - { - get - { - PropertyKey key = new PropertyKey(new Guid("{813F4124-34E6-4D17-AB3E-6B1F3C2247A1}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.MaxAperture -- PKEY_Photo_MaxAperture - /// Description: Calculated from PKEY_Photo_MaxApertureNumerator and PKEY_Photo_MaxApertureDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: {08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E}, 100 - /// - public static PropertyKey MaxAperture - { - get - { - PropertyKey key = new PropertyKey(new Guid("{08F6D7C2-E3F2-44FC-AF1E-5AA5C81A2D3E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.MaxApertureDenominator -- PKEY_Photo_MaxApertureDenominator - /// Description: Denominator of PKEY_Photo_MaxAperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {C77724D4-601F-46C5-9B89-C53F93BCEB77}, 100 - /// - public static PropertyKey MaxApertureDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C77724D4-601F-46C5-9B89-C53F93BCEB77}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.MaxApertureNumerator -- PKEY_Photo_MaxApertureNumerator - /// Description: Numerator of PKEY_Photo_MaxAperture - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {C107E191-A459-44C5-9AE6-B952AD4B906D}, 100 - /// - public static PropertyKey MaxApertureNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C107E191-A459-44C5-9AE6-B952AD4B906D}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.MeteringMode -- PKEY_Photo_MeteringMode - /// Description: PropertyTagExifMeteringMode - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37383 - /// - public static PropertyKey MeteringMode - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37383); - - return key; - } - } - - /// - /// Name: System.Photo.MeteringModeText -- PKEY_Photo_MeteringModeText - /// Description: This is the user-friendly form of System.Photo.MeteringMode. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {F628FD8C-7BA8-465A-A65B-C5AA79263A9E}, 100 - /// - public static PropertyKey MeteringModeText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F628FD8C-7BA8-465A-A65B-C5AA79263A9E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.Orientation -- PKEY_Photo_Orientation - /// Description: This is the image orientation viewed in terms of rows and columns. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 274 (PropertyTagOrientation) - /// - public static PropertyKey Orientation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 274); - - return key; - } - } - - /// - /// Name: System.Photo.OrientationText -- PKEY_Photo_OrientationText - /// Description: This is the user-friendly form of System.Photo.Orientation. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A9EA193C-C511-498A-A06B-58E2776DCC28}, 100 - /// - public static PropertyKey OrientationText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A9EA193C-C511-498A-A06B-58E2776DCC28}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.PeopleNames -- PKEY_Photo_PeopleNames - /// Description: The people tags on an image. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: {E8309B6E-084C-49B4-B1FC-90A80331B638}, 100 - /// - public static PropertyKey PeopleNames - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E8309B6E-084C-49B4-B1FC-90A80331B638}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.PhotometricInterpretation -- PKEY_Photo_PhotometricInterpretation - /// Description: This is the pixel composition. In JPEG compressed data, a JPEG marker is used - ///instead of this property. - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: {341796F1-1DF9-4B1C-A564-91BDEFA43877}, 100 - /// - public static PropertyKey PhotometricInterpretation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{341796F1-1DF9-4B1C-A564-91BDEFA43877}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.PhotometricInterpretationText -- PKEY_Photo_PhotometricInterpretationText - /// Description: This is the user-friendly form of System.Photo.PhotometricInterpretation. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {821437D6-9EAB-4765-A589-3B1CBBD22A61}, 100 - /// - public static PropertyKey PhotometricInterpretationText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{821437D6-9EAB-4765-A589-3B1CBBD22A61}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ProgramMode -- PKEY_Photo_ProgramMode - /// Description: This is the class of the program used by the camera to set exposure when the - ///picture is taken. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6D217F6D-3F6A-4825-B470-5F03CA2FBE9B}, 100 - /// - public static PropertyKey ProgramMode - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D217F6D-3F6A-4825-B470-5F03CA2FBE9B}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ProgramModeText -- PKEY_Photo_ProgramModeText - /// Description: This is the user-friendly form of System.Photo.ProgramMode. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7FE3AA27-2648-42F3-89B0-454E5CB150C3}, 100 - /// - public static PropertyKey ProgramModeText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7FE3AA27-2648-42F3-89B0-454E5CB150C3}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.RelatedSoundFile -- PKEY_Photo_RelatedSoundFile - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {318A6B45-087F-4DC2-B8CC-05359551FC9E}, 100 - /// - public static PropertyKey RelatedSoundFile - { - get - { - PropertyKey key = new PropertyKey(new Guid("{318A6B45-087F-4DC2-B8CC-05359551FC9E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.Saturation -- PKEY_Photo_Saturation - /// Description: This indicates the direction of saturation processing applied by the camera when - ///the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {49237325-A95A-4F67-B211-816B2D45D2E0}, 100 - /// - public static PropertyKey Saturation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49237325-A95A-4F67-B211-816B2D45D2E0}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.SaturationText -- PKEY_Photo_SaturationText - /// Description: This is the user-friendly form of System.Photo.Saturation. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {61478C08-B600-4A84-BBE4-E99C45F0A072}, 100 - /// - public static PropertyKey SaturationText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{61478C08-B600-4A84-BBE4-E99C45F0A072}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.Sharpness -- PKEY_Photo_Sharpness - /// Description: This indicates the direction of sharpness processing applied by the camera when - ///the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {FC6976DB-8349-4970-AE97-B3C5316A08F0}, 100 - /// - public static PropertyKey Sharpness - { - get - { - PropertyKey key = new PropertyKey(new Guid("{FC6976DB-8349-4970-AE97-B3C5316A08F0}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.SharpnessText -- PKEY_Photo_SharpnessText - /// Description: This is the user-friendly form of System.Photo.Sharpness. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {51EC3F47-DD50-421D-8769-334F50424B1E}, 100 - /// - public static PropertyKey SharpnessText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{51EC3F47-DD50-421D-8769-334F50424B1E}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ShutterSpeed -- PKEY_Photo_ShutterSpeed - /// Description: PropertyTagExifShutterSpeed. Calculated from PKEY_Photo_ShutterSpeedNumerator and PKEY_Photo_ShutterSpeedDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37377 - /// - public static PropertyKey ShutterSpeed - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37377); - - return key; - } - } - - /// - /// Name: System.Photo.ShutterSpeedDenominator -- PKEY_Photo_ShutterSpeedDenominator - /// Description: Denominator of PKEY_Photo_ShutterSpeed - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {E13D8975-81C7-4948-AE3F-37CAE11E8FF7}, 100 - /// - public static PropertyKey ShutterSpeedDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E13D8975-81C7-4948-AE3F-37CAE11E8FF7}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.ShutterSpeedNumerator -- PKEY_Photo_ShutterSpeedNumerator - /// Description: Numerator of PKEY_Photo_ShutterSpeed - /// - /// Type: Int32 -- VT_I4 - /// FormatID: {16EA4042-D6F4-4BCA-8349-7C78D30FB333}, 100 - /// - public static PropertyKey ShutterSpeedNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{16EA4042-D6F4-4BCA-8349-7C78D30FB333}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.SubjectDistance -- PKEY_Photo_SubjectDistance - /// Description: PropertyTagExifSubjectDist. Calculated from PKEY_Photo_SubjectDistanceNumerator and PKEY_Photo_SubjectDistanceDenominator - /// - /// Type: Double -- VT_R8 - /// FormatID: (FMTID_ImageProperties) {14B81DA1-0135-4D31-96D9-6CBFC9671A99}, 37382 - /// - public static PropertyKey SubjectDistance - { - get - { - PropertyKey key = new PropertyKey(new Guid("{14B81DA1-0135-4D31-96D9-6CBFC9671A99}"), 37382); - - return key; - } - } - - /// - /// Name: System.Photo.SubjectDistanceDenominator -- PKEY_Photo_SubjectDistanceDenominator - /// Description: Denominator of PKEY_Photo_SubjectDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {0C840A88-B043-466D-9766-D4B26DA3FA77}, 100 - /// - public static PropertyKey SubjectDistanceDenominator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0C840A88-B043-466D-9766-D4B26DA3FA77}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.SubjectDistanceNumerator -- PKEY_Photo_SubjectDistanceNumerator - /// Description: Numerator of PKEY_Photo_SubjectDistance - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {8AF4961C-F526-43E5-AA81-DB768219178D}, 100 - /// - public static PropertyKey SubjectDistanceNumerator - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8AF4961C-F526-43E5-AA81-DB768219178D}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.TagViewAggregate -- PKEY_Photo_TagViewAggregate - /// Description: A read-only aggregation of tag-like properties for use in building views. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) Legacy code may treat this as VT_LPSTR. - /// FormatID: {B812F15D-C2D8-4BBF-BACD-79744346113F}, 100 - /// - public static PropertyKey TagViewAggregate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B812F15D-C2D8-4BBF-BACD-79744346113F}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.TranscodedForSync -- PKEY_Photo_TranscodedForSync - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {9A8EBB75-6458-4E82-BACB-35C0095B03BB}, 100 - /// - public static PropertyKey TranscodedForSync - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9A8EBB75-6458-4E82-BACB-35C0095B03BB}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.WhiteBalance -- PKEY_Photo_WhiteBalance - /// Description: This indicates the white balance mode set when the image was shot. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9}, 100 - /// - public static PropertyKey WhiteBalance - { - get - { - PropertyKey key = new PropertyKey(new Guid("{EE3D3D8A-5381-4CFA-B13B-AAF66B5F4EC9}"), 100); - - return key; - } - } - - /// - /// Name: System.Photo.WhiteBalanceText -- PKEY_Photo_WhiteBalanceText - /// Description: This is the user-friendly form of System.Photo.WhiteBalance. Not intended to be parsed - ///programmatically. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6336B95E-C7A7-426D-86FD-7AE3D39C84B4}, 100 - /// - public static PropertyKey WhiteBalanceText - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6336B95E-C7A7-426D-86FD-7AE3D39C84B4}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// PropGroup Properties - /// - public static class PropGroup - { - - - #region Properties - - /// - /// Name: System.PropGroup.Advanced -- PKEY_PropGroup_Advanced - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {900A403B-097B-4B95-8AE2-071FDAEEB118}, 100 - /// - public static PropertyKey Advanced - { - get - { - PropertyKey key = new PropertyKey(new Guid("{900A403B-097B-4B95-8AE2-071FDAEEB118}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Audio -- PKEY_PropGroup_Audio - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {2804D469-788F-48AA-8570-71B9C187E138}, 100 - /// - public static PropertyKey Audio - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2804D469-788F-48AA-8570-71B9C187E138}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Calendar -- PKEY_PropGroup_Calendar - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {9973D2B5-BFD8-438A-BA94-5349B293181A}, 100 - /// - public static PropertyKey Calendar - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9973D2B5-BFD8-438A-BA94-5349B293181A}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Camera -- PKEY_PropGroup_Camera - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {DE00DE32-547E-4981-AD4B-542F2E9007D8}, 100 - /// - public static PropertyKey Camera - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DE00DE32-547E-4981-AD4B-542F2E9007D8}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Contact -- PKEY_PropGroup_Contact - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {DF975FD3-250A-4004-858F-34E29A3E37AA}, 100 - /// - public static PropertyKey Contact - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DF975FD3-250A-4004-858F-34E29A3E37AA}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Content -- PKEY_PropGroup_Content - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {D0DAB0BA-368A-4050-A882-6C010FD19A4F}, 100 - /// - public static PropertyKey Content - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D0DAB0BA-368A-4050-A882-6C010FD19A4F}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Description -- PKEY_PropGroup_Description - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {8969B275-9475-4E00-A887-FF93B8B41E44}, 100 - /// - public static PropertyKey Description - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8969B275-9475-4E00-A887-FF93B8B41E44}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.FileSystem -- PKEY_PropGroup_FileSystem - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E}, 100 - /// - public static PropertyKey FileSystem - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3A7D2C1-80FC-4B40-8F34-30EA111BDC2E}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.General -- PKEY_PropGroup_General - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {CC301630-B192-4C22-B372-9F4C6D338E07}, 100 - /// - public static PropertyKey General - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CC301630-B192-4C22-B372-9F4C6D338E07}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.GPS -- PKEY_PropGroup_GPS - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {F3713ADA-90E3-4E11-AAE5-FDC17685B9BE}, 100 - /// - public static PropertyKey GPS - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F3713ADA-90E3-4E11-AAE5-FDC17685B9BE}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Image -- PKEY_PropGroup_Image - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {E3690A87-0FA8-4A2A-9A9F-FCE8827055AC}, 100 - /// - public static PropertyKey Image - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E3690A87-0FA8-4A2A-9A9F-FCE8827055AC}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Media -- PKEY_PropGroup_Media - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {61872CF7-6B5E-4B4B-AC2D-59DA84459248}, 100 - /// - public static PropertyKey Media - { - get - { - PropertyKey key = new PropertyKey(new Guid("{61872CF7-6B5E-4B4B-AC2D-59DA84459248}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.MediaAdvanced -- PKEY_PropGroup_MediaAdvanced - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {8859A284-DE7E-4642-99BA-D431D044B1EC}, 100 - /// - public static PropertyKey MediaAdvanced - { - get - { - PropertyKey key = new PropertyKey(new Guid("{8859A284-DE7E-4642-99BA-D431D044B1EC}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Message -- PKEY_PropGroup_Message - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {7FD7259D-16B4-4135-9F97-7C96ECD2FA9E}, 100 - /// - public static PropertyKey Message - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7FD7259D-16B4-4135-9F97-7C96ECD2FA9E}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Music -- PKEY_PropGroup_Music - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {68DD6094-7216-40F1-A029-43FE7127043F}, 100 - /// - public static PropertyKey Music - { - get - { - PropertyKey key = new PropertyKey(new Guid("{68DD6094-7216-40F1-A029-43FE7127043F}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Origin -- PKEY_PropGroup_Origin - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {2598D2FB-5569-4367-95DF-5CD3A177E1A5}, 100 - /// - public static PropertyKey Origin - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2598D2FB-5569-4367-95DF-5CD3A177E1A5}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.PhotoAdvanced -- PKEY_PropGroup_PhotoAdvanced - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF}, 100 - /// - public static PropertyKey PhotoAdvanced - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CB2BF5A-9EE7-4A86-8222-F01E07FDADAF}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.RecordedTV -- PKEY_PropGroup_RecordedTV - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {E7B33238-6584-4170-A5C0-AC25EFD9DA56}, 100 - /// - public static PropertyKey RecordedTV - { - get - { - PropertyKey key = new PropertyKey(new Guid("{E7B33238-6584-4170-A5C0-AC25EFD9DA56}"), 100); - - return key; - } - } - - /// - /// Name: System.PropGroup.Video -- PKEY_PropGroup_Video - /// Description: - /// Type: Null -- VT_NULL - /// FormatID: {BEBE0920-7671-4C54-A3EB-49FDDFC191EE}, 100 - /// - public static PropertyKey Video - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BEBE0920-7671-4C54-A3EB-49FDDFC191EE}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// PropList Properties - /// - public static class PropList - { - - - #region Properties - - /// - /// Name: System.PropList.ConflictPrompt -- PKEY_PropList_ConflictPrompt - /// Description: The list of properties to show in the file operation conflict resolution dialog. Properties with empty - ///values will not be displayed. Register under the regvalue of "ConflictPrompt". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 11 - /// - public static PropertyKey ConflictPrompt - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 11); - - return key; - } - } - - /// - /// Name: System.PropList.ContentViewModeForBrowse -- PKEY_PropList_ContentViewModeForBrowse - /// Description: The list of properties to show in the content view mode of an item in the context of browsing. - ///Register the regvalue under the name of "ContentViewModeForBrowse". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 13 - /// - public static PropertyKey ContentViewModeForBrowse - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 13); - - return key; - } - } - - /// - /// Name: System.PropList.ContentViewModeForSearch -- PKEY_PropList_ContentViewModeForSearch - /// Description: The list of properties to show in the content view mode of an item in the context of searching. - ///Register the regvalue under the name of "ContentViewModeForSearch". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 14 - /// - public static PropertyKey ContentViewModeForSearch - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 14); - - return key; - } - } - - /// - /// Name: System.PropList.ExtendedTileInfo -- PKEY_PropList_ExtendedTileInfo - /// Description: The list of properties to show in the listview on extended tiles. Register under the regvalue of - ///"ExtendedTileInfo". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 9 - /// - public static PropertyKey ExtendedTileInfo - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 9); - - return key; - } - } - - /// - /// Name: System.PropList.FileOperationPrompt -- PKEY_PropList_FileOperationPrompt - /// Description: The list of properties to show in the file operation confirmation dialog. Properties with empty values - ///will not be displayed. If this list is not specified, then the InfoTip property list is used instead. - ///Register under the regvalue of "FileOperationPrompt". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 10 - /// - public static PropertyKey FileOperationPrompt - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 10); - - return key; - } - } - - /// - /// Name: System.PropList.FullDetails -- PKEY_PropList_FullDetails - /// Description: The list of all the properties to show in the details page. Property groups can be included in this list - ///in order to more easily organize the UI. Register under the regvalue of "FullDetails". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 2 - /// - public static PropertyKey FullDetails - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 2); - - return key; - } - } - - /// - /// Name: System.PropList.InfoTip -- PKEY_PropList_InfoTip - /// Description: The list of properties to show in the infotip. Properties with empty values will not be displayed. Register - ///under the regvalue of "InfoTip". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 4 (PID_PROPLIST_INFOTIP) - /// - public static PropertyKey InfoTip - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 4); - - return key; - } - } - - /// - /// Name: System.PropList.NonPersonal -- PKEY_PropList_NonPersonal - /// Description: The list of properties that are considered 'non-personal'. When told to remove all non-personal properties - ///from a given file, the system will leave these particular properties untouched. Register under the regvalue - ///of "NonPersonal". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {49D1091F-082E-493F-B23F-D2308AA9668C}, 100 - /// - public static PropertyKey NonPersonal - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49D1091F-082E-493F-B23F-D2308AA9668C}"), 100); - - return key; - } - } - - /// - /// Name: System.PropList.PreviewDetails -- PKEY_PropList_PreviewDetails - /// Description: The list of properties to display in the preview pane. Register under the regvalue of "PreviewDetails". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 8 - /// - public static PropertyKey PreviewDetails - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 8); - - return key; - } - } - - /// - /// Name: System.PropList.PreviewTitle -- PKEY_PropList_PreviewTitle - /// Description: The one or two properties to display in the preview pane title section. The optional second property is - ///displayed as a subtitle. Register under the regvalue of "PreviewTitle". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 6 - /// - public static PropertyKey PreviewTitle - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 6); - - return key; - } - } - - /// - /// Name: System.PropList.QuickTip -- PKEY_PropList_QuickTip - /// Description: The list of properties to show in the infotip when the item is on a slow network. Properties with empty - ///values will not be displayed. Register under the regvalue of "QuickTip". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 5 (PID_PROPLIST_QUICKTIP) - /// - public static PropertyKey QuickTip - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 5); - - return key; - } - } - - /// - /// Name: System.PropList.TileInfo -- PKEY_PropList_TileInfo - /// Description: The list of properties to show in the listview on tiles. Register under the regvalue of "TileInfo". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {C9944A21-A406-48FE-8225-AEC7E24C211B}, 3 (PID_PROPLIST_TILEINFO) - /// - public static PropertyKey TileInfo - { - get - { - PropertyKey key = new PropertyKey(new Guid("{C9944A21-A406-48FE-8225-AEC7E24C211B}"), 3); - - return key; - } - } - - /// - /// Name: System.PropList.XPDetailsPanel -- PKEY_PropList_XPDetailsPanel - /// Description: The list of properties to display in the XP webview details panel. Obsolete. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_WebView) {F2275480-F782-4291-BD94-F13693513AEC}, 0 (PID_DISPLAY_PROPERTIES) - /// - public static PropertyKey XPDetailsPanel - { - get - { - PropertyKey key = new PropertyKey(new Guid("{F2275480-F782-4291-BD94-F13693513AEC}"), 0); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// RecordedTV Properties - /// - public static class RecordedTV - { - - - #region Properties - - /// - /// Name: System.RecordedTV.ChannelNumber -- PKEY_RecordedTV_ChannelNumber - /// Description: Example: 42 - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 7 - /// - public static PropertyKey ChannelNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 7); - - return key; - } - } - - /// - /// Name: System.RecordedTV.Credits -- PKEY_RecordedTV_Credits - /// Description: Example: "Don Messick/Frank Welker/Casey Kasem/Heather North/Nicole Jaffe;;;" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 4 - /// - public static PropertyKey Credits - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 4); - - return key; - } - } - - /// - /// Name: System.RecordedTV.DateContentExpires -- PKEY_RecordedTV_DateContentExpires - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 15 - /// - public static PropertyKey DateContentExpires - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 15); - - return key; - } - } - - /// - /// Name: System.RecordedTV.EpisodeName -- PKEY_RecordedTV_EpisodeName - /// Description: Example: "Nowhere to Hyde" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 2 - /// - public static PropertyKey EpisodeName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 2); - - return key; - } - } - - /// - /// Name: System.RecordedTV.IsATSCContent -- PKEY_RecordedTV_IsATSCContent - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 16 - /// - public static PropertyKey IsATSCContent - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 16); - - return key; - } - } - - /// - /// Name: System.RecordedTV.IsClosedCaptioningAvailable -- PKEY_RecordedTV_IsClosedCaptioningAvailable - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 12 - /// - public static PropertyKey IsClosedCaptioningAvailable - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 12); - - return key; - } - } - - /// - /// Name: System.RecordedTV.IsDTVContent -- PKEY_RecordedTV_IsDTVContent - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 17 - /// - public static PropertyKey IsDTVContent - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 17); - - return key; - } - } - - /// - /// Name: System.RecordedTV.IsHDContent -- PKEY_RecordedTV_IsHDContent - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 18 - /// - public static PropertyKey IsHDContent - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 18); - - return key; - } - } - - /// - /// Name: System.RecordedTV.IsRepeatBroadcast -- PKEY_RecordedTV_IsRepeatBroadcast - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 13 - /// - public static PropertyKey IsRepeatBroadcast - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 13); - - return key; - } - } - - /// - /// Name: System.RecordedTV.IsSAP -- PKEY_RecordedTV_IsSAP - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 14 - /// - public static PropertyKey IsSAP - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 14); - - return key; - } - } - - /// - /// Name: System.RecordedTV.NetworkAffiliation -- PKEY_RecordedTV_NetworkAffiliation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {2C53C813-FB63-4E22-A1AB-0B331CA1E273}, 100 - /// - public static PropertyKey NetworkAffiliation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{2C53C813-FB63-4E22-A1AB-0B331CA1E273}"), 100); - - return key; - } - } - - /// - /// Name: System.RecordedTV.OriginalBroadcastDate -- PKEY_RecordedTV_OriginalBroadcastDate - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {4684FE97-8765-4842-9C13-F006447B178C}, 100 - /// - public static PropertyKey OriginalBroadcastDate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{4684FE97-8765-4842-9C13-F006447B178C}"), 100); - - return key; - } - } - - /// - /// Name: System.RecordedTV.ProgramDescription -- PKEY_RecordedTV_ProgramDescription - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 3 - /// - public static PropertyKey ProgramDescription - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 3); - - return key; - } - } - - /// - /// Name: System.RecordedTV.RecordingTime -- PKEY_RecordedTV_RecordingTime - /// Description: - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {A5477F61-7A82-4ECA-9DDE-98B69B2479B3}, 100 - /// - public static PropertyKey RecordingTime - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A5477F61-7A82-4ECA-9DDE-98B69B2479B3}"), 100); - - return key; - } - } - - /// - /// Name: System.RecordedTV.StationCallSign -- PKEY_RecordedTV_StationCallSign - /// Description: Example: "TOONP" - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {6D748DE2-8D38-4CC3-AC60-F009B057C557}, 5 - /// - public static PropertyKey StationCallSign - { - get - { - PropertyKey key = new PropertyKey(new Guid("{6D748DE2-8D38-4CC3-AC60-F009B057C557}"), 5); - - return key; - } - } - - /// - /// Name: System.RecordedTV.StationName -- PKEY_RecordedTV_StationName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493}, 100 - /// - public static PropertyKey StationName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{1B5439E7-EBA1-4AF8-BDD7-7AF1D4549493}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Search Properties - /// - public static class Search - { - - - #region Properties - - /// - /// Name: System.Search.AutoSummary -- PKEY_Search_AutoSummary - /// Description: General Summary of the document. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 2 - /// - public static PropertyKey AutoSummary - { - get - { - PropertyKey key = new PropertyKey(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 2); - - return key; - } - } - - /// - /// Name: System.Search.ContainerHash -- PKEY_Search_ContainerHash - /// Description: Hash code used to identify attachments to be deleted based on a common container url - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {BCEEE283-35DF-4D53-826A-F36A3EEFC6BE}, 100 - /// - public static PropertyKey ContainerHash - { - get - { - PropertyKey key = new PropertyKey(new Guid("{BCEEE283-35DF-4D53-826A-F36A3EEFC6BE}"), 100); - - return key; - } - } - - /// - /// Name: System.Search.Contents -- PKEY_Search_Contents - /// Description: The contents of the item. This property is for query restrictions only; it cannot be retrieved in a - ///query result. The Indexing Service friendly name is 'contents'. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Storage) {B725F130-47EF-101A-A5F1-02608C9EEBAC}, 19 (PID_STG_CONTENTS) - /// - public static PropertyKey Contents - { - get - { - PropertyKey key = new PropertyKey(new Guid("{B725F130-47EF-101A-A5F1-02608C9EEBAC}"), 19); - - return key; - } - } - - /// - /// Name: System.Search.EntryID -- PKEY_Search_EntryID - /// Description: The entry ID for an item within a given catalog in the Windows Search Index. - ///This value may be recycled, and therefore is not considered unique over time. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 5 (PROPID_QUERY_WORKID) - /// - public static PropertyKey EntryID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 5); - - return key; - } - } - - /// - /// Name: System.Search.ExtendedProperties -- PKEY_Search_ExtendedProperties - /// Description: - /// Type: Blob -- VT_BLOB - /// FormatID: {7B03B546-FA4F-4A52-A2FE-03D5311E5865}, 100 - /// - public static PropertyKey ExtendedProperties - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7B03B546-FA4F-4A52-A2FE-03D5311E5865}"), 100); - - return key; - } - } - - /// - /// Name: System.Search.GatherTime -- PKEY_Search_GatherTime - /// Description: The Datetime that the Windows Search Gatherer process last pushed properties of this document to the Windows Search Gatherer Plugins. - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {0B63E350-9CCC-11D0-BCDB-00805FCCCE04}, 8 - /// - public static PropertyKey GatherTime - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0B63E350-9CCC-11D0-BCDB-00805FCCCE04}"), 8); - - return key; - } - } - - /// - /// Name: System.Search.HitCount -- PKEY_Search_HitCount - /// Description: When using CONTAINS over the Windows Search Index, this is the number of matches of the term. - ///If there are multiple CONTAINS, an AND computes the min number of hits and an OR the max number of hits. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 4 (PROPID_QUERY_HITCOUNT) - /// - public static PropertyKey HitCount - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 4); - - return key; - } - } - - /// - /// Name: System.Search.IsClosedDirectory -- PKEY_Search_IsClosedDirectory - /// Description: If this property is emitted with a value of TRUE, then it indicates that this URL's last modified time applies to all of it's children, and if this URL is deleted then all of it's children are deleted as well. For example, this would be emitted as TRUE when emitting the URL of an email so that all attachments are tied to the last modified time of that email. - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 23 - /// - public static PropertyKey IsClosedDirectory - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 23); - - return key; - } - } - - /// - /// Name: System.Search.IsFullyContained -- PKEY_Search_IsFullyContained - /// Description: Any child URL of a URL which has System.Search.IsClosedDirectory=TRUE must emit System.Search.IsFullyContained=TRUE. This ensures that the URL is not deleted at the end of a crawl because it hasn't been visited (which is the normal mechanism for detecting deletes). For example an email attachment would emit this property - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 24 - /// - public static PropertyKey IsFullyContained - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 24); - - return key; - } - } - - /// - /// Name: System.Search.QueryFocusedSummary -- PKEY_Search_QueryFocusedSummary - /// Description: Query Focused Summary of the document. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 3 - /// - public static PropertyKey QueryFocusedSummary - { - get - { - PropertyKey key = new PropertyKey(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 3); - - return key; - } - } - - /// - /// Name: System.Search.QueryFocusedSummaryWithFallback -- PKEY_Search_QueryFocusedSummaryWithFallback - /// Description: Query Focused Summary of the document, if none is available it returns the AutoSummary. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {560C36C0-503A-11CF-BAA1-00004C752A9A}, 4 - /// - public static PropertyKey QueryFocusedSummaryWithFallback - { - get - { - PropertyKey key = new PropertyKey(new Guid("{560C36C0-503A-11CF-BAA1-00004C752A9A}"), 4); - - return key; - } - } - - /// - /// Name: System.Search.Rank -- PKEY_Search_Rank - /// Description: Relevance rank of row. Ranges from 0-1000. Larger numbers = better matches. Query-time only. - /// - /// Type: Int32 -- VT_I4 - /// FormatID: (FMTID_Query) {49691C90-7E17-101A-A91C-08002B2ECDA9}, 3 (PROPID_QUERY_RANK) - /// - public static PropertyKey Rank - { - get - { - PropertyKey key = new PropertyKey(new Guid("{49691C90-7E17-101A-A91C-08002B2ECDA9}"), 3); - - return key; - } - } - - /// - /// Name: System.Search.Store -- PKEY_Search_Store - /// Description: The identifier for the protocol handler that produced this item. (E.g. MAPI, CSC, FILE etc.) - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {A06992B3-8CAF-4ED7-A547-B259E32AC9FC}, 100 - /// - public static PropertyKey Store - { - get - { - PropertyKey key = new PropertyKey(new Guid("{A06992B3-8CAF-4ED7-A547-B259E32AC9FC}"), 100); - - return key; - } - } - - /// - /// Name: System.Search.UrlToIndex -- PKEY_Search_UrlToIndex - /// Description: This property should be emitted by a container IFilter for each child URL within the container. The children will eventually be crawled by the indexer if they are within scope. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 2 - /// - public static PropertyKey UrlToIndex - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 2); - - return key; - } - } - - /// - /// Name: System.Search.UrlToIndexWithModificationTime -- PKEY_Search_UrlToIndexWithModificationTime - /// Description: This property is the same as System.Search.UrlToIndex except that it includes the time the URL was last modified. This is an optimization for the indexer as it doesn't have to call back into the protocol handler to ask for this information to determine if the content needs to be indexed again. The property is a vector with two elements, a VT_LPWSTR with the URL and a VT_FILETIME for the last modified time. - /// - /// Type: Multivalue Any -- VT_VECTOR | VT_NULL (For variants: VT_ARRAY | VT_NULL) - /// FormatID: {0B63E343-9CCC-11D0-BCDB-00805FCCCE04}, 12 - /// - public static PropertyKey UrlToIndexWithModificationTime - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0B63E343-9CCC-11D0-BCDB-00805FCCCE04}"), 12); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Shell Properties - /// - public static class Shell - { - - - #region Properties - - /// - /// Name: System.Shell.OmitFromView -- PKEY_Shell_OmitFromView - /// Description: Set this to a string value of 'True' to omit this item from shell views - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {DE35258C-C695-4CBC-B982-38B0AD24CED0}, 2 - /// - public static PropertyKey OmitFromView - { - get - { - PropertyKey key = new PropertyKey(new Guid("{DE35258C-C695-4CBC-B982-38B0AD24CED0}"), 2); - - return key; - } - } - - /// - /// Name: System.Shell.SFGAOFlagsStrings -- PKEY_Shell_SFGAOFlagsStrings - /// Description: Expresses the SFGAO flags as string values and is used as a query optimization. - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: {D6942081-D53B-443D-AD47-5E059D9CD27A}, 2 - /// - public static PropertyKey SFGAOFlagsStrings - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D6942081-D53B-443D-AD47-5E059D9CD27A}"), 2); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Software Properties - /// - public static class Software - { - - - #region Properties - - /// - /// Name: System.Software.DateLastUsed -- PKEY_Software_DateLastUsed - /// Description: - /// - /// Type: DateTime -- VT_FILETIME (For variants: VT_DATE) - /// FormatID: {841E4F90-FF59-4D16-8947-E81BBFFAB36D}, 16 - /// - public static PropertyKey DateLastUsed - { - get - { - PropertyKey key = new PropertyKey(new Guid("{841E4F90-FF59-4D16-8947-E81BBFFAB36D}"), 16); - - return key; - } - } - - /// - /// Name: System.Software.ProductName -- PKEY_Software_ProductName - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (PSFMTID_VERSION) {0CEF7D53-FA64-11D1-A203-0000F81FEDEE}, 7 - /// - public static PropertyKey ProductName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{0CEF7D53-FA64-11D1-A203-0000F81FEDEE}"), 7); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Sync Properties - /// - public static class Sync - { - - - #region Properties - - /// - /// Name: System.Sync.Comments -- PKEY_Sync_Comments - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 13 - /// - public static PropertyKey Comments - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 13); - - return key; - } - } - - /// - /// Name: System.Sync.ConflictDescription -- PKEY_Sync_ConflictDescription - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 4 - /// - public static PropertyKey ConflictDescription - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 4); - - return key; - } - } - - /// - /// Name: System.Sync.ConflictFirstLocation -- PKEY_Sync_ConflictFirstLocation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 6 - /// - public static PropertyKey ConflictFirstLocation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 6); - - return key; - } - } - - /// - /// Name: System.Sync.ConflictSecondLocation -- PKEY_Sync_ConflictSecondLocation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 7 - /// - public static PropertyKey ConflictSecondLocation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 7); - - return key; - } - } - - /// - /// Name: System.Sync.HandlerCollectionID -- PKEY_Sync_HandlerCollectionID - /// Description: - /// Type: Guid -- VT_CLSID - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 2 - /// - public static PropertyKey HandlerCollectionID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 2); - - return key; - } - } - - /// - /// Name: System.Sync.HandlerID -- PKEY_Sync_HandlerID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 3 - /// - public static PropertyKey HandlerID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 3); - - return key; - } - } - - /// - /// Name: System.Sync.HandlerName -- PKEY_Sync_HandlerName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 2 - /// - public static PropertyKey HandlerName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 2); - - return key; - } - } - - /// - /// Name: System.Sync.HandlerType -- PKEY_Sync_HandlerType - /// Description: - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 8 - /// - public static PropertyKey HandlerType - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 8); - - return key; - } - } - - /// - /// Name: System.Sync.HandlerTypeLabel -- PKEY_Sync_HandlerTypeLabel - /// Description: - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 9 - /// - public static PropertyKey HandlerTypeLabel - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 9); - - return key; - } - } - - /// - /// Name: System.Sync.ItemID -- PKEY_Sync_ItemID - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 6 - /// - public static PropertyKey ItemID - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 6); - - return key; - } - } - - /// - /// Name: System.Sync.ItemName -- PKEY_Sync_ItemName - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {CE50C159-2FB8-41FD-BE68-D3E042E274BC}, 3 - /// - public static PropertyKey ItemName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{CE50C159-2FB8-41FD-BE68-D3E042E274BC}"), 3); - - return key; - } - } - - /// - /// Name: System.Sync.ProgressPercentage -- PKEY_Sync_ProgressPercentage - /// Description: An integer value between 0 and 100 representing the percentage completed. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 23 - /// - public static PropertyKey ProgressPercentage - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 23); - - return key; - } - } - - /// - /// Name: System.Sync.State -- PKEY_Sync_State - /// Description: Sync state. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 24 - /// - public static PropertyKey State - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 24); - - return key; - } - } - - /// - /// Name: System.Sync.Status -- PKEY_Sync_Status - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {7BD5533E-AF15-44DB-B8C8-BD6624E1D032}, 10 - /// - public static PropertyKey Status - { - get - { - PropertyKey key = new PropertyKey(new Guid("{7BD5533E-AF15-44DB-B8C8-BD6624E1D032}"), 10); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Task Properties - /// - public static class Task - { - - - #region Properties - - /// - /// Name: System.Task.BillingInformation -- PKEY_Task_BillingInformation - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {D37D52C6-261C-4303-82B3-08B926AC6F12}, 100 - /// - public static PropertyKey BillingInformation - { - get - { - PropertyKey key = new PropertyKey(new Guid("{D37D52C6-261C-4303-82B3-08B926AC6F12}"), 100); - - return key; - } - } - - /// - /// Name: System.Task.CompletionStatus -- PKEY_Task_CompletionStatus - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {084D8A0A-E6D5-40DE-BF1F-C8820E7C877C}, 100 - /// - public static PropertyKey CompletionStatus - { - get - { - PropertyKey key = new PropertyKey(new Guid("{084D8A0A-E6D5-40DE-BF1F-C8820E7C877C}"), 100); - - return key; - } - } - - /// - /// Name: System.Task.Owner -- PKEY_Task_Owner - /// Description: - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: {08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0}, 100 - /// - public static PropertyKey Owner - { - get - { - PropertyKey key = new PropertyKey(new Guid("{08C7CC5F-60F2-4494-AD75-55E3E0B5ADD0}"), 100); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Video Properties - /// - public static class Video - { - - - #region Properties - - /// - /// Name: System.Video.Compression -- PKEY_Video_Compression - /// Description: Indicates the level of compression for the video stream. "Compression". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 10 (PIDVSI_COMPRESSION) - /// - public static PropertyKey Compression - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 10); - - return key; - } - } - - /// - /// Name: System.Video.Director -- PKEY_Video_Director - /// Description: - /// - /// Type: Multivalue String -- VT_VECTOR | VT_LPWSTR (For variants: VT_ARRAY | VT_BSTR) - /// FormatID: (PSGUID_MEDIAFILESUMMARYINFORMATION) {64440492-4C8B-11D1-8B70-080036B11A03}, 20 (PIDMSI_DIRECTOR) - /// - public static PropertyKey Director - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440492-4C8B-11D1-8B70-080036B11A03}"), 20); - - return key; - } - } - - /// - /// Name: System.Video.EncodingBitrate -- PKEY_Video_EncodingBitrate - /// Description: Indicates the data rate in "bits per second" for the video stream. "DataRate". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 8 (PIDVSI_DATA_RATE) - /// - public static PropertyKey EncodingBitrate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 8); - - return key; - } - } - - /// - /// Name: System.Video.FourCC -- PKEY_Video_FourCC - /// Description: Indicates the 4CC for the video stream. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 44 - /// - public static PropertyKey FourCC - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 44); - - return key; - } - } - - /// - /// Name: System.Video.FrameHeight -- PKEY_Video_FrameHeight - /// Description: Indicates the frame height for the video stream. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 4 - /// - public static PropertyKey FrameHeight - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 4); - - return key; - } - } - - /// - /// Name: System.Video.FrameRate -- PKEY_Video_FrameRate - /// Description: Indicates the frame rate in "frames per millisecond" for the video stream. "FrameRate". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 6 (PIDVSI_FRAME_RATE) - /// - public static PropertyKey FrameRate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 6); - - return key; - } - } - - /// - /// Name: System.Video.FrameWidth -- PKEY_Video_FrameWidth - /// Description: Indicates the frame width for the video stream. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 3 - /// - public static PropertyKey FrameWidth - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 3); - - return key; - } - } - - /// - /// Name: System.Video.HorizontalAspectRatio -- PKEY_Video_HorizontalAspectRatio - /// Description: Indicates the horizontal portion of the aspect ratio. The X portion of XX:YY, - ///like 16:9. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 42 - /// - public static PropertyKey HorizontalAspectRatio - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 42); - - return key; - } - } - - /// - /// Name: System.Video.SampleSize -- PKEY_Video_SampleSize - /// Description: Indicates the sample size in bits for the video stream. "SampleSize". - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 9 (PIDVSI_SAMPLE_SIZE) - /// - public static PropertyKey SampleSize - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 9); - - return key; - } - } - - /// - /// Name: System.Video.StreamName -- PKEY_Video_StreamName - /// Description: Indicates the name for the video stream. "StreamName". - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 2 (PIDVSI_STREAM_NAME) - /// - public static PropertyKey StreamName - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 2); - - return key; - } - } - - /// - /// Name: System.Video.StreamNumber -- PKEY_Video_StreamNumber - /// Description: "Stream Number". - /// - /// Type: UInt16 -- VT_UI2 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 11 (PIDVSI_STREAM_NUMBER) - /// - public static PropertyKey StreamNumber - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 11); - - return key; - } - } - - /// - /// Name: System.Video.TotalBitrate -- PKEY_Video_TotalBitrate - /// Description: Indicates the total data rate in "bits per second" for all video and audio streams. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 43 (PIDVSI_TOTAL_BITRATE) - /// - public static PropertyKey TotalBitrate - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 43); - - return key; - } - } - - /// - /// Name: System.Video.TranscodedForSync -- PKEY_Video_TranscodedForSync - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 46 - /// - public static PropertyKey TranscodedForSync - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 46); - - return key; - } - } - - /// - /// Name: System.Video.VerticalAspectRatio -- PKEY_Video_VerticalAspectRatio - /// Description: Indicates the vertical portion of the aspect ratio. The Y portion of - ///XX:YY, like 16:9. - /// - /// Type: UInt32 -- VT_UI4 - /// FormatID: (FMTID_VideoSummaryInformation) {64440491-4C8B-11D1-8B70-080036B11A03}, 45 - /// - public static PropertyKey VerticalAspectRatio - { - get - { - PropertyKey key = new PropertyKey(new Guid("{64440491-4C8B-11D1-8B70-080036B11A03}"), 45); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - - /// - /// Volume Properties - /// - public static class Volume - { - - - #region Properties - - /// - /// Name: System.Volume.FileSystem -- PKEY_Volume_FileSystem - /// Description: Indicates the filesystem of the volume. - /// - /// Type: String -- VT_LPWSTR (For variants: VT_BSTR) - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 4 (PID_VOLUME_FILESYSTEM) (Filesystem Volume Properties) - /// - public static PropertyKey FileSystem - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 4); - - return key; - } - } - - /// - /// Name: System.Volume.IsMappedDrive -- PKEY_Volume_IsMappedDrive - /// Description: - /// Type: Boolean -- VT_BOOL - /// FormatID: {149C0B69-2C2D-48FC-808F-D318D78C4636}, 2 - /// - public static PropertyKey IsMappedDrive - { - get - { - PropertyKey key = new PropertyKey(new Guid("{149C0B69-2C2D-48FC-808F-D318D78C4636}"), 2); - - return key; - } - } - - /// - /// Name: System.Volume.IsRoot -- PKEY_Volume_IsRoot - /// Description: - /// - /// Type: Boolean -- VT_BOOL - /// FormatID: (FMTID_Volume) {9B174B35-40FF-11D2-A27E-00C04FC30871}, 10 (Filesystem Volume Properties) - /// - public static PropertyKey IsRoot - { - get - { - PropertyKey key = new PropertyKey(new Guid("{9B174B35-40FF-11D2-A27E-00C04FC30871}"), 10); - - return key; - } - } - #endregion - - - #region sub-classes - #endregion - } - #endregion - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/PropertySystem/WindowProperties.cs b/src/External/WindowsAPICodePack/Shell/PropertySystem/WindowProperties.cs deleted file mode 100644 index 1998ed8..0000000 --- a/src/External/WindowsAPICodePack/Shell/PropertySystem/WindowProperties.cs +++ /dev/null @@ -1,37 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Windows; -using System.Windows.Interop; -using Microsoft.WindowsAPICodePack.Taskbar; - -namespace Microsoft.WindowsAPICodePack.Shell.PropertySystem -{ - /// - /// Helper class to modify properties for a given window - /// - public class WindowProperties - { - /// - /// Sets a shell property for a given window - /// - /// The property to set - /// Handle to the window that the property will be set on - /// The value to set for the property - public static void SetWindowProperty(IntPtr windowHandle, PropertyKey propkey, string value) - { - TaskbarNativeMethods.SetWindowProperty(windowHandle, propkey, value); - } - - /// - /// Sets a shell property for a given window - /// - /// The property to set - /// Window that the property will be set on - /// The value to set for the property - public static void SetWindowProperty(Window window, PropertyKey propkey, string value) - { - TaskbarNativeMethods.SetWindowProperty((new WindowInteropHelper(window)).Handle, propkey, value); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Shell.csproj b/src/External/WindowsAPICodePack/Shell/Shell.csproj deleted file mode 100644 index b30a276..0000000 --- a/src/External/WindowsAPICodePack/Shell/Shell.csproj +++ /dev/null @@ -1,309 +0,0 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D} - Library - Properties - Microsoft.WindowsAPICodePack.Shell - Microsoft.WindowsAPICodePack.Shell - v4.0 - 512 - SAK - SAK - SAK - SAK - - - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Microsoft.WindowsAPICodePack.Shell.XML - - - false - Migrated rules for Shell.ruleset - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - AllRules.ruleset - - - true - bin\CodeAnalysisDebug\ - TRACE;DEBUG;CODE_ANALYSIS - bin\Debug\Microsoft.WindowsAPICodePack.Shell.XML - full - AnyCPU - - - true - GlobalSuppressions.cs - prompt - true - Migrated rules for Shell (2).ruleset - - - - - 3.0 - - - 3.0 - - - - 3.5 - - - - - - - - 3.0 - - - 3.0 - - - - - - - - - - - - - - - - - - - - - Component - - - CommandLinkWPF.xaml - - - - - Form - - - - UserControl - - - ExplorerBrowser.WPF.xaml - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57} - Core - - - - - - - - - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - MSBuild:Compile - Designer - MSBuild:Compile - Designer - - - - - False - .NET Framework 3.5 SP1 Client Profile - false - - - False - .NET Framework 3.5 SP1 - true - - - False - Windows Installer 3.1 - true - - - - - \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Shell.csproj.vspscc b/src/External/WindowsAPICodePack/Shell/Shell.csproj.vspscc deleted file mode 100644 index feffdec..0000000 --- a/src/External/WindowsAPICodePack/Shell/Shell.csproj.vspscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"FILE_VERSION" = "9237" -"ENLISTMENT_CHOICE" = "NEVER" -"PROJECT_FILE_RELATIVE_PATH" = "" -"NUMBER_OF_EXCLUDED_FILES" = "0" -"ORIGINAL_PROJECT_FILE_PATH" = "" -"NUMBER_OF_NESTED_PROJECTS" = "0" -"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER" -} diff --git a/src/External/WindowsAPICodePack/Shell/StockIcons/StockIcon.cs b/src/External/WindowsAPICodePack/Shell/StockIcons/StockIcon.cs deleted file mode 100644 index b05e9de..0000000 --- a/src/External/WindowsAPICodePack/Shell/StockIcons/StockIcon.cs +++ /dev/null @@ -1,257 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Media.Imaging; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Represents a standard system icon. - /// - public class StockIcon : IDisposable - { - #region Private Members - - private StockIconIdentifier identifier = StockIconIdentifier.Application; - private StockIconSizes currentSize = StockIconSizes.Large; - private bool linkOverlay = false; - private bool selected = false; - private bool invalidateIcon = true; - private IntPtr hIcon = IntPtr.Zero; - - #endregion - - #region Public Constructors - - /// - /// Creates a new StockIcon instance with the specified identifer, default size - /// and no link overlay or selected states. - /// - /// A value that identifies the icon represented by this instance. - public StockIcon(StockIconIdentifier id) - { - identifier = id; - invalidateIcon = true; - } - - /// - /// Creates a new StockIcon instance with the specified identifer and options. - /// - /// A value that identifies the icon represented by this instance. - /// A value that indicates the size of the stock icon. - /// A bool value that indicates whether the icon has a link overlay. - /// A bool value that indicates whether the icon is in a selected state. - public StockIcon(StockIconIdentifier id, StockIconSizes size, bool isLinkOverlay, bool isSelected) - { - identifier = id; - linkOverlay = isLinkOverlay; - selected = isSelected; - currentSize = size; - invalidateIcon = true; - } - - #endregion - - #region Public Properties - - /// - /// Gets or sets a value indicating whether the icon appears selected. - /// - /// A value. - public bool Selected - { - get { return selected; } - set - { - selected = value; - invalidateIcon = true; - } - } - - /// - /// Gets or sets a value that cotrols whether to put a link overlay on the icon. - /// - /// A value. - public bool LinkOverlay - { - get { return linkOverlay; } - set - { - linkOverlay = value; - invalidateIcon = true; - } - } - - /// - /// Gets or sets a value that controls the size of the Stock Icon. - /// - /// A value. - public StockIconSizes CurrentSize - { - get { return currentSize; } - set - { - currentSize = value; - invalidateIcon = true; - } - } - - /// - /// Gets or sets the Stock Icon identifier associated with this icon. - /// - public StockIconIdentifier Identifier - { - get { return identifier; } - set - { - identifier = value; - invalidateIcon = true; - } - } - - /// - /// Gets the icon image in format. - /// - public Bitmap Bitmap - { - get - { - UpdateHIcon(); - - return hIcon != IntPtr.Zero ? Bitmap.FromHicon(hIcon) : null; - } - } - - /// - /// Gets the icon image in format. - /// - public BitmapSource BitmapSource - { - get - { - UpdateHIcon(); - - if (hIcon != IntPtr.Zero) - return Imaging.CreateBitmapSourceFromHIcon(hIcon, Int32Rect.Empty, null); - else - return null; - } - } - - /// - /// Gets the icon image in format. - /// - public Icon Icon - { - get - { - UpdateHIcon(); - - return hIcon != IntPtr.Zero ? Icon.FromHandle(hIcon) : null; - } - } - - #endregion - - #region Private Methods - - private void UpdateHIcon() - { - if (invalidateIcon) - { - if (hIcon != IntPtr.Zero) - CoreNativeMethods.DestroyIcon(hIcon); - - hIcon = GetHIcon(); - - invalidateIcon = false; - } - } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider", MessageId = "System.String.Format(System.String,System.Object)")] - private IntPtr GetHIcon() - { - // Create our internal flag to pass to the native method - StockIconsNativeMethods.StockIconOptions flags = StockIconsNativeMethods.StockIconOptions.Handle; - - // Based on the current settings, update the flags - if (CurrentSize == StockIconSizes.Small) - flags |= StockIconsNativeMethods.StockIconOptions.Small; - else if (CurrentSize == StockIconSizes.ShellSize) - flags |= StockIconsNativeMethods.StockIconOptions.ShellSize; - else - flags |= StockIconsNativeMethods.StockIconOptions.Large; // default - - if (Selected) - flags |= StockIconsNativeMethods.StockIconOptions.Selected; - - if (LinkOverlay) - flags |= StockIconsNativeMethods.StockIconOptions.LinkOverlay; - - // Create a StockIconInfo structure to pass to the native method. - StockIconsNativeMethods.StockIconInfo info = new StockIconsNativeMethods.StockIconInfo(); - info.StuctureSize = (UInt32)Marshal.SizeOf(typeof(StockIconsNativeMethods.StockIconInfo)); - - // Pass the struct to the native method - HRESULT hr = StockIconsNativeMethods.SHGetStockIconInfo(identifier, flags, ref info); - - // If we get an error, return null as the icon requested might not be supported - // on the current system - if (hr != HRESULT.S_OK) - { - if (hr == HRESULT.E_INVALIDARG) - throw new ArgumentException(string.Format("The Stock Icon identifier given is invalid ({0})", identifier)); - else - return IntPtr.Zero; - } - - // If we succeed, return the HIcon - return info.Handle; - } - - #endregion - - #region IDisposable Members - - /// - /// Release the native and managed objects - /// - /// Indicates that this is being called from Dispose(), rather than the finalizer. - public void Dispose(bool disposing) - { - if (disposing) - { - // dispose managed resources here - } - - // Unmanaged resources - if (hIcon != IntPtr.Zero) - CoreNativeMethods.DestroyIcon(hIcon); - } - - /// - /// Release the native objects - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// - /// - ~StockIcon() - { - Dispose(false); - } - - #endregion - } -} - diff --git a/src/External/WindowsAPICodePack/Shell/StockIcons/StockIconEnums.cs b/src/External/WindowsAPICodePack/Shell/StockIcons/StockIconEnums.cs deleted file mode 100644 index 34c2e18..0000000 --- a/src/External/WindowsAPICodePack/Shell/StockIcons/StockIconEnums.cs +++ /dev/null @@ -1,433 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Shell -{ - - /// - /// Specifies options for the size of the stock icon. - /// - public enum StockIconSizes - { - /// - /// Retrieve the small version of the icon, as specified by SM_CXSMICON and SM_CYSMICON system metrics. - /// - Small, - - /// - /// Retrieve the large version of the icon, as specified by SM_CXICON and SM_CYICON system metrics. - /// - Large, - - /// - /// Retrieve the shell-sized icons (instead of the size specified by the system metrics). - /// - ShellSize, - } - - /// - /// Provides values used to specify which standard icon to retrieve. - /// - public enum StockIconIdentifier - { - /// - /// Icon for a document (blank page), no associated program. - /// - DocumentNotAssociated = 0, - /// - /// Icon for a document with an associated program. - /// - DocumentAssociated = 1, - /// - /// Icon for a generic application with no custom icon. - /// - Application = 2, - /// - /// Icon for a closed folder. - /// - Folder = 3, - /// - /// Icon for an open folder. - /// - FolderOpen = 4, - /// - /// Icon for a 5.25" floppy disk drive. - /// - Drive525 = 5, - /// - /// Icon for a 3.5" floppy disk drive. - /// - Drive35 = 6, - /// - /// Icon for a removable drive. - /// - DriveRemove = 7, - /// - /// Icon for a fixed (hard disk) drive. - /// - DriveFixed = 8, - /// - /// Icon for a network drive. - /// - DriveNetwork = 9, - /// - /// Icon for a disconnected network drive. - /// - DriveNetworkDisabled = 10, - /// - /// Icon for a CD drive. - /// - DriveCD = 11, - /// - /// Icon for a RAM disk drive. - /// - DriveRam = 12, - /// - /// Icon for an entire network. - /// - World = 13, - /// - /// Icon for a computer on the network. - /// - Server = 15, - /// - /// Icon for a printer. - /// - Printer = 16, - /// - /// Icon for My Network places. - /// - MyNetwork = 17, - /// - /// Icon for search (magnifying glass). - /// - Find = 22, - /// - /// Icon for help. - /// - Help = 23, - /// - /// Icon for an overlay indicating shared items. - /// - Share = 28, - /// - /// Icon for an overlay indicating shortcuts to items. - /// - Link = 29, - /// - /// Icon for an overlay for slow items. - /// - SlowFile = 30, - /// - /// Icon for a empty recycle bin. - /// - Recycler = 31, - /// - /// Icon for a full recycle bin. - /// - RecyclerFull = 32, - /// - /// Icon for audio CD media. - /// - MediaCDAudio = 40, - /// - /// Icon for a security lock. - /// - Lock = 47, - /// - /// Icon for a auto list. - /// - AutoList = 49, - /// - /// Icon for a network printer. - /// - PrinterNet = 50, - /// - /// Icon for a server share. - /// - ServerShare = 51, - /// - /// Icon for a Fax printer. - /// - PrinterFax = 52, - /// - /// Icon for a networked Fax printer. - /// - PrinterFaxNet = 53, - /// - /// Icon for print to file. - /// - PrinterFile = 54, - /// - /// Icon for a stack. - /// - Stack = 55, - /// - /// Icon for a SVCD media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Svcd")] - MediaSvcd = 56, - /// - /// Icon for a folder containing other items. - /// - StuffedFolder = 57, - /// - /// Icon for an unknown drive. - /// - DriveUnknown = 58, - /// - /// Icon for a DVD drive. - /// - DriveDvd = 59, - /// - /// Icon for DVD media. - /// - MediaDvd = 60, - /// - /// Icon for DVD-RAM media. - /// - MediaDvdRam = 61, - /// - /// Icon for DVD-RW media. - /// - MediaDvdRW = 62, - /// - /// Icon for DVD-R media. - /// - MediaDvdR = 63, - /// - /// Icon for a DVD-ROM media. - /// - MediaDvdRom = 64, - /// - /// Icon for CD+ (Enhanced CD) media. - /// - MediaCDAudioPlus = 65, - /// - /// Icon for CD-RW media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "CDRW")] - MediaCDRW = 66, - /// - /// Icon for a CD-R media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "CDR")] - MediaCDR = 67, - /// - /// Icon burning a CD. - /// - MediaCDBurn = 68, - /// - /// Icon for blank CD media. - /// - MediaBlankCD = 69, - /// - /// Icon for CD-ROM media. - /// - MediaCDRom = 70, - /// - /// Icon for audio files. - /// - AudioFiles = 71, - /// - /// Icon for image files. - /// - ImageFiles = 72, - /// - /// Icon for video files. - /// - VideoFiles = 73, - /// - /// Icon for mixed Files. - /// - MixedFiles = 74, - /// - /// Icon for a folder back. - /// - FolderBack = 75, - /// - /// Icon for a folder front. - /// - FolderFront = 76, - /// - /// Icon for a security shield. Use for UAC prompts only. - /// - Shield = 77, - /// - /// Icon for a warning. - /// - Warning = 78, - /// - /// Icon for an informational message. - /// - Info = 79, - /// - /// Icon for an error message. - /// - Error = 80, - /// - /// Icon for a key. - /// - Key = 81, - /// - /// Icon for software. - /// - Software = 82, - /// - /// Icon for a rename. - /// - Rename = 83, - /// - /// Icon for delete. - /// - Delete = 84, - /// - /// Icon for audio DVD media. - /// - MediaAudioDvd = 85, - /// - /// Icon for movie DVD media. - /// - MediaMovieDvd = 86, - /// - /// Icon for enhanced CD media. - /// - MediaEnhancedCD = 87, - /// - /// Icon for enhanced DVD media. - /// - MediaEnhancedDvd = 88, - /// - /// Icon for HD-DVD media. - /// - MediaHDDvd = 89, - /// - /// Icon for BluRay media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - MediaBluRay = 90, - /// - /// Icon for VCD media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Vcd")] - MediaVcd = 91, - /// - /// Icon for DVD+R media. - /// - MediaDvdPlusR = 92, - /// - /// Icon for DVD+RW media. - /// - MediaDvdPlusRW = 93, - /// - /// Icon for desktop computer. - /// - DesktopPC = 94, - /// - /// Icon for mobile computer (laptop/notebook). - /// - MobilePC = 95, - /// - /// Icon for users. - /// - Users = 96, - /// - /// Icon for smart media. - /// - MediaSmartMedia = 97, - /// - /// Icon for compact flash. - /// - MediaCompactFlash = 98, - /// - /// Icon for a cell phone. - /// - DeviceCellPhone = 99, - /// - /// Icon for a camera. - /// - DeviceCamera = 100, - /// - /// Icon for video camera. - /// - DeviceVideoCamera = 101, - /// - /// Icon for audio player. - /// - DeviceAudioPlayer = 102, - /// - /// Icon for connecting to network. - /// - NetworkConnect = 103, - /// - /// Icon for the Internet. - /// - Internet = 104, - /// - /// Icon for a ZIP file. - /// - ZipFile = 105, - /// - /// Icon for settings. - /// - Settings = 106, - - // 107-131 are internal Vista RTM icons - // 132-159 for SP1 icons - - /// - /// HDDVD Drive (all types) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVD")] - DriveHDDVD = 132, - - /// - /// Icon for BluRay Drive (all types) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - DriveBluRay = 133, - - /// - /// Icon for HDDVD-ROM Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVDROM")] - MediaHDDVDROM = 134, - - /// - /// Icon for HDDVD-R Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVDR")] - MediaHDDVDR = 135, - - /// - /// Icon for HDDVD-RAM Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVDRAM")] - MediaHDDVDRAM = 136, - - /// - /// Icon for BluRay ROM Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ROM")] - MediaBluRayROM = 137, - - /// - /// Icon for BluRay R Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - MediaBluRayR = 138, - - /// - /// Icon for BluRay RE Media (Rewriable and RAM) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - MediaBluRayRE = 139, - - /// - /// Icon for Clustered disk - /// - ClusteredDisk = 140, - - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/StockIcons/StockIcons.cs b/src/External/WindowsAPICodePack/Shell/StockIcons/StockIcons.cs deleted file mode 100644 index 0c4552a..0000000 --- a/src/External/WindowsAPICodePack/Shell/StockIcons/StockIcons.cs +++ /dev/null @@ -1,638 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; - -namespace Microsoft.WindowsAPICodePack.Shell -{ - /// - /// Collection of all the standard system stock icons - /// - public class StockIcons - { - #region Private Members - - private IDictionary stockIconCache; - private ICollection stockIconList; - private StockIconSizes defaultSize = StockIconSizes.Large; - private bool isSelected = false; - private bool isLinkOverlay = false; - - #endregion - - #region Public Constructors - - /// - /// Creates a stock icon collection using the default options for - /// size, link overlay and selection state. - /// - public StockIcons() - { - // Create an empty dictionary. Stock icons will be created when requested - // or when they are enumerated on this collection - stockIconCache = new Dictionary(); - stockIconList = new List(); - - Array allIdentifiers = Enum.GetValues(typeof(StockIconIdentifier)); - - foreach (StockIconIdentifier id in allIdentifiers) - stockIconCache.Add(id, null); - } - - /// - /// Overloaded constructor that takes in size and Boolean values for - /// link overlay and selected icon state. The settings are applied to - /// all the stock icons in the collection. - /// - /// StockIcon size for all the icons in the collection. - /// Link Overlay state for all the icons in the collection. - /// Selection state for all the icons in the collection. - public StockIcons(StockIconSizes size, bool linkOverlay, bool selected) - { - defaultSize = size; - isLinkOverlay = linkOverlay; - isSelected = selected; - - // Create an empty dictionary. Stock icons will be created when requested - // or when they are enumerated on this collection - stockIconCache = new Dictionary(); - stockIconList = new List(); - - Array allIdentifiers = Enum.GetValues(typeof(StockIconIdentifier)); - - foreach (StockIconIdentifier id in allIdentifiers) - stockIconCache.Add(id, null); - } - - #endregion - - #region Public Properties - - /// - /// Gets the default stock icon size in one of the StockIconSizes values. - /// This size applies to all the stock icons in the collection. - /// - public StockIconSizes DefaultSize - { - get { return defaultSize; } - } - - /// - /// Gets the default link overlay state for the icon. This property - /// applies to all the stock icons in the collection. - /// - public bool DefaultLinkOverlay - { - get { return isLinkOverlay; } - } - - /// - /// Gets the default selected state for the icon. This property - /// applies to all the stock icons in the collection. - /// - public bool DefaultSelectedState - { - get { return isSelected; } - } - - /// - /// Gets a collection of all the system stock icons - /// - public ICollection AllStockIcons - { - get - { - return GetAllStockIcons(); - } - } - - /// - /// Icon for a document (blank page), no associated program. - /// - public StockIcon DocumentNotAssociated { get { return GetStockIcon(StockIconIdentifier.DocumentNotAssociated); } } - - /// - /// Icon for a document with an associated program. - /// - public StockIcon DocumentAssociated { get { return GetStockIcon(StockIconIdentifier.DocumentAssociated); } } - - /// - /// Icon for a generic application with no custom icon. - /// - public StockIcon Application { get { return GetStockIcon(StockIconIdentifier.Application); } } - - /// - /// Icon for a closed folder. - /// - public StockIcon Folder { get { return GetStockIcon(StockIconIdentifier.Folder); } } - - /// - /// Icon for an open folder. - /// - public StockIcon FolderOpen { get { return GetStockIcon(StockIconIdentifier.FolderOpen); } } - - /// - /// Icon for a 5.25" floppy disk drive. - /// - public StockIcon Drive525 { get { return GetStockIcon(StockIconIdentifier.Drive525); } } - - /// - /// Icon for a 3.5" floppy disk drive. - /// - public StockIcon Drive35 { get { return GetStockIcon(StockIconIdentifier.Drive35); } } - - /// - /// Icon for a removable drive. - /// - public StockIcon DriveRemove { get { return GetStockIcon(StockIconIdentifier.DriveRemove); } } - - /// - /// Icon for a fixed (hard disk) drive. - /// - public StockIcon DriveFixed { get { return GetStockIcon(StockIconIdentifier.DriveFixed); } } - - /// - /// Icon for a network drive. - /// - public StockIcon DriveNetwork { get { return GetStockIcon(StockIconIdentifier.DriveNetwork); } } - - /// - /// Icon for a disconnected network drive. - /// - public StockIcon DriveNetworkDisabled { get { return GetStockIcon(StockIconIdentifier.DriveNetworkDisabled); } } - - /// - /// Icon for a CD drive. - /// - public StockIcon DriveCD { get { return GetStockIcon(StockIconIdentifier.DriveCD); } } - - /// - /// Icon for a RAM disk drive. - /// - public StockIcon DriveRam { get { return GetStockIcon(StockIconIdentifier.DriveRam); } } - - /// - /// Icon for an entire network. - /// - public StockIcon World { get { return GetStockIcon(StockIconIdentifier.World); } } - - /// - /// Icon for a computer on the network. - /// - public StockIcon Server { get { return GetStockIcon(StockIconIdentifier.Server); } } - - /// - /// Icon for a printer. - /// - public StockIcon Printer { get { return GetStockIcon(StockIconIdentifier.Printer); } } - - /// - /// Icon for My Network places. - /// - public StockIcon MyNetwork { get { return GetStockIcon(StockIconIdentifier.MyNetwork); } } - - /// - /// Icon for search (magnifying glass). - /// - public StockIcon Find { get { return GetStockIcon(StockIconIdentifier.Find); } } - - /// - /// Icon for help. - /// - public StockIcon Help { get { return GetStockIcon(StockIconIdentifier.Help); } } - - /// - /// Icon for an overlay indicating shared items. - /// - public StockIcon Share { get { return GetStockIcon(StockIconIdentifier.Share); } } - - /// - /// Icon for an overlay indicating shortcuts to items. - /// - public StockIcon Link { get { return GetStockIcon(StockIconIdentifier.Link); } } - - /// - /// Icon for an overlay for slow items. - /// - public StockIcon SlowFile { get { return GetStockIcon(StockIconIdentifier.SlowFile); } } - - /// - /// Icon for a empty recycle bin. - /// - public StockIcon Recycler { get { return GetStockIcon(StockIconIdentifier.Recycler); } } - - /// - /// Icon for a full recycle bin. - /// - public StockIcon RecyclerFull { get { return GetStockIcon(StockIconIdentifier.RecyclerFull); } } - - /// - /// Icon for audio CD media. - /// - public StockIcon MediaCDAudio { get { return GetStockIcon(StockIconIdentifier.MediaCDAudio); } } - - /// - /// Icon for a security lock. - /// - public StockIcon Lock { get { return GetStockIcon(StockIconIdentifier.Lock); } } - - /// - /// Icon for a auto list. - /// - public StockIcon AutoList { get { return GetStockIcon(StockIconIdentifier.AutoList); } } - - /// - /// Icon for a network printer. - /// - public StockIcon PrinterNet { get { return GetStockIcon(StockIconIdentifier.PrinterNet); } } - - /// - /// Icon for a server share. - /// - public StockIcon ServerShare { get { return GetStockIcon(StockIconIdentifier.ServerShare); } } - - /// - /// Icon for a Fax printer. - /// - public StockIcon PrinterFax { get { return GetStockIcon(StockIconIdentifier.PrinterFax); } } - - /// - /// Icon for a networked Fax printer. - /// - public StockIcon PrinterFaxNet { get { return GetStockIcon(StockIconIdentifier.PrinterFaxNet); } } - - /// - /// Icon for print to file. - /// - public StockIcon PrinterFile { get { return GetStockIcon(StockIconIdentifier.PrinterFile); } } - - /// - /// Icon for a stack. - /// - public StockIcon Stack { get { return GetStockIcon(StockIconIdentifier.Stack); } } - - /// - /// Icon for a SVCD media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Svcd")] - public StockIcon MediaSvcd { get { return GetStockIcon(StockIconIdentifier.MediaSvcd); } } - - /// - /// Icon for a folder containing other items. - /// - public StockIcon StuffedFolder { get { return GetStockIcon(StockIconIdentifier.StuffedFolder); } } - - /// - /// Icon for an unknown drive. - /// - public StockIcon DriveUnknown { get { return GetStockIcon(StockIconIdentifier.DriveUnknown); } } - - /// - /// Icon for a DVD drive. - /// - public StockIcon DriveDvd { get { return GetStockIcon(StockIconIdentifier.DriveDvd); } } - - /// - /// Icon for DVD media. - /// - public StockIcon MediaDvd { get { return GetStockIcon(StockIconIdentifier.MediaDvd); } } - - /// - /// Icon for DVD-RAM media. - /// - public StockIcon MediaDvdRam { get { return GetStockIcon(StockIconIdentifier.MediaDvdRam); } } - - /// - /// Icon for DVD-RW media. - /// - public StockIcon MediaDvdRW { get { return GetStockIcon(StockIconIdentifier.MediaDvdRW); } } - - /// - /// Icon for DVD-R media. - /// - public StockIcon MediaDvdR { get { return GetStockIcon(StockIconIdentifier.MediaDvdR); } } - - /// - /// Icon for a DVD-ROM media. - /// - public StockIcon MediaDvdRom { get { return GetStockIcon(StockIconIdentifier.MediaDvdRom); } } - - /// - /// Icon for CD+ (Enhanced CD) media. - /// - public StockIcon MediaCDAudioPlus { get { return GetStockIcon(StockIconIdentifier.MediaCDAudioPlus); } } - - /// - /// Icon for CD-RW media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "CDRW")] - public StockIcon MediaCDRW { get { return GetStockIcon(StockIconIdentifier.MediaCDRW); } } - - /// - /// Icon for a CD-R media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "CDR")] - public StockIcon MediaCDR { get { return GetStockIcon(StockIconIdentifier.MediaCDR); } } - - /// - /// Icon burning a CD. - /// - public StockIcon MediaCDBurn { get { return GetStockIcon(StockIconIdentifier.MediaCDBurn); } } - - /// - /// Icon for blank CD media. - /// - public StockIcon MediaBlankCD { get { return GetStockIcon(StockIconIdentifier.MediaBlankCD); } } - - /// - /// Icon for CD-ROM media. - /// - public StockIcon MediaCDRom { get { return GetStockIcon(StockIconIdentifier.MediaCDRom); } } - - /// - /// Icon for audio files. - /// - public StockIcon AudioFiles { get { return GetStockIcon(StockIconIdentifier.AudioFiles); } } - - /// - /// Icon for image files. - /// - public StockIcon ImageFiles { get { return GetStockIcon(StockIconIdentifier.ImageFiles); } } - - /// - /// Icon for video files. - /// - public StockIcon VideoFiles { get { return GetStockIcon(StockIconIdentifier.VideoFiles); } } - - /// - /// Icon for mixed Files. - /// - public StockIcon MixedFiles { get { return GetStockIcon(StockIconIdentifier.MixedFiles); } } - - /// - /// Icon for a folder back. - /// - public StockIcon FolderBack { get { return GetStockIcon(StockIconIdentifier.FolderBack); } } - - /// - /// Icon for a folder front. - /// - public StockIcon FolderFront { get { return GetStockIcon(StockIconIdentifier.FolderFront); } } - - /// - /// Icon for a security shield. Use for UAC prompts only. - /// - public StockIcon Shield { get { return GetStockIcon(StockIconIdentifier.Shield); } } - - /// - /// Icon for a warning. - /// - public StockIcon Warning { get { return GetStockIcon(StockIconIdentifier.Warning); } } - - /// - /// Icon for an informational message. - /// - public StockIcon Info { get { return GetStockIcon(StockIconIdentifier.Info); } } - - /// - /// Icon for an error message. - /// - public StockIcon Error { get { return GetStockIcon(StockIconIdentifier.Error); } } - - /// - /// Icon for a key. - /// - public StockIcon Key { get { return GetStockIcon(StockIconIdentifier.Key); } } - - /// - /// Icon for software. - /// - public StockIcon Software { get { return GetStockIcon(StockIconIdentifier.Software); } } - - /// - /// Icon for a rename. - /// - public StockIcon Rename { get { return GetStockIcon(StockIconIdentifier.Rename); } } - - /// - /// Icon for delete. - /// - public StockIcon Delete { get { return GetStockIcon(StockIconIdentifier.Delete); } } - - /// - /// Icon for audio DVD media. - /// - public StockIcon MediaAudioDvd { get { return GetStockIcon(StockIconIdentifier.MediaAudioDvd); } } - - /// - /// Icon for movie DVD media. - /// - public StockIcon MediaMovieDvd { get { return GetStockIcon(StockIconIdentifier.MediaMovieDvd); } } - - /// - /// Icon for enhanced CD media. - /// - public StockIcon MediaEnhancedCD { get { return GetStockIcon(StockIconIdentifier.MediaEnhancedCD); } } - - /// - /// Icon for enhanced DVD media. - /// - public StockIcon MediaEnhancedDvd { get { return GetStockIcon(StockIconIdentifier.MediaEnhancedDvd); } } - - /// - /// Icon for HD-DVD media. - /// - public StockIcon MediaHDDvd { get { return GetStockIcon(StockIconIdentifier.MediaHDDvd); } } - - /// - /// Icon for BluRay media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - public StockIcon MediaBluRay { get { return GetStockIcon(StockIconIdentifier.MediaBluRay); } } - - /// - /// Icon for VCD media. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Vcd")] - public StockIcon MediaVcd { get { return GetStockIcon(StockIconIdentifier.MediaVcd); } } - - /// - /// Icon for DVD+R media. - /// - public StockIcon MediaDvdPlusR { get { return GetStockIcon(StockIconIdentifier.MediaDvdPlusR); } } - - /// - /// Icon for DVD+RW media. - /// - public StockIcon MediaDvdPlusRW { get { return GetStockIcon(StockIconIdentifier.MediaDvdPlusRW); } } - - /// - /// Icon for desktop computer. - /// - public StockIcon DesktopPC { get { return GetStockIcon(StockIconIdentifier.DesktopPC); } } - - /// - /// Icon for mobile computer (laptop/notebook). - /// - public StockIcon MobilePC { get { return GetStockIcon(StockIconIdentifier.MobilePC); } } - - /// - /// Icon for users. - /// - public StockIcon Users { get { return GetStockIcon(StockIconIdentifier.Users); } } - - /// - /// Icon for smart media. - /// - public StockIcon MediaSmartMedia { get { return GetStockIcon(StockIconIdentifier.MediaSmartMedia); } } - - /// - /// Icon for compact flash. - /// - public StockIcon MediaCompactFlash { get { return GetStockIcon(StockIconIdentifier.MediaCompactFlash); } } - - /// - /// Icon for a cell phone. - /// - public StockIcon DeviceCellPhone { get { return GetStockIcon(StockIconIdentifier.DeviceCellPhone); } } - - /// - /// Icon for a camera. - /// - public StockIcon DeviceCamera { get { return GetStockIcon(StockIconIdentifier.DeviceCamera); } } - - /// - /// Icon for video camera. - /// - public StockIcon DeviceVideoCamera { get { return GetStockIcon(StockIconIdentifier.DeviceVideoCamera); } } - - /// - /// Icon for audio player. - /// - public StockIcon DeviceAudioPlayer { get { return GetStockIcon(StockIconIdentifier.DeviceAudioPlayer); } } - - /// - /// Icon for connecting to network. - /// - public StockIcon NetworkConnect { get { return GetStockIcon(StockIconIdentifier.NetworkConnect); } } - - /// - /// Icon for the Internet. - /// - public StockIcon Internet { get { return GetStockIcon(StockIconIdentifier.Internet); } } - - /// - /// Icon for a ZIP file. - /// - public StockIcon ZipFile { get { return GetStockIcon(StockIconIdentifier.ZipFile); } } - - /// - /// Icon for settings. - /// - public StockIcon Settings { get { return GetStockIcon(StockIconIdentifier.Settings); } } - - /// - /// HDDVD Drive (all types) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVD")] - public StockIcon DriveHDDVD { get { return GetStockIcon(StockIconIdentifier.DriveHDDVD); } } - - /// - /// Icon for BluRay Drive (all types) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - public StockIcon DriveBluRay { get { return GetStockIcon(StockIconIdentifier.DriveBluRay); } } - - /// - /// Icon for HDDVD-ROM Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVDROM")] - public StockIcon MediaHDDVDROM { get { return GetStockIcon(StockIconIdentifier.MediaHDDVDROM); } } - - /// - /// Icon for HDDVD-R Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVDR")] - public StockIcon MediaHDDVDR { get { return GetStockIcon(StockIconIdentifier.MediaHDDVDR); } } - - /// - /// Icon for HDDVD-RAM Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "HDDVDRAM")] - public StockIcon MediaHDDVDRAM { get { return GetStockIcon(StockIconIdentifier.MediaHDDVDRAM); } } - - /// - /// Icon for BluRay ROM Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "ROM")] - public StockIcon MediaBluRayROM { get { return GetStockIcon(StockIconIdentifier.MediaBluRayROM); } } - - /// - /// Icon for BluRay R Media - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - public StockIcon MediaBluRayR { get { return GetStockIcon(StockIconIdentifier.MediaBluRayR); } } - - /// - /// Icon for BluRay RE Media (Rewriable and RAM) - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Blu")] - public StockIcon MediaBluRayRE { get { return GetStockIcon(StockIconIdentifier.MediaBluRayRE); } } - - /// - /// Icon for Clustered disk - /// - public StockIcon ClusteredDisk { get { return GetStockIcon(StockIconIdentifier.ClusteredDisk); } } - - #endregion - - #region Private Methods - - /// - /// Returns the existing stock icon from the internal cache, or creates a new one - /// based on the current settings if it's not in the cache. - /// - /// Unique identifier for the requested stock icon - /// Stock Icon based on the identifier given (either from the cache or created new) - private StockIcon GetStockIcon(StockIconIdentifier stockIconIdentifier) - { - // Check the cache first - if (stockIconCache[stockIconIdentifier] != null) - return stockIconCache[stockIconIdentifier]; - else - { - // Create a new icon based on our default settings - StockIcon icon = new StockIcon(stockIconIdentifier, defaultSize, isLinkOverlay, isSelected); - - // Add it to the cache - stockIconCache[stockIconIdentifier] = icon; - - // Return - return icon; - } - } - - private ICollection GetAllStockIcons() - { - // Create a list of stock Identifiers - StockIconIdentifier[] ids = new StockIconIdentifier[stockIconCache.Count]; - stockIconCache.Keys.CopyTo(ids, 0); - - // For each identifier, if our cache is null, create a new stock icon - foreach (StockIconIdentifier id in ids) - { - if (stockIconCache[id] == null) - GetStockIcon(id); - } - - // return the list of stock icons - return stockIconCache.Values; - } - - - #endregion - - } - - -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpList.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/JumpList.cs deleted file mode 100644 index d2ff356..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpList.cs +++ /dev/null @@ -1,535 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.InteropServices; -using System.Text; -using Microsoft.WindowsAPICodePack.Shell; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents an instance of a Taskbar button jump list. - /// - public class JumpList - { - - /// - /// Create a JumpList for the application's taskbar button. - /// - /// A new JumpList that is associated with the app id of the main application window - /// If there are any other child (top-level) windows for this application and they don't have - /// a specific JumpList created for them, they all will share the same JumpList as the main application window. - /// In order to have a individual JumpList for a top-level window, use the overloaded method CreateJumpListForIndividualWindow. - public static JumpList CreateJumpList() - { - return new JumpList(TaskbarManager.Instance.ApplicationId); - } - - /// - /// Create a JumpList for the application's taskbar button. - /// - /// Application Id for the individual window. This must be unique for each top-level window in order to have a individual JumpList. - /// Handle of the window associated with the new JumpList - /// A new JumpList that is associated with the specific window handle - public static JumpList CreateJumpListForIndividualWindow(string appid, IntPtr windowHandle) - { - return new JumpList(appid, windowHandle); - } - - /// - /// Create a JumpList for the application's taskbar button. - /// - /// Application Id for the individual window. This must be unique for each top-level window in order to have a individual JumpList. - /// WPF Window associated with the new JumpList - /// A new JumpList that is associated with the specific WPF window - public static JumpList CreateJumpListForIndividualWindow(string appid, System.Windows.Window window) - { - return new JumpList(appid, window); - } - - // Best practice recommends defining a private object to lock on - private static Object syncLock = new Object(); - - // Native implementation of destination list - private ICustomDestinationList customDestinationList; - - #region Properties - - private JumpListCustomCategoryCollection customCategoriesCollection; - /// - /// Adds a collection of custom categories to the Taskbar jump list. - /// - /// The catagories to add to the jump list. - public void AddCustomCategories(params JumpListCustomCategory[] customCategories) - { - if (customCategoriesCollection == null) - { - // Make sure that we don't create multiple instances - // of this object - lock (syncLock) - { - if (customCategoriesCollection == null) - { - customCategoriesCollection = new JumpListCustomCategoryCollection(); - } - } - } - - foreach (JumpListCustomCategory category in customCategories) - customCategoriesCollection.Add(category); - } - - private JumpListItemCollection userTasks; - /// - /// Adds user tasks to the Taskbar JumpList. User tasks can only consist of JumpListTask or - /// JumpListSeparator objects. - /// - /// The user tasks to add to the JumpList. - public void AddUserTasks(params IJumpListTask[] tasks) - { - if (userTasks == null) - { - // Make sure that we don't create multiple instances - // of this object - lock (syncLock) - { - if (userTasks == null) - { - userTasks = new JumpListItemCollection(); - } - } - } - - foreach (IJumpListTask task in tasks) - userTasks.Add(task); - } - - /// - /// Removes all user tasks that have been added. - /// - public void ClearAllUserTasks() - { - if (userTasks != null) - userTasks.Clear(); - } - - /// - /// Gets the recommended number of items to add to the jump list. - /// - /// - /// This number doesn’t - /// imply or suggest how many items will appear on the jump list. - /// This number should only be used for reference purposes since - /// the actual number of slots in the jump list can change after the last - /// refresh due to items being pinned or removed and resolution changes. - /// The jump list can increase in size accordingly. - /// - public uint MaxSlotsInList - { - get - { - // Because we need the correct number for max slots, start a commit, get the max slots - // and then abort. If we wait until the user calls RefreshTaskbarlist(), it will be too late. - // The user needs to use this number before they update the jumplist. - - object removedItems; - uint maxSlotsInList = 10; // default - - // Native call to start adding items to the taskbar destination list - HRESULT hr = customDestinationList.BeginList( - out maxSlotsInList, - ref TaskbarNativeMethods.IID_IObjectArray, - out removedItems); - - if (CoreErrorHelper.Succeeded((int)hr)) - customDestinationList.AbortList(); - - return maxSlotsInList; - } - } - - /// - /// Gets or sets the type of known categories to display. - /// - public JumpListKnownCategoryType KnownCategoryToDisplay { get; set; } - - private int knownCategoryOrdinalPosition = 0; - /// - /// Gets or sets the value for the known category location relative to the - /// custom category collection. - /// - public int KnownCategoryOrdinalPosition - { - get - { - return knownCategoryOrdinalPosition; - } - set - { - if (value < 0) - throw new ArgumentOutOfRangeException("value", "Negative numbers are not allowed for the ordinal position."); - - knownCategoryOrdinalPosition = value; - } - - } - - /// - /// Gets or sets the application ID to use for this jump list. - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "This is a public property that can be used by the application calling our library")] - public string ApplicationId { get; private set; } - - #endregion - - /// - /// Creates a new instance of the JumpList class with the specified - /// appId. The JumpList is associated with the main window of the application. - /// - /// Application Id to use for this instace. - internal JumpList(string appID) - : this(appID, TaskbarManager.Instance.OwnerHandle) - { - } - - /// - /// Creates a new instance of the JumpList class with the specified - /// appId. The JumpList is associated with the given WPF Window. - /// - /// Application Id to use for this instace. - /// WPF Window that is associated with this JumpList - internal JumpList(string appID, System.Windows.Window window) - : this(appID, (new System.Windows.Interop.WindowInteropHelper(window)).Handle) - { - } - - /// - /// Creates a new instance of the JumpList class with the specified - /// appId. The JumpList is associated with the given window. - /// - /// Application Id to use for this instace. - /// Window handle for the window that is associated with this JumpList - private JumpList(string appID, IntPtr windowHandle) - { - // Throw exception if not running on Win7 or newer - CoreHelpers.ThrowIfNotWin7(); - - // Native implementation of destination list - customDestinationList = (ICustomDestinationList)new CDestinationList(); - - // Set application user model ID - if (!string.IsNullOrEmpty(appID)) - { - ApplicationId = appID; - - // If the user hasn't yet set the application id for the whole process, - // use the first JumpList's AppId for the whole process. This will ensure - // we have the same JumpList for all the windows (unless user overrides and creates a new - // JumpList for a specific child window) - if (!TaskbarManager.Instance.ApplicationIdSetProcessWide) - TaskbarManager.Instance.ApplicationId = appID; - - TaskbarManager.Instance.SetApplicationIdForSpecificWindow(windowHandle, appID); - } - } - - /// - /// Reports document usage to the shell. - /// - /// The full path of the file to report usage. - public void AddToRecent(string destination) - { - TaskbarNativeMethods.SHAddToRecentDocs(destination); - } - - /// - /// Commits the pending JumpList changes and refreshes the Taskbar. - /// - /// Will throw if the type of the file being added to the JumpList is not registered with the application. - /// Will throw if recent documents tracking is turned off by the user or via group policy. - /// Will throw if updating the JumpList fails for any other reason. - public void Refresh() - { - // Let the taskbar know which specific jumplist we are updating - if (!string.IsNullOrEmpty(ApplicationId)) - customDestinationList.SetAppID(ApplicationId); - - // Begins rendering on the taskbar destination list - BeginList(); - - Exception exception = null; - - try - { - // try to add the user tasks first - AppendTaskList(); - } - catch (Exception e) - { - // If this fails, save the exception but don't throw it yet. - // We need to continue to try and add the custom categories - exception = e; - } - - // Even it fails, continue appending the custom categories - try - { - // Add custom categories - AppendCustomCategories(); - } - finally - { - // End rendering of the taskbar destination list - customDestinationList.CommitList(); - } - - // If an exception was thrown while adding the user tasks or - // custom categories, throw it. - if (exception != null) - throw exception; - } - - private void BeginList() - { - // Get list of removed items from native code - object removedItems; - uint maxSlotsInList = 10; // default - - // Native call to start adding items to the taskbar destination list - HRESULT hr = customDestinationList.BeginList( - out maxSlotsInList, - ref TaskbarNativeMethods.IID_IObjectArray, - out removedItems); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - // Process the deleted items - IEnumerable removedItemsArray = ProcessDeletedItems((IObjectArray)removedItems); - - // Raise the event if items were removed - if (JumpListItemsRemoved != null && removedItemsArray != null && removedItemsArray.GetEnumerator().MoveNext()) - JumpListItemsRemoved(this, new UserRemovedJumpListItemsEventArgs(removedItemsArray)); - } - - /// - /// Occurs when items are removed from the Taskbar's jump list since the last - /// refresh. - /// - /// - /// This event is not triggered - /// immediately when a user removes an item from the jump list but rather - /// when the application refreshes the task bar list directly. - /// - public event EventHandler JumpListItemsRemoved = delegate { }; - - /// - /// Retrieves the current list of destinations that have been removed from the existing jump list by the user. - /// The removed destinations may become items on a custom jump list. - /// - /// A collection of items (filenames) removed from the existing jump list by the user. - public IEnumerable RemovedDestinations - { - get - { - // Get list of removed items from native code - object removedItems; - - customDestinationList.GetRemovedDestinations(ref TaskbarNativeMethods.IID_IObjectArray, out removedItems); - - return ProcessDeletedItems((IObjectArray)removedItems); - } - } - - private IEnumerable ProcessDeletedItems(IObjectArray removedItems) - { - uint count; - removedItems.GetCount(out count); - - if (count == 0) - return new string[] { }; - - // String array passed to the user via the JumpListItemsRemoved - // event - List removedItemsArray = new List(); - - // Process each removed item based on it's type - for (uint i = 0; i < count; i++) - { - // Native call to retrieve objects from IObjectArray - object item; - removedItems.GetAt(i, - ref TaskbarNativeMethods.IID_IUnknown, - out item); - - // Process item - if (item is IShellItem) - { - removedItemsArray.Add(RemoveCustomCategoryItem((IShellItem)item)); - } - else if (item is IShellLinkW) - { - removedItemsArray.Add(RemoveCustomCategoryLink((IShellLinkW)item)); - } - } - - return removedItemsArray; - } - - private string RemoveCustomCategoryItem(IShellItem item) - { - string path = null; - - if (customCategoriesCollection != null) - { - IntPtr pszString = IntPtr.Zero; - HRESULT hr = item.GetDisplayName(ShellNativeMethods.SIGDN.SIGDN_FILESYSPATH, out pszString); - if (hr == HRESULT.S_OK && pszString != IntPtr.Zero) - { - path = Marshal.PtrToStringAuto(pszString); - // Free the string - Marshal.FreeCoTaskMem(pszString); - } - - // Remove this item from each category - foreach (JumpListCustomCategory category in customCategoriesCollection) - category.RemoveJumpListItem(path); - - } - - return path; - } - - - private string RemoveCustomCategoryLink(IShellLinkW link) - { - string path = null; - - if (customCategoriesCollection != null) - { - StringBuilder sb = new StringBuilder(256); - link.GetPath(sb, sb.Capacity, IntPtr.Zero, 2); - - path = sb.ToString(); - - // Remove this item from each category - foreach (JumpListCustomCategory category in customCategoriesCollection) - category.RemoveJumpListItem(path); - } - - return path; - } - - private void AppendCustomCategories() - { - // Initialize our current index in the custom categories list - int currentIndex = 0; - - // Keep track whether we add the Known Categories to our list - bool knownCategoriesAdded = false; - - if (customCategoriesCollection != null) - { - // Append each category to list - foreach (JumpListCustomCategory category in customCategoriesCollection) - { - // If our current index is same as the KnownCategory OrdinalPosition, - // append the Known Categories - if (!knownCategoriesAdded && currentIndex == KnownCategoryOrdinalPosition) - { - AppendKnownCategories(); - knownCategoriesAdded = true; - } - - // Don't process empty categories - if (category.JumpListItems.Count == 0) - continue; - - IObjectCollection categoryContent = - (IObjectCollection)new CEnumerableObjectCollection(); - - // Add each link's shell representation to the object array - foreach (IJumpListItem link in category.JumpListItems) - { - if (link is JumpListItem) - categoryContent.AddObject(((JumpListItem)link).NativeShellItem); - else if (link is JumpListLink) - categoryContent.AddObject(((JumpListLink)link).NativeShellLink); - } - - // Add current category to destination list - HRESULT hr = customDestinationList.AppendCategory( - category.Name, - (IObjectArray)categoryContent); - - if (!CoreErrorHelper.Succeeded((int)hr)) - { - if ((uint)hr == 0x80040F03) - throw new InvalidOperationException("The file type is not registered with this application."); - else if ((uint)hr == 0x80070005 /*E_ACCESSDENIED*/) - { - // If the recent documents tracking is turned off by the user, - // custom categories or items to an existing category cannot be added. - // The recent documents tracking can be changed via: - // 1. Group Policy “Do not keep history of recently opened documents”. - // 2. Via the user setting “Store and display recently opened items in - // the Start menu and the taskbar” in the Start menu property dialog. - // - throw new UnauthorizedAccessException("Custom categories cannot be added while recent documents tracking is turned off."); - } - else - Marshal.ThrowExceptionForHR((int)hr); - } - - // Increase our current index - currentIndex++; - } - } - - // If the ordinal position was out of range, append the Known Categories - // at the end - if (!knownCategoriesAdded) - AppendKnownCategories(); - } - - private void AppendTaskList() - { - if (userTasks == null || userTasks.Count == 0) - return; - - IObjectCollection taskContent = - (IObjectCollection)new CEnumerableObjectCollection(); - - // Add each task's shell representation to the object array - foreach (IJumpListTask task in userTasks) - { - if (task is JumpListLink) - taskContent.AddObject(((JumpListLink)task).NativeShellLink); - else if (task is JumpListSeparator) - taskContent.AddObject(((JumpListSeparator)task).NativeShellLink); - } - - // Add tasks to the taskbar - HRESULT hr = customDestinationList.AddUserTasks((IObjectArray)taskContent); - - if (!CoreErrorHelper.Succeeded((int)hr)) - { - if ((uint)hr == 0x80040F03) - throw new InvalidOperationException("The file type is not registered with this application."); - else - Marshal.ThrowExceptionForHR((int)hr); - } - } - - private void AppendKnownCategories() - { - if (KnownCategoryToDisplay == JumpListKnownCategoryType.Recent) - customDestinationList.AppendKnownCategory(KNOWNDESTCATEGORY.KDC_RECENT); - else if (KnownCategoryToDisplay == JumpListKnownCategoryType.Frequent) - customDestinationList.AppendKnownCategory(KNOWNDESTCATEGORY.KDC_FREQUENT); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategory.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategory.cs deleted file mode 100644 index d6767bf..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategory.cs +++ /dev/null @@ -1,94 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Collections.Specialized; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a custom category on the taskbar's jump list - /// - public class JumpListCustomCategory - { - private string name; - - internal JumpListItemCollection JumpListItems - { - get; - private set; - } - - /// - /// Category name - /// - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1307:SpecifyStringComparison", MessageId = "System.String.Compare(System.String,System.String)", Justification="We are not currently handling globalization or localization")] - public string Name - { - get { return name; } - set - { - if (String.Compare(name, value) != 0) - { - name = value; - this.CollectionChanged(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); - } - } - } - - - /// - /// Add JumpList items for this category - /// - /// The items to add to the JumpList. - public void AddJumpListItems(params IJumpListItem[] items) - { - foreach (IJumpListItem item in items) - JumpListItems.Add(item); - } - - /// - /// Event that is triggered when the jump list collection is modified - /// - internal event NotifyCollectionChangedEventHandler CollectionChanged = delegate { }; - - /// - /// Creates a new custom category instance - /// - /// Category name - public JumpListCustomCategory(string categoryName) - { - Name = categoryName; - - JumpListItems = new JumpListItemCollection(); - JumpListItems.CollectionChanged += OnJumpListCollectionChanged; - } - - internal void OnJumpListCollectionChanged(object sender, NotifyCollectionChangedEventArgs args) - { - this.CollectionChanged(this, args); - } - - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1307:SpecifyStringComparison", MessageId = "System.String.Compare(System.String,System.String,System.Boolean)"), System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Globalization", "CA1304:SpecifyCultureInfo", MessageId = "System.String.Compare(System.String,System.String,System.Boolean)", Justification = "We are not currently handling globalization or localization")] - internal void RemoveJumpListItem(string path) - { - List itemsToRemove = new List(); - - // Check for items to remove - foreach (IJumpListItem item in JumpListItems) - { - if (string.Compare(path, item.Path, true) == 0) - { - itemsToRemove.Add(item); - } - } - - // Remove matching items - for (int i = 0; i < itemsToRemove.Count; i++) - { - JumpListItems.Remove(itemsToRemove[i]); - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs deleted file mode 100644 index bf83d0e..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListCustomCategoryCollection.cs +++ /dev/null @@ -1,130 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a collection of custom categories - /// - internal class JumpListCustomCategoryCollection - : ICollection, INotifyCollectionChanged - { - private List categories = new List(); - - /// - /// Event to trigger anytime this collection is modified - /// - public event NotifyCollectionChangedEventHandler CollectionChanged = delegate { }; - - /// - /// Determines if this collection is read-only - /// - public bool IsReadOnly { get; set; } - - /// - /// The number of items in this collection - /// - public int Count - { - get { return categories.Count; } - } - - /// - /// Add the specified category to this collection - /// - /// Category to add - public void Add(JumpListCustomCategory category) - { - categories.Add(category); - - // Trigger CollectionChanged event - CollectionChanged( - this, - new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Add, - category)); - - // Make sure that a collection changed event is fire if this category - // or it's corresponding jumplist is modified - category.CollectionChanged += CollectionChanged; - category.JumpListItems.CollectionChanged += CollectionChanged; - } - - /// - /// Remove the specified category from this collection - /// - /// Category item to remove - /// True if item was removed. - public bool Remove(JumpListCustomCategory category) - { - bool removed = categories.Remove(category); - - if (removed == true) - { - // Trigger CollectionChanged event - CollectionChanged( - this, - new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Remove, - 0)); - } - - return removed; - } - - /// - /// Clear all items from the collection - /// - public void Clear() - { - categories.Clear(); - - CollectionChanged( - this, - new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Reset)); - } - - /// - /// Determine if this collection contains the specified item - /// - /// Category to search for - /// True if category was found - public bool Contains(JumpListCustomCategory category) - { - return categories.Contains(category); - } - - /// - /// Copy this collection to a compatible one-dimensional array, - /// starting at the specified index of the target array - /// - /// Array to copy to - /// Index of target array to start copy - public void CopyTo(JumpListCustomCategory[] array, int index) - { - categories.CopyTo(array, index); - } - - /// - /// Returns an enumerator that iterates through this collection. - /// - /// Enumerator to iterate through this collection. - IEnumerator IEnumerable.GetEnumerator() - { - return categories.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through this collection. - /// - /// Enumerator to iterate through this collection. - IEnumerator IEnumerable.GetEnumerator() - { - return categories.GetEnumerator(); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItem.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItem.cs deleted file mode 100644 index 1dd57e9..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItem.cs +++ /dev/null @@ -1,43 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a jump list item. - /// - public class JumpListItem : ShellFile, IJumpListItem - { - /// - /// Creates a jump list item with the specified path. - /// - /// The path to the jump list item. - /// The file type should associate the given file - /// with the calling application. - public JumpListItem(string path) - : base(path) - { - - } - - #region IJumpListItem Members - - /// - /// Gets or sets the target path for this jump list item. - /// - public new string Path - { - get - { - return base.Path; - } - set - { - base.ParsingName = value; - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItemCollection.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItemCollection.cs deleted file mode 100644 index 2cfda5c..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListItemCollection.cs +++ /dev/null @@ -1,126 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System.Collections; -using System.Collections.Generic; -using System.Collections.Specialized; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a collection of jump list items. - /// - /// The type of elements in this collection. - internal class JumpListItemCollection : ICollection, INotifyCollectionChanged - { - private List items = new List(); - - /// - /// Occurs anytime a change is made to the underlying collection. - /// - public event NotifyCollectionChangedEventHandler CollectionChanged = delegate { }; - - /// - /// Gets or sets a value that determines if this collection is read-only. - /// - public bool IsReadOnly { get; set; } - - /// - /// Gets a count of the items currently in this collection. - /// - public int Count - { - get { return items.Count; } - } - - /// - /// Adds the specified item to this collection. - /// - /// The item to add. - public void Add(T item) - { - items.Add(item); - - // Trigger CollectionChanged event - CollectionChanged( - this, - new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Add, - item)); - } - - /// - /// Removes the first instance of the specified item from the collection. - /// - /// The item to remove. - /// true if an item was removed, otherwise false if no items were removed. - public bool Remove(T item) - { - bool removed = items.Remove(item); - - if (removed == true) - { - // Trigger CollectionChanged event - CollectionChanged( - this, - new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Remove, - 0)); - } - - return removed; - } - - /// - /// Clears all items from this collection. - /// - public void Clear() - { - items.Clear(); - - // Trigger CollectionChanged event - CollectionChanged( - this, - new NotifyCollectionChangedEventArgs( - NotifyCollectionChangedAction.Reset)); - } - - /// - /// Determines if this collection contains the specified item. - /// - /// The search item. - /// true if an item was found, otherwise false. - public bool Contains(T item) - { - return items.Contains(item); - } - - /// - /// Copies this collection to a compatible one-dimensional array, - /// starting at the specified index of the target array. - /// - /// The array name. - /// The index of the starting element. - public void CopyTo(T[] array, int index) - { - items.CopyTo(array, index); - } - - /// - /// Returns an enumerator that iterates through a collection. - /// - /// An enumerator to iterate through this collection. - IEnumerator IEnumerable.GetEnumerator() - { - return items.GetEnumerator(); - } - - /// - /// Returns an enumerator that iterates through a collection of a specified type. - /// - /// An enumerator to iterate through this collection. - IEnumerator IEnumerable.GetEnumerator() - { - return items.GetEnumerator(); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs deleted file mode 100644 index 10ead15..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListLink.cs +++ /dev/null @@ -1,187 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a jump list link object. - /// - public class JumpListLink : IJumpListTask, IJumpListItem, IDisposable - { - internal static PropertyKey PKEY_Title = SystemProperties.System.Title; - - /// - /// Initializes a new instance of a JumpListLink with the specified path. - /// - /// The path to the item. The path is required for the JumpList Link - /// The title for the JumpListLink item. The title is required for the JumpList link. - public JumpListLink(string pathValue, string titleValue) - { - if (string.IsNullOrEmpty(pathValue)) - throw new ArgumentNullException("pathValue", "JumpListLink's path is required and cannot be null."); - - if (string.IsNullOrEmpty(titleValue)) - throw new ArgumentNullException("titleValue", "JumpListLink's title is required and cannot be null."); - - Path = pathValue; - Title = titleValue; - } - - private string title; - /// - /// Gets or sets the link's title - /// - public string Title - { - get { return title; } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value", "JumpListLink's title is required and cannot be null."); - - title = value; - } - } - - private string path; - /// - /// Gets or sets the link's path - /// - public string Path - { - get { return path; } - set - { - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value", "JumpListLink's title is required and cannot be null."); - - path = value; - } - } - - /// - /// Gets or sets the icon reference (location and index) of the link's icon. - /// - public IconReference IconReference { get; set; } - - /// - /// Gets or sets the object's arguments (passed to the command line). - /// - public string Arguments { get; set; } - - /// - /// Gets or sets the object's working directory. - /// - public string WorkingDirectory { get; set; } - - /// - /// Gets or sets the show command of the lauched application. - /// - public WindowShowCommand ShowCommand { get; set; } - - private IPropertyStore nativePropertyStore; - private IShellLinkW nativeShellLink; - /// - /// Gets an IShellLinkW representation of this object - /// - internal IShellLinkW NativeShellLink - { - get - { - if (nativeShellLink != null) - { - Marshal.ReleaseComObject(nativeShellLink); - nativeShellLink = null; - } - - nativeShellLink = (IShellLinkW)new CShellLink(); - - if (nativePropertyStore != null) - { - Marshal.ReleaseComObject(nativePropertyStore); - nativePropertyStore = null; - } - - nativePropertyStore = (IPropertyStore)nativeShellLink; - - PropVariant propVariant = new PropVariant(); - - nativeShellLink.SetPath(Path); - - if (!String.IsNullOrEmpty(IconReference.ModuleName)) - nativeShellLink.SetIconLocation(IconReference.ModuleName, IconReference.ResourceId); - - if (!String.IsNullOrEmpty(Arguments)) - nativeShellLink.SetArguments(Arguments); - - if (!String.IsNullOrEmpty(WorkingDirectory)) - nativeShellLink.SetWorkingDirectory(WorkingDirectory); - - nativeShellLink.SetShowCmd((uint)ShowCommand); - - propVariant.SetString(Title); - nativePropertyStore.SetValue(ref PKEY_Title, ref propVariant); - propVariant.Clear(); - - nativePropertyStore.Commit(); - - return nativeShellLink; - } - } - - #region IJumpListTask Members - - #endregion - - #region IDisposable Members - - /// - /// Release the native and managed objects - /// - /// Indicates that this is being called from Dispose(), rather than the finalizer. - public void Dispose(bool disposing) - { - if (disposing) - { - title = null; - } - - if (nativePropertyStore != null) - { - Marshal.ReleaseComObject(nativePropertyStore); - nativePropertyStore = null; - } - - if (nativeShellLink != null) - { - Marshal.ReleaseComObject(nativeShellLink); - nativeShellLink = null; - } - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Implement the finalizer. - /// - ~JumpListLink() - { - Dispose(false); - } - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListSeparator.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListSeparator.cs deleted file mode 100644 index c3b8ae9..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/JumpListSeparator.cs +++ /dev/null @@ -1,109 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Shell; -using Microsoft.WindowsAPICodePack.Shell.PropertySystem; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a separator in the user task list. The JumpListSeparator control - /// can only be used in a user task list. - /// - public class JumpListSeparator : IJumpListTask, IDisposable - { - internal static PropertyKey PKEY_AppUserModel_IsDestListSeparator = SystemProperties.System.AppUserModel.IsDestListSeparator; - - /// - /// Initializes a new instance of a JumpListSeparator. - /// - public JumpListSeparator() - { - } - - private IPropertyStore nativePropertyStore; - private IShellLinkW nativeShellLink; - /// - /// Gets an IShellLinkW representation of this object - /// - internal IShellLinkW NativeShellLink - { - get - { - if (nativeShellLink != null) - { - Marshal.ReleaseComObject(nativeShellLink); - nativeShellLink = null; - } - - nativeShellLink = (IShellLinkW)new CShellLink(); - - if (nativePropertyStore != null) - { - Marshal.ReleaseComObject(nativePropertyStore); - nativePropertyStore = null; - } - - nativePropertyStore = (IPropertyStore)nativeShellLink; - - PropVariant propVariant = new PropVariant(); - - propVariant.SetBool(true); - nativePropertyStore.SetValue(ref PKEY_AppUserModel_IsDestListSeparator, ref propVariant); - propVariant.Clear(); - - nativePropertyStore.Commit(); - - return nativeShellLink;; - } - } - - - #region IJumpListTask Members - - #endregion - - #region IDisposable Members - - /// - /// Release the native and managed objects - /// - /// Indicates that this is being called from Dispose(), rather than the finalizer. - public void Dispose(bool disposing) - { - if (nativePropertyStore != null) - { - Marshal.ReleaseComObject(nativePropertyStore); - nativePropertyStore = null; - } - - if (nativeShellLink != null) - { - Marshal.ReleaseComObject(nativeShellLink); - nativeShellLink = null; - } - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Implement the finalizer. - /// - ~JumpListSeparator() - { - Dispose(false); - } - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/ProgressBarStateSettings.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/ProgressBarStateSettings.cs deleted file mode 100644 index bbe474f..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/ProgressBarStateSettings.cs +++ /dev/null @@ -1,86 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - internal class ProgressBarStateSettings - { - internal readonly int DefaultMaxValue = 100; - internal readonly int DefaultMinValue = 0; - - /// - /// Represents a collection of name/value pairs for each HWND and it’s - /// current progress bar value. - /// - internal IDictionary CurrentValues; - - /// - /// Represents a collection of name/value pairs for each HWND and it’s - /// current progress bar max values - /// - internal IDictionary MaxValues; - - /// - /// Represents a collection of name/value pairs for each HWND and it’s - /// current progress bar state. - /// - internal IDictionary States; - - internal ProgressBarStateSettings() - { - CurrentValues = new Dictionary(); - MaxValues = new Dictionary(); - States = new Dictionary(); - } - - private static ProgressBarStateSettings instance; - /// - /// Returns a singleton instance of the ProgressBarStateSettings class - /// - internal static ProgressBarStateSettings Instance - { - get - { - if (instance == null) - instance = new ProgressBarStateSettings(); - - return instance; - } - } - - /// - /// Represents the HWND for the application or default window. - /// - internal IntPtr DefaultHandle - { - get - { - return TaskbarManager.Instance.OwnerHandle; - } - } - - /// - /// Refreshes the native taskbar with the current progressbar values for the given HWND - /// - /// Current window handle - /// Current progress bar value - /// Current progress bar max value - internal void RefreshValue(IntPtr hwnd, int currentValue, int maxValue) - { - TaskbarManager.Instance.TaskbarList.SetProgressValue(hwnd, (ulong)currentValue, (ulong)maxValue); - } - - /// - /// Refreshes the native taskbar with the current progressbar state for the given HWND - /// - /// Current window handle - /// Current progress bar state - internal void RefreshState(IntPtr hwnd, TaskbarProgressBarState state) - { - TaskbarManager.Instance.TaskbarList.SetProgressState(hwnd, (TBPFLAG)state); - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs deleted file mode 100644 index 9457712..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnail.cs +++ /dev/null @@ -1,568 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Drawing; -using System.IO; -using System.Threading; -using System.Windows; -using System.Windows.Forms; -using System.Windows.Interop; -using System.Windows.Media.Imaging; -using Microsoft.WindowsAPICodePack.Shell; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a tabbed thumbnail on the taskbar for a given window or a control. - /// - public class TabbedThumbnail : IDisposable - { - #region Internal members - - internal IntPtr WindowHandle - { - get; - set; - } - - internal IntPtr ParentWindowHandle - { - get; - set; - } - - internal UIElement WindowsControl - { - get; - set; - } - - internal Window WindowsControlParentWindow - { - get; - set; - } - - private TaskbarWindow taskbarWindow; - internal TaskbarWindow TaskbarWindow - { - get { return taskbarWindow; } - set - { - taskbarWindow = value; - - // If we have a TaskbarWindow assigned, set it's icon - if (taskbarWindow != null && taskbarWindow.TabbedThumbnailProxyWindow != null) - TaskbarWindow.TabbedThumbnailProxyWindow.Icon = Icon; - } - } - - private bool addedToTaskbar; - internal bool AddedToTaskbar - { - get - { - return addedToTaskbar; - } - set - { - addedToTaskbar = value; - - // The user has updated the clipping region, so invalidate our existing preview - if (TaskbarWindowManager.Instance != null && ClippingRectangle != null) - TaskbarWindowManager.Instance.InvalidatePreview(this.TaskbarWindow); - } - } - - internal bool RemovedFromTaskbar - { - get; - set; - } - - #endregion - - #region Constructors - - /// - /// Creates a new TabbedThumbnail with the given window handle of the parent and - /// a child control/window's handle (e.g. TabPage or Panel) - /// - /// Window handle of the parent window. - /// This window has to be a top-level window and the handle cannot be null or IntPtr.Zero - /// Window handle of the child control or window for which a tabbed - /// thumbnail needs to be displayed - public TabbedThumbnail(IntPtr parentWindowHandle, IntPtr windowHandle) - { - if (parentWindowHandle == IntPtr.Zero) - throw new ArgumentException("Parent window handle cannot be zero.", "parentWindowHandle"); - if (windowHandle == IntPtr.Zero) - throw new ArgumentException("Child control's window handle cannot be zero.", "windowHandle"); - - WindowHandle = windowHandle; - ParentWindowHandle = parentWindowHandle; - } - - /// - /// Creates a new TabbedThumbnail with the given window handle of the parent and - /// a child control (e.g. TabPage or Panel) - /// - /// Window handle of the parent window. - /// This window has to be a top-level window and the handle cannot be null or IntPtr.Zero - /// Child control for which a tabbed thumbnail needs to be displayed - /// This method can also be called when using a WindowsFormHost control in a WPF application. - /// Call this method with the main WPF Window's handle, and windowsFormHost.Child control. - public TabbedThumbnail(IntPtr parentWindowHandle, Control control) - { - if (parentWindowHandle == IntPtr.Zero) - throw new ArgumentException("Parent window handle cannot be zero.", "parentWindowHandle"); - if (control == null) - throw new ArgumentNullException("control"); - - WindowHandle = control.Handle; - ParentWindowHandle = parentWindowHandle; - } - - /// - /// Creates a new TabbedThumbnail with the given window handle of the parent and - /// a WPF child Window. For WindowsFormHost control, use TabbedThumbnail(IntPtr, Control) overload and pass - /// the WindowsFormHost.Child as the second parameter. - /// - /// Parent window for the UIElement control. - /// This window has to be a top-level window and the handle cannot be null - /// WPF Control (UIElement) for which a tabbed thumbnail needs to be displayed - /// Offset point used for displaying the peek bitmap. This setting is - /// recomended for hidden WPF controls as it is difficult to calculate their offset. - public TabbedThumbnail(Window parentWindow, UIElement windowsControl, Vector peekOffset) - { - if (windowsControl == null) - throw new ArgumentNullException("control"); - if (parentWindow == null) - throw new ArgumentNullException("parentWindow"); - - WindowHandle = IntPtr.Zero; - WindowsControl = windowsControl; - WindowsControlParentWindow = parentWindow; - ParentWindowHandle = (new WindowInteropHelper(parentWindow)).Handle; - PeekOffset = peekOffset; - } - - #endregion - - #region Public Properties - - /// - /// This event is raised when the Title property changes. - /// - public event EventHandler TitleChanged; - - /// - /// This event is raised when the Tooltip property changes. - /// - public event EventHandler TooltipChanged; - - private string title; - /// - /// Title for the window shown as the taskbar thumbnail. - /// - public string Title - { - get - { - return title; - } - set - { - if (value != title) - { - title = value; - - if (TitleChanged != null) - TitleChanged(this, EventArgs.Empty); - } - } - } - - private string tooltip; - /// - /// Tooltip to be shown for this thumbnail on the taskbar. - /// By default this is full title of the window shown on the taskbar. - /// - public string Tooltip - { - get { return tooltip; } - set - { - if (value != tooltip) - { - tooltip = value; - - if (TooltipChanged != null) - TooltipChanged(this, EventArgs.Empty); - } - } - } - - internal Icon Icon - { - get; - private set; - } - - /// - /// Sets the window icon for this thumbnail preview - /// - /// System.Drawing.Icon for the window/control associated with this preview - public void SetWindowIcon(Icon icon) - { - Icon = icon; - - // If we have a TaskbarWindow assigned, set its icon - if (TaskbarWindow != null && TaskbarWindow.TabbedThumbnailProxyWindow != null) - TaskbarWindow.TabbedThumbnailProxyWindow.Icon = Icon; - } - - /// - /// Sets the window icon for this thumbnail preview - /// - /// Icon handle (hIcon) for the window/control associated with this preview - /// This method will not release the icon handle. It is the caller's responsibility to release the icon handle. - public void SetWindowIcon(IntPtr hIcon) - { - if (hIcon != IntPtr.Zero) - Icon = System.Drawing.Icon.FromHandle(hIcon); - else - Icon = null; - - // If we have a TaskbarWindow assigned, set it's icon - if (TaskbarWindow != null && TaskbarWindow.TabbedThumbnailProxyWindow != null) - TaskbarWindow.TabbedThumbnailProxyWindow.Icon = Icon; - } - - private Rectangle? clippingRectangle; - /// - /// Specifies that only a portion of the window's client area - /// should be used in the window's thumbnail. - /// A value of null will clear the clipping area and use the default thumbnail. - /// - public Rectangle? ClippingRectangle - { - get { return clippingRectangle; } - set - { - clippingRectangle = value; - - // The user has updated the clipping region, so invalidate our existing preview - if (TaskbarWindowManager.Instance != null) - TaskbarWindowManager.Instance.InvalidatePreview(this.TaskbarWindow); - } - } - - internal IntPtr CurrentHBitmap - { - get; - set; - } - - /// - /// Override the thumbnail and peek bitmap. - /// By providing this bitmap manually, Thumbnail Window manager will provide the - /// Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. - /// Use this property to update the bitmap whenever the control is updated and the user - /// needs to be shown a new thumbnail on the taskbar preview (or aero peek). - /// - /// The image to use. - /// - /// If the bitmap doesn't have the right dimensions, the DWM may scale it or not - /// render certain areas as appropriate - it is the user's responsibility - /// to render a bitmap with the proper dimensions. - /// - public void SetImage(Bitmap bitmap) - { - if (bitmap != null) - { - SetImage(bitmap.GetHbitmap()); - } - else - { - SetImage(IntPtr.Zero); - } - } - - /// - /// Override the thumbnail and peek bitmap. - /// By providing this bitmap manually, Thumbnail Window manager will provide the - /// Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. - /// Use this property to update the bitmap whenever the control is updated and the user - /// needs to be shown a new thumbnail on the taskbar preview (or aero peek). - /// - /// The image to use. - /// - /// If the bitmap doesn't have the right dimensions, the DWM may scale it or not - /// render certain areas as appropriate - it is the user's responsibility - /// to render a bitmap with the proper dimensions. - /// - public void SetImage(BitmapSource bitmapSource) - { - if (bitmapSource == null) - { - SetImage(IntPtr.Zero); - return; - } - - using (MemoryStream memoryStream = new MemoryStream()) - { - BmpBitmapEncoder encoder = new BmpBitmapEncoder(); - encoder.Frames.Add(BitmapFrame.Create(bitmapSource)); - encoder.Save(memoryStream); - memoryStream.Position = 0; - Bitmap bmp = new Bitmap(memoryStream); - if (bmp != null) - { - try - { - SetImage(bmp.GetHbitmap()); - } - finally - { - //Delete the bitmap - bmp.Dispose(); - bmp = null; - } - } - } - } - - - /// - /// Override the thumbnail and peek bitmap. - /// By providing this bitmap manually, Thumbnail Window manager will provide the - /// Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. - /// Use this property to update the bitmap whenever the control is updated and the user - /// needs to be shown a new thumbnail on the taskbar preview (or aero peek). - /// - /// A bitmap handle for the image to use. - /// When the TabbedThumbnail is finalized, this class will delete the provided hBitmap. - /// - /// If the bitmap doesn't have the right dimensions, the DWM may scale it or not - /// render certain areas as appropriate - it is the user's responsibility - /// to render a bitmap with the proper dimensions. - /// - internal void SetImage(IntPtr hBitmap) - { - - // Before we set a new bitmap, dispose the old one - if (CurrentHBitmap != IntPtr.Zero) - { - ShellNativeMethods.DeleteObject(CurrentHBitmap); - } - - // Set the new bitmap - CurrentHBitmap = hBitmap; - - // Let DWM know to invalidate its cached thumbnail/preview and ask us for a new one (i.e. the one - // user just updated) - if (TaskbarWindowManager.Instance != null) - TaskbarWindowManager.Instance.InvalidatePreview(TaskbarWindow); - } - - /// - /// Specifies whether a standard window frame will be displayed - /// around the bitmap. If the bitmap represents a top-level window, - /// you would probably set this flag to true. If the bitmap - /// represents a child window (or a frameless window), you would - /// probably set this flag to false. - /// - public bool DisplayFrameAroundBitmap - { - get; - set; - } - - /// - /// Invalidate any existing thumbnail preview. Calling this method - /// will force DWM to request a new bitmap next time user previews the thumbnails - /// or requests Aero peek preview. - /// - public void InvalidatePreview() - { - // invalidate the thumbnail bitmap - if (TaskbarWindowManager.Instance != null) - { - SetImage(IntPtr.Zero); - } - } - - /// - /// Gets or sets the offset used for displaying the peek bitmap. This setting is - /// recomended for hidden WPF controls as it is difficult to calculate their offset. - /// - public Vector? PeekOffset - { - get; - set; - } - - #endregion - - #region Events - - - /// - /// The event that occurs when a tab is closed on the taskbar thumbnail preview. - /// - public event EventHandler TabbedThumbnailClosed; - - /// - /// The event that occurs when a tab is maximized via the taskbar thumbnail preview (context menu). - /// - public event EventHandler TabbedThumbnailMaximized; - - /// - /// The event that occurs when a tab is minimized via the taskbar thumbnail preview (context menu). - /// - public event EventHandler TabbedThumbnailMinimized; - - /// - /// The event that occurs when a tab is activated (clicked) on the taskbar thumbnail preview. - /// - public event EventHandler TabbedThumbnailActivated; - - /// - /// The event that occurs when a thumbnail or peek bitmap is requested by the user. - /// - public event EventHandler TabbedThumbnailBitmapRequested; - - - internal void OnTabbedThumbnailMaximized() - { - if (TabbedThumbnailMaximized != null) - { - TabbedThumbnailMaximized(this, GetTabbedThumbnailEventArgs()); - } - else - { - // No one is listening to these events. - // Forward the message to the main window - CoreNativeMethods.SendMessage(ParentWindowHandle, TabbedThumbnailNativeMethods.WM_SYSCOMMAND, new IntPtr(TabbedThumbnailNativeMethods.SC_MAXIMIZE), IntPtr.Zero); - } - } - - internal void OnTabbedThumbnailMinimized() - { - if (TabbedThumbnailMinimized != null) - TabbedThumbnailMinimized(this, GetTabbedThumbnailEventArgs()); - else - { - // No one is listening to these events. - // Forward the message to the main window - CoreNativeMethods.SendMessage(ParentWindowHandle, TabbedThumbnailNativeMethods.WM_SYSCOMMAND, new IntPtr(TabbedThumbnailNativeMethods.SC_MINIMIZE), IntPtr.Zero); - } - - } - - internal void OnTabbedThumbnailClosed() - { - if (TabbedThumbnailClosed != null) - TabbedThumbnailClosed(this, GetTabbedThumbnailEventArgs()); - else - { - // No one is listening to these events. - // Forward the message to the main window - CoreNativeMethods.SendMessage(ParentWindowHandle, TabbedThumbnailNativeMethods.WM_NCDESTROY, IntPtr.Zero, IntPtr.Zero); - } - - // Remove it from the internal list as well as the taskbar - TaskbarManager.Instance.TabbedThumbnail.RemoveThumbnailPreview(this); - } - - internal void OnTabbedThumbnailActivated() - { - if (TabbedThumbnailActivated != null) - TabbedThumbnailActivated(this, GetTabbedThumbnailEventArgs()); - else - { - // No one is listening to these events. - // Forward the message to the main window - CoreNativeMethods.SendMessage(ParentWindowHandle, TabbedThumbnailNativeMethods.WM_ACTIVATEAPP, new IntPtr(1), new IntPtr(Thread.CurrentThread.GetHashCode())); - } - } - - internal void OnTabbedThumbnailBitmapRequested() - { - if (TabbedThumbnailBitmapRequested != null) - { - TabbedThumbnailBitmapRequestedEventArgs eventArgs = null; - - if (this.WindowHandle != IntPtr.Zero) - eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowHandle, this); - else if (this.WindowsControl != null) - eventArgs = new TabbedThumbnailBitmapRequestedEventArgs(this.WindowsControl, this); - - TabbedThumbnailBitmapRequested(this, eventArgs); - } - } - - private TabbedThumbnailEventArgs GetTabbedThumbnailEventArgs() - { - TabbedThumbnailEventArgs eventArgs = null; - - if (this.WindowHandle != IntPtr.Zero) - eventArgs = new TabbedThumbnailEventArgs(this.WindowHandle, this); - else if (this.WindowsControl != null) - eventArgs = new TabbedThumbnailEventArgs(this.WindowsControl, this); - - return eventArgs; - } - - #endregion - - #region IDisposable Members - - /// - /// - /// - ~TabbedThumbnail() - { - Dispose(false); - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Release the native objects. - /// - /// - public void Dispose(bool disposing) - { - if (disposing) - { - taskbarWindow = null; - - if (Icon != null) - Icon.Dispose(); - Icon = null; - - title = null; - tooltip = null; - WindowsControl = null; - } - - if (CurrentHBitmap != IntPtr.Zero) - { - ShellNativeMethods.DeleteObject(CurrentHBitmap); - CurrentHBitmap = IntPtr.Zero; - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailBitmapRequestedEventArgs.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailBitmapRequestedEventArgs.cs deleted file mode 100644 index d630c33..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailBitmapRequestedEventArgs.cs +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Drawing; -using System.Windows; -using System.Windows.Media.Imaging; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Event args for the TabbedThumbnailBitmapRequested event. The event allows applications to - /// provide a bitmap for the tabbed thumbnail's preview and peek. The application should also - /// set the Handled property if a custom bitmap is provided. - /// - public class TabbedThumbnailBitmapRequestedEventArgs : TabbedThumbnailEventArgs - { - /// - /// Creates a Event Args for a TabbedThumbnailBitmapRequested event. - /// - /// Window handle for the control/window related to the event - /// TabbedThumbnail related to this event - public TabbedThumbnailBitmapRequestedEventArgs(IntPtr windowHandle, TabbedThumbnail preview) - : base(windowHandle, preview) - { - } - - /// - /// Creates a Event Args for a TabbedThumbnailBitmapRequested event. - /// - /// WPF Control (UIElement) related to the event - /// TabbedThumbnail related to this event - public TabbedThumbnailBitmapRequestedEventArgs(UIElement windowsControl, TabbedThumbnail preview) - : base(windowsControl, preview) - { - } - - - /// - /// Gets or sets a value indicating whether the TabbedThumbnailBitmapRequested event was handled. - /// Set this property if the SetImage method is called with a custom bitmap for the thumbnail/peek. - /// - public bool Handled - { - get; - set; - } - - /// - /// Override the thumbnail and peek bitmap. - /// By providing this bitmap manually, Thumbnail Window manager will provide the - /// Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. - /// Use this property to update the bitmap whenever the control is updated and the user - /// needs to be shown a new thumbnail on the taskbar preview (or aero peek). - /// - /// The bitmap to be displayed. - /// - /// If the bitmap doesn't have the right dimensions, the DWM may scale it or not - /// render certain areas as appropriate - it is the user's responsibility - /// to render a bitmap with the proper dimensions. - /// - public void SetImage(Bitmap bitmap) - { - base.TabbedThumbnail.SetImage(bitmap); - } - - /// - /// Override the thumbnail and peek bitmap. - /// By providing this bitmap manually, Thumbnail Window manager will provide the - /// Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. - /// Use this property to update the bitmap whenever the control is updated and the user - /// needs to be shown a new thumbnail on the taskbar preview (or aero peek). - /// - /// The bitmap to be displayed. - /// - /// If the bitmap doesn't have the right dimensions, the DWM may scale it or not - /// render certain areas as appropriate - it is the user's responsibility - /// to render a bitmap with the proper dimensions. - /// - public void SetImage(BitmapSource bitmapSource) - { - base.TabbedThumbnail.SetImage(bitmapSource); - } - - - /// - /// Override the thumbnail and peek bitmap. - /// By providing this bitmap manually, Thumbnail Window manager will provide the - /// Desktop Window Manager (DWM) this bitmap instead of rendering one automatically. - /// Use this property to update the bitmap whenever the control is updated and the user - /// needs to be shown a new thumbnail on the taskbar preview (or aero peek). - /// - /// The bitmap to be displayed. - /// - /// If the bitmap doesn't have the right dimensions, the DWM may scale it or not - /// render certain areas as appropriate - it is the user's responsibility - /// to render a bitmap with the proper dimensions. - /// - public void SetImage(IntPtr hBitmap) - { - base.TabbedThumbnail.SetImage(hBitmap); - } - - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailEventArgs.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailEventArgs.cs deleted file mode 100644 index 4e2dd92..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailEventArgs.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Windows; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Event args for various Tabbed Thumbnail related events - /// - public class TabbedThumbnailEventArgs : EventArgs - { - /// - /// Creates a Event Args for a specific tabbed thumbnail event. - /// - /// Window handle for the control/window related to the event - /// TabbedThumbnail related to this event - public TabbedThumbnailEventArgs(IntPtr windowHandle, TabbedThumbnail preview) - { - TabbedThumbnail = preview; - WindowHandle = windowHandle; - WindowsControl = null; - } - - /// - /// Creates a Event Args for a specific tabbed thumbnail event. - /// - /// WPF Control (UIElement) related to the event - /// TabbedThumbnail related to this event - public TabbedThumbnailEventArgs(UIElement windowsControl, TabbedThumbnail preview) - { - TabbedThumbnail = preview; - WindowHandle = IntPtr.Zero; - WindowsControl = windowsControl; - } - - /// - /// Gets the Window handle for the specific control/window that is related to this event. - /// - /// For WPF Controls (UIElement) the WindowHandle will be IntPtr.Zero. - /// Check the WindowsControl property to get the specific control associated with this event. - public IntPtr WindowHandle - { - get; - private set; - } - - /// - /// Gets the WPF Control (UIElement) that is related to this event. This property may be null - /// for non-WPF applications. - /// - public UIElement WindowsControl - { - get; - private set; - } - - /// - /// Gets the TabbedThumbnail associated with this event. - /// - public TabbedThumbnail TabbedThumbnail - { - get; - private set; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs deleted file mode 100644 index 7ed1b8d..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailManager.cs +++ /dev/null @@ -1,427 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Runtime.InteropServices; -using System.Windows; -using System.Windows.Forms; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents the main class for adding and removing tabbed thumbnails on the Taskbar - /// for child windows and controls. - /// - public class TabbedThumbnailManager - { - /// - /// Internal dictionary to keep track of the user's window handle and its - /// corresponding thumbnail preview objects. - /// - private IDictionary tabbedThumbnailList; - private IDictionary tabbedThumbnailListWPF; // list for WPF controls - - /// - /// Internal constructor that creates a new dictionary for keeping track of the window handles - /// and their corresponding thumbnail preview objects. - /// - internal TabbedThumbnailManager() - { - tabbedThumbnailList = new Dictionary(); - tabbedThumbnailListWPF = new Dictionary(); - } - - /// - /// Adds a new tabbed thumbnail to the taskbar. - /// - /// Thumbnail preview for a specific window handle or control. The preview - /// object can be initialized with specific properties for the title, bitmap, and tooltip. - /// If the tabbed thumbnail has already been added - public void AddThumbnailPreview(TabbedThumbnail preview) - { - if (preview.WindowHandle == IntPtr.Zero) // it's most likely a UI Element - { - if (tabbedThumbnailListWPF.ContainsKey(preview.WindowsControl)) - throw new ArgumentException("This preview has already been added"); - } - else - { - // Regular control with a valid handle - if (tabbedThumbnailList.ContainsKey(preview.WindowHandle)) - throw new ArgumentException("This preview has already been added"); - } - - TaskbarWindowManager.Instance.AddTabbedThumbnail(preview); - - // Add the preview and window manager to our cache - - // Probably a UIElement control - if (preview.WindowHandle == IntPtr.Zero) - tabbedThumbnailListWPF.Add(preview.WindowsControl, preview); - else - tabbedThumbnailList.Add(preview.WindowHandle, preview); - - preview.InvalidatePreview(); - } - - /// - /// Gets the TabbedThumbnail object associated with the given window handle - /// - /// Window handle for the control/window - /// TabbedThumbnail associated with the given window handle - public TabbedThumbnail GetThumbnailPreview(IntPtr windowHandle) - { - if (windowHandle == IntPtr.Zero) - throw new ArgumentException("Window handle is invalid", "windowHandle"); - - if (tabbedThumbnailList.ContainsKey(windowHandle)) - return tabbedThumbnailList[windowHandle]; - else - return null; - } - - /// - /// Gets the TabbedThumbnail object associated with the given control - /// - /// Specific control for which the preview object is requested - /// TabbedThumbnail associated with the given control - public TabbedThumbnail GetThumbnailPreview(Control control) - { - if (control == null) - throw new ArgumentNullException("control"); - - return GetThumbnailPreview(control.Handle); - } - - /// - /// Gets the TabbedThumbnail object associated with the given WPF Window - /// - /// WPF Control (UIElement) for which the preview object is requested - /// TabbedThumbnail associated with the given WPF Window - public TabbedThumbnail GetThumbnailPreview(UIElement windowsControl) - { - if (windowsControl == null) - throw new ArgumentNullException("windowsControl"); - - if (tabbedThumbnailListWPF.ContainsKey(windowsControl)) - return tabbedThumbnailListWPF[windowsControl]; - else - return null; - - } - - /// - /// Remove the tabbed thumbnail from the taskbar. - /// - /// TabbedThumbnail associated with the control/window that - /// is to be removed from the taskbar - public void RemoveThumbnailPreview(TabbedThumbnail preview) - { - if (preview == null) - throw new ArgumentNullException("preview"); - - if (tabbedThumbnailList.ContainsKey(preview.WindowHandle)) - RemoveThumbnailPreview(preview.WindowHandle); - else if (tabbedThumbnailListWPF.ContainsKey(preview.WindowsControl)) - RemoveThumbnailPreview(preview.WindowsControl); - } - - /// - /// Remove the tabbed thumbnail from the taskbar. - /// - /// TabbedThumbnail associated with the window handle that - /// is to be removed from the taskbar - public void RemoveThumbnailPreview(IntPtr windowHandle) - { - if (tabbedThumbnailList.ContainsKey(windowHandle)) - { - TaskbarWindowManager.Instance.UnregisterTab(tabbedThumbnailList[windowHandle].TaskbarWindow); - - tabbedThumbnailList.Remove(windowHandle); - - TaskbarWindow taskbarWindow = TaskbarWindowManager.Instance.GetTaskbarWindow(windowHandle, TaskbarProxyWindowType.TabbedThumbnail); - - if (taskbarWindow != null) - { - if (TaskbarWindowManager.Instance.taskbarWindowList.Contains(taskbarWindow)) - TaskbarWindowManager.Instance.taskbarWindowList.Remove(taskbarWindow); - taskbarWindow.Dispose(); - taskbarWindow = null; - } - } - else - throw new ArgumentException("The given control has not been added to the taskbar."); - } - - /// - /// Remove the tabbed thumbnail from the taskbar. - /// - /// TabbedThumbnail associated with the control that - /// is to be removed from the taskbar - public void RemoveThumbnailPreview(Control control) - { - if (control == null) - throw new ArgumentNullException("control"); - - IntPtr handle = control.Handle; - - RemoveThumbnailPreview(handle); - } - - /// - /// Remove the tabbed thumbnail from the taskbar. - /// - /// TabbedThumbnail associated with the WPF Control (UIElement) that - /// is to be removed from the taskbar - public void RemoveThumbnailPreview(UIElement windowsControl) - { - if (windowsControl == null) - throw new ArgumentNullException("windowsControl"); - - if (tabbedThumbnailListWPF.ContainsKey(windowsControl)) - { - TaskbarWindowManager.Instance.UnregisterTab(tabbedThumbnailListWPF[windowsControl].TaskbarWindow); - - tabbedThumbnailListWPF.Remove(windowsControl); - - TaskbarWindow taskbarWindow = TaskbarWindowManager.Instance.GetTaskbarWindow(windowsControl, TaskbarProxyWindowType.TabbedThumbnail); - - if (taskbarWindow != null) - { - if (TaskbarWindowManager.Instance.taskbarWindowList.Contains(taskbarWindow)) - TaskbarWindowManager.Instance.taskbarWindowList.Remove(taskbarWindow); - taskbarWindow.Dispose(); - taskbarWindow = null; - } - } - else - throw new ArgumentException("The given control has not been added to the taskbar."); - } - - /// - /// Sets the given tabbed thumbnail preview object as being active on the taskbar tabbed thumbnails list. - /// Call this method to keep the application and the taskbar in sync as to which window/control - /// is currently active (or selected, in the case of tabbed application). - /// - /// TabbedThumbnail for the specific control/indow that is currently active in the application - /// If the control/window is not yet added to the tabbed thumbnails list - public void SetActiveTab(TabbedThumbnail preview) - { - if (preview.WindowHandle != IntPtr.Zero) - { - if (tabbedThumbnailList.ContainsKey(preview.WindowHandle)) - TaskbarWindowManager.Instance.SetActiveTab(tabbedThumbnailList[preview.WindowHandle].TaskbarWindow); - else - throw new ArgumentException("The given preview has not been added to the taskbar."); - } - else if (preview.WindowsControl != null) - { - if (tabbedThumbnailListWPF.ContainsKey(preview.WindowsControl)) - TaskbarWindowManager.Instance.SetActiveTab(tabbedThumbnailListWPF[preview.WindowsControl].TaskbarWindow); - else - throw new ArgumentException("The given preview has not been added to the taskbar."); - } - } - - /// - /// Sets the given window handle as being active on the taskbar tabbed thumbnails list. - /// Call this method to keep the application and the taskbar in sync as to which window/control - /// is currently active (or selected, in the case of tabbed application). - /// - /// Window handle for the control/window that is currently active in the application - /// If the control/window is not yet added to the tabbed thumbnails list - public void SetActiveTab(IntPtr windowHandle) - { - if (tabbedThumbnailList.ContainsKey(windowHandle)) - TaskbarWindowManager.Instance.SetActiveTab(tabbedThumbnailList[windowHandle].TaskbarWindow); - else - throw new ArgumentException("The given control has not been added to the taskbar."); - } - - /// - /// Sets the given Control/Form window as being active on the taskbar tabbed thumbnails list. - /// Call this method to keep the application and the taskbar in sync as to which window/control - /// is currently active (or selected, in the case of tabbed application). - /// - /// Control/Form that is currently active in the application - /// If the control/window is not yet added to the tabbed thumbnails list - public void SetActiveTab(Control control) - { - if (control == null) - throw new ArgumentNullException("control"); - - SetActiveTab(control.Handle); - } - - /// - /// Sets the given WPF window as being active on the taskbar tabbed thumbnails list. - /// Call this method to keep the application and the taskbar in sync as to which window/control - /// is currently active (or selected, in the case of tabbed application). - /// - /// WPF control that is currently active in the application - /// If the control/window is not yet added to the tabbed thumbnails list - public void SetActiveTab(UIElement windowsControl) - { - if (windowsControl == null) - throw new ArgumentNullException("windowsControl"); - - if (tabbedThumbnailListWPF.ContainsKey(windowsControl)) - TaskbarWindowManager.Instance.SetActiveTab(tabbedThumbnailListWPF[windowsControl].TaskbarWindow); - else - throw new ArgumentException("The given control has not been added to the taskbar."); - } - - /// - /// Determines whether the given preview has been added to the taskbar's tabbed thumbnail list. - /// - /// The preview to locate on the taskbar's tabbed thumbnail list - /// true if the tab is already added on the taskbar; otherwise, false. - public bool IsThumbnailPreviewAdded(TabbedThumbnail preview) - { - if (preview == null) - throw new ArgumentNullException("preview"); - - if (preview.WindowHandle != IntPtr.Zero && tabbedThumbnailList.ContainsKey(preview.WindowHandle)) - return true; - else if (preview.WindowsControl != null && tabbedThumbnailListWPF.ContainsKey(preview.WindowsControl)) - return true; - else - return false; - } - - /// - /// Determines whether the given window has been added to the taskbar's tabbed thumbnail list. - /// - /// The window to locate on the taskbar's tabbed thumbnail list - /// true if the tab is already added on the taskbar; otherwise, false. - public bool IsThumbnailPreviewAdded(IntPtr windowHandle) - { - if (windowHandle == IntPtr.Zero) - throw new ArgumentException("windowHandle"); - - if (tabbedThumbnailList.ContainsKey(windowHandle)) - return true; - else - return false; - } - - /// - /// Determines whether the given control has been added to the taskbar's tabbed thumbnail list. - /// - /// The preview to locate on the taskbar's tabbed thumbnail list - /// true if the tab is already added on the taskbar; otherwise, false. - public bool IsThumbnailPreviewAdded(Control control) - { - if (control == null) - throw new ArgumentNullException("control"); - - if (tabbedThumbnailList.ContainsKey(control.Handle)) - return true; - else - return false; - } - - /// - /// Determines whether the given control has been added to the taskbar's tabbed thumbnail list. - /// - /// The preview to locate on the taskbar's tabbed thumbnail list - /// true if the tab is already added on the taskbar; otherwise, false. - public bool IsThumbnailPreviewAdded(UIElement control) - { - if (control == null) - throw new ArgumentNullException("control"); - - if (tabbedThumbnailListWPF.ContainsKey(control)) - return true; - else - return false; - } - - /// - /// Invalidates all the tabbed thumbnails. This will force the Desktop Window Manager - /// to not use the cached thumbnail or preview or aero peek and request a new one next time. - /// - /// This method should not be called frequently. - /// Doing so can lead to poor performance as new bitmaps are created and retrieved. - public void InvalidateThumbnails() - { - // Invalidate all the previews currently in our cache. - // This will ensure we get updated bitmaps next time - tabbedThumbnailList.Values.ToList().ForEach(thumbPreview => TaskbarWindowManager.Instance.InvalidatePreview(tabbedThumbnailList[thumbPreview.WindowHandle].TaskbarWindow)); - tabbedThumbnailListWPF.Values.ToList().ForEach(thumbPreview => TaskbarWindowManager.Instance.InvalidatePreview(tabbedThumbnailListWPF[thumbPreview.WindowsControl].TaskbarWindow)); - - tabbedThumbnailList.Values.ToList().ForEach(thumbPreview => thumbPreview.SetImage(IntPtr.Zero)); - tabbedThumbnailListWPF.Values.ToList().ForEach(thumbPreview => thumbPreview.SetImage(IntPtr.Zero)); - } - - /// - /// Clear a clip that is already in place and return to the default display of the thumbnail. - /// - /// The handle to a window represented in the taskbar. This has to be a top-level window. - public void ClearThumbnailClip(IntPtr windowHandle) - { - TaskbarManager.Instance.TaskbarList.SetThumbnailClip(windowHandle, IntPtr.Zero); - } - - /// - /// Selects a portion of a window's client area to display as that window's thumbnail in the taskbar. - /// - /// The handle to a window represented in the taskbar. This has to be a top-level window. - /// Rectangle structure that specifies a selection within the window's client area, - /// relative to the upper-left corner of that client area. - /// If this parameter is null, the clipping area will be cleared and the default display of the thumbnail will be used instead. - public void SetThumbnailClip(IntPtr windowHandle, Rectangle? clippingRectangle) - { - if (clippingRectangle == null) - { - TaskbarManager.Instance.TaskbarList.SetThumbnailClip(windowHandle, IntPtr.Zero); - return; - } - - CoreNativeMethods.RECT rect = new CoreNativeMethods.RECT(); - rect.left = clippingRectangle.Value.Left; - rect.top = clippingRectangle.Value.Top; - rect.right = clippingRectangle.Value.Right; - rect.bottom = clippingRectangle.Value.Bottom; - - IntPtr rectPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(rect)); - try - { - Marshal.StructureToPtr(rect, rectPtr, true); - TaskbarManager.Instance.TaskbarList.SetThumbnailClip(windowHandle, rectPtr); - } - finally - { - Marshal.FreeCoTaskMem(rectPtr); - } - } - - /// - /// Moves an existing thumbnail to a new position in the application's group. - /// - /// Preview for the window whose order is being changed. - /// This value is required, must already be added via AddThumbnailPreview method, and cannot be null. - /// The preview of the tab window whose thumbnail that previewToChange is inserted to the left of. - /// This preview must already be added via AddThumbnailPreview. If this value is null, the previewToChange tab is added to the end of the list. - /// - public void SetTabOrder(TabbedThumbnail previewToChange, TabbedThumbnail insertBeforePreview) - { - if (previewToChange == null) - throw new ArgumentNullException("previewToChange"); - - IntPtr handleToReorder = previewToChange.TaskbarWindow.WindowToTellTaskbarAbout; - - if (insertBeforePreview == null) - TaskbarManager.Instance.TaskbarList.SetTabOrder(handleToReorder, IntPtr.Zero); - else - { - IntPtr handleBefore = insertBeforePreview.TaskbarWindow.WindowToTellTaskbarAbout; - - TaskbarManager.Instance.TaskbarList.SetTabOrder(handleToReorder, handleBefore); - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailProxyWindow.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailProxyWindow.cs deleted file mode 100644 index 302859a..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailProxyWindow.cs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Text; -using System.Windows; -using System.Windows.Forms; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - internal sealed class TabbedThumbnailProxyWindow : Form, IDisposable - { - private IntPtr proxyingFor; - - internal TabbedThumbnailProxyWindow(TabbedThumbnail preview) - { - TabbedThumbnail = preview; - - if (preview.WindowHandle != IntPtr.Zero) - { - proxyingFor = preview.WindowHandle; - Size = new System.Drawing.Size(1, 1); - - // Try to get the window text so we can use it on the tabbed thumbnail as well - StringBuilder text = new StringBuilder(256); - TabbedThumbnailNativeMethods.GetWindowText(proxyingFor, text, text.Capacity); - Text = text.ToString(); - - // If we get a valid title from the GetWindowText method, - // and also if the user hasn't set any title on the preview object, - // then update the preview's title with what we get from GetWindowTitle - if(!string.IsNullOrEmpty(Text) && string.IsNullOrEmpty(preview.Title)) - preview.Title = Text; - } - else if (preview.WindowsControl != null) - { - proxyingFor = IntPtr.Zero; - WindowsControl = preview.WindowsControl; - Size = new System.Drawing.Size(1, 1); - // Since we can't get the text/caption for a UIElement, not setting this.Text here. - - } - } - - internal TabbedThumbnail TabbedThumbnail - { - get; - private set; - } - - internal IntPtr RealWindow - { - get { return proxyingFor; } - } - - internal UIElement WindowsControl - { - get; - private set; - } - - internal IntPtr WindowToTellTaskbarAbout - { - get { return this.Handle; } - } - - protected override void WndProc(ref Message m) - { - bool handled = false; - - if(this.TabbedThumbnail != null) - handled = TaskbarWindowManager.Instance.DispatchMessage(ref m, this.TabbedThumbnail.TaskbarWindow); - - // If it's a WM_Destroy message, then also forward it to the base class (our native window) - if ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_DESTROY) || - (m.Msg == (int)TabbedThumbnailNativeMethods.WM_NCDESTROY) || - ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_SYSCOMMAND) && (((int)m.WParam) == TabbedThumbnailNativeMethods.SC_CLOSE))) - { - base.WndProc(ref m); - } - else if (!handled) - base.WndProc(ref m); - } - - #region IDisposable Members - - /// - /// - /// - ~TabbedThumbnailProxyWindow() - { - Dispose(false); - } - - /// - /// Release the native objects. - /// - void IDisposable.Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - - base.Dispose(); - } - - protected override void Dispose(bool disposing) - { - if (disposing) - { - // Dispose managed resources - if (TabbedThumbnail != null) - TabbedThumbnail.Dispose(); - - TabbedThumbnail = null; - - // - WindowsControl = null; - } - - base.Dispose(disposing); - } - - #endregion - } -} \ No newline at end of file diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailScreenCapture.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailScreenCapture.cs deleted file mode 100644 index 6ba8927..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TabbedThumbnailScreenCapture.cs +++ /dev/null @@ -1,169 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Drawing; -using System.IO; -using System.Windows; -using System.Windows.Interop; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using Microsoft.WindowsAPICodePack.Shell; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Helper class to capture a control or window as System.Drawing.Bitmap - /// - public static class TabbedThumbnailScreenCapture - { - /// - /// Captures a screenshot of the specified window at the specified - /// bitmap size. NOTE: This method will not accurately capture controls - /// that are hidden or obstructed (partially or completely) by another control (e.g. hidden tabs, - /// or MDI child windows that are obstructed by other child windows/forms). - /// - /// The window handle. - /// The requested bitmap size. - /// A screen capture of the window. - public static Bitmap GrabWindowBitmap(IntPtr hwnd, System.Drawing.Size bitmapSize) - { - if (bitmapSize.Height <= 0 || bitmapSize.Width <= 0) - return null; - - IntPtr windowDC = IntPtr.Zero; - IntPtr targetDC = IntPtr.Zero; - Graphics targetGr = null; - - try - { - System.Drawing.Size realWindowSize; - TabbedThumbnailNativeMethods.GetClientSize(hwnd, out realWindowSize); - - if (realWindowSize == System.Drawing.Size.Empty) - realWindowSize = new System.Drawing.Size(200, 200); - - windowDC = TabbedThumbnailNativeMethods.GetWindowDC(hwnd); - - Bitmap targetBitmap = null; - - if (bitmapSize == System.Drawing.Size.Empty) - targetBitmap = new Bitmap(realWindowSize.Width, realWindowSize.Height); - else - targetBitmap = new Bitmap(bitmapSize.Width, bitmapSize.Height); - - targetGr = Graphics.FromImage(targetBitmap); - - targetDC = targetGr.GetHdc(); - uint operation = 0x00CC0020 /*SRCCOPY*/; - - System.Drawing.Size ncArea = WindowUtilities.GetNonClientArea(hwnd); - - bool success = TabbedThumbnailNativeMethods.StretchBlt(targetDC, 0, 0, targetBitmap.Width, targetBitmap.Height, - windowDC, ncArea.Width, ncArea.Height, realWindowSize.Width, realWindowSize.Height, operation); - return targetBitmap; - } - finally - { - if (windowDC != IntPtr.Zero) - { - TabbedThumbnailNativeMethods.ReleaseDC(hwnd, windowDC); - } - if (targetGr != null && targetDC != IntPtr.Zero) - { - targetGr.ReleaseHdc(targetDC); - } - } - } - - /// - /// Grabs a snapshot of a WPF UIElement and returns the image as Bitmap. - /// - /// Represents the element to take the snapshot from. - /// Represents the X DPI value used to capture this snapshot. - /// Represents the Y DPI value used to capture this snapshot. - /// The requested bitmap width. - /// The requested bitmap height. - /// Returns the bitmap (PNG format). - public static Bitmap GrabWindowBitmap(UIElement element, int dpiX, int dpiY, int width, int height) - { - // Special case for HwndHost controls - if (element is HwndHost) - { - IntPtr handle = ((HwndHost)element).Handle; - return GrabWindowBitmap(handle, new System.Drawing.Size(width, height)); - } - - Rect bounds = VisualTreeHelper.GetDescendantBounds(element); - - // create the renderer. - if (bounds.Height == 0 || bounds.Width == 0) - return null; // 0 sized element. Probably hidden - - RenderTargetBitmap rendertarget = new RenderTargetBitmap((int)(bounds.Width * dpiX / 96.0), - (int)(bounds.Height * dpiY / 96.0), dpiX, dpiY, PixelFormats.Default); - - DrawingVisual dv = new DrawingVisual(); - using (DrawingContext ctx = dv.RenderOpen()) - { - VisualBrush vb = new VisualBrush(element); - ctx.DrawRectangle(vb, null, new Rect(new System.Windows.Point(), bounds.Size)); - } - - rendertarget.Render(dv); - - BitmapEncoder bmpe; - - bmpe = new PngBitmapEncoder(); - bmpe.Frames.Add(BitmapFrame.Create(rendertarget)); - - // Create a MemoryStream with the image. - // Returning this as a MemoryStream makes it easier to save the image to a file or simply display it anywhere. - MemoryStream fl = new MemoryStream(); - bmpe.Save(fl); - - Bitmap bmp = new Bitmap(fl); - - fl.Close(); - - return (Bitmap)bmp.GetThumbnailImage(width, height, null, IntPtr.Zero); - } - - /// - /// Resizes the given bitmap while maintaining the aspect ratio. - /// - /// Original/source bitmap - /// Maximum width for the new image - /// Maximum height for the new image - /// If true and requested image is wider than the source, the new image is resized accordingly. - /// - internal static Bitmap ResizeImageWithAspect(IntPtr originalHBitmap, int newWidth, int maxHeight, bool resizeIfWider) - { - Bitmap originalBitmap = Bitmap.FromHbitmap(originalHBitmap); - - try - { - if (resizeIfWider) - { - if (originalBitmap.Width <= newWidth) - newWidth = originalBitmap.Width; - } - - int newHeight = originalBitmap.Height * newWidth / originalBitmap.Width; - - if (newHeight > maxHeight) // Height resize if necessary - { - newWidth = originalBitmap.Width * maxHeight / originalBitmap.Height; - newHeight = maxHeight; - } - - // Create the new image with the sizes we've calculated - return (Bitmap)originalBitmap.GetThumbnailImage(newWidth, newHeight, null, IntPtr.Zero); - } - finally - { - originalBitmap.Dispose(); - originalBitmap = null; - } - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarEnums.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarEnums.cs deleted file mode 100644 index ed09fae..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarEnums.cs +++ /dev/null @@ -1,58 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Known category to display - /// - public enum JumpListKnownCategoryType - { - /// - /// Don't display either known category. You must have at least one - /// user task or custom category link in order to not see the - /// default 'Recent' known category - /// - Neither = 0, - - /// - /// Display the 'Recent' known category - /// - Recent, - - /// - /// Display the 'Frequent' known category - /// - Frequent, - } - - /// - /// Represents the thumbnail progress bar state. - /// - public enum TaskbarProgressBarState - { - /// - /// No progress is displayed. - /// - NoProgress = 0, - - /// - /// The progress is indeterminate (marquee). - /// - Indeterminate = 0x1, - - /// - /// Normal progress is displayed. - /// - Normal = 0x2, - - /// - /// An error occurred (red). - /// - Error = 0x4, - - /// - /// The operation is paused (yellow). - /// - Paused = 0x8 - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarInterfaces.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarInterfaces.cs deleted file mode 100644 index ea33221..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarInterfaces.cs +++ /dev/null @@ -1,22 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Interface for jump list items - /// - public interface IJumpListItem - { - /// - /// Gets or sets this item's path - /// - string Path { get; set; } - } - - /// - /// Interface for jump list tasks - /// - public interface IJumpListTask - { - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs deleted file mode 100644 index a643331..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarManager.cs +++ /dev/null @@ -1,352 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Diagnostics; -using System.Windows.Interop; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents an instance of the Windows taskbar - /// - public class TaskbarManager - { - // Hide the default constructor - private TaskbarManager() - { - - } - - // Best practice recommends defining a private object to lock on - private static Object syncLock = new Object(); - - private static volatile TaskbarManager instance; - /// - /// Represents an instance of the Windows Taskbar - /// - public static TaskbarManager Instance - { - get - { - CoreHelpers.ThrowIfNotWin7(); - - if (instance == null) - { - lock (syncLock) - { - if (instance == null) - instance = new TaskbarManager(); - } - } - - return instance; - } - } - - // Internal implemenation of ITaskbarList4 interface - private ITaskbarList4 taskbarList; - internal ITaskbarList4 TaskbarList - { - get - { - if (taskbarList == null) - { - // Create a new instance of ITaskbarList3 - lock (syncLock) - { - if (taskbarList == null) - { - taskbarList = (ITaskbarList4)new CTaskbarList(); - taskbarList.HrInit(); - } - } - } - - return taskbarList; - } - } - - /// - /// Applies an overlay to a taskbar button of the main application window to indicate application status or a notification to the user. - /// - /// The overlay icon - /// String that provides an alt text version of the information conveyed by the overlay, for accessibility purposes - public void SetOverlayIcon(System.Drawing.Icon icon, string accessibilityText) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetOverlayIcon(OwnerHandle, icon != null ? icon.Handle : IntPtr.Zero, accessibilityText); - } - - /// - /// Applies an overlay to a taskbar button of the given window handle to indicate application status or a notification to the user. - /// - /// The handle of the window whose associated taskbar button receives the overlay. This handle must belong to a calling process associated with the button's application and must be a valid HWND or the call is ignored. - /// The overlay icon - /// String that provides an alt text version of the information conveyed by the overlay, for accessibility purposes - public void SetOverlayIcon(IntPtr windowHandle, System.Drawing.Icon icon, string accessibilityText) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetOverlayIcon(windowHandle, icon != null ? icon.Handle : IntPtr.Zero, accessibilityText); - } - - /// - /// Applies an overlay to a taskbar button of the given WPF window to indicate application status or a notification to the user. - /// - /// The window whose associated taskbar button receives the overlay. This window belong to a calling process associated with the button's application and must be already loaded. - /// The overlay icon - /// String that provides an alt text version of the information conveyed by the overlay, for accessibility purposes - public void SetOverlayIcon(System.Windows.Window window, System.Drawing.Icon icon, string accessibilityText) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetOverlayIcon( - (new WindowInteropHelper(window)).Handle, - icon != null ? icon.Handle : IntPtr.Zero, - accessibilityText); - } - - /// - /// Displays or updates a progress bar hosted in a taskbar button of the main application window - /// to show the specific percentage completed of the full operation. - /// - /// An application-defined value that indicates the proportion of the operation that has been completed at the time the method is called. - /// An application-defined value that specifies the value currentValue will have when the operation is complete. - public void SetProgressValue(int currentValue, int maximumValue) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetProgressValue(OwnerHandle, Convert.ToUInt32(currentValue), Convert.ToUInt32(maximumValue)); - } - - /// - /// Displays or updates a progress bar hosted in a taskbar button of the given window handle - /// to show the specific percentage completed of the full operation. - /// - /// The handle of the window whose associated taskbar button is being used as a progress indicator. - /// This window belong to a calling process associated with the button's application and must be already loaded. - /// An application-defined value that indicates the proportion of the operation that has been completed at the time the method is called. - /// An application-defined value that specifies the value currentValue will have when the operation is complete. - public void SetProgressValue(int currentValue, int maximumValue, IntPtr windowHandle) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetProgressValue(windowHandle, Convert.ToUInt32(currentValue), Convert.ToUInt32(maximumValue)); - } - - /// - /// Displays or updates a progress bar hosted in a taskbar button of the given WPF window - /// to show the specific percentage completed of the full operation. - /// - /// The window whose associated taskbar button is being used as a progress indicator. - /// This window belong to a calling process associated with the button's application and must be already loaded. - /// An application-defined value that indicates the proportion of the operation that has been completed at the time the method is called. - /// An application-defined value that specifies the value currentValue will have when the operation is complete. - public void SetProgressValue(int currentValue, int maximumValue, System.Windows.Window window) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetProgressValue( - (new WindowInteropHelper(window)).Handle, - Convert.ToUInt32(currentValue), - Convert.ToUInt32(maximumValue)); - } - - /// - /// Sets the type and state of the progress indicator displayed on a taskbar button of the main application window. - /// - /// Progress state of the progress button - public void SetProgressState(TaskbarProgressBarState state) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetProgressState(OwnerHandle, (TBPFLAG)state); - } - - /// - /// Sets the type and state of the progress indicator displayed on a taskbar button - /// of the given window handle - /// - /// The handle of the window whose associated taskbar button is being used as a progress indicator. - /// This window belong to a calling process associated with the button's application and must be already loaded. - /// Progress state of the progress button - public void SetProgressState(TaskbarProgressBarState state, IntPtr windowHandle) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetProgressState(windowHandle, (TBPFLAG)state); - } - - /// - /// Sets the type and state of the progress indicator displayed on a taskbar button - /// of the given WPF window - /// - /// The window whose associated taskbar button is being used as a progress indicator. - /// This window belong to a calling process associated with the button's application and must be already loaded. - /// Progress state of the progress button - public void SetProgressState(TaskbarProgressBarState state, System.Windows.Window window) - { - CoreHelpers.ThrowIfNotWin7(); - - TaskbarList.SetProgressState( - (new WindowInteropHelper(window)).Handle, - (TBPFLAG)state); - } - - private TabbedThumbnailManager tabbedThumbnail; - /// - /// Gets the Tabbed Thumbnail manager class for adding/updating - /// tabbed thumbnail previews. - /// - public TabbedThumbnailManager TabbedThumbnail - { - get - { - CoreHelpers.ThrowIfNotWin7(); - - if (tabbedThumbnail == null) - tabbedThumbnail = new TabbedThumbnailManager(); - - return tabbedThumbnail; - } - } - - private ThumbnailToolbarManager thumbnailToolbarManager; - /// - /// Gets the Thumbnail toolbar manager class for adding/updating - /// toolbar buttons. - /// - public ThumbnailToolbarManager ThumbnailToolbars - { - get - { - CoreHelpers.ThrowIfNotWin7(); - - if (thumbnailToolbarManager == null) - thumbnailToolbarManager = new ThumbnailToolbarManager(); - - return thumbnailToolbarManager; - } - } - - /// - /// Gets or sets the application user model id. Use this to explicitly - /// set the application id when generating custom jump lists - /// - public string ApplicationId - { - get - { - CoreHelpers.ThrowIfNotWin7(); - - return GetCurrentProcessAppId(); - } - set - { - CoreHelpers.ThrowIfNotWin7(); - - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value", "Application Id cannot be an empty or null string."); - else - { - SetCurrentProcessAppId(value); - ApplicationIdSetProcessWide = true; - } - } - } - - private IntPtr ownerHandle; - /// - /// Sets the handle of the window whose taskbar button will be used - /// to display progress. - /// - internal IntPtr OwnerHandle - { - get - { - if (ownerHandle == IntPtr.Zero) - { - Process currentProcess = Process.GetCurrentProcess(); - - if (currentProcess != null && currentProcess.MainWindowHandle != IntPtr.Zero) - ownerHandle = currentProcess.MainWindowHandle; - else - throw new InvalidOperationException("A valid active Window is needed to update the Taskbar"); - } - - return ownerHandle; - } - } - - /// - /// Sets the application user model id for an individual window - /// - /// The app id to set - /// Window handle for the window that needs a specific application id - /// AppId specifies a unique Application User Model ID (AppID) for the application or individual - /// top-level window whose taskbar button will hold the custom JumpList built through the methods class. - /// By setting an appId for a specific window, the window will not be grouped with it's parent window/application. Instead it will have it's own taskbar button. - public void SetApplicationIdForSpecificWindow(IntPtr windowHandle, string appId) - { - TaskbarNativeMethods.SetWindowAppId(windowHandle, appId); - } - - /// - /// Sets the application user model id for a given window - /// - /// The app id to set - /// Window that needs a specific application id - /// AppId specifies a unique Application User Model ID (AppID) for the application or individual - /// top-level window whose taskbar button will hold the custom JumpList built through the methods class. - /// By setting an appId for a specific window, the window will not be grouped with it's parent window/application. Instead it will have it's own taskbar button. - public void SetApplicationIdForSpecificWindow(System.Windows.Window window, string appId) - { - TaskbarNativeMethods.SetWindowAppId((new WindowInteropHelper(window)).Handle, appId); - } - - /// - /// Sets the current process' explicit application user model id. - /// - /// The application id. - private void SetCurrentProcessAppId(string appId) - { - TaskbarNativeMethods.SetCurrentProcessExplicitAppUserModelID(appId); - } - - /// - /// Gets the current process' explicit application user model id. - /// - /// The app id or null if no app id has been defined. - private string GetCurrentProcessAppId() - { - string appId = string.Empty; - TaskbarNativeMethods.GetCurrentProcessExplicitAppUserModelID(out appId); - return appId; - } - - /// - /// Indicates if the user has set the application id for the whole process (all windows) - /// - internal bool ApplicationIdSetProcessWide - { - get; - private set; - } - - - /// - /// Indicates whether this feature is supported on the current platform. - /// - public static bool IsPlatformSupported - { - get - { - // We need Windows 7 onwards ... - return CoreHelpers.RunningOnWin7; - } - } - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs deleted file mode 100644 index 8b82599..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindow.cs +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Windows; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - internal class TaskbarWindow : IDisposable - { - internal TabbedThumbnailProxyWindow TabbedThumbnailProxyWindow - { - get; - set; - } - - internal ThumbnailToolbarProxyWindow ThumbnailToolbarProxyWindow - { - get; - set; - } - - internal bool EnableTabbedThumbnails - { - get; - set; - } - - internal bool EnableThumbnailToolbars - { - get; - set; - } - - internal IntPtr UserWindowHandle - { - get; - set; - } - - internal UIElement WindowsControl - { - get; - set; - } - - private TabbedThumbnail tabbedThumbnailPreview = null; - internal TabbedThumbnail TabbedThumbnail - { - get { return tabbedThumbnailPreview; } - set - { - if (tabbedThumbnailPreview == null) - { - TabbedThumbnailProxyWindow = new TabbedThumbnailProxyWindow(value); - tabbedThumbnailPreview = value; - } - else - throw new InvalidOperationException("Value is already set. It cannot be set more than once."); - } - } - - private ThumbnailToolbarButton[] thumbnailButtons; - internal ThumbnailToolbarButton[] ThumbnailButtons - { - get { return thumbnailButtons; } - set - { - thumbnailButtons = value; - - // Set the window handle on the buttons (for future updates) - Array.ForEach(thumbnailButtons, new Action(UpdateHandle)); - } - } - - private void UpdateHandle(ThumbnailToolbarButton button) - { - button.WindowHandle = WindowToTellTaskbarAbout; - button.AddedToTaskbar = false; - } - - internal IntPtr WindowToTellTaskbarAbout - { - get - { - if (EnableThumbnailToolbars && !EnableTabbedThumbnails && ThumbnailToolbarProxyWindow != null) - return ThumbnailToolbarProxyWindow.WindowToTellTaskbarAbout; - else if (!EnableThumbnailToolbars && EnableTabbedThumbnails && TabbedThumbnailProxyWindow != null) - return TabbedThumbnailProxyWindow.WindowToTellTaskbarAbout; - else if (EnableTabbedThumbnails && EnableThumbnailToolbars && TabbedThumbnailProxyWindow != null) - return TabbedThumbnailProxyWindow.WindowToTellTaskbarAbout; - else - throw new InvalidOperationException(); - } - } - - internal string Title - { - set - { - if (TabbedThumbnailProxyWindow != null) - TabbedThumbnailProxyWindow.Text = value; - else - throw new InvalidOperationException(); - } - } - - internal TaskbarWindow(IntPtr userWindowHandle, params ThumbnailToolbarButton[] buttons) - { - if (userWindowHandle == IntPtr.Zero) - throw new ArgumentException("userWindowHandle"); - - if (buttons == null || buttons.Length == 0) - throw new ArgumentException("buttons"); - - // Create our proxy window - ThumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(userWindowHandle, buttons); - ThumbnailToolbarProxyWindow.TaskbarWindow = this; - - // Set our current state - EnableThumbnailToolbars = true; - EnableTabbedThumbnails = false; - - // - this.ThumbnailButtons = buttons; - UserWindowHandle = userWindowHandle; - WindowsControl = null; - } - - internal TaskbarWindow(System.Windows.UIElement windowsControl, params ThumbnailToolbarButton[] buttons) - { - if (windowsControl == null) - throw new ArgumentNullException("windowsControl"); - - if (buttons == null || buttons.Length == 0) - throw new ArgumentException("buttons"); - - // Create our proxy window - ThumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(windowsControl, buttons); - ThumbnailToolbarProxyWindow.TaskbarWindow = this; - - // Set our current state - EnableThumbnailToolbars = true; - EnableTabbedThumbnails = false; - - this.ThumbnailButtons = buttons; - UserWindowHandle = IntPtr.Zero; - WindowsControl = windowsControl; - } - - internal TaskbarWindow(TabbedThumbnail preview) - { - if (preview == null) - throw new ArgumentException("preview"); - - // Create our proxy window - TabbedThumbnailProxyWindow = new TabbedThumbnailProxyWindow(preview); - - // set our current state - EnableThumbnailToolbars = false; - EnableTabbedThumbnails = true; - - // - UserWindowHandle = preview.WindowHandle; - WindowsControl = preview.WindowsControl; - TabbedThumbnail = preview; - } - - - #region IDisposable Members - - /// - /// - /// - ~TaskbarWindow() - { - Dispose(false); - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - public void Dispose(bool disposing) - { - if (disposing) - { - // Dispose managed resources - if (tabbedThumbnailPreview != null) - tabbedThumbnailPreview.Dispose(); - tabbedThumbnailPreview = null; - - if (ThumbnailToolbarProxyWindow != null) - ThumbnailToolbarProxyWindow.Dispose(); - ThumbnailToolbarProxyWindow = null; - - if (TabbedThumbnailProxyWindow != null) - TabbedThumbnailProxyWindow.Dispose(); - TabbedThumbnailProxyWindow = null; - - // Don't dispose the thumbnail buttons - // as they might be used in another window. - // Setting them to null will indicate we don't need use anymore. - thumbnailButtons = null; - } - } - - #endregion - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs deleted file mode 100644 index e6ce132..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/TaskbarWindowManager.cs +++ /dev/null @@ -1,658 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Runtime.InteropServices; -using System.Windows.Forms; -using System.Windows.Media; -using Microsoft.WindowsAPICodePack.Shell; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - internal enum TaskbarProxyWindowType - { - TabbedThumbnail, - ThumbnailToolbar, - } - - internal class TaskbarWindowManager - { - internal IList taskbarWindowList; - private bool buttonsAdded = false; - - private static TaskbarWindowManager instance = null; - internal static TaskbarWindowManager Instance - { - get - { - if (instance == null) - instance = new TaskbarWindowManager(); - - return instance; - } - } - - internal TaskbarWindowManager() - { - taskbarWindowList = new List(); - } - - internal void AddThumbnailButtons(IntPtr userWindowHandle, params ThumbnailToolbarButton[] buttons) - { - // Try to get an existing taskbar window for this user windowhandle, - // or get one that is created for us - TaskbarWindow taskbarWindow = GetTaskbarWindow(userWindowHandle, TaskbarProxyWindowType.ThumbnailToolbar); - - if (taskbarWindow == null) - { - taskbarWindow = new TaskbarWindow(userWindowHandle, buttons); - taskbarWindowList.Add(taskbarWindow); - } - else if (taskbarWindow.ThumbnailButtons == null) - taskbarWindow.ThumbnailButtons = buttons; - else - { - // We already have buttons assigned - throw new InvalidOperationException("Toolbar buttons for this window are already added. Once added, neither the order of the buttons cannot be changed, nor can they be added or removed."); - } - } - - internal void AddThumbnailButtons(System.Windows.UIElement control, params ThumbnailToolbarButton[] buttons) - { - // Try to get an existing taskbar window for this user windowhandle, - // or get one that is created for us - TaskbarWindow taskbarWindow = GetTaskbarWindow(control, TaskbarProxyWindowType.ThumbnailToolbar); - - if (taskbarWindow == null) - { - taskbarWindow = new TaskbarWindow(control, buttons); - taskbarWindowList.Add(taskbarWindow); - } - else if (taskbarWindow.ThumbnailButtons == null) - taskbarWindow.ThumbnailButtons = buttons; - else - { - // We already have buttons assigned - throw new InvalidOperationException("Toolbar buttons for this window are already added. Please refer to the Remarks section of the AddButtons method for more information on updating the properties or hiding existing buttons."); - } - } - - internal void AddTabbedThumbnail(TabbedThumbnail preview) - { - // Create a TOP-LEVEL proxy window for the user's source window/control - TaskbarWindow taskbarWindow = null; - - if (preview.WindowHandle != IntPtr.Zero) - taskbarWindow = GetTaskbarWindow(preview.WindowHandle, TaskbarProxyWindowType.TabbedThumbnail); - else - taskbarWindow = GetTaskbarWindow(preview.WindowsControl, TaskbarProxyWindowType.TabbedThumbnail); - - if (taskbarWindow == null) - { - taskbarWindow = new TaskbarWindow(preview); - taskbarWindowList.Add(taskbarWindow); - } - else if (taskbarWindow.TabbedThumbnail == null) - taskbarWindow.TabbedThumbnail = preview; - - // - preview.TaskbarWindow = taskbarWindow; - - // Listen for Title changes - preview.TitleChanged += new EventHandler(thumbnailPreview_TitleChanged); - preview.TooltipChanged += new EventHandler(thumbnailPreview_TooltipChanged); - - // Get/Set properties for proxy window - IntPtr hwnd = taskbarWindow.WindowToTellTaskbarAbout; - - // Register this new tab and set it as being active. - TaskbarManager.Instance.TaskbarList.RegisterTab(hwnd, preview.ParentWindowHandle); - TaskbarManager.Instance.TaskbarList.SetTabOrder(hwnd, IntPtr.Zero); - TaskbarManager.Instance.TaskbarList.SetTabActive(hwnd, preview.ParentWindowHandle, 0); - - // We need to make sure we can set these properties even when - // running with admin - TabbedThumbnailNativeMethods.ChangeWindowMessageFilter(TabbedThumbnailNativeMethods.WM_DWMSENDICONICTHUMBNAIL, TabbedThumbnailNativeMethods.MSGFLT_ADD); - TabbedThumbnailNativeMethods.ChangeWindowMessageFilter(TabbedThumbnailNativeMethods.WM_DWMSENDICONICLIVEPREVIEWBITMAP, TabbedThumbnailNativeMethods.MSGFLT_ADD); - - TabbedThumbnailNativeMethods.EnableCustomWindowPreview(hwnd, true); - - // Make sure we use the initial title set by the user - // Trigger a "fake" title changed event, so the title is set on the taskbar thumbnail. - // Empty/null title will be ignored. - thumbnailPreview_TitleChanged(preview, EventArgs.Empty); - thumbnailPreview_TooltipChanged(preview, EventArgs.Empty); - - // Indicate to the preview that we've added it on the taskbar - preview.AddedToTaskbar = true; - } - - internal TaskbarWindow GetTaskbarWindow(System.Windows.UIElement windowsControl, TaskbarProxyWindowType taskbarProxyWindowType) - { - if (windowsControl == null) - throw new ArgumentNullException("userWindowHandle"); - - TaskbarWindow toReturn = null; - - foreach (TaskbarWindow window in taskbarWindowList) - { - if ((window.TabbedThumbnail != null && window.TabbedThumbnail.WindowsControl == windowsControl) - || (window.ThumbnailToolbarProxyWindow != null && window.ThumbnailToolbarProxyWindow.WindowsControl == windowsControl)) - { - toReturn = window; - break; - } - } - - // It's not in our list. Create a new TaskbarWindow, set the correct properties, - // return the window to the caller. - if (toReturn == null) - return null; - - if (taskbarProxyWindowType == TaskbarProxyWindowType.ThumbnailToolbar) - toReturn.EnableThumbnailToolbars = true; - else - toReturn.EnableTabbedThumbnails = true; - - return toReturn; - } - - internal TaskbarWindow GetTaskbarWindow(IntPtr userWindowHandle, TaskbarProxyWindowType taskbarProxyWindowType) - { - if (userWindowHandle == IntPtr.Zero) - throw new ArgumentException("userWindowHandle"); - - TaskbarWindow toReturn = null; - - foreach (TaskbarWindow window in taskbarWindowList) - { - if (window.UserWindowHandle == userWindowHandle) - { - toReturn = window; - break; - } - } - - // It's not in our list. Create a new TaskbarWindow, set the correct properties, - // return the window to the caller. - if (toReturn == null) - return null; - - if (taskbarProxyWindowType == TaskbarProxyWindowType.ThumbnailToolbar) - toReturn.EnableThumbnailToolbars = true; - else - toReturn.EnableTabbedThumbnails = true; - - return toReturn; - } - - void thumbnailPreview_TooltipChanged(object sender, EventArgs e) - { - TabbedThumbnail preview = sender as TabbedThumbnail; - - TaskbarWindow taskbarWindow = null; - - if (preview.WindowHandle == IntPtr.Zero) - taskbarWindow = GetTaskbarWindow(preview.WindowsControl, TaskbarProxyWindowType.TabbedThumbnail); - else - taskbarWindow = GetTaskbarWindow(preview.WindowHandle, TaskbarProxyWindowType.TabbedThumbnail); - - // Update the proxy window for the tabbed thumbnail - if (taskbarWindow != null) - TaskbarManager.Instance.TaskbarList.SetThumbnailTooltip(taskbarWindow.WindowToTellTaskbarAbout, preview.Tooltip); - } - - void thumbnailPreview_TitleChanged(object sender, EventArgs e) - { - TabbedThumbnail preview = sender as TabbedThumbnail; - - TaskbarWindow taskbarWindow = null; - - if (preview.WindowHandle == IntPtr.Zero) - taskbarWindow = GetTaskbarWindow(preview.WindowsControl, TaskbarProxyWindowType.TabbedThumbnail); - else - taskbarWindow = GetTaskbarWindow(preview.WindowHandle, TaskbarProxyWindowType.TabbedThumbnail); - - // Update the proxy window for the tabbed thumbnail - if (taskbarWindow != null) - taskbarWindow.Title = preview.Title; - } - - /// - /// Dispatches a window message so that the appropriate events - /// can be invoked. This is used for the Taskbar's thumbnail toolbar feature. - /// - /// The window message, typically obtained - /// from a Windows Forms or WPF window procedure. - /// Taskbar window for which we are intercepting the messages - /// Returns true if this method handles the window message - internal bool DispatchMessage(ref Message m, TaskbarWindow taskbarWindow) - { - if (taskbarWindow.EnableThumbnailToolbars) - { - if (m.Msg == (int)TaskbarNativeMethods.WM_TASKBARBUTTONCREATED) - { - AddButtons(taskbarWindow); - } - else - { - if (!buttonsAdded) - AddButtons(taskbarWindow); - - switch (m.Msg) - { - - case TaskbarNativeMethods.WM_COMMAND: - if (CoreNativeMethods.HIWORD(m.WParam.ToInt64(), 16) == THUMBBUTTON.THBN_CLICKED) - { - int buttonId = CoreNativeMethods.LOWORD(m.WParam.ToInt64()); - - var buttonsFound = - from b in taskbarWindow.ThumbnailButtons - where b.Id == buttonId - select b; - - foreach (ThumbnailToolbarButton button in buttonsFound) - { - button.FireClick(taskbarWindow); - } - } - break; - } // End switch - } // End else - } // End if - - - // If we are removed from the taskbar, ignore all the messages - if (taskbarWindow.EnableTabbedThumbnails) - { - if (taskbarWindow.TabbedThumbnail.RemovedFromTaskbar) - return false; - else if (m.Msg == (int)TabbedThumbnailNativeMethods.WM_ACTIVATE) - { - // Raise the event - taskbarWindow.TabbedThumbnail.OnTabbedThumbnailActivated(); - - SetActiveTab(taskbarWindow); - - return true; - } - else if (m.Msg == (int)TaskbarNativeMethods.WM_DWMSENDICONICTHUMBNAIL) - { - int width = (int)((long)m.LParam >> 16); - int height = (int)(((long)m.LParam) & (0xFFFF)); - Size requestedSize = new Size(width, height); - - // Fire an event to let the user update their bitmap - // Raise the event - taskbarWindow.TabbedThumbnail.OnTabbedThumbnailBitmapRequested(); - - IntPtr hBitmap = IntPtr.Zero; - - // Default size for the thumbnail - Size realWindowSize = new Size(200, 200); - - if (taskbarWindow.TabbedThumbnail.WindowHandle != IntPtr.Zero) - TabbedThumbnailNativeMethods.GetClientSize(taskbarWindow.TabbedThumbnail.WindowHandle, out realWindowSize); - else if (taskbarWindow.TabbedThumbnail.WindowsControl != null) - realWindowSize = new Size( - Convert.ToInt32(taskbarWindow.TabbedThumbnail.WindowsControl.RenderSize.Width), - Convert.ToInt32(taskbarWindow.TabbedThumbnail.WindowsControl.RenderSize.Height)); - - if ((realWindowSize.Height == -1) && (realWindowSize.Width == -1)) - realWindowSize.Width = realWindowSize.Height = 199; - - // capture the bitmap for the given control - // If the user has already specified us a bitmap to use, use that. - if (taskbarWindow.TabbedThumbnail.ClippingRectangle != null && taskbarWindow.TabbedThumbnail.ClippingRectangle.Value != Rectangle.Empty) - { - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - hBitmap = GrabBitmap(taskbarWindow, realWindowSize); - else - hBitmap = taskbarWindow.TabbedThumbnail.CurrentHBitmap; - - // Clip the bitmap we just got - Bitmap bmp = Bitmap.FromHbitmap(hBitmap); - - Rectangle clippingRectangle = taskbarWindow.TabbedThumbnail.ClippingRectangle.Value; - - // If our clipping rect is out of bounds, update it - if (clippingRectangle.Height > requestedSize.Height) - clippingRectangle.Height = requestedSize.Height; - if (clippingRectangle.Width > requestedSize.Width) - clippingRectangle.Width = requestedSize.Width; - - bmp = bmp.Clone(clippingRectangle, bmp.PixelFormat); - - // Make sure we dispose the bitmap before assigning, otherwise we'll have a memory leak - if (hBitmap != IntPtr.Zero && taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - { - ShellNativeMethods.DeleteObject(hBitmap); - } - hBitmap = bmp.GetHbitmap(); - } - else - { - // Else, user didn't want any clipping, if they haven't provided us a bitmap, - // use the screencapture utility and capture it. - - hBitmap = taskbarWindow.TabbedThumbnail.CurrentHBitmap; - - // If no bitmap, capture one using the utility - if (hBitmap == IntPtr.Zero) - hBitmap = GrabBitmap(taskbarWindow, realWindowSize); - } - - // Only set the thumbnail if it's not null. - // If it's null (either we didn't get the bitmap or size was 0), - // let DWM handle it - if (hBitmap != IntPtr.Zero) - { - Bitmap temp = TabbedThumbnailScreenCapture.ResizeImageWithAspect(hBitmap, requestedSize.Width, requestedSize.Height, true); - - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - ShellNativeMethods.DeleteObject(hBitmap); - - hBitmap = temp.GetHbitmap(); - TabbedThumbnailNativeMethods.SetIconicThumbnail(taskbarWindow.WindowToTellTaskbarAbout, hBitmap); - temp.Dispose(); - } - - // If the bitmap we have is not coming from the user (i.e. we created it here), - // then make sure we delete it as we don't need it now. - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - ShellNativeMethods.DeleteObject(hBitmap); - - return true; - } - else if (m.Msg == (int)TaskbarNativeMethods.WM_DWMSENDICONICLIVEPREVIEWBITMAP) - { - // Try to get the width/height - int width = (int)(((long)m.LParam) >> 16); - int height = (int)(((long)m.LParam) & (0xFFFF)); - - // Default size for the thumbnail - Size realWindowSize = new Size(200, 200); - - if (taskbarWindow.TabbedThumbnail.WindowHandle != IntPtr.Zero) - TabbedThumbnailNativeMethods.GetClientSize(taskbarWindow.TabbedThumbnail.WindowHandle, out realWindowSize); - else if (taskbarWindow.TabbedThumbnail.WindowsControl != null) - realWindowSize = new Size( - Convert.ToInt32(taskbarWindow.TabbedThumbnail.WindowsControl.RenderSize.Width), - Convert.ToInt32(taskbarWindow.TabbedThumbnail.WindowsControl.RenderSize.Height)); - - // If we don't have a valid height/width, use the original window's size - if (width <= 0) - width = realWindowSize.Width; - if (height <= 0) - height = realWindowSize.Height; - - // Fire an event to let the user update their bitmap - // Raise the event - taskbarWindow.TabbedThumbnail.OnTabbedThumbnailBitmapRequested(); - - // capture the bitmap for the given control - // If the user has already specified us a bitmap to use, use that. - IntPtr hBitmap = taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero ? GrabBitmap(taskbarWindow, realWindowSize) : taskbarWindow.TabbedThumbnail.CurrentHBitmap; - - // If we have a valid parent window handle, - // calculate the offset so we can place the "peek" bitmap - // correctly on the app window - if (taskbarWindow.TabbedThumbnail.ParentWindowHandle != IntPtr.Zero && taskbarWindow.TabbedThumbnail.WindowHandle != IntPtr.Zero) - { - Point offset = new Point(); - - // if we don't have a offset specified already by the user... - if (!taskbarWindow.TabbedThumbnail.PeekOffset.HasValue) - { - offset = WindowUtilities.GetParentOffsetOfChild(taskbarWindow.TabbedThumbnail.WindowHandle, taskbarWindow.TabbedThumbnail.ParentWindowHandle); - } - else - { - offset = new Point(Convert.ToInt32(taskbarWindow.TabbedThumbnail.PeekOffset.Value.X), - Convert.ToInt32(taskbarWindow.TabbedThumbnail.PeekOffset.Value.Y)); - } - - // Only set the peek bitmap if it's not null. - // If it's null (either we didn't get the bitmap or size was 0), - // let DWM handle it - if (hBitmap != IntPtr.Zero) - { - if (offset.X >= 0 && offset.Y >= 0) - TabbedThumbnailNativeMethods.SetPeekBitmap(taskbarWindow.WindowToTellTaskbarAbout, hBitmap, offset, taskbarWindow.TabbedThumbnail.DisplayFrameAroundBitmap); - } - - // If the bitmap we have is not coming from the user (i.e. we created it here), - // then make sure we delete it as we don't need it now. - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - ShellNativeMethods.DeleteObject(hBitmap); - - return true; - } - // Else, we don't have a valid window handle from the user. This is mostly likely because - // we have a WPF UIElement control. If that's the case, use a different screen capture method - // and also couple of ways to try to calculate the control's offset w.r.t it's parent. - else if (taskbarWindow.TabbedThumbnail.ParentWindowHandle != IntPtr.Zero && - taskbarWindow.TabbedThumbnail.WindowsControl != null) - { - System.Windows.Point offset; - - if (!taskbarWindow.TabbedThumbnail.PeekOffset.HasValue) - { - // Calculate the offset for a WPF UIElement control - // For hidden controls, we can't seem to perform the transform. - GeneralTransform objGeneralTransform = taskbarWindow.TabbedThumbnail.WindowsControl.TransformToVisual(taskbarWindow.TabbedThumbnail.WindowsControlParentWindow); - offset = objGeneralTransform.Transform(new System.Windows.Point(0, 0)); - } - else - { - offset = new System.Windows.Point(taskbarWindow.TabbedThumbnail.PeekOffset.Value.X, taskbarWindow.TabbedThumbnail.PeekOffset.Value.Y); - } - - // Only set the peek bitmap if it's not null. - // If it's null (either we didn't get the bitmap or size was 0), - // let DWM handle it - if (hBitmap != IntPtr.Zero) - { - if (offset.X >= 0 && offset.Y >= 0) - TabbedThumbnailNativeMethods.SetPeekBitmap(taskbarWindow.WindowToTellTaskbarAbout, hBitmap, new Point((int)offset.X, (int)offset.Y), taskbarWindow.TabbedThumbnail.DisplayFrameAroundBitmap); - else - TabbedThumbnailNativeMethods.SetPeekBitmap(taskbarWindow.WindowToTellTaskbarAbout, hBitmap, taskbarWindow.TabbedThumbnail.DisplayFrameAroundBitmap); - } - - // If the bitmap we have is not coming from the user (i.e. we created it here), - // then make sure we delete it as we don't need it now. - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - ShellNativeMethods.DeleteObject(hBitmap); - - return true; - } - else - { - // Else (no parent specified), just set the bitmap. It would take over the entire - // application window (would work only if you are a MDI app) - - // Only set the peek bitmap if it's not null. - // If it's null (either we didn't get the bitmap or size was 0), - // let DWM handle it - if (hBitmap != null) - TabbedThumbnailNativeMethods.SetPeekBitmap(taskbarWindow.WindowToTellTaskbarAbout, hBitmap, taskbarWindow.TabbedThumbnail.DisplayFrameAroundBitmap); - - // If the bitmap we have is not coming from the user (i.e. we created it here), - // then make sure we delete it as we don't need it now. - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - ShellNativeMethods.DeleteObject(hBitmap); - - return true; - } - } - else if (m.Msg == (int)TabbedThumbnailNativeMethods.WM_DESTROY) - { - TaskbarManager.Instance.TaskbarList.UnregisterTab(taskbarWindow.WindowToTellTaskbarAbout); - - taskbarWindow.TabbedThumbnail.RemovedFromTaskbar = true; - - return true; - } - else if (m.Msg == (int)TabbedThumbnailNativeMethods.WM_NCDESTROY) - { - // Raise the event - taskbarWindow.TabbedThumbnail.OnTabbedThumbnailClosed(); - - // Remove the taskbar window from our internal list - if (taskbarWindowList.Contains(taskbarWindow)) - taskbarWindowList.Remove(taskbarWindow); - - taskbarWindow.Dispose(); - taskbarWindow = null; - - return true; - } - else if (m.Msg == (int)TabbedThumbnailNativeMethods.WM_SYSCOMMAND) - { - if (((int)m.WParam) == TabbedThumbnailNativeMethods.SC_CLOSE) - { - // Raise the event - taskbarWindow.TabbedThumbnail.OnTabbedThumbnailClosed(); - - // Remove the taskbar window from our internal list - if (taskbarWindowList.Contains(taskbarWindow)) - taskbarWindowList.Remove(taskbarWindow); - - taskbarWindow.Dispose(); - taskbarWindow = null; - } - else if (((int)m.WParam) == TabbedThumbnailNativeMethods.SC_MAXIMIZE) - { - // Raise the event - taskbarWindow.TabbedThumbnail.OnTabbedThumbnailMaximized(); - } - else if (((int)m.WParam) == TabbedThumbnailNativeMethods.SC_MINIMIZE) - { - // Raise the event - taskbarWindow.TabbedThumbnail.OnTabbedThumbnailMinimized(); - } - - return true; - } - } - - return false; - } - - /// - /// Helper function to capture a bitmap for a given window handle or incase of WPF app, - /// an UIElement. - /// - /// The proxy window for which a bitmap needs to be created - /// Size for the requested bitmap image - /// Bitmap captured from the window handle or UIElement. Null if the window is hidden or it's size is zero. - private IntPtr GrabBitmap(TaskbarWindow taskbarWindow, System.Drawing.Size requestedSize) - { - IntPtr hBitmap = IntPtr.Zero; - - if (taskbarWindow.TabbedThumbnail.WindowHandle != IntPtr.Zero) - { - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - { - Bitmap bmp = TabbedThumbnailScreenCapture.GrabWindowBitmap(taskbarWindow.TabbedThumbnail.WindowHandle, requestedSize); - hBitmap = bmp != null ? bmp.GetHbitmap() : IntPtr.Zero; - - if (bmp != null) - { - bmp.Dispose(); - bmp = null; - } - } - else - { - System.Drawing.Image img = System.Drawing.Image.FromHbitmap(taskbarWindow.TabbedThumbnail.CurrentHBitmap); - System.Drawing.Bitmap bmp = new Bitmap(img, requestedSize); - - hBitmap = bmp != null ? bmp.GetHbitmap() : IntPtr.Zero; - - // Dipose the image - bmp.Dispose(); - bmp = null; - - img.Dispose(); - img = null; - } - } - else if (taskbarWindow.TabbedThumbnail.WindowsControl != null) - { - if (taskbarWindow.TabbedThumbnail.CurrentHBitmap == IntPtr.Zero) - { - Bitmap bmp = TabbedThumbnailScreenCapture.GrabWindowBitmap(taskbarWindow.TabbedThumbnail.WindowsControl, 96, 96, requestedSize.Width, requestedSize.Height); - hBitmap = bmp != null ? bmp.GetHbitmap() : IntPtr.Zero; - - if (bmp != null) - { - bmp.Dispose(); - bmp = null; - } - } - else - { - System.Drawing.Image img = System.Drawing.Image.FromHbitmap(taskbarWindow.TabbedThumbnail.CurrentHBitmap); - System.Drawing.Bitmap bmp = new Bitmap(img, requestedSize); - - hBitmap = bmp != null ? bmp.GetHbitmap() : IntPtr.Zero; - - // Dipose the image - bmp.Dispose(); - bmp = null; - - img.Dispose(); - img = null; - } - } - - return hBitmap; - } - - internal void SetActiveTab(TaskbarWindow taskbarWindow) - { - if (taskbarWindow != null) - TaskbarManager.Instance.TaskbarList.SetTabActive(taskbarWindow.WindowToTellTaskbarAbout, taskbarWindow.TabbedThumbnail.ParentWindowHandle, 0); - } - - internal void UnregisterTab(TaskbarWindow taskbarWindow) - { - if (taskbarWindow != null) - TaskbarManager.Instance.TaskbarList.UnregisterTab(taskbarWindow.WindowToTellTaskbarAbout); - } - - internal void InvalidatePreview(TaskbarWindow taskbarWindow) - { - if (taskbarWindow != null) - TabbedThumbnailNativeMethods.DwmInvalidateIconicBitmaps(taskbarWindow.WindowToTellTaskbarAbout); - } - - private void AddButtons(TaskbarWindow taskbarWindow) - { - // Add the buttons - // Get the array of thumbnail buttons in native format - THUMBBUTTON[] nativeButtons = (from thumbButton in taskbarWindow.ThumbnailButtons - select thumbButton.Win32ThumbButton).ToArray(); - - // Add the buttons on the taskbar - HRESULT hr = TaskbarManager.Instance.TaskbarList.ThumbBarAddButtons(taskbarWindow.WindowToTellTaskbarAbout, (uint)taskbarWindow.ThumbnailButtons.Length, nativeButtons); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - // Set the window handle on the buttons (for future updates) - buttonsAdded = true; - Array.ForEach(taskbarWindow.ThumbnailButtons, new Action(UpdateHandle)); - } - - private void UpdateHandle(ThumbnailToolbarButton button) - { - button.AddedToTaskbar = buttonsAdded; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButton.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButton.cs deleted file mode 100644 index f95a551..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButton.cs +++ /dev/null @@ -1,365 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using MS.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents a taskbar thumbnail button in the thumbnail toolbar. - /// - public sealed class ThumbnailToolbarButton: IDisposable - { - private static uint nextId = 101; - private THUMBBUTTON win32ThumbButton; - - /// - /// The event that occurs when the taskbar thumbnail button - /// is clicked. - /// - public event EventHandler Click; - - // Internal bool to track whether we should be updating the taskbar - // if any of our properties change or if it's just an internal update - // on the properties (via the constructor) - private bool internalUpdate = false; - - /// - /// Initializes an instance of this class - /// - /// The icon to use for this button - /// The tooltip string to use for this button. - public ThumbnailToolbarButton(Icon icon, string tooltip) - { - // Start internal update (so we don't accidently update the taskbar - // via the native API) - internalUpdate = true; - - // Set our id - Id = nextId; - - // increment the ID - if (nextId == Int32.MaxValue) - nextId = 101; // our starting point - else - nextId++; - - // Set user settings - Icon = icon; - Tooltip = tooltip; - - // Defaults - Enabled = true; - - // Create a native - win32ThumbButton = new THUMBBUTTON(); - - // End our internal update - internalUpdate = false; - } - - #region Public properties - - /// - /// Gets thumbnail button's id. - /// - internal uint Id - { - get; - set; - } - - private Icon icon; - /// - /// Gets or sets the thumbnail button's icon. - /// - public Icon Icon - { - get - { - return icon; - } - set - { - if (icon != value) - { - icon = value; - UpdateThumbnailButton(); - } - } - } - - private string tooltip; - /// - /// Gets or sets the thumbnail button's tooltip. - /// - public string Tooltip - { - get - { - return tooltip; - } - set - { - if (tooltip != value) - { - tooltip = value; - UpdateThumbnailButton(); - } - } - } - - private bool visible = true; - /// - /// Gets or sets the thumbnail button's visibility. Default is true. - /// - public bool Visible - { - get - { - return (this.Flags & THBFLAGS.THBF_HIDDEN) == 0; - } - set - { - if (visible != value) - { - visible = value; - - if (value) - { - this.Flags &= ~(THBFLAGS.THBF_HIDDEN); - } - else - { - this.Flags |= THBFLAGS.THBF_HIDDEN; - } - - UpdateThumbnailButton(); - } - - } - } - - private bool enabled = true; - /// - /// Gets or sets the thumbnail button's enabled state. If the button is disabled, it is present, - /// but has a visual state that indicates that it will not respond to user action. Default is true. - /// - public bool Enabled - { - get - { - return (this.Flags & THBFLAGS.THBF_DISABLED) == 0; - } - set - { - if (value != enabled) - { - enabled = value; - - if (value) - { - this.Flags &= ~(THBFLAGS.THBF_DISABLED); - } - else - { - this.Flags |= THBFLAGS.THBF_DISABLED; - } - - UpdateThumbnailButton(); - } - } - } - - private bool dismissOnClick = false; - /// - /// Gets or sets the property that describes the behavior when the button is clicked. - /// If set to true, the taskbar button's flyout will close immediately. Default is false. - /// - public bool DismissOnClick - { - get - { - return (this.Flags & THBFLAGS.THBF_DISMISSONCLICK) == 0; - } - set - { - if (value != dismissOnClick) - { - dismissOnClick = value; - - if (value) - { - this.Flags |= THBFLAGS.THBF_DISMISSONCLICK; - } - else - { - this.Flags &= ~(THBFLAGS.THBF_DISMISSONCLICK); - } - - UpdateThumbnailButton(); - } - } - } - - private bool isInteractive = true; - /// - /// Gets or sets the property that describes whether the button is interactive with the user. Default is true. - /// - /// - /// Non-interactive buttons don't display any hover behavior nor do they raise click events. - /// They are intended to be used as status icons. This is mostly similar to being not Enabled, - /// but the image is not desaturated. - /// - public bool IsInteractive - { - get - { - return (this.Flags & THBFLAGS.THBF_NONINTERACTIVE) == 0; - } - set - { - if (value != isInteractive) - { - isInteractive = value; - - if (value) - { - this.Flags &= ~(THBFLAGS.THBF_NONINTERACTIVE); - } - else - { - this.Flags |= THBFLAGS.THBF_NONINTERACTIVE; - } - - UpdateThumbnailButton(); - } - } - } - - #endregion - - #region Internal Methods - - /// - /// Native flags enum (used when creating the native button) - /// - internal THBFLAGS Flags { get; set; } - - /// - /// Native representation of the thumbnail button - /// - internal THUMBBUTTON Win32ThumbButton - { - get - { - win32ThumbButton.iId = Id; - win32ThumbButton.szTip = Tooltip; - win32ThumbButton.dwFlags = Flags; - - win32ThumbButton.dwMask = THBMASK.THB_FLAGS; - if (Tooltip != null) - { - win32ThumbButton.dwMask |= THBMASK.THB_TOOLTIP; - } - if (Icon != null) - { - win32ThumbButton.dwMask |= THBMASK.THB_ICON; - win32ThumbButton.hIcon = Icon.Handle; - } - - return win32ThumbButton; - } - } - - /// - /// The window manager should call this method to raise the public click event to all - /// the subscribers. - /// - /// Taskbar Window associated with this button - internal void FireClick(TaskbarWindow taskbarWindow) - { - if (Click != null && taskbarWindow != null) - { - if (taskbarWindow.UserWindowHandle != IntPtr.Zero) - Click(this, new ThumbnailButtonClickedEventArgs(taskbarWindow.UserWindowHandle, this)); - else if (taskbarWindow.WindowsControl != null) - Click(this, new ThumbnailButtonClickedEventArgs(taskbarWindow.WindowsControl, this)); - } - } - - /// - /// Handle to the window to which this button is for (on the taskbar). - /// - internal IntPtr WindowHandle - { - get; - set; - } - - /// - /// Indicates if this button was added to the taskbar. If it's not yet added, - /// then we can't do any updates on it. - /// - internal bool AddedToTaskbar - { - get; - set; - } - - internal void UpdateThumbnailButton() - { - if (internalUpdate || !AddedToTaskbar) - return; - - // Get the array of thumbnail buttons in native format - THUMBBUTTON[] nativeButtons = { Win32ThumbButton }; - - HRESULT hr = TaskbarManager.Instance.TaskbarList.ThumbBarUpdateButtons(WindowHandle, 1, nativeButtons); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - } - - #endregion - - #region IDisposable Members - - /// - /// - /// - ~ThumbnailToolbarButton() - { - Dispose(false); - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - /// - /// Release the native objects. - /// - /// - public void Dispose(bool disposing) - { - if (disposing) - { - // Dispose managed resources - Icon.Dispose(); - tooltip = null; - } - } - - #endregion - } - -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButtonClickedEventArgs.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButtonClickedEventArgs.cs deleted file mode 100644 index 6fec0e4..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailButtonClickedEventArgs.cs +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Windows; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Event args for TabbedThumbnailButton.Click event - /// - public class ThumbnailButtonClickedEventArgs : EventArgs - { - /// - /// Creates a Event Args for the TabbedThumbnailButton.Click event - /// - /// Window handle for the control/window related to the event - /// Thumbnail toolbar button that was clicked - public ThumbnailButtonClickedEventArgs(IntPtr windowHandle, ThumbnailToolbarButton button) - { - ThumbnailButton = button; - WindowHandle = windowHandle; - WindowsControl = null; - } - - /// - /// Creates a Event Args for the TabbedThumbnailButton.Click event - /// - /// WPF Control (UIElement) related to the event - /// Thumbnail toolbar button that was clicked - public ThumbnailButtonClickedEventArgs(UIElement windowsControl, ThumbnailToolbarButton button) - { - ThumbnailButton = button; - WindowHandle = IntPtr.Zero; - WindowsControl = windowsControl; - } - - /// - /// Gets the Window handle for the specific control/window that is related to this event. - /// - /// For WPF Controls (UIElement) the WindowHandle will be IntPtr.Zero. - /// Check the WindowsControl property to get the specific control associated with this event. - public IntPtr WindowHandle - { - get; - private set; - } - - /// - /// Gets the WPF Control (UIElement) that is related to this event. This property may be null - /// for non-WPF applications. - /// - public UIElement WindowsControl - { - get; - private set; - } - - /// - /// Gets the ThumbnailToolbarButton that was clicked - /// - public ThumbnailToolbarButton ThumbnailButton - { - get; - private set; - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs deleted file mode 100644 index 511097a..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarManager.cs +++ /dev/null @@ -1,70 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Windows; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Thumbnail toolbar manager class for adding a thumbnail toolbar with a specified set of buttons - /// to the thumbnail image of a window in a taskbar button flyout. - /// - public class ThumbnailToolbarManager - { - - internal ThumbnailToolbarManager() - { - // Hide the public constructor so users can't create an instance of this class. - } - - /// - /// Adds thumbnail toolbar for the specified window. - /// - /// Window handle for which the thumbnail toolbar buttons need to be added - /// Thumbnail buttons for the window's thumbnail toolbar - /// If the number of buttons exceed the maximum allowed capacity (7). - /// If the Window Handle passed in invalid - /// After a toolbar has been added to a thumbnail, buttons can be altered only through various - /// properties on the . While individual buttons cannot be added or removed, - /// they can be shown and hidden through as needed. - /// The toolbar itself cannot be removed without re-creating the window itself. - /// - public void AddButtons(IntPtr windowHandle, params ThumbnailToolbarButton[] buttons) - { - if (windowHandle == IntPtr.Zero) - throw new ArgumentException("Window handle cannot be empty", "windowHandle"); - if (buttons != null && buttons.Length == 0) - throw new ArgumentException("Null or empty arrays are not allowed.", "buttons"); - if (buttons.Length > 7) - throw new ArgumentException("Maximum number of buttons allowed is 7.", "buttons"); - - // Add the buttons to our window manager, which will also create a proxy window - TaskbarWindowManager.Instance.AddThumbnailButtons(windowHandle, buttons); - } - - /// - /// Adds thumbnail toolbar for the specified WPF Control. - /// - /// WPF Control for which the thumbnail toolbar buttons need to be added - /// Thumbnail buttons for the window's thumbnail toolbar - /// If the number of buttons exceed the maximum allowed capacity (7). - /// If the control passed in null - /// After a toolbar has been added to a thumbnail, buttons can be altered only through various - /// properties on the ThumbnailToolbarButton. While individual buttons cannot be added or removed, - /// they can be shown and hidden through ThumbnailToolbarButton.Visible as needed. - /// The toolbar itself cannot be removed without re-creating the window itself. - /// - public void AddButtons(UIElement control, params ThumbnailToolbarButton[] buttons) - { - if (control == null) - throw new ArgumentNullException("Control cannot be null", "control"); - if (buttons != null && buttons.Length == 0) - throw new ArgumentException("Null or empty arrays are not allowed.", "buttons"); - if (buttons.Length > 7) - throw new ArgumentException("Maximum number of buttons allowed is 7.", "buttons"); - - // Add the buttons to our window manager, which will also create a proxy window - TaskbarWindowManager.Instance.AddThumbnailButtons(control, buttons); - } - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs deleted file mode 100644 index 69fee3c..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/ThumbnailToolbarProxyWindow.cs +++ /dev/null @@ -1,130 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Windows.Forms; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - internal class ThumbnailToolbarProxyWindow : NativeWindow, IDisposable - { - private ThumbnailToolbarButton[] thumbnailButtons; - private IntPtr internalWindowHandle; - - internal System.Windows.UIElement WindowsControl - { - get; - set; - } - - internal IntPtr WindowToTellTaskbarAbout - { - get - { - if (internalWindowHandle == IntPtr.Zero) - return this.Handle; - else - return internalWindowHandle; - } - } - - internal TaskbarWindow TaskbarWindow - { - get; - set; - } - - internal ThumbnailToolbarProxyWindow(IntPtr windowHandle, ThumbnailToolbarButton[] buttons) - { - if (windowHandle == IntPtr.Zero) - throw new ArgumentException("Window handle cannot be empty", "windowHandle"); - if (buttons != null && buttons.Length == 0) - throw new ArgumentException("Null or empty arrays are not allowed.", "buttons"); - - // - internalWindowHandle = windowHandle; - thumbnailButtons = buttons; - - // Set the window handle on the buttons (for future updates) - Array.ForEach(thumbnailButtons, new Action(UpdateHandle)); - - // Assign the window handle (coming from the user) to this native window - // so we can intercept the window messages sent from the taskbar to this window. - this.AssignHandle(windowHandle); - } - - internal ThumbnailToolbarProxyWindow(System.Windows.UIElement windowsControl, ThumbnailToolbarButton[] buttons) - { - if (windowsControl == null) - throw new ArgumentNullException("Control cannot be null", "windowsControl"); - if (buttons != null && buttons.Length == 0) - throw new ArgumentException("Null or empty arrays are not allowed.", "buttons"); - - // - internalWindowHandle = IntPtr.Zero; - WindowsControl = windowsControl; - thumbnailButtons = buttons; - - // Set the window handle on the buttons (for future updates) - Array.ForEach(thumbnailButtons, new Action(UpdateHandle)); - } - - - private void UpdateHandle(ThumbnailToolbarButton button) - { - button.WindowHandle = internalWindowHandle; - button.AddedToTaskbar = false; - } - - protected override void WndProc(ref Message m) - { - bool handled = false; - - handled = TaskbarWindowManager.Instance.DispatchMessage(ref m, this.TaskbarWindow); - - // If it's a WM_Destroy message, then also forward it to the base class (our native window) - if ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_DESTROY) || - (m.Msg == (int)TabbedThumbnailNativeMethods.WM_NCDESTROY) || - ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_SYSCOMMAND) && (((int)m.WParam) == TabbedThumbnailNativeMethods.SC_CLOSE))) - { - base.WndProc(ref m); - } - else if (!handled) - base.WndProc(ref m); - } - - #region IDisposable Members - - /// - /// - /// - ~ThumbnailToolbarProxyWindow() - { - Dispose(false); - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - public void Dispose(bool disposing) - { - if (disposing) - { - // Dispose managed resources - - // Don't dispose the thumbnail buttons - // as they might be used in another window. - // Setting them to null will indicate we don't need use anymore. - thumbnailButtons = null; - } - } - - #endregion - - } -} diff --git a/src/External/WindowsAPICodePack/Shell/Taskbar/UserRemovedJumpListItemsEventArg.cs b/src/External/WindowsAPICodePack/Shell/Taskbar/UserRemovedJumpListItemsEventArg.cs deleted file mode 100644 index 7ee50c3..0000000 --- a/src/External/WindowsAPICodePack/Shell/Taskbar/UserRemovedJumpListItemsEventArg.cs +++ /dev/null @@ -1,29 +0,0 @@ -//Copyright (c) Microsoft Corporation. All rights reserved. - -using System; -using System.Collections; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Event arguments for when the user is notified of items - /// that have been removed from the taskbar destination list - /// - public class UserRemovedJumpListItemsEventArgs : EventArgs - { - readonly IEnumerable removedItems; - - internal UserRemovedJumpListItemsEventArgs(IEnumerable RemovedItems) - { - removedItems = RemovedItems; - } - - /// - /// The collection of removed items based on path. - /// - public IEnumerable RemovedItems - { - get { return removedItems; } - } - } -} diff --git a/src/External/log4net.dll b/src/External/log4net.dll deleted file mode 100644 index ffc57e11254ad9530867b35d15aaf38eb4747d8d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 270336 zcmeFa37A|*b@yG<-P1kOGmnOR_Bk7BV)n@xI|5$>0?)c){27$SiKR zFq^@6!7L%*ge78i2us)@kT~pXVhB5CfCQ32LSEj4tR&|9{m-epbkB@z^YOmV_dFkC ztM9FRXybL!No^`3sg-Ju#nsPXStzY5{QJoUHTe)s-!3(1SueROen|L~Xh`|!YN zU*7NBr(HcWbwfM7s(tCxr=EK0_1CAnrY^f;s(s`2Q&(R2)7i$1>ZjS>2F=P_SLWc{MUYX-~N?}7k~K2r=R!BQ~vowcTJ5y>ZER|{)j$Yiq0$kGW_{Cvp-sdMl@3g*wJ+o~*+kalavMlfjVRopJ zY!?0p!t?-R_zH1bw)pUW*`WhACMQmK2Zgs4>eCxSrP@`9vNITF00bkF3}*GAm2f1u zD4h89&Eyaj5~|}54oo~aFw)qxPte@J4arp^C$xrz(<%f>_2kef)j6wIw@rQtb{FdX?M;-`jSvdSBZU+SE)BeL`j6$+b8D;+pk^9Ns{^bO@x9T)Z2aanDww&|dZgoSJQy{`&! zR#D4U58wN^73a0B-gWiNVW>wlRF@4-EUUMYvB9zWJtLvgFg8$q%hn9_Mv54lkUdtP z+_9`aRv#O@>*@zj?o*JQjL%_{O# zcsaB%FNb@0dCY05MhNHg?+*U`HUB30=X~|}w-Wwu{uzULsy*5}1T^`F4%y!_+SjF? z2EVK6@zqdIS3)0h9}E*Ct&=P1B7)7)R7AL&A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Hz&^DTxyE)JU#||%~Mt`&!db~ zFVoUq28KyiP(l0&kfIg*FMnvgu=2yXmv5&$mT&LGv=f~jw%v&|RwtZG{6i1IBdDz+ChT*NH=ljO6IxsxGqhI_(ycS1SaQa5j3JK#ZUUb)@#c)dz6emm) zSH`p@j9v4IjJZEymQLSKq1Lv*K!L92!()Bhi_Z^_;TN-JB}~iuVySNsKlwq3f~H%M zKv?wnir%no0q!yUEXiG<#2>)JUGT=-%1XGvPmT4BJU+Z*(zET|Ha7hH&V<>UNl7~v z|Aps;$;;TuzDPS`o_%O|Z28d8YGhQ5IP1mYqW&Ski9erpnZg5dHdD-CUR)jCSl>IJFv+-*h|j)p9dyBzfJlNaKlY~{0&}i91M5kvRys&`i^x0 zuiiZl>i5d5>)|ipvxJKTqXxgJ+lqMv<2;FR_}icQg%|d(zYV+y$L`5zmYOy^L&`^A zT@Gg-hiMV;%?}2UeoOG&DvU7zj137TM}RlZY5+6F7dINz5nA%WV!UUoXJ5mtJ`aB3 z4Vry*uqfAZ$0R@dMJkiC{`uf}KybRIh70brB!&XI1e=-b=^f&>8@^!zAG+igQojGr zFRz3YsejJkb9jg!>e|;+UukdfDmrh`zzhavFffCG84S!|U - - - - - - - - - - - - - - - - - - - - - ECAAAIqgIGBicBEQAQgIBAAAiIYAEIACjAIIChxqXgA= - Src\Gui\TextEditorControlBase.cs - - - - - - - - - - - - - - - - - - - - REAACMIoAKIABCAAAEAIAAABAAAIBAAQwFBAAiAAiAA= - Src\Gui\TextEditorControl.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AQLYAAChAChMERCAQogICEAFBAJAAAiCAYBAQUEAAAA= - Src\Gui\TextAreaControl.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - EyLAQFOI8qFKkAF5CQgKQAoErBgAKA4KJQZJCXkgQAA= - Src\Gui\TextArea.cs - - - - - - - - - - - ACIAA0MBTAAAFAg4AsBABgAAUAggUAYIKQCcHAAECHE= - Src\Document\DefaultDocument.cs - - - - - - - ACIAA0EACAAAFAA4AMBABgAAQAgAUAYAKQCcDAAAAHE= - Src\Document\IDocument.cs - - - - \ No newline at end of file diff --git a/src/ICSharpCode.TextEditor/Article2.cd b/src/ICSharpCode.TextEditor/Article2.cd deleted file mode 100644 index af17a09..0000000 --- a/src/ICSharpCode.TextEditor/Article2.cd +++ /dev/null @@ -1,492 +0,0 @@ - - - - - - - - - - - - - - REAACMIoAKIABCAAAEAIAAABAAAIBAAQwFBAAiAAiAA= - Src\Gui\TextEditorControl.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AQLYAAChAChMERCAQogICEAFBAJAAAiCAYBAQUEAAAA= - Src\Gui\TextAreaControl.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - EyLAQFOI8qFKkAF5CQgKQAoErBgAKA4KJQZJCXkgQAA= - Src\Gui\TextArea.cs - - - - - - - - - - - - - - AQkAgQAAACAAEoAgARBCJCAIQUgBIAFAICQQAAoFggE= - Src\Gui\Caret.cs - - - - - - - - - - - - - - - - - - - - - - - ECAAAIqgIGBicBEQAQgIBAAAiIYAEIACjAIIChxqXgA= - Src\Gui\TextEditorControlBase.cs - - - - - - - - - ACIAA0MBTAAAFAg4AsBABgAAUAggUAYIKQCcHAAECHE= - Src\Document\DefaultDocument.cs - - - - - - - AAAGAAAAAAEAAEBAYAkgBEAAAAICAAACAAQAgABAAAI= - Src\Document\BookmarkManager\BookmarkManager.cs - - - - - - - - - - - - - - - - GAEAAYBAAEgABEBoGAAAIAgAEAIAAAAAEAAIAUAABAA= - Src\Document\FoldingStrategy\FoldingManager.cs - - - - - - - - - - - AAAAIQAAACAAAAAAAAAgCAAAAAMAgAACIAAAAAEAAAA= - Src\Document\MarkerStrategy\MarkerStrategy.cs - - - - - - - - - QAgAAgAABAAABABAAAAiMCABAAAIAQAIEABAAAFCCAA= - Src\Undo\UndoStack.cs - - - - - - QAAwBAAAAAAAIAgUAwAIEAJAACAAEBAAACgAASAhgAA= - Src\Document\LineManager\LineSegment.cs - - - - - - - ECgAIDCwACAKCAAgAgwIBDiAiIQ6AIikCgAaRhgKUko= - Src\Document\DefaultTextEditorProperties.cs - - - - - - - AAAAAQAAAAEAAAAQCAAAAAgAAAAABACAAAAAgQAAQAE= - Src\Document\MarkerStrategy\TextMarker.cs - - - - - - AQAAAQEAAAAAAwQAAEMIAAADBAIAEAACAAAAAAABAgA= - Src\Document\BookmarkManager\Bookmark.cs - - - - - - AAQAAAAAAACEAAAQAACCCQAAABAAAAAAAAAAAAAAAAA= - Src\Document\FormattingStrategy\DefaultFormattingStrategy.cs - - - - - - - KhYAAIIACAiQiAAEAIAAoAREBAAXACGUAAgIHIIKACA= - Src\Document\HighlightingStrategy\DefaultHighlightingStrategy.cs - - - - - - - AQAAAUAAQCQAUgUAAGQBBAEIEAYAAkAQAAAIQAACgiA= - Src\Document\Selection\SelectionManager.cs - - - - - - - - - - CQRARAAAAigBAAAAAAAAAAAAAgMAACAAAAAACAAABMA= - Src\Gui\TextAreaClipboardHandler.cs - - - - - - AACAAAAAAAAAAAAEAEAAAABAAAAAAAAAAAAAAAAAgAA= - Src\Document\AbstractSegment.cs - - - - - - - AAAAIEEAAAoAAAEYAAAABABRAAAAQAAACABAAAAAACE= - Src\Document\TextBufferStrategy\GapTextBufferStrategy.cs - - - - - - - ABBIAAAQEAAAQBAUAAAAAABAAAIAAAAAAgAAAAKAgAA= - Src\Document\Selection\DefaultSelection.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - ACIAA0EACAAAFAA4AMBABgAAQAgAUAYAKQCcDAAAAHE= - Src\Document\IDocument.cs - - - - - - - - - - - - - - - - - - - AAAAAAAAAAAAAAAQAAACCQAAABAAAAAAAAAAAAAAAAA= - Src\Document\FormattingStrategy\IFormattingStrategy.cs - - - - - - ABAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAEAACAAA= - Src\Document\HighlightingStrategy\IHighlightingStrategy.cs - - - - - - ECAAACCgACAAAAAAAggABAAAiIQ6AAAACgAIQhgKUgA= - Src\Document\ITextEditorProperties.cs - - - - - - AAAAAEEAAAIAAAAIAAAABABAAAAAAAAAAAAAAAAAACA= - Src\Document\TextBufferStrategy\ITextBufferStrategy.cs - - - - - - AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\FoldingStrategy\IFoldingStrategy.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAIAAAA= - Src\Document\HighlightingStrategy\IHighlightingStrategy.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAgAA= - Src\Document\ISegment.cs - - - - - - AABIAAAQEAAAQAAQAAAAAABAAAAAAAAAAgAAAACAgAA= - Src\Document\Selection\ISelection.cs - - - - \ No newline at end of file diff --git a/src/ICSharpCode.TextEditor/Configuration/AssemblyInfo.cs b/src/ICSharpCode.TextEditor/Configuration/AssemblyInfo.cs deleted file mode 100644 index fa1e709..0000000 --- a/src/ICSharpCode.TextEditor/Configuration/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -// -// -// -// -// $Revision: 1618 $ -// - -using System; -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly: CLSCompliant(true)] -[assembly: StringFreezing()] - -[assembly: AssemblyTitle("ICSharpCode.TextEditor")] -[assembly: AssemblyDescription("A .NET text editor control")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] diff --git a/src/ICSharpCode.TextEditor/GlobalAssemblyInfo.cs b/src/ICSharpCode.TextEditor/GlobalAssemblyInfo.cs deleted file mode 100644 index 92c6391..0000000 --- a/src/ICSharpCode.TextEditor/GlobalAssemblyInfo.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -// -// -// -// $Revision: 1040 $ -// - -///////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////// -// // -// DO NOT EDIT GlobalAssemblyInfo.cs, it is recreated using AssemblyInfo.template whenever // -// StartUp is compiled. // -// // -///////////////////////////////////////////////////////////////////////////////////////////// -///////////////////////////////////////////////////////////////////////////////////////////// - -using System.Reflection; - -[assembly: System.Runtime.InteropServices.ComVisible(false)] -[assembly: AssemblyCompany("ic#code")] -[assembly: AssemblyProduct("SharpDevelop")] -[assembly: AssemblyCopyright("2000-2008 AlphaSierraPapa")] -[assembly: AssemblyVersion(RevisionClass.FullVersion)] - -internal static class RevisionClass -{ - public const string Major = "3"; - public const string Minor = "0"; - public const string Build = "0"; - public const string Revision = "3437"; - - public const string MainVersion = Major + "." + Minor; - public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; -} diff --git a/src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.cd b/src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.cd deleted file mode 100644 index 66d8feb..0000000 --- a/src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.cd +++ /dev/null @@ -1,2447 +0,0 @@ - - - - - - - - - AAAAAAAAAAIAAAAAAAAAAAAAAEQAgAAAAAAgAAAAACA= - GlobalAssemblyInfo.cs - - - - - - - - - - - - ACIAA0MBTAAAFAg4AsBABgAAUAggUAYIKQCcHAAECHE= - Src\Document\DefaultDocument.cs - - - - - - - - - - - - AACAAAAAAAAAAAAEAEAAAABAAAIAAAAKAAAACAAAgAA= - Src\Document\DocumentEventArgs.cs - - - - - - - - - AgAAAAAAAAAAAAAAAAAAAEAAAAAAAAAACAAAAAAAAAA= - Src\Document\DocumentFactory.cs - - - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\HighlightingStrategy\HighlightingDefinitionInvalidException.cs - - - - - - - - - - - - - - Src\Document\LineManager\LineSegmentTree.cs - - - - - Src\Document\LineManager\LineSegmentTree.cs - - - - - - Src\Document\LineManager\LineSegmentTree.cs - - - - - - AWAAAAgAAAAgYBAEigEDKQQAEAAgQEIAAQAAAABQIQA= - Src\Document\LineManager\LineSegmentTree.cs - - - - - - - - - - - - - AAAAAAgAAAAAAEAkAAIIEAAABAEAAAAAAAAAAQABhAA= - Src\Document\TextAnchor.cs - - - - - - - - - - - - Src\Document\TextUtilities.cs - - - - - AAAAAAEAQAAAEABQAgAAAQAAAAAACKAIEAAAAAAABMA= - Src\Document\TextUtilities.cs - - - - - - - - - - - - AAAGAAAAAAEAAEBAYAkgBEAAAAICAAACAAQAgABAAAI= - Src\Document\BookmarkManager\BookmarkManager.cs - - - - - - - - - - - AAAAAAAAAAFAAAAAQAAAAAACAAAAAAAAAABAAAAAAAA= - Src\Document\BookmarkManager\BookmarkManagerMemento.cs - - - - - - - - - - AAQAAAAAAACEAAAQAACCCQAAABAAAAAAAAAAAAAAAAA= - Src\Document\FormattingStrategy\DefaultFormattingStrategy.cs - - - - - - - - - - - - KhYAAIIACAiQiAAEAIAAoAREBAAXACGUAAgIHIIKACA= - Src\Document\HighlightingStrategy\DefaultHighlightingStrategy.cs - - - - - - - - - - - - IAAAAAgAAAAoABAAAAAACAAAEAgAEAAAAQAAACEAAAA= - Src\Document\HighlightingStrategy\FontContainer.cs - - - - - - - - - - - AAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\HighlightingStrategy\HighlightBackground.cs - - - - - - - - - - - ACAIAQAAAFAAACAUAAAgQAIACEgAAACAAAIAwAAAAEE= - Src\Document\HighlightingStrategy\HighlightColor.cs - - - - - - - - - - AAAACAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAIAAAA= - Src\Document\HighlightingStrategy\HighlightInfo.cs - - - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\HighlightingStrategy\HighlightingColorNotFoundException.cs - - - - - - - - - AAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\HighlightingStrategy\HighlightingDefinitionParser.cs - - - - - - - - - - - - QAAAAAMgAAAAAAAAGIAhABAAAAIEBAAQAAgAAAgAAQA= - Src\Document\HighlightingStrategy\HighlightingManager.cs - - - - - - - - - AAAAAAAAAAAAAAAAAAAAIAAAAAAAAAACAAAAAAAAAAA= - Src\Document\HighlightingStrategy\HighlightingStrategyFactory.cs - - - - - - - - - - - ACCAAACCQAAAgEIEAAAAAAQAAAAEAYAAAAHAAAAggAQ= - Src\Document\HighlightingStrategy\HighlightRuleSet.cs - - - - - - - - - - - AAAIAIAACACAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAA= - Src\Document\HighlightingStrategy\NextMarker.cs - - - - - - - - - - - AAAIAIAACACAAAAAAAAAAAAAAAAAAACAAAAAgAAAAAA= - Src\Document\HighlightingStrategy\PrevMarker.cs - - - - - - - - - - - AAMEYQACRGQAABAEAAAAAAQQAAAEEACAAAhAgAIIAIQ= - Src\Document\HighlightingStrategy\Span.cs - - - - - - - - - - - - - - Src\Document\HighlightingStrategy\TextWord.cs - - - - - Src\Document\HighlightingStrategy\TextWord.cs - - - - - AAGAACAAAAAgACAFAEAEAABAAAoQAACRAQAggAAAgAM= - Src\Document\HighlightingStrategy\TextWord.cs - - - - - - - - - - - - - - - Src\Document\LineManager\LineManager.cs - - - - - AQAAAkAASAKgJAAxAIAARgAAAAIAUAYgAQAQAAACACE= - Src\Document\LineManager\LineManager.cs - - - - - - - - - - - QAAwBAAAAAAAIAgUAwAIEAJAACAAEBAAACgAASAhgAA= - Src\Document\LineManager\LineSegment.cs - - - - - - - - - - - - ABAAAAAAAAAAAAAgAAAAAAAAAAIAAAACAAAEAAAgAAA= - Src\Document\LineManager\LineManagerEventArgs.cs - - - - - - - - - - - CAAAAAgAAAAAAAAEAAAAAAAAAAIAAAACAAAAAAAAAAA= - Src\Document\LineManager\LineManagerEventArgs.cs - - - - - - - - - - - AAAAAAAAAAAAAAAEAAAEAAAAAAAAAAAAAAAEAAAAAAA= - Src\Document\LineManager\LineManagerEventArgs.cs - - - - - - - - - - - AAAAIEEAAAoAAAEYAAAABABRAAAAQAAACABAAAAAACE= - Src\Document\TextBufferStrategy\GapTextBufferStrategy.cs - - - - - - - - - - - - AAAAAEEABAIAAAAIAAAABABAAAAAAAAAAAAAAgAAACA= - Src\Document\TextBufferStrategy\StringTextBufferStrategy.cs - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - AAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Util\LoggingService.cs - - - - - - - - - - - - - - Src\Util\LookupTable.cs - - - - - AAAAAAAAAAAAAAAACEAgAAQAAAAIAAAAAAAAAAAAAAA= - Src\Util\LookupTable.cs - - - - - - - - - - AQAAAAAAAAAACAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Util\MouseWheelHandler.cs - - - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAA= - Src\Util\TextUtility.cs - - - - - - - - - - AACAAAAAAAAABAAAAAAAAAABAAIAAAAIAAAAAAAAAAA= - Src\Undo\UndoableDelete.cs - - - - - - - - - - - AACAAAAAAAAABAAAAAAAAAABAAIAAAAIAAAAAAAAAAA= - Src\Undo\UndoableInsert.cs - - - - - - - - - - - AACAAAAAAAAABAAAAAAAAAABAAIAAAAIAAAAAQAAAAA= - Src\Undo\UndoableReplace.cs - - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\ClipBoardActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\ClipBoardActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\ClipBoardActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\CaretActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\HomeEndActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\HomeEndActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\HomeEndActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\HomeEndActions.cs - - - - - - - - - - - AAAAAAAAAAAIAAQACAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\IEditAction.cs - - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAIAAAAEAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - - AAABAAAAAAAAAAQAAAAIAAAAAAAAEAAACAAAAgAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAABAAAAAQAAAAAAAAAAAAAAAQACAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - - - AAAAAAAAABAAIAAQgCAAAAAAABAAAIAQAAAABAAAAAQ= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAABAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\MiscActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\SelectionActions.cs - - - - - - - - - - - ABBIAAAQEAAAQBAUAAAAAABAAAIAAAAAAgAAAAKAgAA= - Src\Document\Selection\DefaultSelection.cs - - - - - - - - - - AAAAAAAAABAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAA= - Src\Document\FoldingStrategy\IndentFoldingStrategy.cs - - - - - - - - - - - - - - - Src\Gui\Ime.cs - - - - - Src\Gui\Ime.cs - - - - - Src\Gui\Ime.cs - - - - - Src\Gui\Ime.cs - - - - - AAIACAAAAAAAAQAAAmAAIIAAACAIAEIQAAAAAAACIAA= - Src\Gui\Ime.cs - - - - - - - - - - - AAAAAAAAAAAAAAAkAAAAIAAAAAABQAAAAAAAAAAAAAA= - Src\Gui\TextAreaUpdate.cs - - - - - - - - - - - - AQAAAUAAQCQAUgUAAGQBBAEIEAYAAkAQAAAIQAACgiA= - Src\Document\Selection\SelectionManager.cs - - - - - - - - - - - AAAAAAAAAAAAAAAAAAEAAQAAAAAAAAAAAAAAAAAAAAA= - Src\Document\Selection\SelectionManager.cs - - - - - - - - - AAAAAAAAAAACAAAAAAAAAAAACAAAAAAAAAAAAAEAAAA= - Src\Document\Selection\SelectionManager.cs - - - - - - - - - - - AAAAAAAAAAQgAAAEIAAAAAAAAAAAAAAIAABACAAEQAA= - Src\Gui\CompletionWindow\ICompletionData.cs - - - - - - - - - - - - AAAIABAkAnAAEEEAAkAAAACBAAJAYABkAAhpAIAAgAQ= - Src\Gui\CompletionWindow\CodeCompletionWindow.cs - - - - - - - - - - - AwCAAQAAABAgAAAAIAAAABACAAAABAAAAAAAAAAAAAA= - Src\Gui\CompletionWindow\DeclarationViewWindow.cs - - - - - - - - - - - - - - - Src\Gui\InsightWindow\InsightWindow.cs - - - - - AQiAEAAAAAAAAAAAAAAACABBAAAAAABCIABIEAAAAAA= - Src\Gui\InsightWindow\InsightWindow.cs - - - - - - - - - - AAAAAAAAEAAAAAAAAAAAABAAEAAgQACAIAAAAAAAAAA= - Src\Util\RtfWriter.cs - - - - - - - - - - - - - - - Src\Document\FoldingStrategy\FoldingManager.cs - - - - - - Src\Document\FoldingStrategy\FoldingManager.cs - - - - - - GAEAAYBAAEgABEBoGAAAIAgAEAIAAAAAEAAIAUAABAA= - Src\Document\FoldingStrategy\FoldingManager.cs - - - - - - - - - - - AACAAAAAAAAAAAAEAEAAAABAAAAAAAAAAAAAAAAAgAA= - Src\Document\AbstractSegment.cs - - - - - - - - - - - - EAAAAAAAggAAAIYAAACAAABgAAIQIAIgEAAAYBAAgEA= - Src\Document\FoldingStrategy\FoldMarker.cs - - - - - - - - - - - AAAACAAEAAAAAAAAAAAAAAEAAQAAAAAAAAAgAAAAAAA= - Src\Util\TipPainter.cs - - - - - - - - - - - ACAEAAACAEAAAgAAAAAAAAAACAMAAAAAAAABQAiAgAI= - Src\Util\TipSection.cs - - - - - - - - - - QAAEAAEAAAAAAgCAAAAAAAAAAAAAAAAAAAAAQAEAAAA= - Src\Util\TipText.cs - - - - - - - - - - - AAQEABAgAAAAUgAAgBAAAAAAAAAEAAQAAAAAgEAAAAE= - Src\Util\TipText.cs - - - - - - - - - - AAIEAAAAAAAAAgAAAAAAAAABAAACAAAAAAAAAAAAAAA= - Src\Util\TipSplitter.cs - - - - - - - - - - AAAEAAAAAAAAAgAAAQAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Util\TipSpacer.cs - - - - - - - - - - QAAAAAAAEAAAAACAAAAEAAAAAAAAIAAACQAAAAAAAAI= - Src\Util\TipPainterTools.cs - - - - - - - - - - - - - - - Src\Gui\Caret.cs - - - - - - Src\Gui\Caret.cs - - - - - Src\Gui\Caret.cs - - - - - AQkAgQAAACAAEoAgARBCJCAIQUgBIAFAICQQAAoFggE= - Src\Gui\Caret.cs - - - - - - - - - - - - - EyLAQFOI8qFKkAF5CQgKQAoErBgAKA4KJQZJCXkgQAA= - Src\Gui\TextArea.cs - - - - - - - - - - - - REAACMIoAKIABCAAAEAIAAABAAAIBAAQwFBAAiAAiAA= - Src\Gui\TextEditorControl.cs - - - - - - - - - - - - ECAAAIqgIGBicBEQAQgIBAAAiIYAEIACjAIIChxqXgA= - Src\Gui\TextEditorControlBase.cs - - - - - - - - - - - - CQRARAAAAigBAAAAAAAAAAAAAgMAACAAAAAACAAABMA= - Src\Gui\TextAreaClipboardHandler.cs - - - - - - - - - - - - - - - - - - - - - - - - - - Src\Gui\TextView.cs - - - - - Src\Gui\TextView.cs - - - - - cAAhDAAgAzAAkGhgQQAIAKQCAAACAsINFARsA1QKiME= - Src\Gui\TextView.cs - - - - - - - - - - - - AAAAAAAAASAAkACAAAAAAAAAAEAAAAAAAAAAAAgIAAA= - Src\Gui\GutterMargin.cs - - - - - - - - - - - - - AQAABACAARAAkAGAAgAAAAAgAAAAMAACAAAAAAGIAAA= - Src\Gui\AbstractMargin.cs - - - - - - - - - - AAAAAAAAAAAABCAAAAAAAAABAAAAAAAAAAAAAAAAAAA= - Src\Undo\UndoQueue.cs - - - - - - - - - - - - - - - - Src\Undo\UndoStack.cs - - - - - - QAgAAgAABAAABABAAAAiMCABAAAIAQAIEABAAAFCCAA= - Src\Undo\UndoStack.cs - - - - - - - - - - - - AQLYAAChAChMERCAQogICEAFBAJAAAiCAYBAQUEAAAA= - Src\Gui\TextAreaControl.cs - - - - - - - - - - AyAEAIBISAAAAABBABAAAAgAAIAQACABIADhAUACABA= - Src\Gui\TextAreaMouseHandler.cs - - - - - - - - - - - AgAAAAAAAAAAAAAEAAAAAAQAAAAEAAAAAEgAAABIAAA= - Src\Document\HighlightingStrategy\SyntaxModes\SyntaxMode.cs - - - - - - - - - - - AIAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAACAA= - Src\Document\HighlightingStrategy\SyntaxModes\ResourceSyntaxModeProvider.cs - - - - - - - - - - - - gAAAAAAAgAAAlACAAAAgAAAAEEIgAAAAAAEAAAIIABA= - Src\Gui\IconBarMargin.cs - - - - - - - - - - - AAAABAAAABAAkACAAABEAAAAAAAAAAAAAAAAAkAIAAA= - Src\Gui\FoldMargin.cs - - - - - - - - - - - AIACAACAAAAQAAAAAAAAAAAAAAAAAAAAAAAAACAACAA= - Src\Document\HighlightingStrategy\SyntaxModes\FileSyntaxModeProvider.cs - - - - - - - - - - - - AAAAAAAAgAAAAIAEgEAAAAAAAAAAAIAgAIAAIAAAAAA= - Src\Document\Selection\ColumnRange.cs - - - - - - - - - - AYAAAAAAAAAAAAAAAIACBAAEAIAAAAAAFAAAAAAAAAA= - Src\Gui\TextAreaDragDropHandler.cs - - - - - - - - - - AAAAAAAAAAAAAAAAAAIAAAgAAAAAAAAAAAAAAAAAAAA= - Src\Gui\BracketHighlighter.cs - - - - - - - - - - - AAAAAUAAAAAAAAAAgAAAAAAAAAAAAQAAAAAAAgAAAAA= - Src\Gui\BracketHighlighter.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\BookmarkActions.cs - - - - - - - - - - AAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\BookmarkActions.cs - - - - - - - - - - AAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\BookmarkActions.cs - - - - - - - - - - AAAAAAAAAAAAAARAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\BookmarkActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FoldActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FoldActions.cs - - - - - - - - - AAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FoldActions.cs - - - - - - - - - - AQAAAAAAAAAAAAQAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - - AQAAAAAAAAAAAAQAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - AAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\FormatActions.cs - - - - - - - - - - - ECgAIDCwACAKCAAgAgwIBDiAiIQ6AIikCgAaRhgKUko= - Src\Document\DefaultTextEditorProperties.cs - - - - - - - - - - - - AAAAIQAAACAAAAAAAAAgCAAAAAMAgAACIAAAAAEAAAA= - Src\Document\MarkerStrategy\MarkerStrategy.cs - - - - - - - - - - - AAAAAQAAAAEAAAAQCAAAAAgAAAAABACAAAAAgQAAQAE= - Src\Document\MarkerStrategy\TextMarker.cs - - - - - - - - - - - AgAAAQAgAAAABAggAIAAAAiQABAQAAFgAQgIAAAAAAA= - Src\Gui\CompletionWindow\AbstractCompletionWindow.cs - - - - - - - - - - - - AQmIQAIIAQAEAEALwEAAAQAAAAAAAAAAIEAAAACQAgA= - Src\Gui\CompletionWindow\CodeCompletionListView.cs - - - - - - - - - - AAAAAAAAAAQAAAAAACAAAAAIAAAAAAAAAAEgQAAAAAA= - Src\Gui\BrushRegistry.cs - - - - - - - - - - AQCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Gui\HRuler.cs - - - - - - - - - - - - AQAAAQEAAAAAAwQAAEMIAAADBAIAEAACAAAAAAABAgA= - Src\Document\BookmarkManager\Bookmark.cs - - - - - - - - - - - AAAAAAAAAABAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\BookmarkManager\BookmarkEventHandler.cs - - - - - - - - - ABAAEAEAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAA= - Src\Util\FileReader.cs - - - - - - - - - - - - - - Src\Gui\DrawableLine.cs - - - - - AAAQDAAABAgAIAAAAAAAAEABAAAAAAAEAGAAAAAAAAA= - Src\Gui\DrawableLine.cs - - - - - - - - - - - AAIAABAAIgABAAIAAAAACAAAAAgAAAAAAAAAAAACAAA= - Src\Gui\ToolTipRequestEventArgs.cs - - - - - - - - - - - - - - Src\Document\HighlightingStrategy\SpanStack.cs - - - - - Src\Document\HighlightingStrategy\SpanStack.cs - - - - - - ACBAAAAAAAAEABAIAACAAAgAAACAAAAAAAAAAAAACBA= - Src\Document\HighlightingStrategy\SpanStack.cs - - - - - - - - - - - - - - - - - - - - - - AAAAAAAAAICAAAAAAAAAAEAgAAAAAAAAAAAAAAAgAAA= - Src\Document\LineManager\DeferredEventList.cs - - - - - - - - - - - AABAAAAAAAAAAAQEgALAAgAAAAAAAIAAAABgAAABZyA= - Src\Document\TextLocation.cs - - - - - - - - - - - - - - - - - - - - - - - - ACIAA0EACAAAFAA4AMBABgAAQAgAUAYAKQCcDAAAAHE= - Src\Document\IDocument.cs - - - - - - - - - AAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAgAA= - Src\Document\ISegment.cs - - - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAA= - Src\Document\BookmarkManager\BookmarkManager.cs - - - - - - - - - AAAAAAAAAAAAAAAQAAACCQAAABAAAAAAAAAAAAAAAAA= - Src\Document\FormattingStrategy\IFormattingStrategy.cs - - - - - - - - - - ABAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAEAACAAA= - Src\Document\HighlightingStrategy\IHighlightingStrategy.cs - - - - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAIAAAA= - Src\Document\HighlightingStrategy\IHighlightingStrategy.cs - - - - - - - - - - AAAAAEEAAAIAAAAIAAAABABAAAAAAAAAAAAAAAAAACA= - Src\Document\TextBufferStrategy\ITextBufferStrategy.cs - - - - - - - - - - - - - - - - - - - - AAAAAAAAAAAAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Actions\IEditAction.cs - - - - - - - - - - AABIAAAQEAAAQAAQAAAAAABAAAAAAAAAAgAAAACAgAA= - Src\Document\Selection\ISelection.cs - - - - - - - - - AAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\FoldingStrategy\IFoldingStrategy.cs - - - - - - - - - - AAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAAAACAAEQAA= - Src\Gui\CompletionWindow\ICompletionData.cs - - - - - - - - - - AAAAAAAgAAAAAAAAAQAAAQCAAAAAAAAAgAAAAAAEAAA= - Src\Gui\CompletionWindow\ICompletionDataProvider.cs - - - - - - - - - - AAAAAAAAABAgAAAAAAAAAAAAAAAABAAAAAAAAAAAAAA= - Src\Gui\CompletionWindow\DeclarationViewWindow.cs - - - - - - - - - - AABAAAAgAAAEAABAAAAAAAAAAAAAAAAAAAAIAAAAAAA= - Src\Gui\InsightWindow\IInsightDataProvider.cs - - - - - - - - - ECAAACCgACAAAAAAAggABAAAiIQ6AAAACgAIQhgKUgA= - Src\Document\ITextEditorProperties.cs - - - - - - - - - AAAAAAAAAAAABAAAAAAAAAABAAAAAAAAAAAAAAAAAAA= - Src\Undo\IUndoableOperation.cs - - - - - - - - - - AAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAACAA= - Src\Document\HighlightingStrategy\SyntaxModes\ISyntaxModeFileProvider.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAEAAAA= - Src\Document\DefaultDocument.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACEAAQA= - Src\Document\DefaultDocument.cs - - - - - - AgAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAEAAAA= - Src\Document\DefaultDocument.cs - - - - - - AAAAAAAAAAAAAAAAAAgAAAAAAAAIAAAAAAAAAAAAAAA= - Src\Document\DefaultDocument.cs - - - - - - AAAAAAAABAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\TextAnchor.cs - - - - - - AAEAACAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Document\HighlightingStrategy\TextWord.cs - - - - - - AAAAAAAAAQAAAAAAAAAECAAAAAAAIACAAAAAAAAAAAg= - Src\Gui\TextAreaUpdate.cs - - - - - - AAAAAAAAAAAAAEgAAAAAAAgAAAAAAAAAAAAAAAAAAAA= - Src\Gui\CompletionWindow\ICompletionDataProvider.cs - - - - - - AAAAAAABgAAAAAAAAAAAAAggAAAAAAAAAAAAAAAAAAA= - Src\Document\FoldingStrategy\FoldMarker.cs - - - - - - ABAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Gui\Caret.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAQAA= - Src\Document\DefaultTextEditorProperties.cs - - - - - - AAAAAAAAIAAAAAAAAAAAAAAAAABAACAAAAAAAAAAACA= - Src\Document\MarkerStrategy\TextMarker.cs - - - - - - AAAAAAAAAAAAAAAAEAAAAAAQAAAAAAAAAAAAAAAAAAA= - Src\Document\DocumentEventArgs.cs - - - - - - AAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAA= - Src\Gui\TextArea.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA= - Src\Gui\TextArea.cs - - - - - - - - - - - - - - AAAAIAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAQAAAAAA= - Src\Gui\AbstractMargin.cs - - - - - - AAAAAAAAABAAAAAAgAAAAAAAAAAAAAAAAAAAQAAAAAA= - Src\Gui\AbstractMargin.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAQAAAAACAAAAAAAAAAAAA= - Src\Document\BookmarkManager\BookmarkEventHandler.cs - - - - - - AAAAAAAAAAAAAAAAAAAAAAAQAAAQAAAAAAAAAAAAAAA= - Src\Gui\ToolTipRequestEventArgs.cs - - - - \ No newline at end of file diff --git a/src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj b/src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj deleted file mode 100644 index 7812810..0000000 --- a/src/ICSharpCode.TextEditor/ICSharpCode.TextEditor.csproj +++ /dev/null @@ -1,230 +0,0 @@ - - - - Debug - AnyCPU - 9.0.21022 - 2.0 - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D} - ICSharpCode.TextEditor - Library - 4 - False - False - OnSuccessfulBuild - Library - true - Resources\ICSharpCode.TextEditor.snk - ICSharpCode.TextEditor - False - Auto - 98041856 - AnyCPU - 4096 - v4.0 - - - 3.5 - - - - - False - False - True - ..\..\..\bin\Debug\ - TRACE;DEBUG - false - -Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Design#CA1062;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1303;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA1300;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Naming#CA1718;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1705;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1706;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1807;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1816;-Microsoft.Performance#CA1817;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1818;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1804;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2100;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2110;-Microsoft.Security#CA2120;-Microsoft.Security#CA2101;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Usage#CA2209;-Microsoft.Usage#CA2236;-Microsoft.Usage#CA2227;-Microsoft.Usage#CA2213;-Microsoft.Usage#CA2216;-Microsoft.Usage#CA2215;-Microsoft.Usage#CA2214;-Microsoft.Usage#CA2222;-Microsoft.Usage#CA2202;-Microsoft.Usage#CA1806;-Microsoft.Usage#CA2217;-Microsoft.Usage#CA2212;-Microsoft.Usage#CA2219;-Microsoft.Usage#CA2201;-Microsoft.Usage#CA2228;-Microsoft.Usage#CA2221;-Microsoft.Usage#CA2220;-Microsoft.Usage#CA2240;-Microsoft.Usage#CA2229;-Microsoft.Usage#CA2238;-Microsoft.Usage#CA2207;-Microsoft.Usage#CA2208;-Microsoft.Usage#CA2235;-Microsoft.Usage#CA2237;-Microsoft.Usage#CA2232;-Microsoft.Usage#CA2223;-Microsoft.Usage#CA2211;-Microsoft.Usage#CA2233;-Microsoft.Usage#CA2225;-Microsoft.Usage#CA2226;-Microsoft.Usage#CA2231;-Microsoft.Usage#CA2224;-Microsoft.Usage#CA2218;-Microsoft.Usage#CA2234;-Microsoft.Usage#CA2241;-Microsoft.Usage#CA2239;-Microsoft.Usage#CA2200;-Microsoft.Usage#CA1801;-Microsoft.Usage#CA2205;-Microsoft.Usage#CA2230 - - - true - False - False - ..\..\..\bin\Release\ - False - TRACE - - - Full - true - - - None - False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Form - - - Form - - - - Form - - - - - - - - - - - - - - - Component - - - UserControl - - - UserControl - - - - - - - - - - Component - - - - - - - - - - - - - - - - - - - Form - - - UserControl - - - - Component - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - rem ..\src\Tools\UpdateAssemblyInfo\bin\Debug\UpdateAssemblyInfo.exe - - \ No newline at end of file diff --git a/src/ICSharpCode.TextEditor/Resources/..svnbridge/ICSharpCode.TextEditor.snk b/src/ICSharpCode.TextEditor/Resources/..svnbridge/ICSharpCode.TextEditor.snk deleted file mode 100644 index 0814930..0000000 --- a/src/ICSharpCode.TextEditor/Resources/..svnbridge/ICSharpCode.TextEditor.snk +++ /dev/null @@ -1 +0,0 @@ -svn:mime-typeapplication/octet-stream \ No newline at end of file diff --git a/src/ICSharpCode.TextEditor/Resources/..svnbridge/RightArrow.cur b/src/ICSharpCode.TextEditor/Resources/..svnbridge/RightArrow.cur deleted file mode 100644 index 0814930..0000000 --- a/src/ICSharpCode.TextEditor/Resources/..svnbridge/RightArrow.cur +++ /dev/null @@ -1 +0,0 @@ -svn:mime-typeapplication/octet-stream \ No newline at end of file diff --git a/src/ICSharpCode.TextEditor/Resources/..svnbridge/TextEditorControl.bmp b/src/ICSharpCode.TextEditor/Resources/..svnbridge/TextEditorControl.bmp deleted file mode 100644 index 0814930..0000000 --- a/src/ICSharpCode.TextEditor/Resources/..svnbridge/TextEditorControl.bmp +++ /dev/null @@ -1 +0,0 @@ -svn:mime-typeapplication/octet-stream \ No newline at end of file diff --git a/src/ICSharpCode.TextEditor/Resources/ASPX.xshd b/src/ICSharpCode.TextEditor/Resources/ASPX.xshd deleted file mode 100644 index b28520c..0000000 --- a/src/ICSharpCode.TextEditor/Resources/ASPX.xshd +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - <% - %> - - - - - - // - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/BAT-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/BAT-Mode.xshd deleted file mode 100644 index bd68739..0000000 --- a/src/ICSharpCode.TextEditor/Resources/BAT-Mode.xshd +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/Boo.xshd b/src/ICSharpCode.TextEditor/Resources/Boo.xshd deleted file mode 100644 index f4d68db..0000000 --- a/src/ICSharpCode.TextEditor/Resources/Boo.xshd +++ /dev/null @@ -1,314 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - &<>~!@$%^*()-+=|\#/{}[]:;"' , .? - - - """ - """ - - - - # - - - - // - - - - /* - */ - - - - " - " - - - - """ - """ - - - - ' - ' - - - - @@/ - / - - - - /@! @@!/@ - / - - - ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &<>~!@%^*()-+=|\#/{}[]:;"' , .? - - - /* - */ - - - - - - &<>~!@%^*()-+=|\#/{}[]:;"' , .? - - - /* - */ - - - - - - &<>~!@%^*()-+=|\#/{}[]:;"' , .? - - - ${ - } - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/CPP-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/CPP-Mode.xshd deleted file mode 100644 index e9741c5..0000000 --- a/src/ICSharpCode.TextEditor/Resources/CPP-Mode.xshd +++ /dev/null @@ -1,206 +0,0 @@ - - - - - - - - - - - - - - ~!%^*()-+=|\#/{}[]:;"'<> , .? - - - # - - - - // - - - - /* - */ - - - - " - " - - - - ' - ' - - - ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/CSharp-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/CSharp-Mode.xshd deleted file mode 100644 index ac85cfb..0000000 --- a/src/ICSharpCode.TextEditor/Resources/CSharp-Mode.xshd +++ /dev/null @@ -1,338 +0,0 @@ - - - - - - - - - - - - - - - - - - - &<>~!%^*()-+=|\#/{}[]:;"' , .? - - - # - - - - ///@!/@ - - - - //@!/@ - - - //// - - - - /* - */ - - - - " - " - - - - @@" - " - - - - ' - ' - - - ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <>~!@%^*()-+=|\#/{}[]:;"' , .? - - - - - - - - - - - - <>~!@%^*()-+=|\#/{}[]:;"' , .? - - - < - > - - - - - - - - - - - - - - - &<>~!%^*()-+=|\#/{}[]:;"' , .? - - - - - - - - - - - - - - - - - - - <>~!@%^*()-+=|\#/{}[]:;"' , .? - - - " - " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/Coco-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/Coco-Mode.xshd deleted file mode 100644 index 45149e1..0000000 --- a/src/ICSharpCode.TextEditor/Resources/Coco-Mode.xshd +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - &<>~!@%^*()-+=|\#/{}[]:;"' , .? - - - // - - - - /* - */ - - - - - COMPILER - TOKENNAMES - - - - " - " - - - - ' - ' - - - - < - > - - - - (. - .) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/HTML-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/HTML-Mode.xshd deleted file mode 100644 index bcf95f7..0000000 --- a/src/ICSharpCode.TextEditor/Resources/HTML-Mode.xshd +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - - - - <!-- - --> - - - <script> - </script> - - - <script lang="JavaScript"> - </script> - - - <script lang="JScript"> - </script> - - - <script lang="VBScript"> - </script> - - - <script@C - </script> - - - < - > - - - - & - ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /= - - - " - " - - - - ' - ' - - - = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/ICSharpCode.TextEditor.snk b/src/ICSharpCode.TextEditor/Resources/ICSharpCode.TextEditor.snk deleted file mode 100644 index a49f400e767a63cff1b0f7febf0c10343d230b6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONa50096WpVmUMQ4OSI%Q$c1gpaNbGB%y_t?hRK zTGzB+bsR&MM+0P7$%9j8`-o^O=-7rH*@Sf@Ur6#3A!6mi81mAfK`>yrOQLx5@eOkz$?z+Ch_8NMWO3D1 zSuXQo_?#bjgAv|SMMz4``&37VBkE;Zp?M52q_V#YF5wa`67>U@GG$ z%k#&`vXbY0L-Yt|KKahW-5ufQvw_uBR%86?f9&;$eM`b7O|dLHx%fn~JRAkwGkVj8 zQdxCM3*G~?xsx3-)zPtgQXTElzZ9Q`N#EJfe&ahCx}>)!%<@{VET6E+Jc<>@JCh=< z2T{TZN0tlA;&fCIfWW15zsu8$GH$`HhzJAmgf~Ta#qbxt#v!~x(%8F|NeW@+<}kys zq^2`^kHDWlrqFV3pTH{Di(d*7)ao+U6;7ub|g_AhHeUz=u(TZ=T&YeH4F$DCo!&DnT6wqW(l zFvsBrH-lYCG3TE`w+SMB;?IBxe6|LUu0bjTJ@0`0xa502dM1UEv7q)+6NP3UJ(~t= izMc*^c*r(Tg^PXu&cFM>4=-sg+K7J$BNGRc(Q*?32P9np diff --git a/src/ICSharpCode.TextEditor/Resources/Java-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/Java-Mode.xshd deleted file mode 100644 index 68309f2..0000000 --- a/src/ICSharpCode.TextEditor/Resources/Java-Mode.xshd +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - - - - - - - - - - ~!%^*()-+=|\#/{}[]:;"'<> , .? - - - // - - - - /* - */ - - - - " - " - - - - ' - ' - - - ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~!%^*()-+=|\#/{}[]:;"'<> , .? - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/JavaScript-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/JavaScript-Mode.xshd deleted file mode 100644 index d105e16..0000000 --- a/src/ICSharpCode.TextEditor/Resources/JavaScript-Mode.xshd +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - =!><+-/*%&|^~.}{,;][?: - - - // - - - - /* - */ - - - - " - " - - - - ' - ' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/Mode.xsd b/src/ICSharpCode.TextEditor/Resources/Mode.xsd deleted file mode 100644 index cda9652..0000000 --- a/src/ICSharpCode.TextEditor/Resources/Mode.xsd +++ /dev/null @@ -1,295 +0,0 @@ - - - - - This schema defines the syntax for mode definitions in SharpDevelop. - The schema can be simplified quite a bit but it does the job as is. - - - If you are using this file as a reference it is probably easiest to scroll to - the botton to find the definition of the root element called SyntaxDefinition and - then unwind the different type definitions and refernces. - - Note on coloring: - Many tags define how some symbol should be colored. If a specific symbol - can not be matched onto either a Span definition, Keyword, or a Digit/Number it - will be rendered in the current default color. Which is the default color of the - current span or the default color of the mode as a whole if no span has been entered. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/PHP-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/PHP-Mode.xshd deleted file mode 100644 index ea3911a..0000000 --- a/src/ICSharpCode.TextEditor/Resources/PHP-Mode.xshd +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - - - - ~!%^*()-+=|\#/{}[]:;"'<> , .? - - - # - - - - /// - - - - //@!/@ - - - - /* - */ - - - - " - " - - - - @@" - " - - - - ' - ' - - - ( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~!@%^*()-+=|\#/{}[]:;"'<> , .? - - - - - - - ~!@%^*()-+=|\#/{}[]:;"'<> , .? - - - < - > - - - - - - - - - ~!@%^*()-+=|\#/{}[]:;"'<> , .? - - - " - " - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/Patch-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/Patch-Mode.xshd deleted file mode 100644 index 997d51b..0000000 --- a/src/ICSharpCode.TextEditor/Resources/Patch-Mode.xshd +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - ~!%^*()-+=|\#/{}[]:;"'<> , .? - - - Index: - - - == - - - --- - - - +++ - - - @@ - - - - - - - + - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/RightArrow.cur b/src/ICSharpCode.TextEditor/Resources/RightArrow.cur deleted file mode 100644 index 5691efbaf8997b9957eff92ce6b842edf232689a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 326 zcmb8pF%H5o5Jb^2NTfj`6`~_0rH_z~>*NS@TnmYUYmh3fJ17vtUlJ*G)_NZA%91Uu zl+-lRR#HyVo;-n(S|rxLrWl)fw>>utP6zIWcsFc9Ev+*;6zPZ^Dny^4&>^D+#UB>c h!0r2_C;OLO7?!jBu0|K~h9}B2`;cEaT=BqQ{{a3le&zrG diff --git a/src/ICSharpCode.TextEditor/Resources/SyntaxModes.xml b/src/ICSharpCode.TextEditor/Resources/SyntaxModes.xml deleted file mode 100644 index 73c0f0c..0000000 --- a/src/ICSharpCode.TextEditor/Resources/SyntaxModes.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/Tex-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/Tex-Mode.xshd deleted file mode 100644 index 9da3377..0000000 --- a/src/ICSharpCode.TextEditor/Resources/Tex-Mode.xshd +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - - - - - &~!@%^*()-+=|\#/{}[]:;"'<> , .? - - - % - - - - $$ - $$ - - - \[ - \] - - - - \ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - &~!@%^*()-+=|\#/{}[]:;"'<> , .? - - - - % - - - - \ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/TextEditorControl.bmp b/src/ICSharpCode.TextEditor/Resources/TextEditorControl.bmp deleted file mode 100644 index 4bd828012d3d1d6ae8eb3b8e620b0e019a362950..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 824 zcmZ?rwP0od12Z700mK4O%*Y@C76%bR+z<>C_|Nd4rfB`D^~58fOMr_169+&lVd@ze z8i1N0egZO{w1hwqNU#AY3G^h`WSDv&mmokfA8ZK399YPK%tW>bSv^6+feMh-!_9#^ z8_oc^9_%}0^}l}oB4`D&dWf5WS|Fi;<`JMQntKQuj;tPN5s?TOUuZtX&m}`WPzy - - - - - - - - - - - - - - - - ~!@%^*()-+=|\#/{}[]:;"'<>,.? - - - " - " - - - - # - - - - # - # - - - - ' - - - - REM@C - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ~!@%^*()-+=|\#/{}[]:;"'<>,.? - - - - - - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Resources/XML-Mode.xshd b/src/ICSharpCode.TextEditor/Resources/XML-Mode.xshd deleted file mode 100644 index a7f59e2..0000000 --- a/src/ICSharpCode.TextEditor/Resources/XML-Mode.xshd +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - <!-- - --> - - - <![CDATA[ - ]]> - - - <!DOCTYPE - > - - - <? - ?> - - - < - > - - - & - ; - - - - - /= - - " - " - - - ' - ' - - = - - - - - - - - - diff --git a/src/ICSharpCode.TextEditor/Src/Actions/BookmarkActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/BookmarkActions.cs deleted file mode 100644 index ad0136b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/BookmarkActions.cs +++ /dev/null @@ -1,80 +0,0 @@ -// -// -// -// -// $Revision: 3272 $ -// - -using System; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Actions -{ - public class ToggleBookmark : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - textArea.Document.BookmarkManager.ToggleMarkAt(textArea.Caret.Position); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, textArea.Caret.Line)); - textArea.Document.CommitUpdate(); - - } - } - - public class GotoPrevBookmark : AbstractEditAction - { - Predicate predicate = null; - - public GotoPrevBookmark(Predicate predicate) - { - this.predicate = predicate; - } - - public override void Execute(TextArea textArea) - { - Bookmark mark = textArea.Document.BookmarkManager.GetPrevMark(textArea.Caret.Line, predicate); - if (mark != null) { - textArea.Caret.Position = mark.Location; - textArea.SelectionManager.ClearSelection(); - textArea.SetDesiredColumn(); - } - } - } - - public class GotoNextBookmark : AbstractEditAction - { - Predicate predicate = null; - - public GotoNextBookmark(Predicate predicate) - { - this.predicate = predicate; - } - - public override void Execute(TextArea textArea) - { - Bookmark mark = textArea.Document.BookmarkManager.GetNextMark(textArea.Caret.Line, predicate); - if (mark != null) { - textArea.Caret.Position = mark.Location; - textArea.SelectionManager.ClearSelection(); - textArea.SetDesiredColumn(); - } - } - } - - public class ClearAllBookmarks : AbstractEditAction - { - Predicate predicate = null; - - public ClearAllBookmarks(Predicate predicate) - { - this.predicate = predicate; - } - - public override void Execute(TextArea textArea) - { - textArea.Document.BookmarkManager.RemoveMarks(predicate); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - textArea.Document.CommitUpdate(); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/CaretActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/CaretActions.cs deleted file mode 100644 index ceb28e9..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/CaretActions.cs +++ /dev/null @@ -1,203 +0,0 @@ -// -// -// -// -// $Revision: 2681 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Actions -{ - public class CaretLeft : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - TextLocation position = textArea.Caret.Position; - List foldings = textArea.Document.FoldingManager.GetFoldedFoldingsWithEnd(position.Y); - FoldMarker justBeforeCaret = null; - foreach (FoldMarker fm in foldings) { - if (fm.EndColumn == position.X) { - justBeforeCaret = fm; - break; // the first folding found is the folding with the smallest Startposition - } - } - - if (justBeforeCaret != null) { - position.Y = justBeforeCaret.StartLine; - position.X = justBeforeCaret.StartColumn; - } else { - if (position.X > 0) { - --position.X; - } else if (position.Y > 0) { - LineSegment lineAbove = textArea.Document.GetLineSegment(position.Y - 1); - position = new TextLocation(lineAbove.Length, position.Y - 1); - } - } - - textArea.Caret.Position = position; - textArea.SetDesiredColumn(); - } - } - - public class CaretRight : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - LineSegment curLine = textArea.Document.GetLineSegment(textArea.Caret.Line); - TextLocation position = textArea.Caret.Position; - List foldings = textArea.Document.FoldingManager.GetFoldedFoldingsWithStart(position.Y); - FoldMarker justBehindCaret = null; - foreach (FoldMarker fm in foldings) { - if (fm.StartColumn == position.X) { - justBehindCaret = fm; - break; - } - } - if (justBehindCaret != null) { - position.Y = justBehindCaret.EndLine; - position.X = justBehindCaret.EndColumn; - } else { // no folding is interesting - if (position.X < curLine.Length || textArea.TextEditorProperties.AllowCaretBeyondEOL) { - ++position.X; - } else if (position.Y + 1 < textArea.Document.TotalNumberOfLines) { - ++position.Y; - position.X = 0; - } - } - textArea.Caret.Position = position; - textArea.SetDesiredColumn(); - } - } - - public class CaretUp : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - TextLocation position = textArea.Caret.Position; - int lineNr = position.Y; - int visualLine = textArea.Document.GetVisibleLine(lineNr); - if (visualLine > 0) { - Point pos = new Point(textArea.TextView.GetDrawingXPos(lineNr, position.X), - textArea.TextView.DrawingPosition.Y + (visualLine - 1) * textArea.TextView.FontHeight - textArea.TextView.TextArea.VirtualTop.Y); - textArea.Caret.Position = textArea.TextView.GetLogicalPosition(pos); - textArea.SetCaretToDesiredColumn(); - } -// if (textArea.Caret.Line > 0) { -// textArea.SetCaretToDesiredColumn(textArea.Caret.Line - 1); -// } - } - } - - public class CaretDown : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - TextLocation position = textArea.Caret.Position; - int lineNr = position.Y; - int visualLine = textArea.Document.GetVisibleLine(lineNr); - if (visualLine < textArea.Document.GetVisibleLine(textArea.Document.TotalNumberOfLines)) { - Point pos = new Point(textArea.TextView.GetDrawingXPos(lineNr, position.X), - textArea.TextView.DrawingPosition.Y - + (visualLine + 1) * textArea.TextView.FontHeight - - textArea.TextView.TextArea.VirtualTop.Y); - textArea.Caret.Position = textArea.TextView.GetLogicalPosition(pos); - textArea.SetCaretToDesiredColumn(); - } -// if (textArea.Caret.Line + 1 < textArea.Document.TotalNumberOfLines) { -// textArea.SetCaretToDesiredColumn(textArea.Caret.Line + 1); -// } - } - } - - public class WordRight : CaretRight - { - public override void Execute(TextArea textArea) - { - LineSegment line = textArea.Document.GetLineSegment(textArea.Caret.Position.Y); - TextLocation oldPos = textArea.Caret.Position; - TextLocation newPos; - if (textArea.Caret.Column >= line.Length) { - newPos = new TextLocation(0, textArea.Caret.Line + 1); - } else { - int nextWordStart = TextUtilities.FindNextWordStart(textArea.Document, textArea.Caret.Offset); - newPos = textArea.Document.OffsetToPosition(nextWordStart); - } - - // handle fold markers - List foldings = textArea.Document.FoldingManager.GetFoldingsFromPosition(newPos.Y, newPos.X); - foreach (FoldMarker marker in foldings) { - if (marker.IsFolded) { - if (oldPos.X == marker.StartColumn && oldPos.Y == marker.StartLine) { - newPos = new TextLocation(marker.EndColumn, marker.EndLine); - } else { - newPos = new TextLocation(marker.StartColumn, marker.StartLine); - } - break; - } - } - - textArea.Caret.Position = newPos; - textArea.SetDesiredColumn(); - } - } - - public class WordLeft : CaretLeft - { - public override void Execute(TextArea textArea) - { - TextLocation oldPos = textArea.Caret.Position; - if (textArea.Caret.Column == 0) { - base.Execute(textArea); - } else { - LineSegment line = textArea.Document.GetLineSegment(textArea.Caret.Position.Y); - - int prevWordStart = TextUtilities.FindPrevWordStart(textArea.Document, textArea.Caret.Offset); - - TextLocation newPos = textArea.Document.OffsetToPosition(prevWordStart); - - // handle fold markers - List foldings = textArea.Document.FoldingManager.GetFoldingsFromPosition(newPos.Y, newPos.X); - foreach (FoldMarker marker in foldings) { - if (marker.IsFolded) { - if (oldPos.X == marker.EndColumn && oldPos.Y == marker.EndLine) { - newPos = new TextLocation(marker.StartColumn, marker.StartLine); - } else { - newPos = new TextLocation(marker.EndColumn, marker.EndLine); - } - break; - } - } - textArea.Caret.Position = newPos; - textArea.SetDesiredColumn(); - } - - - } - } - - public class ScrollLineUp : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - textArea.AutoClearSelection = false; - - textArea.MotherTextAreaControl.VScrollBar.Value = Math.Max(textArea.MotherTextAreaControl.VScrollBar.Minimum, - textArea.VirtualTop.Y - textArea.TextView.FontHeight); - } - } - - public class ScrollLineDown : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - textArea.AutoClearSelection = false; - textArea.MotherTextAreaControl.VScrollBar.Value = Math.Min(textArea.MotherTextAreaControl.VScrollBar.Maximum, - textArea.VirtualTop.Y + textArea.TextView.FontHeight); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/ClipBoardActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/ClipBoardActions.cs deleted file mode 100644 index 5074634..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/ClipBoardActions.cs +++ /dev/null @@ -1,42 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Actions -{ - public class Cut : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - textArea.ClipboardHandler.Cut(null, null); - } - } - - public class Copy : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - textArea.AutoClearSelection = false; - textArea.ClipboardHandler.Copy(null, null); - } - } - - public class Paste : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - textArea.ClipboardHandler.Paste(null, null); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/FoldActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/FoldActions.cs deleted file mode 100644 index 88efbf0..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/FoldActions.cs +++ /dev/null @@ -1,68 +0,0 @@ -// -// -// -// -// $Revision: 2972 $ -// - -using System; -using System.Collections.Generic; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Actions -{ - public class ToggleFolding : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - List foldMarkers = textArea.Document.FoldingManager.GetFoldingsWithStart(textArea.Caret.Line); - if (foldMarkers.Count != 0) { - foreach (FoldMarker fm in foldMarkers) - fm.IsFolded = !fm.IsFolded; - } else { - foldMarkers = textArea.Document.FoldingManager.GetFoldingsContainsLineNumber(textArea.Caret.Line); - if (foldMarkers.Count != 0) { - FoldMarker innerMost = foldMarkers[0]; - for (int i = 1; i < foldMarkers.Count; i++) { - if (new TextLocation(foldMarkers[i].StartColumn, foldMarkers[i].StartLine) > - new TextLocation(innerMost.StartColumn, innerMost.StartLine)) - { - innerMost = foldMarkers[i]; - } - } - innerMost.IsFolded = !innerMost.IsFolded; - } - } - textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); - } - } - - public class ToggleAllFoldings : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - bool doFold = true; - foreach (FoldMarker fm in textArea.Document.FoldingManager.FoldMarker) { - if (fm.IsFolded) { - doFold = false; - break; - } - } - foreach (FoldMarker fm in textArea.Document.FoldingManager.FoldMarker) { - fm.IsFolded = doFold; - } - textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); - } - } - - public class ShowDefinitionsOnly : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - foreach (FoldMarker fm in textArea.Document.FoldingManager.FoldMarker) { - fm.IsFolded = fm.FoldType == FoldType.MemberBody || fm.FoldType == FoldType.Region; - } - textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/FormatActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/FormatActions.cs deleted file mode 100644 index f626ef8..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/FormatActions.cs +++ /dev/null @@ -1,213 +0,0 @@ -// -// -// -// -// $Revision: 2640 $ -// - -using System; -using System.Text; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Actions -{ - public abstract class AbstractLineFormatAction : AbstractEditAction - { - protected TextArea textArea; - abstract protected void Convert(IDocument document, int startLine, int endLine); - - public override void Execute(TextArea textArea) - { - this.textArea = textArea; - textArea.BeginUpdate(); - textArea.Document.UndoStack.StartUndoGroup(); - if (textArea.SelectionManager.HasSomethingSelected) { - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - Convert(textArea.Document, selection.StartPosition.Y, selection.EndPosition.Y); - } - } else { - Convert(textArea.Document, 0, textArea.Document.TotalNumberOfLines - 1); - } - textArea.Document.UndoStack.EndUndoGroup(); - textArea.Caret.ValidateCaretPos(); - textArea.EndUpdate(); - textArea.Refresh(); - } - } - - public abstract class AbstractSelectionFormatAction : AbstractEditAction - { - protected TextArea textArea; - abstract protected void Convert(IDocument document, int offset, int length); - - public override void Execute(TextArea textArea) - { - this.textArea = textArea; - textArea.BeginUpdate(); - if (textArea.SelectionManager.HasSomethingSelected) { - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - Convert(textArea.Document, selection.Offset, selection.Length); - } - } else { - Convert(textArea.Document, 0, textArea.Document.TextLength); - } - textArea.Caret.ValidateCaretPos(); - textArea.EndUpdate(); - textArea.Refresh(); - } - } - - public class RemoveLeadingWS : AbstractLineFormatAction - { - protected override void Convert(IDocument document, int y1, int y2) - { - for (int i = y1; i < y2; ++i) { - LineSegment line = document.GetLineSegment(i); - int removeNumber = 0; - for (int x = line.Offset; x < line.Offset + line.Length && Char.IsWhiteSpace(document.GetCharAt(x)); ++x) { - ++removeNumber; - } - if (removeNumber > 0) { - document.Remove(line.Offset, removeNumber); - } - } - } - } - - public class RemoveTrailingWS : AbstractLineFormatAction - { - protected override void Convert(IDocument document, int y1, int y2) - { - for (int i = y2 - 1; i >= y1; --i) { - LineSegment line = document.GetLineSegment(i); - int removeNumber = 0; - for (int x = line.Offset + line.Length - 1; x >= line.Offset && Char.IsWhiteSpace(document.GetCharAt(x)); --x) { - ++removeNumber; - } - if (removeNumber > 0) { - document.Remove(line.Offset + line.Length - removeNumber, removeNumber); - } - } - } - } - - - public class ToUpperCase : AbstractSelectionFormatAction - { - protected override void Convert(IDocument document, int startOffset, int length) - { - string what = document.GetText(startOffset, length).ToUpper(); - document.Replace(startOffset, length, what); - } - } - - public class ToLowerCase : AbstractSelectionFormatAction - { - protected override void Convert(IDocument document, int startOffset, int length) - { - string what = document.GetText(startOffset, length).ToLower(); - document.Replace(startOffset, length, what); - } - } - - public class InvertCaseAction : AbstractSelectionFormatAction - { - protected override void Convert(IDocument document, int startOffset, int length) - { - StringBuilder what = new StringBuilder(document.GetText(startOffset, length)); - - for (int i = 0; i < what.Length; ++i) { - what[i] = Char.IsUpper(what[i]) ? Char.ToLower(what[i]) : Char.ToUpper(what[i]); - } - - document.Replace(startOffset, length, what.ToString()); - } - } - - public class CapitalizeAction : AbstractSelectionFormatAction - { - protected override void Convert(IDocument document, int startOffset, int length) - { - StringBuilder what = new StringBuilder(document.GetText(startOffset, length)); - - for (int i = 0; i < what.Length; ++i) { - if (!Char.IsLetter(what[i]) && i < what.Length - 1) { - what[i + 1] = Char.ToUpper(what[i + 1]); - } - } - document.Replace(startOffset, length, what.ToString()); - } - - } - - public class ConvertTabsToSpaces : AbstractSelectionFormatAction - { - protected override void Convert(IDocument document, int startOffset, int length) - { - string what = document.GetText(startOffset, length); - string spaces = new string(' ', document.TextEditorProperties.TabIndent); - document.Replace(startOffset, length, what.Replace("\t", spaces)); - } - } - - public class ConvertSpacesToTabs : AbstractSelectionFormatAction - { - protected override void Convert(IDocument document, int startOffset, int length) - { - string what = document.GetText(startOffset, length); - string spaces = new string(' ', document.TextEditorProperties.TabIndent); - document.Replace(startOffset, length, what.Replace(spaces, "\t")); - } - } - - public class ConvertLeadingTabsToSpaces : AbstractLineFormatAction - { - protected override void Convert(IDocument document, int y1, int y2) - { - for (int i = y2; i >= y1; --i) { - LineSegment line = document.GetLineSegment(i); - - if(line.Length > 0) { - // count how many whitespace characters there are at the start - int whiteSpace = 0; - for(whiteSpace = 0; whiteSpace < line.Length && Char.IsWhiteSpace(document.GetCharAt(line.Offset + whiteSpace)); whiteSpace++) { - // deliberately empty - } - if(whiteSpace > 0) { - string newLine = document.GetText(line.Offset,whiteSpace); - string newPrefix = newLine.Replace("\t",new string(' ', document.TextEditorProperties.TabIndent)); - document.Replace(line.Offset,whiteSpace,newPrefix); - } - } - } - } - } - - public class ConvertLeadingSpacesToTabs : AbstractLineFormatAction - { - protected override void Convert(IDocument document, int y1, int y2) - { - for (int i = y2; i >= y1; --i) { - LineSegment line = document.GetLineSegment(i); - if(line.Length > 0) { - // note: some users may prefer a more radical ConvertLeadingSpacesToTabs that - // means there can be no spaces before the first character even if the spaces - // didn't add up to a whole number of tabs - string newLine = TextUtilities.LeadingWhiteSpaceToTabs(document.GetText(line.Offset,line.Length), document.TextEditorProperties.TabIndent); - document.Replace(line.Offset,line.Length,newLine); - } - } - } - } - - /// - /// This is a sample editaction plugin, it indents the selected area. - /// - public class FormatBuffer : AbstractLineFormatAction - { - protected override void Convert(IDocument document, int startLine, int endLine) - { - document.FormattingStrategy.IndentLines(textArea, startLine, endLine); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/HomeEndActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/HomeEndActions.cs deleted file mode 100644 index 3b8fe99..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/HomeEndActions.cs +++ /dev/null @@ -1,114 +0,0 @@ -// -// -// -// -// $Revision: 2659 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Actions -{ - public class Home : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - LineSegment curLine; - TextLocation newPos = textArea.Caret.Position; - bool jumpedIntoFolding = false; - do { - curLine = textArea.Document.GetLineSegment(newPos.Y); - - if (TextUtilities.IsEmptyLine(textArea.Document, newPos.Y)) { - if (newPos.X != 0) { - newPos.X = 0; - } else { - newPos.X = curLine.Length; - } - } else { - int firstCharOffset = TextUtilities.GetFirstNonWSChar(textArea.Document, curLine.Offset); - int firstCharColumn = firstCharOffset - curLine.Offset; - - if (newPos.X == firstCharColumn) { - newPos.X = 0; - } else { - newPos.X = firstCharColumn; - } - } - List foldings = textArea.Document.FoldingManager.GetFoldingsFromPosition(newPos.Y, newPos.X); - jumpedIntoFolding = false; - foreach (FoldMarker foldMarker in foldings) { - if (foldMarker.IsFolded) { - newPos = new TextLocation(foldMarker.StartColumn, foldMarker.StartLine); - jumpedIntoFolding = true; - break; - } - } - - } while (jumpedIntoFolding); - - if (newPos != textArea.Caret.Position) { - textArea.Caret.Position = newPos; - textArea.SetDesiredColumn(); - } - } - } - - public class End : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - LineSegment curLine; - TextLocation newPos = textArea.Caret.Position; - bool jumpedIntoFolding = false; - do { - curLine = textArea.Document.GetLineSegment(newPos.Y); - newPos.X = curLine.Length; - - List foldings = textArea.Document.FoldingManager.GetFoldingsFromPosition(newPos.Y, newPos.X); - jumpedIntoFolding = false; - foreach (FoldMarker foldMarker in foldings) { - if (foldMarker.IsFolded) { - newPos = new TextLocation(foldMarker.EndColumn, foldMarker.EndLine); - jumpedIntoFolding = true; - break; - } - } - } while (jumpedIntoFolding); - - if (newPos != textArea.Caret.Position) { - textArea.Caret.Position = newPos; - textArea.SetDesiredColumn(); - } - } - } - - - public class MoveToStart : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - if (textArea.Caret.Line != 0 || textArea.Caret.Column != 0) { - textArea.Caret.Position = new TextLocation(0, 0); - textArea.SetDesiredColumn(); - } - } - } - - - public class MoveToEnd : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - TextLocation endPos = textArea.Document.OffsetToPosition(textArea.Document.TextLength); - if (textArea.Caret.Position != endPos) { - textArea.Caret.Position = endPos; - textArea.SetDesiredColumn(); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/IEditAction.cs b/src/ICSharpCode.TextEditor/Src/Actions/IEditAction.cs deleted file mode 100644 index e8c478b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/IEditAction.cs +++ /dev/null @@ -1,58 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Actions -{ - /// - /// To define a new key for the textarea, you must write a class which - /// implements this interface. - /// - public interface IEditAction - { - /// - /// An array of keys on which this edit action occurs. - /// - Keys[] Keys { - get; - set; - } - - /// - /// When the key which is defined per XML is pressed, this method will be launched. - /// - void Execute(TextArea textArea); - } - - /// - /// To define a new key for the textarea, you must write a class which - /// implements this interface. - /// - public abstract class AbstractEditAction : IEditAction - { - Keys[] keys = null; - - /// - /// An array of keys on which this edit action occurs. - /// - public Keys[] Keys { - get { - return keys; - } - set { - keys = value; - } - } - - /// - /// When the key which is defined per XML is pressed, this method will be launched. - /// - public abstract void Execute(TextArea textArea); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/MiscActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/MiscActions.cs deleted file mode 100644 index 7c3c59c..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/MiscActions.cs +++ /dev/null @@ -1,927 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Diagnostics; -using System.Drawing; -using System.Text; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Actions -{ - public class Tab : AbstractEditAction - { - public static string GetIndentationString(IDocument document) - { - return GetIndentationString(document, null); - } - - public static string GetIndentationString(IDocument document, TextArea textArea) - { - StringBuilder indent = new StringBuilder(); - - if (document.TextEditorProperties.ConvertTabsToSpaces) { - int tabIndent = document.TextEditorProperties.IndentationSize; - if (textArea != null) { - int column = textArea.TextView.GetVisualColumn(textArea.Caret.Line, textArea.Caret.Column); - indent.Append(new String(' ', tabIndent - column % tabIndent)); - } else { - indent.Append(new String(' ', tabIndent)); - } - } else { - indent.Append('\t'); - } - return indent.ToString(); - } - - void InsertTabs(IDocument document, ISelection selection, int y1, int y2) - { - string indentationString = GetIndentationString(document); - for (int i = y2; i >= y1; --i) { - LineSegment line = document.GetLineSegment(i); - if (i == y2 && i == selection.EndPosition.Y && selection.EndPosition.X == 0) { - continue; - } - - // this bit is optional - but useful if you are using block tabbing to sort out - // a source file with a mixture of tabs and spaces -// string newLine = document.GetText(line.Offset,line.Length); -// document.Replace(line.Offset,line.Length,newLine); - - document.Insert(line.Offset, indentationString); - } - } - - void InsertTabAtCaretPosition(TextArea textArea) - { - switch (textArea.Caret.CaretMode) { - case CaretMode.InsertMode: - textArea.InsertString(GetIndentationString(textArea.Document, textArea)); - break; - case CaretMode.OverwriteMode: - string indentStr = GetIndentationString(textArea.Document, textArea); - textArea.ReplaceChar(indentStr[0]); - if (indentStr.Length > 1) { - textArea.InsertString(indentStr.Substring(1)); - } - break; - } - textArea.SetDesiredColumn(); - } - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - textArea.Document.UndoStack.StartUndoGroup(); - if (textArea.SelectionManager.HasSomethingSelected) { - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - int startLine = selection.StartPosition.Y; - int endLine = selection.EndPosition.Y; - if (startLine != endLine) { - textArea.BeginUpdate(); - InsertTabs(textArea.Document, selection, startLine, endLine); - textArea.Document.UpdateQueue.Clear(); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, startLine, endLine)); - textArea.EndUpdate(); - } else { - InsertTabAtCaretPosition(textArea); - break; - } - } - textArea.Document.CommitUpdate(); - textArea.AutoClearSelection = false; - } else { - InsertTabAtCaretPosition(textArea); - } - textArea.Document.UndoStack.EndUndoGroup(); - } - } - - public class ShiftTab : AbstractEditAction - { - void RemoveTabs(IDocument document, ISelection selection, int y1, int y2) - { - document.UndoStack.StartUndoGroup(); - for (int i = y2; i >= y1; --i) { - LineSegment line = document.GetLineSegment(i); - if (i == y2 && line.Offset == selection.EndOffset) { - continue; - } - if (line.Length > 0) { - /**** TextPad Strategy: - /// first convert leading whitespace to tabs (controversial! - not all editors work like this) - string newLine = TextUtilities.LeadingWhiteSpaceToTabs(document.GetText(line.Offset,line.Length),document.Properties.Get("TabIndent", 4)); - if(newLine.Length > 0 && newLine[0] == '\t') { - document.Replace(line.Offset,line.Length,newLine.Substring(1)); - ++redocounter; - } - else if(newLine.Length > 0 && newLine[0] == ' ') { - /// there were just some leading spaces but less than TabIndent of them - int leadingSpaces = 1; - for(leadingSpaces = 1; leadingSpaces < newLine.Length && newLine[leadingSpaces] == ' '; leadingSpaces++) { - /// deliberately empty - } - document.Replace(line.Offset,line.Length,newLine.Substring(leadingSpaces)); - ++redocounter; - } - /// else - /// there were no leading tabs or spaces on this line so do nothing - /// MS Visual Studio 6 strategy: - ****/ -// string temp = document.GetText(line.Offset,line.Length); - if (line.Length > 0) { - int charactersToRemove = 0; - if(document.GetCharAt(line.Offset) == '\t') { // first character is a tab - just remove it - charactersToRemove = 1; - } else if(document.GetCharAt(line.Offset) == ' ') { - int leadingSpaces = 1; - int tabIndent = document.TextEditorProperties.IndentationSize; - for (leadingSpaces = 1; leadingSpaces < line.Length && document.GetCharAt(line.Offset + leadingSpaces) == ' '; leadingSpaces++) { - // deliberately empty - } - if(leadingSpaces >= tabIndent) { - // just remove tabIndent - charactersToRemove = tabIndent; - } - else if(line.Length > leadingSpaces && document.GetCharAt(line.Offset + leadingSpaces) == '\t') { - // remove the leading spaces and the following tab as they add up - // to just one tab stop - charactersToRemove = leadingSpaces+1; - } - else { - // just remove the leading spaces - charactersToRemove = leadingSpaces; - } - } - if (charactersToRemove > 0) { - document.Remove(line.Offset,charactersToRemove); - } - } - } - } - document.UndoStack.EndUndoGroup(); - } - - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.SelectionManager.HasSomethingSelected) { - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - int startLine = selection.StartPosition.Y; - int endLine = selection.EndPosition.Y; - textArea.BeginUpdate(); - RemoveTabs(textArea.Document, selection, startLine, endLine); - textArea.Document.UpdateQueue.Clear(); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, startLine, endLine)); - textArea.EndUpdate(); - - } - textArea.AutoClearSelection = false; - } else { - // Pressing Shift-Tab with nothing selected the cursor will move back to the - // previous tab stop. It will stop at the beginning of the line. Also, the desired - // column is updated to that column. - LineSegment line = textArea.Document.GetLineSegmentForOffset(textArea.Caret.Offset); - string startOfLine = textArea.Document.GetText(line.Offset,textArea.Caret.Offset - line.Offset); - int tabIndent = textArea.Document.TextEditorProperties.IndentationSize; - int currentColumn = textArea.Caret.Column; - int remainder = currentColumn % tabIndent; - if (remainder == 0) { - textArea.Caret.DesiredColumn = Math.Max(0, currentColumn - tabIndent); - } else { - textArea.Caret.DesiredColumn = Math.Max(0, currentColumn - remainder); - } - textArea.SetCaretToDesiredColumn(); - } - } - } - - public class ToggleComment : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - - if (textArea.Document.HighlightingStrategy.Properties.ContainsKey("LineComment")) { - new ToggleLineComment().Execute(textArea); - } else if (textArea.Document.HighlightingStrategy.Properties.ContainsKey("BlockCommentBegin") && - textArea.Document.HighlightingStrategy.Properties.ContainsKey("BlockCommentBegin")) { - new ToggleBlockComment().Execute(textArea); - } - } - } - - public class ToggleLineComment : AbstractEditAction - { - int firstLine; - int lastLine; - - void RemoveCommentAt(IDocument document, string comment, ISelection selection, int y1, int y2) - { - firstLine = y1; - lastLine = y2; - - for (int i = y2; i >= y1; --i) { - LineSegment line = document.GetLineSegment(i); - if (selection != null && i == y2 && line.Offset == selection.Offset + selection.Length) { - --lastLine; - continue; - } - - string lineText = document.GetText(line.Offset, line.Length); - if (lineText.Trim().StartsWith(comment)) { - document.Remove(line.Offset + lineText.IndexOf(comment), comment.Length); - } - } - } - - void SetCommentAt(IDocument document, string comment, ISelection selection, int y1, int y2) - { - firstLine = y1; - lastLine = y2; - - for (int i = y2; i >= y1; --i) { - LineSegment line = document.GetLineSegment(i); - if (selection != null && i == y2 && line.Offset == selection.Offset + selection.Length) { - --lastLine; - continue; - } - - string lineText = document.GetText(line.Offset, line.Length); - document.Insert(line.Offset, comment); - } - } - - bool ShouldComment(IDocument document, string comment, ISelection selection, int startLine, int endLine) - { - for (int i = endLine; i >= startLine; --i) { - LineSegment line = document.GetLineSegment(i); - if (selection != null && i == endLine && line.Offset == selection.Offset + selection.Length) { - --lastLine; - continue; - } - string lineText = document.GetText(line.Offset, line.Length); - if (!lineText.Trim().StartsWith(comment)) { - return true; - } - } - return false; - } - - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - - string comment = null; - if (textArea.Document.HighlightingStrategy.Properties.ContainsKey("LineComment")) { - comment = textArea.Document.HighlightingStrategy.Properties["LineComment"].ToString(); - } - - if (comment == null || comment.Length == 0) { - return; - } - - textArea.Document.UndoStack.StartUndoGroup(); - if (textArea.SelectionManager.HasSomethingSelected) { - bool shouldComment = true; - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - if (!ShouldComment(textArea.Document, comment, selection, selection.StartPosition.Y, selection.EndPosition.Y)) { - shouldComment = false; - break; - } - } - - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - textArea.BeginUpdate(); - if (shouldComment) { - SetCommentAt(textArea.Document, comment, selection, selection.StartPosition.Y, selection.EndPosition.Y); - } else { - RemoveCommentAt(textArea.Document, comment, selection, selection.StartPosition.Y, selection.EndPosition.Y); - } - textArea.Document.UpdateQueue.Clear(); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, firstLine, lastLine)); - textArea.EndUpdate(); - } - textArea.Document.CommitUpdate(); - textArea.AutoClearSelection = false; - } else { - textArea.BeginUpdate(); - int caretLine = textArea.Caret.Line; - if (ShouldComment(textArea.Document, comment, null, caretLine, caretLine)) { - SetCommentAt(textArea.Document, comment, null, caretLine, caretLine); - } else { - RemoveCommentAt(textArea.Document, comment, null, caretLine, caretLine); - } - textArea.Document.UpdateQueue.Clear(); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, caretLine)); - textArea.EndUpdate(); - } - textArea.Document.UndoStack.EndUndoGroup(); - } - } - - public class ToggleBlockComment : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - - string commentStart = null; - if (textArea.Document.HighlightingStrategy.Properties.ContainsKey("BlockCommentBegin")) { - commentStart = textArea.Document.HighlightingStrategy.Properties["BlockCommentBegin"].ToString(); - } - - string commentEnd = null; - if (textArea.Document.HighlightingStrategy.Properties.ContainsKey("BlockCommentEnd")) { - commentEnd = textArea.Document.HighlightingStrategy.Properties["BlockCommentEnd"].ToString(); - } - - if (commentStart == null || commentStart.Length == 0 || commentEnd == null || commentEnd.Length == 0) { - return; - } - - int selectionStartOffset; - int selectionEndOffset; - - if (textArea.SelectionManager.HasSomethingSelected) { - selectionStartOffset = textArea.SelectionManager.SelectionCollection[0].Offset; - selectionEndOffset = textArea.SelectionManager.SelectionCollection[textArea.SelectionManager.SelectionCollection.Count - 1].EndOffset; - } else { - selectionStartOffset = textArea.Caret.Offset; - selectionEndOffset = selectionStartOffset; - } - - BlockCommentRegion commentRegion = FindSelectedCommentRegion(textArea.Document, commentStart, commentEnd, selectionStartOffset, selectionEndOffset); - - textArea.Document.UndoStack.StartUndoGroup(); - if (commentRegion != null) { - RemoveComment(textArea.Document, commentRegion); - } else if (textArea.SelectionManager.HasSomethingSelected) { - SetCommentAt(textArea.Document, selectionStartOffset, selectionEndOffset, commentStart, commentEnd); - } - textArea.Document.UndoStack.EndUndoGroup(); - - textArea.Document.CommitUpdate(); - textArea.AutoClearSelection = false; - } - - public static BlockCommentRegion FindSelectedCommentRegion(IDocument document, string commentStart, string commentEnd, int selectionStartOffset, int selectionEndOffset) - { - if (document.TextLength == 0) { - return null; - } - - // Find start of comment in selected text. - - int commentEndOffset = -1; - string selectedText = document.GetText(selectionStartOffset, selectionEndOffset - selectionStartOffset); - - int commentStartOffset = selectedText.IndexOf(commentStart); - if (commentStartOffset >= 0) { - commentStartOffset += selectionStartOffset; - } - - // Find end of comment in selected text. - - if (commentStartOffset >= 0) { - commentEndOffset = selectedText.IndexOf(commentEnd, commentStartOffset + commentStart.Length - selectionStartOffset); - } else { - commentEndOffset = selectedText.IndexOf(commentEnd); - } - - if (commentEndOffset >= 0) { - commentEndOffset += selectionStartOffset; - } - - // Find start of comment before or partially inside the - // selected text. - - int commentEndBeforeStartOffset = -1; - if (commentStartOffset == -1) { - int offset = selectionEndOffset + commentStart.Length - 1; - if (offset > document.TextLength) { - offset = document.TextLength; - } - string text = document.GetText(0, offset); - commentStartOffset = text.LastIndexOf(commentStart); - if (commentStartOffset >= 0) { - // Find end of comment before comment start. - commentEndBeforeStartOffset = text.IndexOf(commentEnd, commentStartOffset, selectionStartOffset - commentStartOffset); - if (commentEndBeforeStartOffset > commentStartOffset) { - commentStartOffset = -1; - } - } - } - - // Find end of comment after or partially after the - // selected text. - - if (commentEndOffset == -1) { - int offset = selectionStartOffset + 1 - commentEnd.Length; - if (offset < 0) { - offset = selectionStartOffset; - } - string text = document.GetText(offset, document.TextLength - offset); - commentEndOffset = text.IndexOf(commentEnd); - if (commentEndOffset >= 0) { - commentEndOffset += offset; - } - } - - if (commentStartOffset != -1 && commentEndOffset != -1) { - return new BlockCommentRegion(commentStart, commentEnd, commentStartOffset, commentEndOffset); - } - - return null; - } - - - void SetCommentAt(IDocument document, int offsetStart, int offsetEnd, string commentStart, string commentEnd) - { - document.Insert(offsetEnd, commentEnd); - document.Insert(offsetStart, commentStart); - } - - void RemoveComment(IDocument document, BlockCommentRegion commentRegion) - { - document.Remove(commentRegion.EndOffset, commentRegion.CommentEnd.Length); - document.Remove(commentRegion.StartOffset, commentRegion.CommentStart.Length); - } - } - - public class BlockCommentRegion - { - string commentStart = String.Empty; - string commentEnd = String.Empty; - int startOffset = -1; - int endOffset = -1; - - /// - /// The end offset is the offset where the comment end string starts from. - /// - public BlockCommentRegion(string commentStart, string commentEnd, int startOffset, int endOffset) - { - this.commentStart = commentStart; - this.commentEnd = commentEnd; - this.startOffset = startOffset; - this.endOffset = endOffset; - } - - public string CommentStart { - get { - return commentStart; - } - } - - public string CommentEnd { - get { - return commentEnd; - } - } - - public int StartOffset { - get { - return startOffset; - } - } - - public int EndOffset { - get { - return endOffset; - } - } - - public override int GetHashCode() - { - int hashCode = 0; - unchecked { - if (commentStart != null) hashCode += 1000000007 * commentStart.GetHashCode(); - if (commentEnd != null) hashCode += 1000000009 * commentEnd.GetHashCode(); - hashCode += 1000000021 * startOffset.GetHashCode(); - hashCode += 1000000033 * endOffset.GetHashCode(); - } - return hashCode; - } - - public override bool Equals(object obj) - { - BlockCommentRegion other = obj as BlockCommentRegion; - if (other == null) return false; - return this.commentStart == other.commentStart && this.commentEnd == other.commentEnd && this.startOffset == other.startOffset && this.endOffset == other.endOffset; - } - } - - public class IndentSelection : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - textArea.BeginUpdate(); - if (textArea.SelectionManager.HasSomethingSelected) { - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - textArea.Document.FormattingStrategy.IndentLines(textArea, selection.StartPosition.Y, selection.EndPosition.Y); - } - } else { - textArea.Document.FormattingStrategy.IndentLines(textArea, 0, textArea.Document.TotalNumberOfLines - 1); - } - textArea.EndUpdate(); - textArea.Refresh(); - } - } - - public class Backspace : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.SelectionManager.HasSomethingSelected) { - Delete.DeleteSelection(textArea); - } else { - if (textArea.Caret.Offset > 0 && !textArea.IsReadOnly(textArea.Caret.Offset - 1)) { - textArea.BeginUpdate(); - int curLineNr = textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset); - int curLineOffset = textArea.Document.GetLineSegment(curLineNr).Offset; - - if (curLineOffset == textArea.Caret.Offset) { - LineSegment line = textArea.Document.GetLineSegment(curLineNr - 1); - bool lastLine = curLineNr == textArea.Document.TotalNumberOfLines; - int lineEndOffset = line.Offset + line.Length; - int lineLength = line.Length; - textArea.Document.Remove(lineEndOffset, curLineOffset - lineEndOffset); - textArea.Caret.Position = new TextLocation(lineLength, curLineNr - 1); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToEnd, new TextLocation(0, curLineNr - 1))); - } else { - int caretOffset = textArea.Caret.Offset - 1; - textArea.Caret.Position = textArea.Document.OffsetToPosition(caretOffset); - textArea.Document.Remove(caretOffset, 1); - - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToLineEnd, new TextLocation(textArea.Caret.Offset - textArea.Document.GetLineSegment(curLineNr).Offset, curLineNr))); - } - textArea.EndUpdate(); - } - } - } - } - - public class Delete : AbstractEditAction - { - internal static void DeleteSelection(TextArea textArea) - { - Debug.Assert(textArea.SelectionManager.HasSomethingSelected); - if (textArea.SelectionManager.SelectionIsReadonly) - return; - textArea.BeginUpdate(); - textArea.Caret.Position = textArea.SelectionManager.SelectionCollection[0].StartPosition; - textArea.SelectionManager.RemoveSelectedText(); - textArea.ScrollToCaret(); - textArea.EndUpdate(); - } - - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.SelectionManager.HasSomethingSelected) { - DeleteSelection(textArea); - } else { - if (textArea.IsReadOnly(textArea.Caret.Offset)) - return; - - if (textArea.Caret.Offset < textArea.Document.TextLength) { - textArea.BeginUpdate(); - int curLineNr = textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset); - LineSegment curLine = textArea.Document.GetLineSegment(curLineNr); - - if (curLine.Offset + curLine.Length == textArea.Caret.Offset) { - if (curLineNr + 1 < textArea.Document.TotalNumberOfLines) { - LineSegment nextLine = textArea.Document.GetLineSegment(curLineNr + 1); - - textArea.Document.Remove(textArea.Caret.Offset, nextLine.Offset - textArea.Caret.Offset); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToEnd, new TextLocation(0, curLineNr))); - } - } else { - textArea.Document.Remove(textArea.Caret.Offset, 1); -// textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToLineEnd, new TextLocation(textArea.Caret.Offset - textArea.Document.GetLineSegment(curLineNr).Offset, curLineNr))); - } - textArea.UpdateMatchingBracket(); - textArea.EndUpdate(); - } - } - } - } - - public class MovePageDown : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - int curLineNr = textArea.Caret.Line; - int requestedLineNumber = Math.Min(textArea.Document.GetNextVisibleLineAbove(curLineNr, textArea.TextView.VisibleLineCount), textArea.Document.TotalNumberOfLines - 1); - - if (curLineNr != requestedLineNumber) { - textArea.Caret.Position = new TextLocation(0, requestedLineNumber); - textArea.SetCaretToDesiredColumn(); - } - } - } - - public class MovePageUp : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - int curLineNr = textArea.Caret.Line; - int requestedLineNumber = Math.Max(textArea.Document.GetNextVisibleLineBelow(curLineNr, textArea.TextView.VisibleLineCount), 0); - - if (curLineNr != requestedLineNumber) { - textArea.Caret.Position = new TextLocation(0, requestedLineNumber); - textArea.SetCaretToDesiredColumn(); - } - } - } - public class Return : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - textArea.BeginUpdate(); - textArea.Document.UndoStack.StartUndoGroup(); - try { - if (textArea.HandleKeyPress('\n')) - return; - - textArea.InsertString(Environment.NewLine); - - int curLineNr = textArea.Caret.Line; - textArea.Document.FormattingStrategy.FormatLine(textArea, curLineNr, textArea.Caret.Offset, '\n'); - textArea.SetDesiredColumn(); - - textArea.Document.UpdateQueue.Clear(); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToEnd, new TextLocation(0, curLineNr - 1))); - } finally { - textArea.Document.UndoStack.EndUndoGroup(); - textArea.EndUpdate(); - } - } - } - - public class ToggleEditMode : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.Document.ReadOnly) { - return; - } - switch (textArea.Caret.CaretMode) { - case CaretMode.InsertMode: - textArea.Caret.CaretMode = CaretMode.OverwriteMode; - break; - case CaretMode.OverwriteMode: - textArea.Caret.CaretMode = CaretMode.InsertMode; - break; - } - } - } - - public class Undo : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - textArea.MotherTextEditorControl.Undo(); - } - } - - public class Redo : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - textArea.MotherTextEditorControl.Redo(); - } - } - - /// - /// handles the ctrl-backspace key - /// functionality attempts to roughly mimic MS Developer studio - /// I will implement this as deleting back to the point that ctrl-leftarrow would - /// take you to - /// - public class WordBackspace : AbstractEditAction - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - // if anything is selected we will just delete it first - if (textArea.SelectionManager.HasSomethingSelected) { - Delete.DeleteSelection(textArea); - return; - } - textArea.BeginUpdate(); - // now delete from the caret to the beginning of the word - LineSegment line = - textArea.Document.GetLineSegmentForOffset(textArea.Caret.Offset); - // if we are not at the beginning of a line - if (textArea.Caret.Offset > line.Offset) { - int prevWordStart = TextUtilities.FindPrevWordStart(textArea.Document, - textArea.Caret.Offset); - if (prevWordStart < textArea.Caret.Offset) { - if (!textArea.IsReadOnly(prevWordStart, textArea.Caret.Offset - prevWordStart)) { - textArea.Document.Remove(prevWordStart, - textArea.Caret.Offset - prevWordStart); - textArea.Caret.Position = textArea.Document.OffsetToPosition(prevWordStart); - } - } - } - // if we are now at the beginning of a line - if (textArea.Caret.Offset == line.Offset) { - // if we are not on the first line - int curLineNr = textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset); - if (curLineNr > 0) { - // move to the end of the line above - LineSegment lineAbove = textArea.Document.GetLineSegment(curLineNr - 1); - int endOfLineAbove = lineAbove.Offset + lineAbove.Length; - int charsToDelete = textArea.Caret.Offset - endOfLineAbove; - if (!textArea.IsReadOnly(endOfLineAbove, charsToDelete)) { - textArea.Document.Remove(endOfLineAbove, charsToDelete); - textArea.Caret.Position = textArea.Document.OffsetToPosition(endOfLineAbove); - } - } - } - textArea.SetDesiredColumn(); - textArea.EndUpdate(); - // if there are now less lines, we need this or there are redraw problems - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToEnd, new TextLocation(0, textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset)))); - textArea.Document.CommitUpdate(); - } - } - - /// - /// handles the ctrl-delete key - /// functionality attempts to mimic MS Developer studio - /// I will implement this as deleting forwardto the point that - /// ctrl-leftarrow would take you to - /// - public class DeleteWord : Delete - { - /// - /// Executes this edit action - /// - /// The which is used for callback purposes - public override void Execute(TextArea textArea) - { - if (textArea.SelectionManager.HasSomethingSelected) { - DeleteSelection(textArea); - return; - } - // if anything is selected we will just delete it first - textArea.BeginUpdate(); - // now delete from the caret to the beginning of the word - LineSegment line = textArea.Document.GetLineSegmentForOffset(textArea.Caret.Offset); - if(textArea.Caret.Offset == line.Offset + line.Length) { - // if we are at the end of a line - base.Execute(textArea); - } else { - int nextWordStart = TextUtilities.FindNextWordStart(textArea.Document, - textArea.Caret.Offset); - if(nextWordStart > textArea.Caret.Offset) { - if (!textArea.IsReadOnly(textArea.Caret.Offset, nextWordStart - textArea.Caret.Offset)) { - textArea.Document.Remove(textArea.Caret.Offset, nextWordStart - textArea.Caret.Offset); - // cursor never moves with this command - } - } - } - textArea.UpdateMatchingBracket(); - textArea.EndUpdate(); - // if there are now less lines, we need this or there are redraw problems - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToEnd, new TextLocation(0, textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset)))); - textArea.Document.CommitUpdate(); - } - } - - public class DeleteLine : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - int lineNr = textArea.Caret.Line; - LineSegment line = textArea.Document.GetLineSegment(lineNr); - if (textArea.IsReadOnly(line.Offset, line.Length)) - return; - textArea.Document.Remove(line.Offset, line.TotalLength); - textArea.Caret.Position = textArea.Document.OffsetToPosition(line.Offset); - - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToEnd, new TextLocation(0, lineNr))); - textArea.UpdateMatchingBracket(); - textArea.Document.CommitUpdate(); - } - } - - public class DeleteToLineEnd : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - int lineNr = textArea.Caret.Line; - LineSegment line = textArea.Document.GetLineSegment(lineNr); - - int numRemove = (line.Offset + line.Length) - textArea.Caret.Offset; - if (numRemove > 0 && !textArea.IsReadOnly(textArea.Caret.Offset, numRemove)) { - textArea.Document.Remove(textArea.Caret.Offset, numRemove); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, new TextLocation(0, lineNr))); - textArea.Document.CommitUpdate(); - } - } - } - - public class GotoMatchingBrace : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - BracketHighlight highlight = textArea.FindMatchingBracketHighlight(); - if (highlight != null) { - TextLocation p1 = new TextLocation(highlight.CloseBrace.X + 1, highlight.CloseBrace.Y); - TextLocation p2 = new TextLocation(highlight.OpenBrace.X + 1, highlight.OpenBrace.Y); - if (p1 == textArea.Caret.Position) { - if (textArea.Document.TextEditorProperties.BracketMatchingStyle == BracketMatchingStyle.After) { - textArea.Caret.Position = p2; - } else { - textArea.Caret.Position = new TextLocation(p2.X - 1, p2.Y); - } - } else { - if (textArea.Document.TextEditorProperties.BracketMatchingStyle == BracketMatchingStyle.After) { - textArea.Caret.Position = p1; - } else { - textArea.Caret.Position = new TextLocation(p1.X - 1, p1.Y); - } - } - textArea.SetDesiredColumn(); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Actions/SelectionActions.cs b/src/ICSharpCode.TextEditor/Src/Actions/SelectionActions.cs deleted file mode 100644 index 60ec793..0000000 --- a/src/ICSharpCode.TextEditor/Src/Actions/SelectionActions.cs +++ /dev/null @@ -1,176 +0,0 @@ -// -// -// -// -// $Revision: 2659 $ -// - -using System; -using System.Drawing; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Actions -{ - public class ShiftCaretRight : CaretRight - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftCaretLeft : CaretLeft - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftCaretUp : CaretUp - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftCaretDown : CaretDown - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftWordRight : WordRight - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftWordLeft : WordLeft - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftHome : Home - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftEnd : End - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftMoveToStart : MoveToStart - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftMoveToEnd : MoveToEnd - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftMovePageUp : MovePageUp - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class ShiftMovePageDown : MovePageDown - { - public override void Execute(TextArea textArea) - { - TextLocation oldCaretPos = textArea.Caret.Position; - base.Execute(textArea); - textArea.AutoClearSelection = false; - textArea.SelectionManager.ExtendSelection(oldCaretPos, textArea.Caret.Position); - } - } - - public class SelectWholeDocument : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - textArea.AutoClearSelection = false; - TextLocation startPoint = new TextLocation(0, 0); - TextLocation endPoint = textArea.Document.OffsetToPosition(textArea.Document.TextLength); - if (textArea.SelectionManager.HasSomethingSelected) { - if (textArea.SelectionManager.SelectionCollection[0].StartPosition == startPoint && - textArea.SelectionManager.SelectionCollection[0].EndPosition == endPoint) { - return; - } - } - textArea.Caret.Position = textArea.SelectionManager.NextValidPosition(endPoint.Y); - textArea.SelectionManager.ExtendSelection(startPoint, endPoint); - // after a SelectWholeDocument selection, the caret is placed correctly, - // but it is not positioned internally. The effect is when the cursor - // is moved up or down a line, the caret will take on the column that - // it was in before the SelectWholeDocument - textArea.SetDesiredColumn(); - } - } - - public class ClearAllSelections : AbstractEditAction - { - public override void Execute(TextArea textArea) - { - textArea.SelectionManager.ClearSelection(); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/AbstractSegment.cs b/src/ICSharpCode.TextEditor/Src/Document/AbstractSegment.cs deleted file mode 100644 index eb8ee07..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/AbstractSegment.cs +++ /dev/null @@ -1,52 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This interface is used to describe a span inside a text sequence - /// - public class AbstractSegment : ISegment - { - [CLSCompliant(false)] - protected int offset = -1; - [CLSCompliant(false)] - protected int length = -1; - - #region ICSharpCode.TextEditor.Document.ISegment interface implementation - public virtual int Offset { - get { - return offset; - } - set { - offset = value; - } - } - - public virtual int Length { - get { - return length; - } - set { - length = value; - } - } - - #endregion - - public override string ToString() - { - return String.Format("[AbstractSegment: Offset = {0}, Length = {1}]", - Offset, - Length); - } - - - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/Bookmark.cs b/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/Bookmark.cs deleted file mode 100644 index 7e86d25..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/Bookmark.cs +++ /dev/null @@ -1,164 +0,0 @@ -// -// -// -// -// $Revision: 3272 $ -// - -using System; -using System.Drawing; -using SWF = System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Description of Bookmark. - /// - public class Bookmark - { - IDocument document; - TextAnchor anchor; - TextLocation location; - bool isEnabled = true; - - public IDocument Document { - get { - return document; - } - set { - if (document != value) { - if (anchor != null) { - location = anchor.Location; - anchor = null; - } - document = value; - CreateAnchor(); - OnDocumentChanged(EventArgs.Empty); - } - } - } - - void CreateAnchor() - { - if (document != null) { - LineSegment line = document.GetLineSegment(Math.Max(0, Math.Min(location.Line, document.TotalNumberOfLines-1))); - anchor = line.CreateAnchor(Math.Max(0, Math.Min(location.Column, line.Length))); - // after insertion: keep bookmarks after the initial whitespace (see DefaultFormattingStrategy.SmartReplaceLine) - anchor.MovementType = AnchorMovementType.AfterInsertion; - anchor.Deleted += AnchorDeleted; - } - } - - void AnchorDeleted(object sender, EventArgs e) - { - document.BookmarkManager.RemoveMark(this); - } - - /// - /// Gets the TextAnchor used for this bookmark. - /// Is null if the bookmark is not connected to a document. - /// - public TextAnchor Anchor { - get { return anchor; } - } - - public TextLocation Location { - get { - if (anchor != null) - return anchor.Location; - else - return location; - } - set { - location = value; - CreateAnchor(); - } - } - - public event EventHandler DocumentChanged; - - protected virtual void OnDocumentChanged(EventArgs e) - { - if (DocumentChanged != null) { - DocumentChanged(this, e); - } - } - - public bool IsEnabled { - get { - return isEnabled; - } - set { - if (isEnabled != value) { - isEnabled = value; - if (document != null) { - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, LineNumber)); - document.CommitUpdate(); - } - OnIsEnabledChanged(EventArgs.Empty); - } - } - } - - public event EventHandler IsEnabledChanged; - - protected virtual void OnIsEnabledChanged(EventArgs e) - { - if (IsEnabledChanged != null) { - IsEnabledChanged(this, e); - } - } - - public int LineNumber { - get { - if (anchor != null) - return anchor.LineNumber; - else - return location.Line; - } - } - - public int ColumnNumber { - get { - if (anchor != null) - return anchor.ColumnNumber; - else - return location.Column; - } - } - - /// - /// Gets if the bookmark can be toggled off using the 'set/unset bookmark' command. - /// - public virtual bool CanToggle { - get { - return true; - } - } - - public Bookmark(IDocument document, TextLocation location) : this(document, location, true) - { - } - - public Bookmark(IDocument document, TextLocation location, bool isEnabled) - { - this.document = document; - this.isEnabled = isEnabled; - this.Location = location; - } - - public virtual bool Click(SWF.Control parent, SWF.MouseEventArgs e) - { - if (e.Button == SWF.MouseButtons.Left && CanToggle) { - document.BookmarkManager.RemoveMark(this); - return true; - } - return false; - } - - public virtual void Draw(IconBarMargin margin, Graphics g, Point p) - { - margin.DrawBookmark(g, p.Y, isEnabled); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkEventHandler.cs b/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkEventHandler.cs deleted file mode 100644 index 156ac5a..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkEventHandler.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - public delegate void BookmarkEventHandler(object sender, BookmarkEventArgs e); - - /// - /// Description of BookmarkEventHandler. - /// - public class BookmarkEventArgs : EventArgs - { - Bookmark bookmark; - - public Bookmark Bookmark { - get { - return bookmark; - } - } - - public BookmarkEventArgs(Bookmark bookmark) - { - this.bookmark = bookmark; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManager.cs b/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManager.cs deleted file mode 100644 index 2decb4f..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManager.cs +++ /dev/null @@ -1,246 +0,0 @@ -// -// -// -// -// $Revision: 3272 $ -// - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using ICSharpCode.TextEditor.Util; - -namespace ICSharpCode.TextEditor.Document -{ - public interface IBookmarkFactory - { - Bookmark CreateBookmark(IDocument document, TextLocation location); - } - - /// - /// This class handles the bookmarks for a buffer - /// - public class BookmarkManager - { - IDocument document; - #if DEBUG - IList bookmark = new CheckedList(); - #else - List bookmark = new List(); - #endif - - /// - /// Contains all bookmarks - /// - public ReadOnlyCollection Marks { - get { - return new ReadOnlyCollection(bookmark); - } - } - - public IDocument Document { - get { - return document; - } - } - - /// - /// Creates a new instance of - /// - internal BookmarkManager(IDocument document, LineManager lineTracker) - { - this.document = document; - } - - /// - /// Gets/Sets the bookmark factory used to create bookmarks for "ToggleMarkAt". - /// - public IBookmarkFactory Factory { get; set;} - - /// - /// Sets the mark at the line location.Line if it is not set, if the - /// line is already marked the mark is cleared. - /// - public void ToggleMarkAt(TextLocation location) - { - Bookmark newMark; - if (Factory != null) { - newMark = Factory.CreateBookmark(document, location); - } else { - newMark = new Bookmark(document, location); - } - - Type newMarkType = newMark.GetType(); - - for (int i = 0; i < bookmark.Count; ++i) { - Bookmark mark = bookmark[i]; - - if (mark.LineNumber == location.Line && mark.CanToggle && mark.GetType() == newMarkType) { - bookmark.RemoveAt(i); - OnRemoved(new BookmarkEventArgs(mark)); - return; - } - } - - bookmark.Add(newMark); - OnAdded(new BookmarkEventArgs(newMark)); - } - - public void AddMark(Bookmark mark) - { - bookmark.Add(mark); - OnAdded(new BookmarkEventArgs(mark)); - } - - public void RemoveMark(Bookmark mark) - { - bookmark.Remove(mark); - OnRemoved(new BookmarkEventArgs(mark)); - } - - public void RemoveMarks(Predicate predicate) - { - for (int i = 0; i < bookmark.Count; ++i) { - Bookmark bm = bookmark[i]; - if (predicate(bm)) { - bookmark.RemoveAt(i--); - OnRemoved(new BookmarkEventArgs(bm)); - } - } - } - - /// - /// true, if a mark at mark exists, otherwise false - /// - public bool IsMarked(int lineNr) - { - for (int i = 0; i < bookmark.Count; ++i) { - if (bookmark[i].LineNumber == lineNr) { - return true; - } - } - return false; - } - - /// - /// Clears all bookmark - /// - public void Clear() - { - foreach (Bookmark mark in bookmark) { - OnRemoved(new BookmarkEventArgs(mark)); - } - bookmark.Clear(); - } - - /// - /// The lowest mark, if no marks exists it returns -1 - /// - public Bookmark GetFirstMark(Predicate predicate) - { - if (bookmark.Count < 1) { - return null; - } - Bookmark first = null; - for (int i = 0; i < bookmark.Count; ++i) { - if (predicate(bookmark[i]) && bookmark[i].IsEnabled && (first == null || bookmark[i].LineNumber < first.LineNumber)) { - first = bookmark[i]; - } - } - return first; - } - - /// - /// The highest mark, if no marks exists it returns -1 - /// - public Bookmark GetLastMark(Predicate predicate) - { - if (bookmark.Count < 1) { - return null; - } - Bookmark last = null; - for (int i = 0; i < bookmark.Count; ++i) { - if (predicate(bookmark[i]) && bookmark[i].IsEnabled && (last == null || bookmark[i].LineNumber > last.LineNumber)) { - last = bookmark[i]; - } - } - return last; - } - bool AcceptAnyMarkPredicate(Bookmark mark) - { - return true; - } - public Bookmark GetNextMark(int curLineNr) - { - return GetNextMark(curLineNr, AcceptAnyMarkPredicate); - } - - /// - /// returns first mark higher than lineNr - /// - /// - /// returns the next mark > cur, if it not exists it returns FirstMark() - /// - public Bookmark GetNextMark(int curLineNr, Predicate predicate) - { - if (bookmark.Count == 0) { - return null; - } - - Bookmark next = GetFirstMark(predicate); - foreach (Bookmark mark in bookmark) { - if (predicate(mark) && mark.IsEnabled && mark.LineNumber > curLineNr) { - if (mark.LineNumber < next.LineNumber || next.LineNumber <= curLineNr) { - next = mark; - } - } - } - return next; - } - - public Bookmark GetPrevMark(int curLineNr) - { - return GetPrevMark(curLineNr, AcceptAnyMarkPredicate); - } - /// - /// returns first mark lower than lineNr - /// - /// - /// returns the next mark lower than cur, if it not exists it returns LastMark() - /// - public Bookmark GetPrevMark(int curLineNr, Predicate predicate) - { - if (bookmark.Count == 0) { - return null; - } - - Bookmark prev = GetLastMark(predicate); - - foreach (Bookmark mark in bookmark) { - if (predicate(mark) && mark.IsEnabled && mark.LineNumber < curLineNr) { - if (mark.LineNumber > prev.LineNumber || prev.LineNumber >= curLineNr) { - prev = mark; - } - } - } - return prev; - } - - protected virtual void OnRemoved(BookmarkEventArgs e) - { - if (Removed != null) { - Removed(this, e); - } - } - - protected virtual void OnAdded(BookmarkEventArgs e) - { - if (Added != null) { - Added(this, e); - } - } - - public event BookmarkEventHandler Removed; - public event BookmarkEventHandler Added; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManagerMemento.cs b/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManagerMemento.cs deleted file mode 100644 index 9f81d27..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/BookmarkManager/BookmarkManagerMemento.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; -using System.Collections.Generic; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This class is used for storing the state of a bookmark manager - /// - public class BookmarkManagerMemento - { - List bookmarks = new List(); - - /// - /// Contains all bookmarks as int values - /// - public List Bookmarks { - get { - return bookmarks; - } - set { - bookmarks = value; - } - } - - /// - /// Validates all bookmarks if they're in range of the document. - /// (removing all bookmarks < 0 and bookmarks > max. line number - /// - public void CheckMemento(IDocument document) - { - for (int i = 0; i < bookmarks.Count; ++i) { - int mark = (int)bookmarks[i]; - if (mark < 0 || mark >= document.TotalNumberOfLines) { - bookmarks.RemoveAt(i); - --i; - } - } - } - - /// - /// Creates a new instance of - /// - public BookmarkManagerMemento() - { - } - - /// - /// Creates a new instance of - /// - public BookmarkManagerMemento(XmlElement element) - { - foreach (XmlElement el in element.ChildNodes) { - bookmarks.Add(Int32.Parse(el.Attributes["line"].InnerText)); - } - } - - /// - /// Creates a new instance of - /// - public BookmarkManagerMemento(List bookmarks) - { - this.bookmarks = bookmarks; - } - - /// - /// Converts a xml element to a object - /// - public object FromXmlElement(XmlElement element) - { - return new BookmarkManagerMemento(element); - } - - /// - /// Converts this to a xml element - /// - public XmlElement ToXmlElement(XmlDocument doc) - { - XmlElement bookmarknode = doc.CreateElement("Bookmarks"); - - foreach (int line in bookmarks) { - XmlElement markNode = doc.CreateElement("Mark"); - - XmlAttribute lineAttr = doc.CreateAttribute("line"); - lineAttr.InnerText = line.ToString(); - markNode.Attributes.Append(lineAttr); - - bookmarknode.AppendChild(markNode); - } - - return bookmarknode; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/DefaultDocument.cs b/src/ICSharpCode.TextEditor/Src/Document/DefaultDocument.cs deleted file mode 100644 index ba7095b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/DefaultDocument.cs +++ /dev/null @@ -1,457 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; - -using ICSharpCode.TextEditor.Undo; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Describes the caret marker - /// - public enum LineViewerStyle { - /// - /// No line viewer will be displayed - /// - None, - - /// - /// The row in which the caret is will be marked - /// - FullRow - } - - /// - /// Describes the indent style - /// - public enum IndentStyle { - /// - /// No indentation occurs - /// - None, - - /// - /// The indentation from the line above will be - /// taken to indent the curent line - /// - Auto, - - /// - /// Inteligent, context sensitive indentation will occur - /// - Smart - } - - /// - /// Describes the bracket highlighting style - /// - public enum BracketHighlightingStyle { - - /// - /// Brackets won't be highlighted - /// - None, - - /// - /// Brackets will be highlighted if the caret is on the bracket - /// - OnBracket, - - /// - /// Brackets will be highlighted if the caret is after the bracket - /// - AfterBracket - } - - /// - /// Describes the selection mode of the text area - /// - public enum DocumentSelectionMode { - /// - /// The 'normal' selection mode. - /// - Normal, - - /// - /// Selections will be added to the current selection or new - /// ones will be created (multi-select mode) - /// - Additive - } - - /// - /// The default implementation. - /// - internal sealed class DefaultDocument : IDocument - { - bool readOnly = false; - - LineManager lineTrackingStrategy; - BookmarkManager bookmarkManager; - ITextBufferStrategy textBufferStrategy; - IFormattingStrategy formattingStrategy; - FoldingManager foldingManager; - UndoStack undoStack = new UndoStack(); - ITextEditorProperties textEditorProperties = new DefaultTextEditorProperties(); - MarkerStrategy markerStrategy; - - public LineManager LineManager { - get { return lineTrackingStrategy; } - set { lineTrackingStrategy = value; } - } - - public event EventHandler LineLengthChanged { - add { lineTrackingStrategy.LineLengthChanged += value; } - remove { lineTrackingStrategy.LineLengthChanged -= value; } - } - public event EventHandler LineCountChanged { - add { lineTrackingStrategy.LineCountChanged += value; } - remove { lineTrackingStrategy.LineCountChanged -= value; } - } - public event EventHandler LineDeleted { - add { lineTrackingStrategy.LineDeleted += value; } - remove { lineTrackingStrategy.LineDeleted -= value; } - } - - public MarkerStrategy MarkerStrategy { - get { return markerStrategy; } - set { markerStrategy = value; } - } - - public ITextEditorProperties TextEditorProperties { - get { - return textEditorProperties; - } - set { - textEditorProperties = value; - } - } - - public UndoStack UndoStack { - get { - return undoStack; - } - } - - public IList LineSegmentCollection { - get { - return lineTrackingStrategy.LineSegmentCollection; - } - } - - public bool ReadOnly { - get { - return readOnly; - } - set { - readOnly = value; - } - } - - public ITextBufferStrategy TextBufferStrategy { - get { - return textBufferStrategy; - } - set { - textBufferStrategy = value; - } - } - - public IFormattingStrategy FormattingStrategy { - get { - return formattingStrategy; - } - set { - formattingStrategy = value; - } - } - - public FoldingManager FoldingManager { - get { - return foldingManager; - } - set { - foldingManager = value; - } - } - - public IHighlightingStrategy HighlightingStrategy { - get { - return lineTrackingStrategy.HighlightingStrategy; - } - set { - lineTrackingStrategy.HighlightingStrategy = value; - } - } - - public int TextLength { - get { - return textBufferStrategy.Length; - } - } - - public BookmarkManager BookmarkManager { - get { - return bookmarkManager; - } - set { - bookmarkManager = value; - } - } - - - public string TextContent { - get { - return GetText(0, textBufferStrategy.Length); - } - set { - Debug.Assert(textBufferStrategy != null); - Debug.Assert(lineTrackingStrategy != null); - OnDocumentAboutToBeChanged(new DocumentEventArgs(this, 0, 0, value)); - textBufferStrategy.SetContent(value); - lineTrackingStrategy.SetContent(value); - undoStack.ClearAll(); - - OnDocumentChanged(new DocumentEventArgs(this, 0, 0, value)); - OnTextContentChanged(EventArgs.Empty); - } - } - - public void Insert(int offset, string text) - { - if (readOnly) { - return; - } - OnDocumentAboutToBeChanged(new DocumentEventArgs(this, offset, -1, text)); - - textBufferStrategy.Insert(offset, text); - lineTrackingStrategy.Insert(offset, text); - - undoStack.Push(new UndoableInsert(this, offset, text)); - - OnDocumentChanged(new DocumentEventArgs(this, offset, -1, text)); - } - - public void Remove(int offset, int length) - { - if (readOnly) { - return; - } - OnDocumentAboutToBeChanged(new DocumentEventArgs(this, offset, length)); - undoStack.Push(new UndoableDelete(this, offset, GetText(offset, length))); - - textBufferStrategy.Remove(offset, length); - lineTrackingStrategy.Remove(offset, length); - - OnDocumentChanged(new DocumentEventArgs(this, offset, length)); - } - - public void Replace(int offset, int length, string text) - { - if (readOnly) { - return; - } - OnDocumentAboutToBeChanged(new DocumentEventArgs(this, offset, length, text)); - undoStack.Push(new UndoableReplace(this, offset, GetText(offset, length), text)); - - textBufferStrategy.Replace(offset, length, text); - lineTrackingStrategy.Replace(offset, length, text); - - OnDocumentChanged(new DocumentEventArgs(this, offset, length, text)); - } - - public char GetCharAt(int offset) - { - return textBufferStrategy.GetCharAt(offset); - } - - public string GetText(int offset, int length) - { - #if DEBUG - if (length < 0) throw new ArgumentOutOfRangeException("length", length, "length < 0"); - #endif - return textBufferStrategy.GetText(offset, length); - } - public string GetText(ISegment segment) - { - return GetText(segment.Offset, segment.Length); - } - - public int TotalNumberOfLines { - get { - return lineTrackingStrategy.TotalNumberOfLines; - } - } - - public int GetLineNumberForOffset(int offset) - { - return lineTrackingStrategy.GetLineNumberForOffset(offset); - } - - public LineSegment GetLineSegmentForOffset(int offset) - { - return lineTrackingStrategy.GetLineSegmentForOffset(offset); - } - - public LineSegment GetLineSegment(int line) - { - return lineTrackingStrategy.GetLineSegment(line); - } - - public int GetFirstLogicalLine(int lineNumber) - { - return lineTrackingStrategy.GetFirstLogicalLine(lineNumber); - } - - public int GetLastLogicalLine(int lineNumber) - { - return lineTrackingStrategy.GetLastLogicalLine(lineNumber); - } - - public int GetVisibleLine(int lineNumber) - { - return lineTrackingStrategy.GetVisibleLine(lineNumber); - } - -// public int GetVisibleColumn(int logicalLine, int logicalColumn) -// { -// return lineTrackingStrategy.GetVisibleColumn(logicalLine, logicalColumn); -// } -// - public int GetNextVisibleLineAbove(int lineNumber, int lineCount) - { - return lineTrackingStrategy.GetNextVisibleLineAbove(lineNumber, lineCount); - } - - public int GetNextVisibleLineBelow(int lineNumber, int lineCount) - { - return lineTrackingStrategy.GetNextVisibleLineBelow(lineNumber, lineCount); - } - - public TextLocation OffsetToPosition(int offset) - { - int lineNr = GetLineNumberForOffset(offset); - LineSegment line = GetLineSegment(lineNr); - return new TextLocation(offset - line.Offset, lineNr); - } - - public int PositionToOffset(TextLocation p) - { - if (p.Y >= this.TotalNumberOfLines) { - return 0; - } - LineSegment line = GetLineSegment(p.Y); - return Math.Min(this.TextLength, line.Offset + Math.Min(line.Length, p.X)); - } - - public void UpdateSegmentListOnDocumentChange(List list, DocumentEventArgs e) where T : ISegment - { - int removedCharacters = e.Length > 0 ? e.Length : 0; - int insertedCharacters = e.Text != null ? e.Text.Length : 0; - for (int i = 0; i < list.Count; ++i) { - ISegment s = list[i]; - int segmentStart = s.Offset; - int segmentEnd = s.Offset + s.Length; - - if (e.Offset <= segmentStart) { - segmentStart -= removedCharacters; - if (segmentStart < e.Offset) - segmentStart = e.Offset; - } - if (e.Offset < segmentEnd) { - segmentEnd -= removedCharacters; - if (segmentEnd < e.Offset) - segmentEnd = e.Offset; - } - - Debug.Assert(segmentStart <= segmentEnd); - - if (segmentStart == segmentEnd) { - list.RemoveAt(i); - --i; - continue; - } - - if (e.Offset <= segmentStart) - segmentStart += insertedCharacters; - if (e.Offset < segmentEnd) - segmentEnd += insertedCharacters; - - Debug.Assert(segmentStart < segmentEnd); - - s.Offset = segmentStart; - s.Length = segmentEnd - segmentStart; - } - } - - void OnDocumentAboutToBeChanged(DocumentEventArgs e) - { - if (DocumentAboutToBeChanged != null) { - DocumentAboutToBeChanged(this, e); - } - } - - void OnDocumentChanged(DocumentEventArgs e) - { - if (DocumentChanged != null) { - DocumentChanged(this, e); - } - } - - public event DocumentEventHandler DocumentAboutToBeChanged; - public event DocumentEventHandler DocumentChanged; - - // UPDATE STUFF - List updateQueue = new List(); - - public List UpdateQueue { - get { - return updateQueue; - } - } - - public void RequestUpdate(TextAreaUpdate update) - { - if (updateQueue.Count == 1 && updateQueue[0].TextAreaUpdateType == TextAreaUpdateType.WholeTextArea) { - // if we're going to update the whole text area, we don't need to store detail updates - return; - } - if (update.TextAreaUpdateType == TextAreaUpdateType.WholeTextArea) { - // if we're going to update the whole text area, we don't need to store detail updates - updateQueue.Clear(); - } - updateQueue.Add(update); - } - - public void CommitUpdate() - { - if (UpdateCommited != null) { - UpdateCommited(this, EventArgs.Empty); - } - } - - void OnTextContentChanged(EventArgs e) - { - if (TextContentChanged != null) { - TextContentChanged(this, e); - } - } - - public event EventHandler UpdateCommited; - public event EventHandler TextContentChanged; - - [Conditional("DEBUG")] - internal static void ValidatePosition(IDocument document, TextLocation position) - { - document.GetLineSegment(position.Line); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/DefaultTextEditorProperties.cs b/src/ICSharpCode.TextEditor/Src/Document/DefaultTextEditorProperties.cs deleted file mode 100644 index 4fba689..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/DefaultTextEditorProperties.cs +++ /dev/null @@ -1,307 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Drawing; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - public enum BracketMatchingStyle { - Before, - After - } - - public class DefaultTextEditorProperties : ITextEditorProperties - { - int tabIndent = 4; - int indentationSize = 4; - IndentStyle indentStyle = IndentStyle.Smart; - DocumentSelectionMode documentSelectionMode = DocumentSelectionMode.Normal; - Encoding encoding = System.Text.Encoding.UTF8; - BracketMatchingStyle bracketMatchingStyle = BracketMatchingStyle.After; - FontContainer fontContainer; - static Font DefaultFont; - - public DefaultTextEditorProperties() - { - if (DefaultFont == null) { - DefaultFont = new Font("Courier New", 10); - } - this.fontContainer = new FontContainer(DefaultFont); - } - - bool allowCaretBeyondEOL = false; - - bool showMatchingBracket = true; - bool showLineNumbers = true; - - bool showSpaces = false; - bool showTabs = false; - bool showEOLMarker = false; - - bool showInvalidLines = false; - - bool isIconBarVisible = false; - bool enableFolding = true; - bool showHorizontalRuler = false; - bool showVerticalRuler = true; - bool convertTabsToSpaces = false; - System.Drawing.Text.TextRenderingHint textRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault; - bool mouseWheelScrollDown = true; - bool mouseWheelTextZoom = true; - - bool hideMouseCursor = false; - bool cutCopyWholeLine = true; - - int verticalRulerRow = 80; - LineViewerStyle lineViewerStyle = LineViewerStyle.None; - string lineTerminator = "\r\n"; - bool autoInsertCurlyBracket = true; - bool supportReadOnlySegments = false; - - public int TabIndent { - get { - return tabIndent; - } - set { - tabIndent = value; - } - } - - public int IndentationSize { - get { return indentationSize; } - set { indentationSize = value; } - } - - public IndentStyle IndentStyle { - get { - return indentStyle; - } - set { - indentStyle = value; - } - } - public DocumentSelectionMode DocumentSelectionMode { - get { - return documentSelectionMode; - } - set { - documentSelectionMode = value; - } - } - public bool AllowCaretBeyondEOL { - get { - return allowCaretBeyondEOL; - } - set { - allowCaretBeyondEOL = value; - } - } - public bool ShowMatchingBracket { - get { - return showMatchingBracket; - } - set { - showMatchingBracket = value; - } - } - public bool ShowLineNumbers { - get { - return showLineNumbers; - } - set { - showLineNumbers = value; - } - } - public bool ShowSpaces { - get { - return showSpaces; - } - set { - showSpaces = value; - } - } - public bool ShowTabs { - get { - return showTabs; - } - set { - showTabs = value; - } - } - public bool ShowEOLMarker { - get { - return showEOLMarker; - } - set { - showEOLMarker = value; - } - } - public bool ShowInvalidLines { - get { - return showInvalidLines; - } - set { - showInvalidLines = value; - } - } - public bool IsIconBarVisible { - get { - return isIconBarVisible; - } - set { - isIconBarVisible = value; - } - } - public bool EnableFolding { - get { - return enableFolding; - } - set { - enableFolding = value; - } - } - public bool ShowHorizontalRuler { - get { - return showHorizontalRuler; - } - set { - showHorizontalRuler = value; - } - } - public bool ShowVerticalRuler { - get { - return showVerticalRuler; - } - set { - showVerticalRuler = value; - } - } - public bool ConvertTabsToSpaces { - get { - return convertTabsToSpaces; - } - set { - convertTabsToSpaces = value; - } - } - public System.Drawing.Text.TextRenderingHint TextRenderingHint { - get { return textRenderingHint; } - set { textRenderingHint = value; } - } - - public bool MouseWheelScrollDown { - get { - return mouseWheelScrollDown; - } - set { - mouseWheelScrollDown = value; - } - } - public bool MouseWheelTextZoom { - get { - return mouseWheelTextZoom; - } - set { - mouseWheelTextZoom = value; - } - } - - public bool HideMouseCursor { - get { - return hideMouseCursor; - } - set { - hideMouseCursor = value; - } - } - - public bool CutCopyWholeLine { - get { - return cutCopyWholeLine; - } - set { - cutCopyWholeLine = value; - } - } - - public Encoding Encoding { - get { - return encoding; - } - set { - encoding = value; - } - } - public int VerticalRulerRow { - get { - return verticalRulerRow; - } - set { - verticalRulerRow = value; - } - } - public LineViewerStyle LineViewerStyle { - get { - return lineViewerStyle; - } - set { - lineViewerStyle = value; - } - } - public string LineTerminator { - get { - return lineTerminator; - } - set { - lineTerminator = value; - } - } - public bool AutoInsertCurlyBracket { - get { - return autoInsertCurlyBracket; - } - set { - autoInsertCurlyBracket = value; - } - } - - public Font Font { - get { - return fontContainer.DefaultFont; - } - set { - fontContainer.DefaultFont = value; - } - } - - public FontContainer FontContainer { - get { - return fontContainer; - } - } - - public BracketMatchingStyle BracketMatchingStyle { - get { - return bracketMatchingStyle; - } - set { - bracketMatchingStyle = value; - } - } - - public bool SupportReadOnlySegments { - get { - return supportReadOnlySegments; - } - set { - supportReadOnlySegments = value; - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/DocumentEventArgs.cs b/src/ICSharpCode.TextEditor/Src/Document/DocumentEventArgs.cs deleted file mode 100644 index 7726045..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/DocumentEventArgs.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This delegate is used for document events. - /// - public delegate void DocumentEventHandler(object sender, DocumentEventArgs e); - - /// - /// This class contains more information on a document event - /// - public class DocumentEventArgs : EventArgs - { - IDocument document; - int offset; - int length; - string text; - - /// - /// always a valid Document which is related to the Event. - /// - public IDocument Document { - get { - return document; - } - } - - /// - /// -1 if no offset was specified for this event - /// - public int Offset { - get { - return offset; - } - } - - /// - /// null if no text was specified for this event - /// - public string Text { - get { - return text; - } - } - - /// - /// -1 if no length was specified for this event - /// - public int Length { - get { - return length; - } - } - - /// - /// Creates a new instance off - /// - public DocumentEventArgs(IDocument document) : this(document, -1, -1, null) - { - } - - /// - /// Creates a new instance off - /// - public DocumentEventArgs(IDocument document, int offset) : this(document, offset, -1, null) - { - } - - /// - /// Creates a new instance off - /// - public DocumentEventArgs(IDocument document, int offset, int length) : this(document, offset, length, null) - { - } - - /// - /// Creates a new instance off - /// - public DocumentEventArgs(IDocument document, int offset, int length, string text) - { - this.document = document; - this.offset = offset; - this.length = length; - this.text = text; - } - public override string ToString() - { - return String.Format("[DocumentEventArgs: Document = {0}, Offset = {1}, Text = {2}, Length = {3}]", - Document, - Offset, - Text, - Length); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/DocumentFactory.cs b/src/ICSharpCode.TextEditor/Src/Document/DocumentFactory.cs deleted file mode 100644 index fa552fc..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/DocumentFactory.cs +++ /dev/null @@ -1,57 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This interface represents a container which holds a text sequence and - /// all necessary information about it. It is used as the base for a text editor. - /// - public class DocumentFactory - { - /// - /// Creates a new object. Only create - /// with this method. - /// - public IDocument CreateDocument() - { - DefaultDocument doc = new DefaultDocument(); - doc.TextBufferStrategy = new GapTextBufferStrategy(); - doc.FormattingStrategy = new DefaultFormattingStrategy(); - doc.LineManager = new LineManager(doc, null); - doc.FoldingManager = new FoldingManager(doc, doc.LineManager); - doc.FoldingManager.FoldingStrategy = null; //new ParserFoldingStrategy(); - doc.MarkerStrategy = new MarkerStrategy(doc); - doc.BookmarkManager = new BookmarkManager(doc, doc.LineManager); - return doc; - } - - /// - /// Creates a new document and loads the given file - /// - public IDocument CreateFromTextBuffer(ITextBufferStrategy textBuffer) - { - DefaultDocument doc = (DefaultDocument)CreateDocument(); - doc.TextContent = textBuffer.GetText(0, textBuffer.Length); - doc.TextBufferStrategy = textBuffer; - return doc; - } - - /// - /// Creates a new document and loads the given file - /// - public IDocument CreateFromFile(string fileName) - { - IDocument document = CreateDocument(); - document.TextContent = Util.FileReader.ReadFileContent(fileName, Encoding.Default); - return document; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldMarker.cs b/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldMarker.cs deleted file mode 100644 index fc80d55..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldMarker.cs +++ /dev/null @@ -1,174 +0,0 @@ -// -// -// -// -// $Revision: 2063 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - public enum FoldType { - Unspecified, - MemberBody, - Region, - TypeBody - } - - public class FoldMarker : AbstractSegment, IComparable - { - bool isFolded = false; - string foldText = "..."; - FoldType foldType = FoldType.Unspecified; - IDocument document = null; - int startLine = -1, startColumn, endLine = -1, endColumn; - - static void GetPointForOffset(IDocument document, int offset, out int line, out int column) - { - if (offset > document.TextLength) { - line = document.TotalNumberOfLines + 1; - column = 1; - } else if (offset < 0) { - line = -1; - column = -1; - } else { - line = document.GetLineNumberForOffset(offset); - column = offset - document.GetLineSegment(line).Offset; - } - } - - public FoldType FoldType { - get { return foldType; } - set { foldType = value; } - } - - public int StartLine { - get { - if (startLine < 0) { - GetPointForOffset(document, offset, out startLine, out startColumn); - } - return startLine; - } - } - - public int StartColumn { - get { - if (startLine < 0) { - GetPointForOffset(document, offset, out startLine, out startColumn); - } - return startColumn; - } - } - - public int EndLine { - get { - if (endLine < 0) { - GetPointForOffset(document, offset + length, out endLine, out endColumn); - } - return endLine; - } - } - - public int EndColumn { - get { - if (endLine < 0) { - GetPointForOffset(document, offset + length, out endLine, out endColumn); - } - return endColumn; - } - } - - public override int Offset { - get { return base.Offset; } - set { - base.Offset = value; - startLine = -1; endLine = -1; - } - } - public override int Length { - get { return base.Length; } - set { - base.Length = value; - endLine = -1; - } - } - - public bool IsFolded { - get { - return isFolded; - } - set { - isFolded = value; - } - } - - public string FoldText { - get { - return foldText; - } - } - - public string InnerText { - get { - return document.GetText(offset, length); - } - } - - public FoldMarker(IDocument document, int offset, int length, string foldText, bool isFolded) - { - this.document = document; - this.offset = offset; - this.length = length; - this.foldText = foldText; - this.isFolded = isFolded; - } - - public FoldMarker(IDocument document, int startLine, int startColumn, int endLine, int endColumn) : this(document, startLine, startColumn, endLine, endColumn, FoldType.Unspecified) - { - } - - public FoldMarker(IDocument document, int startLine, int startColumn, int endLine, int endColumn, FoldType foldType) : this(document, startLine, startColumn, endLine, endColumn, foldType, "...") - { - } - - public FoldMarker(IDocument document, int startLine, int startColumn, int endLine, int endColumn, FoldType foldType, string foldText) : this(document, startLine, startColumn, endLine, endColumn, foldType, foldText, false) - { - } - - public FoldMarker(IDocument document, int startLine, int startColumn, int endLine, int endColumn, FoldType foldType, string foldText, bool isFolded) - { - this.document = document; - - startLine = Math.Min(document.TotalNumberOfLines - 1, Math.Max(startLine, 0)); - ISegment startLineSegment = document.GetLineSegment(startLine); - - endLine = Math.Min(document.TotalNumberOfLines - 1, Math.Max(endLine, 0)); - ISegment endLineSegment = document.GetLineSegment(endLine); - - // Prevent the region from completely disappearing - if (string.IsNullOrEmpty(foldText)) { - foldText = "..."; - } - - this.FoldType = foldType; - this.foldText = foldText; - this.offset = startLineSegment.Offset + Math.Min(startColumn, startLineSegment.Length); - this.length = (endLineSegment.Offset + Math.Min(endColumn, endLineSegment.Length)) - this.offset; - this.isFolded = isFolded; - } - - public int CompareTo(object o) - { - if (!(o is FoldMarker)) { - throw new ArgumentException(); - } - FoldMarker f = (FoldMarker)o; - if (offset != f.offset) { - return offset.CompareTo(f.offset); - } - - return length.CompareTo(f.length); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldingManager.cs b/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldingManager.cs deleted file mode 100644 index 47273b4..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/FoldingManager.cs +++ /dev/null @@ -1,333 +0,0 @@ -// -// -// -// -// $Revision: 2691 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - public class FoldingManager - { - List foldMarker = new List(); - List foldMarkerByEnd = new List(); - IFoldingStrategy foldingStrategy = null; - IDocument document; - - public IList FoldMarker { - get { - return foldMarker.AsReadOnly(); - } - } - - public IFoldingStrategy FoldingStrategy { - get { - return foldingStrategy; - } - set { - foldingStrategy = value; - } - } - - internal FoldingManager(IDocument document, LineManager lineTracker) - { - this.document = document; - document.DocumentChanged += new DocumentEventHandler(DocumentChanged); - -// lineTracker.LineCountChanged += new LineManagerEventHandler(LineManagerLineCountChanged); -// lineTracker.LineLengthChanged += new LineLengthEventHandler(LineManagerLineLengthChanged); -// foldMarker.Add(new FoldMarker(0, 5, 3, 5)); -// -// foldMarker.Add(new FoldMarker(5, 5, 10, 3)); -// foldMarker.Add(new FoldMarker(6, 0, 8, 2)); -// -// FoldMarker fm1 = new FoldMarker(10, 4, 10, 7); -// FoldMarker fm2 = new FoldMarker(10, 10, 10, 14); -// -// fm1.IsFolded = true; -// fm2.IsFolded = true; -// -// foldMarker.Add(fm1); -// foldMarker.Add(fm2); -// foldMarker.Sort(); - } - - void DocumentChanged(object sender, DocumentEventArgs e) - { - int oldCount = foldMarker.Count; - document.UpdateSegmentListOnDocumentChange(foldMarker, e); - if (oldCount != foldMarker.Count) { - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - } - } - - public List GetFoldingsFromPosition(int line, int column) - { - List foldings = new List(); - if (foldMarker != null) { - for (int i = 0; i < foldMarker.Count; ++i) { - FoldMarker fm = foldMarker[i]; - if ((fm.StartLine == line && column > fm.StartColumn && !(fm.EndLine == line && column >= fm.EndColumn)) || - (fm.EndLine == line && column < fm.EndColumn && !(fm.StartLine == line && column <= fm.StartColumn)) || - (line > fm.StartLine && line < fm.EndLine)) { - foldings.Add(fm); - } - } - } - return foldings; - } - - class StartComparer : IComparer - { - public readonly static StartComparer Instance = new StartComparer(); - - public int Compare(FoldMarker x, FoldMarker y) - { - if (x.StartLine < y.StartLine) - return -1; - else if (x.StartLine == y.StartLine) - return x.StartColumn.CompareTo(y.StartColumn); - else - return 1; - } - } - - class EndComparer : IComparer - { - public readonly static EndComparer Instance = new EndComparer(); - - public int Compare(FoldMarker x, FoldMarker y) - { - if (x.EndLine < y.EndLine) - return -1; - else if (x.EndLine == y.EndLine) - return x.EndColumn.CompareTo(y.EndColumn); - else - return 1; - } - } - - List GetFoldingsByStartAfterColumn(int lineNumber, int column, bool forceFolded) - { - List foldings = new List(); - - if (foldMarker != null) { - int index = foldMarker.BinarySearch( - new FoldMarker(document, lineNumber, column, lineNumber, column), - StartComparer.Instance); - if (index < 0) index = ~index; - - for (; index < foldMarker.Count; index++) { - FoldMarker fm = foldMarker[index]; - if (fm.StartLine > lineNumber) - break; - if (fm.StartColumn <= column) - continue; - if (!forceFolded || fm.IsFolded) - foldings.Add(fm); - } - } - return foldings; - } - - public List GetFoldingsWithStart(int lineNumber) - { - return GetFoldingsByStartAfterColumn(lineNumber, -1, false); - } - - public List GetFoldedFoldingsWithStart(int lineNumber) - { - return GetFoldingsByStartAfterColumn(lineNumber, -1, true); - } - - public List GetFoldedFoldingsWithStartAfterColumn(int lineNumber, int column) - { - return GetFoldingsByStartAfterColumn(lineNumber, column, true); - } - - List GetFoldingsByEndAfterColumn(int lineNumber, int column, bool forceFolded) - { - List foldings = new List(); - - if (foldMarker != null) { - int index = foldMarkerByEnd.BinarySearch( - new FoldMarker(document, lineNumber, column, lineNumber, column), - EndComparer.Instance); - if (index < 0) index = ~index; - - for (; index < foldMarkerByEnd.Count; index++) { - FoldMarker fm = foldMarkerByEnd[index]; - if (fm.EndLine > lineNumber) - break; - if (fm.EndColumn <= column) - continue; - if (!forceFolded || fm.IsFolded) - foldings.Add(fm); - } - } - return foldings; - } - - public List GetFoldingsWithEnd(int lineNumber) - { - return GetFoldingsByEndAfterColumn(lineNumber, -1, false); - } - - public List GetFoldedFoldingsWithEnd(int lineNumber) - { - return GetFoldingsByEndAfterColumn(lineNumber, -1, true); - } - - public bool IsFoldStart(int lineNumber) - { - return GetFoldingsWithStart(lineNumber).Count > 0; - } - - public bool IsFoldEnd(int lineNumber) - { - return GetFoldingsWithEnd(lineNumber).Count > 0; - } - - public List GetFoldingsContainsLineNumber(int lineNumber) - { - List foldings = new List(); - if (foldMarker != null) { - foreach (FoldMarker fm in foldMarker) { - if (fm.StartLine < lineNumber && lineNumber < fm.EndLine) { - foldings.Add(fm); - } - } - } - return foldings; - } - - public bool IsBetweenFolding(int lineNumber) - { - return GetFoldingsContainsLineNumber(lineNumber).Count > 0; - } - - public bool IsLineVisible(int lineNumber) - { - foreach (FoldMarker fm in GetFoldingsContainsLineNumber(lineNumber)) { - if (fm.IsFolded) - return false; - } - return true; - } - - public List GetTopLevelFoldedFoldings() - { - List foldings = new List(); - if (foldMarker != null) { - Point end = new Point(0, 0); - foreach (FoldMarker fm in foldMarker) { - if (fm.IsFolded && (fm.StartLine > end.Y || fm.StartLine == end.Y && fm.StartColumn >= end.X)) { - foldings.Add(fm); - end = new Point(fm.EndColumn, fm.EndLine); - } - } - } - return foldings; - } - - public void UpdateFoldings(string fileName, object parseInfo) - { - UpdateFoldings(foldingStrategy.GenerateFoldMarkers(document, fileName, parseInfo)); - } - - public void UpdateFoldings(List newFoldings) - { - int oldFoldingsCount = foldMarker.Count; - lock (this) { - if (newFoldings != null && newFoldings.Count != 0) { - newFoldings.Sort(); - if (foldMarker.Count == newFoldings.Count) { - for (int i = 0; i < foldMarker.Count; ++i) { - newFoldings[i].IsFolded = foldMarker[i].IsFolded; - } - foldMarker = newFoldings; - } else { - for (int i = 0, j = 0; i < foldMarker.Count && j < newFoldings.Count;) { - int n = newFoldings[j].CompareTo(foldMarker[i]); - if (n > 0) { - ++i; - } else { - if (n == 0) { - newFoldings[j].IsFolded = foldMarker[i].IsFolded; - } - ++j; - } - } - } - } - if (newFoldings != null) { - foldMarker = newFoldings; - foldMarkerByEnd = new List(newFoldings); - foldMarkerByEnd.Sort(EndComparer.Instance); - } else { - foldMarker.Clear(); - foldMarkerByEnd.Clear(); - } - } - if (oldFoldingsCount != foldMarker.Count) { - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - document.CommitUpdate(); - } - } - - public string SerializeToString() - { - StringBuilder sb = new StringBuilder(); - foreach (FoldMarker marker in this.foldMarker) { - sb.Append(marker.Offset);sb.Append("\n"); - sb.Append(marker.Length);sb.Append("\n"); - sb.Append(marker.FoldText);sb.Append("\n"); - sb.Append(marker.IsFolded);sb.Append("\n"); - } - return sb.ToString(); - } - - public void DeserializeFromString(string str) - { - try { - string[] lines = str.Split('\n'); - for (int i = 0; i < lines.Length && lines[i].Length > 0; i += 4) { - int offset = Int32.Parse(lines[i]); - int length = Int32.Parse(lines[i + 1]); - string text = lines[i + 2]; - bool isFolded = Boolean.Parse(lines[i + 3]); - bool found = false; - foreach (FoldMarker marker in foldMarker) { - if (marker.Offset == offset && marker.Length == length) { - marker.IsFolded = isFolded; - found = true; - break; - } - } - if (!found) { - foldMarker.Add(new FoldMarker(document, offset, length, text, isFolded)); - } - } - if (lines.Length > 0) { - NotifyFoldingsChanged(EventArgs.Empty); - } - } catch (Exception) { - } - } - - public void NotifyFoldingsChanged(EventArgs e) - { - if (FoldingsChanged != null) { - FoldingsChanged(this, e); - } - } - - - public event EventHandler FoldingsChanged; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IFoldingStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IFoldingStrategy.cs deleted file mode 100644 index 500e065..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IFoldingStrategy.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This interface is used for the folding capabilities - /// of the textarea. - /// - public interface IFoldingStrategy - { - /// - /// Calculates the fold level of a specific line. - /// - List GenerateFoldMarkers(IDocument document, string fileName, object parseInformation); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IndentFoldingStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IndentFoldingStrategy.cs deleted file mode 100644 index 4112378..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/FoldingStrategy/IndentFoldingStrategy.cs +++ /dev/null @@ -1,47 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// A simple folding strategy which calculates the folding level - /// using the indent level of the line. - /// - public class IndentFoldingStrategy : IFoldingStrategy - { - public List GenerateFoldMarkers(IDocument document, string fileName, object parseInformation) - { - List l = new List(); - Stack offsetStack = new Stack(); - Stack textStack = new Stack(); - //int level = 0; - //foreach (LineSegment segment in document.LineSegmentCollection) { - // - //} - return l; - } - - int GetLevel(IDocument document, int offset) - { - int level = 0; - int spaces = 0; - for (int i = offset; i < document.TextLength; ++i) { - char c = document.GetCharAt(i); - if (c == '\t' || (c == ' ' && ++spaces == 4)) { - spaces = 0; - ++level; - } else { - break; - } - } - return level; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/DefaultFormattingStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/DefaultFormattingStrategy.cs deleted file mode 100644 index fcc4ffe..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/DefaultFormattingStrategy.cs +++ /dev/null @@ -1,218 +0,0 @@ -// -// -// -// -// $Revision: 3272 $ -// - -using System; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This class handles the auto and smart indenting in the textbuffer while - /// you type. - /// - public class DefaultFormattingStrategy : IFormattingStrategy - { - /// - /// Creates a new instance off - /// - public DefaultFormattingStrategy() - { - } - - /// - /// returns the whitespaces which are before a non white space character in the line line - /// as a string. - /// - protected string GetIndentation(TextArea textArea, int lineNumber) - { - if (lineNumber < 0 || lineNumber > textArea.Document.TotalNumberOfLines) { - throw new ArgumentOutOfRangeException("lineNumber"); - } - - string lineText = TextUtilities.GetLineAsString(textArea.Document, lineNumber); - StringBuilder whitespaces = new StringBuilder(); - - foreach (char ch in lineText) { - if (Char.IsWhiteSpace(ch)) { - whitespaces.Append(ch); - } else { - break; - } - } - return whitespaces.ToString(); - } - - /// - /// Could be overwritten to define more complex indenting. - /// - protected virtual int AutoIndentLine(TextArea textArea, int lineNumber) - { - string indentation = lineNumber != 0 ? GetIndentation(textArea, lineNumber - 1) : ""; - if(indentation.Length > 0) { - string newLineText = indentation + TextUtilities.GetLineAsString(textArea.Document, lineNumber).Trim(); - LineSegment oldLine = textArea.Document.GetLineSegment(lineNumber); - SmartReplaceLine(textArea.Document, oldLine, newLineText); - } - return indentation.Length; - } - - static readonly char[] whitespaceChars = {' ', '\t'}; - - /// - /// Replaces the text in a line. - /// If only whitespace at the beginning and end of the line was changed, this method - /// only adjusts the whitespace and doesn't replace the other text. - /// - public static void SmartReplaceLine(IDocument document, LineSegment line, string newLineText) - { - if (document == null) - throw new ArgumentNullException("document"); - if (line == null) - throw new ArgumentNullException("line"); - if (newLineText == null) - throw new ArgumentNullException("newLineText"); - string newLineTextTrim = newLineText.Trim(whitespaceChars); - string oldLineText = document.GetText(line); - if (oldLineText == newLineText) - return; - int pos = oldLineText.IndexOf(newLineTextTrim); - if (newLineTextTrim.Length > 0 && pos >= 0) { - document.UndoStack.StartUndoGroup(); - try { - // find whitespace at beginning - int startWhitespaceLength = 0; - while (startWhitespaceLength < newLineText.Length) { - char c = newLineText[startWhitespaceLength]; - if (c != ' ' && c != '\t') - break; - startWhitespaceLength++; - } - // find whitespace at end - int endWhitespaceLength = newLineText.Length - newLineTextTrim.Length - startWhitespaceLength; - - // replace whitespace sections - int lineOffset = line.Offset; - document.Replace(lineOffset + pos + newLineTextTrim.Length, line.Length - pos - newLineTextTrim.Length, newLineText.Substring(newLineText.Length - endWhitespaceLength)); - document.Replace(lineOffset, pos, newLineText.Substring(0, startWhitespaceLength)); - } finally { - document.UndoStack.EndUndoGroup(); - } - } else { - document.Replace(line.Offset, line.Length, newLineText); - } - } - - /// - /// Could be overwritten to define more complex indenting. - /// - protected virtual int SmartIndentLine(TextArea textArea, int line) - { - return AutoIndentLine(textArea, line); // smart = autoindent in normal texts - } - - /// - /// This function formats a specific line after ch is pressed. - /// - /// - /// the caret delta position the caret will be moved this number - /// of bytes (e.g. the number of bytes inserted before the caret, or - /// removed, if this number is negative) - /// - public virtual void FormatLine(TextArea textArea, int line, int cursorOffset, char ch) - { - if (ch == '\n') { - textArea.Caret.Column = IndentLine(textArea, line); - } - } - - /// - /// This function sets the indentation level in a specific line - /// - /// - /// the number of inserted characters. - /// - public int IndentLine(TextArea textArea, int line) - { - textArea.Document.UndoStack.StartUndoGroup(); - int result; - switch (textArea.Document.TextEditorProperties.IndentStyle) { - case IndentStyle.None: - result = 0; - break; - case IndentStyle.Auto: - result = AutoIndentLine(textArea, line); - break; - case IndentStyle.Smart: - result = SmartIndentLine(textArea, line); - break; - default: - throw new NotSupportedException("Unsupported value for IndentStyle: " + textArea.Document.TextEditorProperties.IndentStyle); - } - textArea.Document.UndoStack.EndUndoGroup(); - return result; - } - - /// - /// This function sets the indentlevel in a range of lines. - /// - public virtual void IndentLines(TextArea textArea, int begin, int end) - { - textArea.Document.UndoStack.StartUndoGroup(); - for (int i = begin; i <= end; ++i) { - IndentLine(textArea, i); - } - textArea.Document.UndoStack.EndUndoGroup(); - } - - public virtual int SearchBracketBackward(IDocument document, int offset, char openBracket, char closingBracket) - { - int brackets = -1; - // first try "quick find" - find the matching bracket if there is no string/comment in the way - for (int i = offset; i >= 0; --i) { - char ch = document.GetCharAt(i); - if (ch == openBracket) { - ++brackets; - if (brackets == 0) return i; - } else if (ch == closingBracket) { - --brackets; - } else if (ch == '"') { - break; - } else if (ch == '\'') { - break; - } else if (ch == '/' && i > 0) { - if (document.GetCharAt(i - 1) == '/') break; - if (document.GetCharAt(i - 1) == '*') break; - } - } - return -1; - } - - public virtual int SearchBracketForward(IDocument document, int offset, char openBracket, char closingBracket) - { - int brackets = 1; - // try "quick find" - find the matching bracket if there is no string/comment in the way - for (int i = offset; i < document.TextLength; ++i) { - char ch = document.GetCharAt(i); - if (ch == openBracket) { - ++brackets; - } else if (ch == closingBracket) { - --brackets; - if (brackets == 0) return i; - } else if (ch == '"') { - break; - } else if (ch == '\'') { - break; - } else if (ch == '/' && i > 0) { - if (document.GetCharAt(i - 1) == '/') break; - } else if (ch == '*' && i > 0) { - if (document.GetCharAt(i - 1) == '/') break; - } - } - return -1; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/IFormattingStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/IFormattingStrategy.cs deleted file mode 100644 index ec7a1de..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/FormattingStrategy/IFormattingStrategy.cs +++ /dev/null @@ -1,59 +0,0 @@ -// -// -// -// -// $Revision: 2640 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This interface handles the auto and smart indenting and formating - /// in the document while you type. Language bindings could overwrite this - /// interface and define their own indentation/formating. - /// - public interface IFormattingStrategy - { - /// - /// This function formats a specific line after ch is pressed. - /// - void FormatLine(TextArea textArea, int line, int caretOffset, char charTyped); - - /// - /// This function sets the indentation level in a specific line - /// - /// - /// The target caret position (length of new indentation). - /// - int IndentLine(TextArea textArea, int line); - - /// - /// This function sets the indentlevel in a range of lines. - /// - void IndentLines(TextArea textArea, int begin, int end); - - /// - /// Finds the offset of the opening bracket in the block defined by offset skipping - /// brackets in strings and comments. - /// - /// The document to search in. - /// The offset of an position in the block or the offset of the closing bracket. - /// The character for the opening bracket. - /// The character for the closing bracket. - /// Returns the offset of the opening bracket or -1 if no matching bracket was found. - int SearchBracketBackward(IDocument document, int offset, char openBracket, char closingBracket); - - /// - /// Finds the offset of the closing bracket in the block defined by offset skipping - /// brackets in strings and comments. - /// - /// The document to search in. - /// The offset of an position in the block or the offset of the opening bracket. - /// The character for the opening bracket. - /// The character for the closing bracket. - /// Returns the offset of the closing bracket or -1 if no matching bracket was found. - int SearchBracketForward(IDocument document, int offset, char openBracket, char closingBracket); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/DefaultHighlightingStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/DefaultHighlightingStrategy.cs deleted file mode 100644 index bdecb56..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/DefaultHighlightingStrategy.cs +++ /dev/null @@ -1,905 +0,0 @@ -// -// -// -// -// $Revision: 3036 $ -// - -using System; -using System.Collections.Generic; -using System.Text; -using System.Drawing; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Document -{ - public class DefaultHighlightingStrategy : IHighlightingStrategyUsingRuleSets - { - string name; - List rules = new List(); - - Dictionary environmentColors = new Dictionary(); - Dictionary properties = new Dictionary(); - string[] extensions; - - HighlightColor digitColor; - HighlightRuleSet defaultRuleSet = null; - - public HighlightColor DigitColor { - get { - return digitColor; - } - set { - digitColor = value; - } - } - - public IEnumerable> EnvironmentColors { - get { - return environmentColors; - } - } - - protected void ImportSettingsFrom(DefaultHighlightingStrategy source) - { - if (source == null) - throw new ArgumentNullException("source"); - properties = source.properties; - extensions = source.extensions; - digitColor = source.digitColor; - defaultRuleSet = source.defaultRuleSet; - name = source.name; - rules = source.rules; - environmentColors = source.environmentColors; - defaultTextColor = source.defaultTextColor; - } - - public DefaultHighlightingStrategy() : this("Default") - { - } - - public DefaultHighlightingStrategy(string name) - { - this.name = name; - - digitColor = new HighlightColor(SystemColors.WindowText, false, false); - defaultTextColor = new HighlightColor(SystemColors.WindowText, false, false); - - // set small 'default color environment' - environmentColors["Default"] = new HighlightBackground("WindowText", "Window", false, false); - environmentColors["Selection"] = new HighlightColor("HighlightText", "Highlight", false, false); - environmentColors["VRuler"] = new HighlightColor("ControlLight", "Window", false, false); - environmentColors["InvalidLines"] = new HighlightColor(Color.Red, false, false); - environmentColors["CaretMarker"] = new HighlightColor(Color.Yellow, false, false); - environmentColors["LineNumbers"] = new HighlightBackground("ControlDark", "Window", false, false); - - environmentColors["FoldLine"] = new HighlightColor(Color.FromArgb(0x80, 0x80, 0x80), Color.Black, false, false); - environmentColors["FoldMarker"] = new HighlightColor(Color.FromArgb(0x80, 0x80, 0x80), Color.White, false, false); - environmentColors["SelectedFoldLine"] = new HighlightColor(Color.Black, false, false); - environmentColors["EOLMarkers"] = new HighlightColor("ControlLight", "Window", false, false); - environmentColors["SpaceMarkers"] = new HighlightColor("ControlLight", "Window", false, false); - environmentColors["TabMarkers"] = new HighlightColor("ControlLight", "Window", false, false); - - } - - public Dictionary Properties { - get { - return properties; - } - } - - public string Name - { - get { - return name; - } - } - - public string[] Extensions - { - set { - extensions = value; - } - get { - return extensions; - } - } - - public List Rules { - get { - return rules; - } - } - - public HighlightRuleSet FindHighlightRuleSet(string name) - { - foreach(HighlightRuleSet ruleSet in rules) { - if (ruleSet.Name == name) { - return ruleSet; - } - } - return null; - } - - public void AddRuleSet(HighlightRuleSet aRuleSet) - { - HighlightRuleSet existing = FindHighlightRuleSet(aRuleSet.Name); - if (existing != null) { - existing.MergeFrom(aRuleSet); - } else { - rules.Add(aRuleSet); - } - } - - public void ResolveReferences() - { - // Resolve references from Span definitions to RuleSets - ResolveRuleSetReferences(); - // Resolve references from RuleSet defintitions to Highlighters defined in an external mode file - ResolveExternalReferences(); - } - - void ResolveRuleSetReferences() - { - foreach (HighlightRuleSet ruleSet in Rules) { - if (ruleSet.Name == null) { - defaultRuleSet = ruleSet; - } - - foreach (Span aSpan in ruleSet.Spans) { - if (aSpan.Rule != null) { - bool found = false; - foreach (HighlightRuleSet refSet in Rules) { - if (refSet.Name == aSpan.Rule) { - found = true; - aSpan.RuleSet = refSet; - break; - } - } - if (!found) { - aSpan.RuleSet = null; - throw new HighlightingDefinitionInvalidException("The RuleSet " + aSpan.Rule + " could not be found in mode definition " + this.Name); - } - } else { - aSpan.RuleSet = null; - } - } - } - - if (defaultRuleSet == null) { - throw new HighlightingDefinitionInvalidException("No default RuleSet is defined for mode definition " + this.Name); - } - } - - void ResolveExternalReferences() - { - foreach (HighlightRuleSet ruleSet in Rules) { - ruleSet.Highlighter = this; - if (ruleSet.Reference != null) { - IHighlightingStrategy highlighter = HighlightingManager.Manager.FindHighlighter (ruleSet.Reference); - - if (highlighter == null) - throw new HighlightingDefinitionInvalidException("The mode defintion " + ruleSet.Reference + " which is refered from the " + this.Name + " mode definition could not be found"); - if (highlighter is IHighlightingStrategyUsingRuleSets) - ruleSet.Highlighter = (IHighlightingStrategyUsingRuleSets)highlighter; - else - throw new HighlightingDefinitionInvalidException("The mode defintion " + ruleSet.Reference + " which is refered from the " + this.Name + " mode definition does not implement IHighlightingStrategyUsingRuleSets"); - } - } - } - -// internal void SetDefaultColor(HighlightBackground color) -// { -// return (HighlightColor)environmentColors[name]; -// defaultColor = color; -// } - - HighlightColor defaultTextColor; - - public HighlightColor DefaultTextColor { - get { - return defaultTextColor; - } - } - - public void SetColorFor(string name, HighlightColor color) - { - if (name == "Default") - defaultTextColor = new HighlightColor(color.Color, color.Bold, color.Italic); - environmentColors[name] = color; - } - - public HighlightColor GetColorFor(string name) - { - HighlightColor color; - if (environmentColors.TryGetValue(name, out color)) - return color; - else - return defaultTextColor; - } - - public HighlightColor GetColor(IDocument document, LineSegment currentSegment, int currentOffset, int currentLength) - { - return GetColor(defaultRuleSet, document, currentSegment, currentOffset, currentLength); - } - - protected virtual HighlightColor GetColor(HighlightRuleSet ruleSet, IDocument document, LineSegment currentSegment, int currentOffset, int currentLength) - { - if (ruleSet != null) { - if (ruleSet.Reference != null) { - return ruleSet.Highlighter.GetColor(document, currentSegment, currentOffset, currentLength); - } else { - return (HighlightColor)ruleSet.KeyWords[document, currentSegment, currentOffset, currentLength]; - } - } - return null; - } - - public HighlightRuleSet GetRuleSet(Span aSpan) - { - if (aSpan == null) { - return this.defaultRuleSet; - } else { - if (aSpan.RuleSet != null) - { - if (aSpan.RuleSet.Reference != null) { - return aSpan.RuleSet.Highlighter.GetRuleSet(null); - } else { - return aSpan.RuleSet; - } - } else { - return null; - } - } - } - - // Line state variable - protected LineSegment currentLine; - protected int currentLineNumber; - - // Span stack state variable - protected SpanStack currentSpanStack; - - public virtual void MarkTokens(IDocument document) - { - if (Rules.Count == 0) { - return; - } - - int lineNumber = 0; - - while (lineNumber < document.TotalNumberOfLines) { - LineSegment previousLine = (lineNumber > 0 ? document.GetLineSegment(lineNumber - 1) : null); - if (lineNumber >= document.LineSegmentCollection.Count) { // may be, if the last line ends with a delimiter - break; // then the last line is not in the collection :) - } - - currentSpanStack = ((previousLine != null && previousLine.HighlightSpanStack != null) ? previousLine.HighlightSpanStack.Clone() : null); - - if (currentSpanStack != null) { - while (!currentSpanStack.IsEmpty && currentSpanStack.Peek().StopEOL) - { - currentSpanStack.Pop(); - } - if (currentSpanStack.IsEmpty) currentSpanStack = null; - } - - currentLine = (LineSegment)document.LineSegmentCollection[lineNumber]; - - if (currentLine.Length == -1) { // happens when buffer is empty ! - return; - } - - currentLineNumber = lineNumber; - List words = ParseLine(document); - // Alex: clear old words - if (currentLine.Words != null) { - currentLine.Words.Clear(); - } - currentLine.Words = words; - currentLine.HighlightSpanStack = (currentSpanStack==null || currentSpanStack.IsEmpty) ? null : currentSpanStack; - - ++lineNumber; - } - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - document.CommitUpdate(); - currentLine = null; - } - - bool MarkTokensInLine(IDocument document, int lineNumber, ref bool spanChanged) - { - currentLineNumber = lineNumber; - bool processNextLine = false; - LineSegment previousLine = (lineNumber > 0 ? document.GetLineSegment(lineNumber - 1) : null); - - currentSpanStack = ((previousLine != null && previousLine.HighlightSpanStack != null) ? previousLine.HighlightSpanStack.Clone() : null); - if (currentSpanStack != null) { - while (!currentSpanStack.IsEmpty && currentSpanStack.Peek().StopEOL) { - currentSpanStack.Pop(); - } - if (currentSpanStack.IsEmpty) { - currentSpanStack = null; - } - } - - currentLine = (LineSegment)document.LineSegmentCollection[lineNumber]; - - if (currentLine.Length == -1) { // happens when buffer is empty ! - return false; - } - - List words = ParseLine(document); - - if (currentSpanStack != null && currentSpanStack.IsEmpty) { - currentSpanStack = null; - } - - // Check if the span state has changed, if so we must re-render the next line - // This check may seem utterly complicated but I didn't want to introduce any function calls - // or allocations here for perf reasons. - if(currentLine.HighlightSpanStack != currentSpanStack) { - if (currentLine.HighlightSpanStack == null) { - processNextLine = false; - foreach (Span sp in currentSpanStack) { - if (!sp.StopEOL) { - spanChanged = true; - processNextLine = true; - break; - } - } - } else if (currentSpanStack == null) { - processNextLine = false; - foreach (Span sp in currentLine.HighlightSpanStack) { - if (!sp.StopEOL) { - spanChanged = true; - processNextLine = true; - break; - } - } - } else { - SpanStack.Enumerator e1 = currentSpanStack.GetEnumerator(); - SpanStack.Enumerator e2 = currentLine.HighlightSpanStack.GetEnumerator(); - bool done = false; - while (!done) { - bool blockSpanIn1 = false; - while (e1.MoveNext()) { - if (!((Span)e1.Current).StopEOL) { - blockSpanIn1 = true; - break; - } - } - bool blockSpanIn2 = false; - while (e2.MoveNext()) { - if (!((Span)e2.Current).StopEOL) { - blockSpanIn2 = true; - break; - } - } - if (blockSpanIn1 || blockSpanIn2) { - if (blockSpanIn1 && blockSpanIn2) { - if (e1.Current != e2.Current) { - done = true; - processNextLine = true; - spanChanged = true; - } - } else { - spanChanged = true; - done = true; - processNextLine = true; - } - } else { - done = true; - processNextLine = false; - } - } - } - } else { - processNextLine = false; - } - - //// Alex: remove old words - if (currentLine.Words!=null) currentLine.Words.Clear(); - currentLine.Words = words; - currentLine.HighlightSpanStack = (currentSpanStack != null && !currentSpanStack.IsEmpty) ? currentSpanStack : null; - - return processNextLine; - } - - public virtual void MarkTokens(IDocument document, List inputLines) - { - if (Rules.Count == 0) { - return; - } - - Dictionary processedLines = new Dictionary(); - - bool spanChanged = false; - int documentLineSegmentCount = document.LineSegmentCollection.Count; - - foreach (LineSegment lineToProcess in inputLines) { - if (!processedLines.ContainsKey(lineToProcess)) { - int lineNumber = lineToProcess.LineNumber; - bool processNextLine = true; - - if (lineNumber != -1) { - while (processNextLine && lineNumber < documentLineSegmentCount) { - processNextLine = MarkTokensInLine(document, lineNumber, ref spanChanged); - processedLines[currentLine] = true; - ++lineNumber; - } - } - } - } - - if (spanChanged || inputLines.Count > 20) { - // if the span was changed (more than inputLines lines had to be reevaluated) - // or if there are many lines in inputLines, it's faster to update the whole - // text area instead of many small segments - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - } else { -// document.Caret.ValidateCaretPos(); -// document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, document.GetLineNumberForOffset(document.Caret.Offset))); -// - foreach (LineSegment lineToProcess in inputLines) { - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, lineToProcess.LineNumber)); - } - - } - document.CommitUpdate(); - currentLine = null; - } - - // Span state variables - protected bool inSpan; - protected Span activeSpan; - protected HighlightRuleSet activeRuleSet; - - // Line scanning state variables - protected int currentOffset; - protected int currentLength; - - void UpdateSpanStateVariables() - { - inSpan = (currentSpanStack != null && !currentSpanStack.IsEmpty); - activeSpan = inSpan ? currentSpanStack.Peek() : null; - activeRuleSet = GetRuleSet(activeSpan); - } - - List ParseLine(IDocument document) - { - List words = new List(); - HighlightColor markNext = null; - - currentOffset = 0; - currentLength = 0; - UpdateSpanStateVariables(); - - int currentLineLength = currentLine.Length; - int currentLineOffset = currentLine.Offset; - - for (int i = 0; i < currentLineLength; ++i) { - char ch = document.GetCharAt(currentLineOffset + i); - switch (ch) { - case '\n': - case '\r': - PushCurWord(document, ref markNext, words); - ++currentOffset; - break; - case ' ': - PushCurWord(document, ref markNext, words); - if (activeSpan != null && activeSpan.Color.HasBackground) { - words.Add(new TextWord.SpaceTextWord(activeSpan.Color)); - } else { - words.Add(TextWord.Space); - } - ++currentOffset; - break; - case '\t': - PushCurWord(document, ref markNext, words); - if (activeSpan != null && activeSpan.Color.HasBackground) { - words.Add(new TextWord.TabTextWord(activeSpan.Color)); - } else { - words.Add(TextWord.Tab); - } - ++currentOffset; - break; - default: - { - // handle escape characters - char escapeCharacter = '\0'; - if (activeSpan != null && activeSpan.EscapeCharacter != '\0') { - escapeCharacter = activeSpan.EscapeCharacter; - } else if (activeRuleSet != null) { - escapeCharacter = activeRuleSet.EscapeCharacter; - } - if (escapeCharacter != '\0' && escapeCharacter == ch) { - // we found the escape character - if (activeSpan != null && activeSpan.End != null && activeSpan.End.Length == 1 - && escapeCharacter == activeSpan.End[0]) - { - // the escape character is a end-doubling escape character - // it may count as escape only when the next character is the escape, too - if (i + 1 < currentLineLength) { - if (document.GetCharAt(currentLineOffset + i + 1) == escapeCharacter) { - currentLength += 2; - PushCurWord(document, ref markNext, words); - ++i; - continue; - } - } - } else { - // this is a normal \-style escape - ++currentLength; - if (i + 1 < currentLineLength) { - ++currentLength; - } - PushCurWord(document, ref markNext, words); - ++i; - continue; - } - } - - // highlight digits - if (!inSpan && (Char.IsDigit(ch) || (ch == '.' && i + 1 < currentLineLength && Char.IsDigit(document.GetCharAt(currentLineOffset + i + 1)))) && currentLength == 0) { - bool ishex = false; - bool isfloatingpoint = false; - - if (ch == '0' && i + 1 < currentLineLength && Char.ToUpper(document.GetCharAt(currentLineOffset + i + 1)) == 'X') { // hex digits - const string hex = "0123456789ABCDEF"; - ++currentLength; - ++i; // skip 'x' - ++currentLength; - ishex = true; - while (i + 1 < currentLineLength && hex.IndexOf(Char.ToUpper(document.GetCharAt(currentLineOffset + i + 1))) != -1) { - ++i; - ++currentLength; - } - } else { - ++currentLength; - while (i + 1 < currentLineLength && Char.IsDigit(document.GetCharAt(currentLineOffset + i + 1))) { - ++i; - ++currentLength; - } - } - if (!ishex && i + 1 < currentLineLength && document.GetCharAt(currentLineOffset + i + 1) == '.') { - isfloatingpoint = true; - ++i; - ++currentLength; - while (i + 1 < currentLineLength && Char.IsDigit(document.GetCharAt(currentLineOffset + i + 1))) { - ++i; - ++currentLength; - } - } - - if (i + 1 < currentLineLength && Char.ToUpper(document.GetCharAt(currentLineOffset + i + 1)) == 'E') { - isfloatingpoint = true; - ++i; - ++currentLength; - if (i + 1 < currentLineLength && (document.GetCharAt(currentLineOffset + i + 1) == '+' || document.GetCharAt(currentLine.Offset + i + 1) == '-')) { - ++i; - ++currentLength; - } - while (i + 1 < currentLine.Length && Char.IsDigit(document.GetCharAt(currentLineOffset + i + 1))) { - ++i; - ++currentLength; - } - } - - if (i + 1 < currentLine.Length) { - char nextch = Char.ToUpper(document.GetCharAt(currentLineOffset + i + 1)); - if (nextch == 'F' || nextch == 'M' || nextch == 'D') { - isfloatingpoint = true; - ++i; - ++currentLength; - } - } - - if (!isfloatingpoint) { - bool isunsigned = false; - if (i + 1 < currentLineLength && Char.ToUpper(document.GetCharAt(currentLineOffset + i + 1)) == 'U') { - ++i; - ++currentLength; - isunsigned = true; - } - if (i + 1 < currentLineLength && Char.ToUpper(document.GetCharAt(currentLineOffset + i + 1)) == 'L') { - ++i; - ++currentLength; - if (!isunsigned && i + 1 < currentLineLength && Char.ToUpper(document.GetCharAt(currentLineOffset + i + 1)) == 'U') { - ++i; - ++currentLength; - } - } - } - - words.Add(new TextWord(document, currentLine, currentOffset, currentLength, DigitColor, false)); - currentOffset += currentLength; - currentLength = 0; - continue; - } - - // Check for SPAN ENDs - if (inSpan) { - if (activeSpan.End != null && activeSpan.End.Length > 0) { - if (MatchExpr(currentLine, activeSpan.End, i, document, activeSpan.IgnoreCase)) { - PushCurWord(document, ref markNext, words); - string regex = GetRegString(currentLine, activeSpan.End, i, document); - currentLength += regex.Length; - words.Add(new TextWord(document, currentLine, currentOffset, currentLength, activeSpan.EndColor, false)); - currentOffset += currentLength; - currentLength = 0; - i += regex.Length - 1; - currentSpanStack.Pop(); - UpdateSpanStateVariables(); - continue; - } - } - } - - // check for SPAN BEGIN - if (activeRuleSet != null) { - foreach (Span span in activeRuleSet.Spans) { - if ((!span.IsBeginSingleWord || currentLength == 0) - && (!span.IsBeginStartOfLine.HasValue || span.IsBeginStartOfLine.Value == (currentLength == 0 && words.TrueForAll(delegate(TextWord textWord) { return textWord.Type != TextWordType.Word; }))) - && MatchExpr(currentLine, span.Begin, i, document, activeRuleSet.IgnoreCase)) { - PushCurWord(document, ref markNext, words); - string regex = GetRegString(currentLine, span.Begin, i, document); - - if (!OverrideSpan(regex, document, words, span, ref i)) { - currentLength += regex.Length; - words.Add(new TextWord(document, currentLine, currentOffset, currentLength, span.BeginColor, false)); - currentOffset += currentLength; - currentLength = 0; - - i += regex.Length - 1; - if (currentSpanStack == null) { - currentSpanStack = new SpanStack(); - } - currentSpanStack.Push(span); - span.IgnoreCase = activeRuleSet.IgnoreCase; - - UpdateSpanStateVariables(); - } - - goto skip; - } - } - } - - // check if the char is a delimiter - if (activeRuleSet != null && (int)ch < 256 && activeRuleSet.Delimiters[(int)ch]) { - PushCurWord(document, ref markNext, words); - if (currentOffset + currentLength +1 < currentLine.Length) { - ++currentLength; - PushCurWord(document, ref markNext, words); - goto skip; - } - } - - ++currentLength; - skip: continue; - } - } - } - - PushCurWord(document, ref markNext, words); - - OnParsedLine(document, currentLine, words); - - return words; - } - - protected virtual void OnParsedLine(IDocument document, LineSegment currentLine, List words) - { - } - - protected virtual bool OverrideSpan(string spanBegin, IDocument document, List words, Span span, ref int lineOffset) - { - return false; - } - - /// - /// pushes the curWord string on the word list, with the - /// correct color. - /// - void PushCurWord(IDocument document, ref HighlightColor markNext, List words) - { - // Svante Lidman : Need to look through the next prev logic. - if (currentLength > 0) { - if (words.Count > 0 && activeRuleSet != null) { - TextWord prevWord = null; - int pInd = words.Count - 1; - while (pInd >= 0) { - if (!((TextWord)words[pInd]).IsWhiteSpace) { - prevWord = (TextWord)words[pInd]; - if (prevWord.HasDefaultColor) { - PrevMarker marker = (PrevMarker)activeRuleSet.PrevMarkers[document, currentLine, currentOffset, currentLength]; - if (marker != null) { - prevWord.SyntaxColor = marker.Color; -// document.Caret.ValidateCaretPos(); -// document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, document.GetLineNumberForOffset(document.Caret.Offset))); - } - } - break; - } - pInd--; - } - } - - if (inSpan) { - HighlightColor c = null; - bool hasDefaultColor = true; - if (activeSpan.Rule == null) { - c = activeSpan.Color; - } else { - c = GetColor(activeRuleSet, document, currentLine, currentOffset, currentLength); - hasDefaultColor = false; - } - - if (c == null) { - c = activeSpan.Color; - if (c.Color == Color.Transparent) { - c = this.DefaultTextColor; - } - hasDefaultColor = true; - } - words.Add(new TextWord(document, currentLine, currentOffset, currentLength, markNext != null ? markNext : c, hasDefaultColor)); - } else { - HighlightColor c = markNext != null ? markNext : GetColor(activeRuleSet, document, currentLine, currentOffset, currentLength); - if (c == null) { - words.Add(new TextWord(document, currentLine, currentOffset, currentLength, this.DefaultTextColor, true)); - } else { - words.Add(new TextWord(document, currentLine, currentOffset, currentLength, c, false)); - } - } - - if (activeRuleSet != null) { - NextMarker nextMarker = (NextMarker)activeRuleSet.NextMarkers[document, currentLine, currentOffset, currentLength]; - if (nextMarker != null) { - if (nextMarker.MarkMarker && words.Count > 0) { - TextWord prevword = ((TextWord)words[words.Count - 1]); - prevword.SyntaxColor = nextMarker.Color; - } - markNext = nextMarker.Color; - } else { - markNext = null; - } - } - currentOffset += currentLength; - currentLength = 0; - } - } - - #region Matching - /// - /// get the string, which matches the regular expression expr, - /// in string s2 at index - /// - static string GetRegString(LineSegment lineSegment, char[] expr, int index, IDocument document) - { - int j = 0; - StringBuilder regexpr = new StringBuilder(); - - for (int i = 0; i < expr.Length; ++i, ++j) { - if (index + j >= lineSegment.Length) - break; - - switch (expr[i]) { - case '@': // "special" meaning - ++i; - switch (expr[i]) { - case '!': // don't match the following expression - StringBuilder whatmatch = new StringBuilder(); - ++i; - while (i < expr.Length && expr[i] != '@') { - whatmatch.Append(expr[i++]); - } - break; - case '@': // matches @ - regexpr.Append(document.GetCharAt(lineSegment.Offset + index + j)); - break; - } - break; - default: - if (expr[i] != document.GetCharAt(lineSegment.Offset + index + j)) { - return regexpr.ToString(); - } - regexpr.Append(document.GetCharAt(lineSegment.Offset + index + j)); - break; - } - } - return regexpr.ToString(); - } - - /// - /// returns true, if the get the string s2 at index matches the expression expr - /// - static bool MatchExpr(LineSegment lineSegment, char[] expr, int index, IDocument document, bool ignoreCase) - { - for (int i = 0, j = 0; i < expr.Length; ++i, ++j) { - switch (expr[i]) { - case '@': // "special" meaning - ++i; - if (i < expr.Length) { - switch (expr[i]) { - case 'C': // match whitespace or punctuation - if (index + j == lineSegment.Offset || index + j >= lineSegment.Offset + lineSegment.Length) { - // nothing (EOL or SOL) - } else { - char ch = document.GetCharAt(lineSegment.Offset + index + j); - if (!Char.IsWhiteSpace(ch) && !Char.IsPunctuation(ch)) { - return false; - } - } - break; - case '!': // don't match the following expression - { - StringBuilder whatmatch = new StringBuilder(); - ++i; - while (i < expr.Length && expr[i] != '@') { - whatmatch.Append(expr[i++]); - } - if (lineSegment.Offset + index + j + whatmatch.Length < document.TextLength) { - int k = 0; - for (; k < whatmatch.Length; ++k) { - char docChar = ignoreCase ? Char.ToUpperInvariant(document.GetCharAt(lineSegment.Offset + index + j + k)) : document.GetCharAt(lineSegment.Offset + index + j + k); - char spanChar = ignoreCase ? Char.ToUpperInvariant(whatmatch[k]) : whatmatch[k]; - if (docChar != spanChar) { - break; - } - } - if (k >= whatmatch.Length) { - return false; - } - } -// --j; - break; - } - case '-': // don't match the expression before - { - StringBuilder whatmatch = new StringBuilder(); - ++i; - while (i < expr.Length && expr[i] != '@') { - whatmatch.Append(expr[i++]); - } - if (index - whatmatch.Length >= 0) { - int k = 0; - for (; k < whatmatch.Length; ++k) { - char docChar = ignoreCase ? Char.ToUpperInvariant(document.GetCharAt(lineSegment.Offset + index - whatmatch.Length + k)) : document.GetCharAt(lineSegment.Offset + index - whatmatch.Length + k); - char spanChar = ignoreCase ? Char.ToUpperInvariant(whatmatch[k]) : whatmatch[k]; - if (docChar != spanChar) - break; - } - if (k >= whatmatch.Length) { - return false; - } - } -// --j; - break; - } - case '@': // matches @ - if (index + j >= lineSegment.Length || '@' != document.GetCharAt(lineSegment.Offset + index + j)) { - return false; - } - break; - } - } - break; - default: - { - if (index + j >= lineSegment.Length) { - return false; - } - char docChar = ignoreCase ? Char.ToUpperInvariant(document.GetCharAt(lineSegment.Offset + index + j)) : document.GetCharAt(lineSegment.Offset + index + j); - char spanChar = ignoreCase ? Char.ToUpperInvariant(expr[i]) : expr[i]; - if (docChar != spanChar) { - return false; - } - break; - } - } - } - return true; - } - #endregion - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/FontContainer.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/FontContainer.cs deleted file mode 100644 index 1e6f7fa..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/FontContainer.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// -// -// -// $Revision: 3358 $ -// - -using System; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This class is used to generate bold, italic and bold/italic fonts out - /// of a base font. - /// - public class FontContainer - { - Font defaultFont; - Font regularfont, boldfont, italicfont, bolditalicfont; - - /// - /// The scaled, regular version of the base font - /// - public Font RegularFont { - get { - return regularfont; - } - } - - /// - /// The scaled, bold version of the base font - /// - public Font BoldFont { - get { - return boldfont; - } - } - - /// - /// The scaled, italic version of the base font - /// - public Font ItalicFont { - get { - return italicfont; - } - } - - /// - /// The scaled, bold/italic version of the base font - /// - public Font BoldItalicFont { - get { - return bolditalicfont; - } - } - - static float twipsPerPixelY; - - public static float TwipsPerPixelY { - get { - if (twipsPerPixelY == 0) { - using (Bitmap bmp = new Bitmap(1,1)) { - using (Graphics g = Graphics.FromImage(bmp)) { - twipsPerPixelY = 1440 / g.DpiY; - } - } - } - return twipsPerPixelY; - } - } - - /// - /// The base font - /// - public Font DefaultFont { - get { - return defaultFont; - } - set { - // 1440 twips is one inch - float pixelSize = (float)Math.Round(value.SizeInPoints * 20 / TwipsPerPixelY); - - defaultFont = value; - regularfont = new Font(value.FontFamily, pixelSize * TwipsPerPixelY / 20f, FontStyle.Regular); - boldfont = new Font(regularfont, FontStyle.Bold); - italicfont = new Font(regularfont, FontStyle.Italic); - bolditalicfont = new Font(regularfont, FontStyle.Bold | FontStyle.Italic); - } - } - - public static Font ParseFont(string font) - { - string[] descr = font.Split(new char[]{',', '='}); - return new Font(descr[1], Single.Parse(descr[3])); - } - - public FontContainer(Font defaultFont) - { - this.DefaultFont = defaultFont; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightBackground.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightBackground.cs deleted file mode 100644 index d1c69ea..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightBackground.cs +++ /dev/null @@ -1,51 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Drawing; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Extens the highlighting color with a background image. - /// - public class HighlightBackground : HighlightColor - { - Image backgroundImage; - - /// - /// The image used as background - /// - public Image BackgroundImage { - get { - return backgroundImage; - } - } - - /// - /// Creates a new instance of - /// - public HighlightBackground(XmlElement el) : base(el) - { - if (el.Attributes["image"] != null) { - backgroundImage = new Bitmap(el.Attributes["image"].InnerText); - } - } - - /// - /// Creates a new instance of - /// - public HighlightBackground(Color color, Color backgroundcolor, bool bold, bool italic) : base(color, backgroundcolor, bold, italic) - { - } - - public HighlightBackground(string systemColor, string systemBackgroundColor, bool bold, bool italic) : base(systemColor, systemBackgroundColor, bold, italic) - { - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightColor.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightColor.cs deleted file mode 100644 index 3ddcfd7..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightColor.cs +++ /dev/null @@ -1,280 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Diagnostics; -using System.Drawing; -using System.Globalization; -using System.Reflection; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// A color used for highlighting - /// - public class HighlightColor - { - bool systemColor = false; - string systemColorName = null; - - bool systemBgColor = false; - string systemBgColorName = null; - - Color color; - Color backgroundcolor = System.Drawing.Color.WhiteSmoke; - - bool bold = false; - bool italic = false; - bool hasForeground = false; - bool hasBackground = false; - - public bool HasForeground { - get { - return hasForeground; - } - } - - public bool HasBackground { - get { - return hasBackground; - } - } - - - /// - /// If true the font will be displayed bold style - /// - public bool Bold { - get { - return bold; - } - } - - /// - /// If true the font will be displayed italic style - /// - public bool Italic { - get { - return italic; - } - } - - /// - /// The background color used - /// - public Color BackgroundColor { - get { - if (!systemBgColor) { - return backgroundcolor; - } - return ParseColorString(systemBgColorName); - } - } - - /// - /// The foreground color used - /// - public Color Color { - get { - if (!systemColor) { - return color; - } - return ParseColorString(systemColorName); - } - } - - /// - /// The font used - /// - public Font GetFont(FontContainer fontContainer) - { - if (Bold) { - return Italic ? fontContainer.BoldItalicFont : fontContainer.BoldFont; - } - return Italic ? fontContainer.ItalicFont : fontContainer.RegularFont; - } - - Color ParseColorString(string colorName) - { - string[] cNames = colorName.Split('*'); - PropertyInfo myPropInfo = typeof(System.Drawing.SystemColors).GetProperty(cNames[0], BindingFlags.Public | - BindingFlags.Instance | - BindingFlags.Static); - Color c = (Color)myPropInfo.GetValue(null, null); - - if (cNames.Length == 2) { - // hack : can't figure out how to parse doubles with '.' (culture info might set the '.' to ',') - double factor = Double.Parse(cNames[1]) / 100; - c = Color.FromArgb((int)((double)c.R * factor), (int)((double)c.G * factor), (int)((double)c.B * factor)); - } - - return c; - } - - /// - /// Creates a new instance of - /// - public HighlightColor(XmlElement el) - { - Debug.Assert(el != null, "ICSharpCode.TextEditor.Document.SyntaxColor(XmlElement el) : el == null"); - if (el.Attributes["bold"] != null) { - bold = Boolean.Parse(el.Attributes["bold"].InnerText); - } - - if (el.Attributes["italic"] != null) { - italic = Boolean.Parse(el.Attributes["italic"].InnerText); - } - - if (el.Attributes["color"] != null) { - string c = el.Attributes["color"].InnerText; - if (c[0] == '#') { - color = ParseColor(c); - } else if (c.StartsWith("SystemColors.")) { - systemColor = true; - systemColorName = c.Substring("SystemColors.".Length); - } else { - color = (Color)(Color.GetType()).InvokeMember(c, BindingFlags.GetProperty, null, Color, new object[0]); - } - hasForeground = true; - } else { - color = Color.Transparent; // to set it to the default value. - } - - if (el.Attributes["bgcolor"] != null) { - string c = el.Attributes["bgcolor"].InnerText; - if (c[0] == '#') { - backgroundcolor = ParseColor(c); - } else if (c.StartsWith("SystemColors.")) { - systemBgColor = true; - systemBgColorName = c.Substring("SystemColors.".Length); - } else { - backgroundcolor = (Color)(Color.GetType()).InvokeMember(c, BindingFlags.GetProperty, null, Color, new object[0]); - } - hasBackground = true; - } - } - - /// - /// Creates a new instance of - /// - public HighlightColor(XmlElement el, HighlightColor defaultColor) - { - Debug.Assert(el != null, "ICSharpCode.TextEditor.Document.SyntaxColor(XmlElement el) : el == null"); - if (el.Attributes["bold"] != null) { - bold = Boolean.Parse(el.Attributes["bold"].InnerText); - } else { - bold = defaultColor.Bold; - } - - if (el.Attributes["italic"] != null) { - italic = Boolean.Parse(el.Attributes["italic"].InnerText); - } else { - italic = defaultColor.Italic; - } - - if (el.Attributes["color"] != null) { - string c = el.Attributes["color"].InnerText; - if (c[0] == '#') { - color = ParseColor(c); - } else if (c.StartsWith("SystemColors.")) { - systemColor = true; - systemColorName = c.Substring("SystemColors.".Length); - } else { - color = (Color)(Color.GetType()).InvokeMember(c, BindingFlags.GetProperty, null, Color, new object[0]); - } - hasForeground = true; - } else { - color = defaultColor.color; - } - - if (el.Attributes["bgcolor"] != null) { - string c = el.Attributes["bgcolor"].InnerText; - if (c[0] == '#') { - backgroundcolor = ParseColor(c); - } else if (c.StartsWith("SystemColors.")) { - systemBgColor = true; - systemBgColorName = c.Substring("SystemColors.".Length); - } else { - backgroundcolor = (Color)(Color.GetType()).InvokeMember(c, BindingFlags.GetProperty, null, Color, new object[0]); - } - hasBackground = true; - } else { - backgroundcolor = defaultColor.BackgroundColor; - } - } - - /// - /// Creates a new instance of - /// - public HighlightColor(Color color, bool bold, bool italic) - { - hasForeground = true; - this.color = color; - this.bold = bold; - this.italic = italic; - } - - /// - /// Creates a new instance of - /// - public HighlightColor(Color color, Color backgroundcolor, bool bold, bool italic) - { - hasForeground = true; - hasBackground = true; - this.color = color; - this.backgroundcolor = backgroundcolor; - this.bold = bold; - this.italic = italic; - } - - - /// - /// Creates a new instance of - /// - public HighlightColor(string systemColor, string systemBackgroundColor, bool bold, bool italic) - { - hasForeground = true; - hasBackground = true; - - this.systemColor = true; - systemColorName = systemColor; - - systemBgColor = true; - systemBgColorName = systemBackgroundColor; - - this.bold = bold; - this.italic = italic; - } - - static Color ParseColor(string c) - { - int a = 255; - int offset = 0; - if (c.Length > 7) { - offset = 2; - a = Int32.Parse(c.Substring(1,2), NumberStyles.HexNumber); - } - - int r = Int32.Parse(c.Substring(1 + offset,2), NumberStyles.HexNumber); - int g = Int32.Parse(c.Substring(3 + offset,2), NumberStyles.HexNumber); - int b = Int32.Parse(c.Substring(5 + offset,2), NumberStyles.HexNumber); - return Color.FromArgb(a, r, g, b); - } - - /// - /// Converts a instance to string (for debug purposes) - /// - public override string ToString() - { - return "[HighlightColor: Bold = " + Bold + - ", Italic = " + Italic + - ", Color = " + Color + - ", BackgroundColor = " + BackgroundColor + "]"; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightInfo.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightInfo.cs deleted file mode 100644 index f307ed4..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightInfo.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - public class HighlightInfo - { - public bool BlockSpanOn = false; - public bool Span = false; - public Span CurSpan = null; - - public HighlightInfo(Span curSpan, bool span, bool blockSpanOn) - { - this.CurSpan = curSpan; - this.Span = span; - this.BlockSpanOn = blockSpanOn; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightRuleSet.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightRuleSet.cs deleted file mode 100644 index f15f9c8..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightRuleSet.cs +++ /dev/null @@ -1,182 +0,0 @@ -// -// -// -// -// $Revision: 3036 $ -// - -using System; -using System.Collections; -using System.Xml; - -using ICSharpCode.TextEditor.Util; - -namespace ICSharpCode.TextEditor.Document -{ - public class HighlightRuleSet - { - LookupTable keyWords; - ArrayList spans = new ArrayList(); - LookupTable prevMarkers; - LookupTable nextMarkers; - char escapeCharacter; - - bool ignoreCase = false; - string name = null; - - bool[] delimiters = new bool[256]; - - string reference = null; - - public ArrayList Spans { - get { - return spans; - } - } - - internal IHighlightingStrategyUsingRuleSets Highlighter; - - public LookupTable KeyWords { - get { - return keyWords; - } - } - - public LookupTable PrevMarkers { - get { - return prevMarkers; - } - } - - public LookupTable NextMarkers { - get { - return nextMarkers; - } - } - - public bool[] Delimiters { - get { - return delimiters; - } - } - - public char EscapeCharacter { - get { - return escapeCharacter; - } - } - - public bool IgnoreCase { - get { - return ignoreCase; - } - } - - public string Name { - get { - return name; - } - set { - name = value; - } - } - - public string Reference { - get { - return reference; - } - } - - public HighlightRuleSet() - { - keyWords = new LookupTable(false); - prevMarkers = new LookupTable(false); - nextMarkers = new LookupTable(false); - } - - public HighlightRuleSet(XmlElement el) - { - XmlNodeList nodes; - - if (el.Attributes["name"] != null) { - Name = el.Attributes["name"].InnerText; - } - - if (el.HasAttribute("escapecharacter")) { - escapeCharacter = el.GetAttribute("escapecharacter")[0]; - } - - if (el.Attributes["reference"] != null) { - reference = el.Attributes["reference"].InnerText; - } - - if (el.Attributes["ignorecase"] != null) { - ignoreCase = Boolean.Parse(el.Attributes["ignorecase"].InnerText); - } - - for (int i = 0; i < Delimiters.Length; ++i) { - delimiters[i] = false; - } - - if (el["Delimiters"] != null) { - string delimiterString = el["Delimiters"].InnerText; - foreach (char ch in delimiterString) { - delimiters[(int)ch] = true; - } - } - -// Spans = new LookupTable(!IgnoreCase); - - keyWords = new LookupTable(!IgnoreCase); - prevMarkers = new LookupTable(!IgnoreCase); - nextMarkers = new LookupTable(!IgnoreCase); - - nodes = el.GetElementsByTagName("KeyWords"); - foreach (XmlElement el2 in nodes) { - HighlightColor color = new HighlightColor(el2); - - XmlNodeList keys = el2.GetElementsByTagName("Key"); - foreach (XmlElement node in keys) { - keyWords[node.Attributes["word"].InnerText] = color; - } - } - - nodes = el.GetElementsByTagName("Span"); - foreach (XmlElement el2 in nodes) { - Spans.Add(new Span(el2)); - /* - Span span = new Span(el2); - Spans[span.Begin] = span;*/ - } - - nodes = el.GetElementsByTagName("MarkPrevious"); - foreach (XmlElement el2 in nodes) { - PrevMarker prev = new PrevMarker(el2); - prevMarkers[prev.What] = prev; - } - - nodes = el.GetElementsByTagName("MarkFollowing"); - foreach (XmlElement el2 in nodes) { - NextMarker next = new NextMarker(el2); - nextMarkers[next.What] = next; - } - } - - /// - /// Merges spans etc. from the other rule set into this rule set. - /// - public void MergeFrom(HighlightRuleSet ruleSet) - { - for (int i = 0; i < delimiters.Length; i++) { - delimiters[i] |= ruleSet.delimiters[i]; - } - // insert merged spans in front of old spans - ArrayList oldSpans = spans; - spans = (ArrayList)ruleSet.spans.Clone(); - spans.AddRange(oldSpans); - //keyWords.MergeFrom(ruleSet.keyWords); - //prevMarkers.MergeFrom(ruleSet.prevMarkers); - //nextMarkers.MergeFrom(ruleSet.nextMarkers); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingColorNotFoundException.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingColorNotFoundException.cs deleted file mode 100644 index 1cbeb74..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingColorNotFoundException.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// -// -// -// $Revision: 1624 $ -// - -using System; -using System.Runtime.Serialization; - -namespace ICSharpCode.TextEditor.Document -{ - [Serializable()] - public class HighlightingColorNotFoundException : Exception - { - public HighlightingColorNotFoundException() : base() - { - } - - public HighlightingColorNotFoundException(string message) : base(message) - { - } - - public HighlightingColorNotFoundException(string message, Exception innerException) : base(message, innerException) - { - } - - protected HighlightingColorNotFoundException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionInvalidException.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionInvalidException.cs deleted file mode 100644 index 93d4786..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionInvalidException.cs +++ /dev/null @@ -1,37 +0,0 @@ -// -// -// -// -// $Revision: 2533 $ -// - -using System; -using System.Runtime.Serialization; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Indicates that the highlighting definition that was tried to load was invalid. - /// You get this exception only once per highlighting definition, after that the definition - /// is replaced with the default highlighter. - /// - [Serializable()] - public class HighlightingDefinitionInvalidException : Exception - { - public HighlightingDefinitionInvalidException() : base() - { - } - - public HighlightingDefinitionInvalidException(string message) : base(message) - { - } - - public HighlightingDefinitionInvalidException(string message, Exception innerException) : base(message, innerException) - { - } - - protected HighlightingDefinitionInvalidException(SerializationInfo info, StreamingContext context) : base(info, context) - { - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionParser.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionParser.cs deleted file mode 100644 index 8f7c7b2..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingDefinitionParser.cs +++ /dev/null @@ -1,110 +0,0 @@ -// -// -// -// -// $Revision: 2533 $ -// - -using System; -using System.Collections.Generic; -using System.IO; -using System.Text; -using System.Windows.Forms; -using System.Xml; -using System.Xml.Schema; - -namespace ICSharpCode.TextEditor.Document -{ - public static class HighlightingDefinitionParser - { - public static DefaultHighlightingStrategy Parse(SyntaxMode syntaxMode, XmlReader xmlReader) - { - return Parse(null, syntaxMode, xmlReader); - } - - public static DefaultHighlightingStrategy Parse(DefaultHighlightingStrategy highlighter, SyntaxMode syntaxMode, XmlReader xmlReader) - { - if (syntaxMode == null) - throw new ArgumentNullException("syntaxMode"); - if (xmlReader == null) - throw new ArgumentNullException("xmlTextReader"); - try { - List errors = null; - XmlReaderSettings settings = new XmlReaderSettings(); - Stream shemaStream = typeof(HighlightingDefinitionParser).Assembly.GetManifestResourceStream("ICSharpCode.TextEditor.Resources.Mode.xsd"); - settings.Schemas.Add("", new XmlTextReader(shemaStream)); - settings.Schemas.ValidationEventHandler += delegate(object sender, ValidationEventArgs args) { - if (errors == null) { - errors = new List(); - } - errors.Add(args); - }; - settings.ValidationType = ValidationType.Schema; - XmlReader validatingReader = XmlReader.Create(xmlReader, settings); - - XmlDocument doc = new XmlDocument(); - doc.Load(validatingReader); - - if (highlighter == null) - highlighter = new DefaultHighlightingStrategy(doc.DocumentElement.Attributes["name"].InnerText); - - if (doc.DocumentElement.HasAttribute("extends")) { - KeyValuePair entry = HighlightingManager.Manager.FindHighlighterEntry(doc.DocumentElement.GetAttribute("extends")); - if (entry.Key == null) { - throw new HighlightingDefinitionInvalidException("Cannot find referenced highlighting source " + doc.DocumentElement.GetAttribute("extends")); - } else { - highlighter = Parse(highlighter, entry.Key, entry.Value.GetSyntaxModeFile(entry.Key)); - if (highlighter == null) return null; - } - } - if (doc.DocumentElement.HasAttribute("extensions")) { - highlighter.Extensions = doc.DocumentElement.GetAttribute("extensions").Split(new char[] { ';', '|' }); - } - - XmlElement environment = doc.DocumentElement["Environment"]; - if (environment != null) { - foreach (XmlNode node in environment.ChildNodes) { - if (node is XmlElement) { - XmlElement el = (XmlElement)node; - if (el.Name == "Custom") { - highlighter.SetColorFor(el.GetAttribute("name"), el.HasAttribute("bgcolor") ? new HighlightBackground(el) : new HighlightColor(el)); - } else { - highlighter.SetColorFor(el.Name, el.HasAttribute("bgcolor") ? new HighlightBackground(el) : new HighlightColor(el)); - } - } - } - } - - // parse properties - if (doc.DocumentElement["Properties"]!= null) { - foreach (XmlElement propertyElement in doc.DocumentElement["Properties"].ChildNodes) { - highlighter.Properties[propertyElement.Attributes["name"].InnerText] = propertyElement.Attributes["value"].InnerText; - } - } - - if (doc.DocumentElement["Digits"]!= null) { - highlighter.DigitColor = new HighlightColor(doc.DocumentElement["Digits"]); - } - - XmlNodeList nodes = doc.DocumentElement.GetElementsByTagName("RuleSet"); - foreach (XmlElement element in nodes) { - highlighter.AddRuleSet(new HighlightRuleSet(element)); - } - - xmlReader.Close(); - - if (errors != null) { - StringBuilder msg = new StringBuilder(); - foreach (ValidationEventArgs args in errors) { - msg.AppendLine(args.Message); - } - throw new HighlightingDefinitionInvalidException(msg.ToString()); - } else { - return highlighter; - } - } catch (Exception e) { - throw new HighlightingDefinitionInvalidException("Could not load mode definition file '" + syntaxMode.FileName + "'.\n", e); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingManager.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingManager.cs deleted file mode 100644 index bb226aa..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingManager.cs +++ /dev/null @@ -1,166 +0,0 @@ -// -// -// -// -// $Revision: 3209 $ -// - -using System; -using System.Collections; -using System.Collections.Generic; -using System.IO; -using System.Diagnostics; - -namespace ICSharpCode.TextEditor.Document -{ - public class HighlightingManager - { - ArrayList syntaxModeFileProviders = new ArrayList(); - static HighlightingManager highlightingManager; - - // hash table from extension name to highlighting definition, - // OR from extension name to Pair SyntaxMode,ISyntaxModeFileProvider - Hashtable highlightingDefs = new Hashtable(); - - Hashtable extensionsToName = new Hashtable(); - - public Hashtable HighlightingDefinitions { - get { - return highlightingDefs; - } - } - - public static HighlightingManager Manager { - get { - return highlightingManager; - } - } - - static HighlightingManager() - { - highlightingManager = new HighlightingManager(); - highlightingManager.AddSyntaxModeFileProvider(new ResourceSyntaxModeProvider()); - } - - public HighlightingManager() - { - CreateDefaultHighlightingStrategy(); - } - - public void AddSyntaxModeFileProvider(ISyntaxModeFileProvider syntaxModeFileProvider) - { - foreach (SyntaxMode syntaxMode in syntaxModeFileProvider.SyntaxModes) { - highlightingDefs[syntaxMode.Name] = new DictionaryEntry(syntaxMode, syntaxModeFileProvider); - foreach (string extension in syntaxMode.Extensions) { - extensionsToName[extension.ToUpperInvariant()] = syntaxMode.Name; - } - } - if (!syntaxModeFileProviders.Contains(syntaxModeFileProvider)) { - syntaxModeFileProviders.Add(syntaxModeFileProvider); - } - } - - public void AddHighlightingStrategy(IHighlightingStrategy highlightingStrategy) - { - highlightingDefs[highlightingStrategy.Name] = highlightingStrategy; - foreach (string extension in highlightingStrategy.Extensions) - { - extensionsToName[extension.ToUpperInvariant()] = highlightingStrategy.Name; - } - } - - public void ReloadSyntaxModes() - { - highlightingDefs.Clear(); - extensionsToName.Clear(); - CreateDefaultHighlightingStrategy(); - foreach (ISyntaxModeFileProvider provider in syntaxModeFileProviders) { - provider.UpdateSyntaxModeList(); - AddSyntaxModeFileProvider(provider); - } - OnReloadSyntaxHighlighting(EventArgs.Empty); - } - - void CreateDefaultHighlightingStrategy() - { - DefaultHighlightingStrategy defaultHighlightingStrategy = new DefaultHighlightingStrategy(); - defaultHighlightingStrategy.Extensions = new string[] {}; - defaultHighlightingStrategy.Rules.Add(new HighlightRuleSet()); - highlightingDefs["Default"] = defaultHighlightingStrategy; - } - - IHighlightingStrategy LoadDefinition(DictionaryEntry entry) - { - SyntaxMode syntaxMode = (SyntaxMode)entry.Key; - ISyntaxModeFileProvider syntaxModeFileProvider = (ISyntaxModeFileProvider)entry.Value; - - DefaultHighlightingStrategy highlightingStrategy = null; - try { - var reader = syntaxModeFileProvider.GetSyntaxModeFile(syntaxMode); - if (reader == null) - throw new HighlightingDefinitionInvalidException("Could not get syntax mode file for " + syntaxMode.Name); - highlightingStrategy = HighlightingDefinitionParser.Parse(syntaxMode, reader); - if (highlightingStrategy.Name != syntaxMode.Name) { - throw new HighlightingDefinitionInvalidException("The name specified in the .xshd '" + highlightingStrategy.Name + "' must be equal the syntax mode name '" + syntaxMode.Name + "'"); - } - } finally { - if (highlightingStrategy == null) { - highlightingStrategy = DefaultHighlighting; - } - highlightingDefs[syntaxMode.Name] = highlightingStrategy; - highlightingStrategy.ResolveReferences(); - } - return highlightingStrategy; - } - - public DefaultHighlightingStrategy DefaultHighlighting { - get { - return (DefaultHighlightingStrategy)highlightingDefs["Default"]; - } - } - - internal KeyValuePair FindHighlighterEntry(string name) - { - foreach (ISyntaxModeFileProvider provider in syntaxModeFileProviders) { - foreach (SyntaxMode mode in provider.SyntaxModes) { - if (mode.Name == name) { - return new KeyValuePair(mode, provider); - } - } - } - return new KeyValuePair(null, null); - } - - public IHighlightingStrategy FindHighlighter(string name) - { - object def = highlightingDefs[name]; - if (def is DictionaryEntry) { - return LoadDefinition((DictionaryEntry)def); - } - return def == null ? DefaultHighlighting : (IHighlightingStrategy)def; - } - - public IHighlightingStrategy FindHighlighterForFile(string fileName) - { - string highlighterName = (string)extensionsToName[Path.GetExtension(fileName).ToUpperInvariant()]; - if (highlighterName != null) { - object def = highlightingDefs[highlighterName]; - if (def is DictionaryEntry) { - return LoadDefinition((DictionaryEntry)def); - } - return def == null ? DefaultHighlighting : (IHighlightingStrategy)def; - } else { - return DefaultHighlighting; - } - } - - protected virtual void OnReloadSyntaxHighlighting(EventArgs e) - { - if (ReloadSyntaxHighlighting != null) { - ReloadSyntaxHighlighting(this, e); - } - } - - public event EventHandler ReloadSyntaxHighlighting; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingStrategyFactory.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingStrategyFactory.cs deleted file mode 100644 index 90fe485..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/HighlightingStrategyFactory.cs +++ /dev/null @@ -1,38 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - public class HighlightingStrategyFactory - { - public static IHighlightingStrategy CreateHighlightingStrategy() - { - return (IHighlightingStrategy)HighlightingManager.Manager.HighlightingDefinitions["Default"]; - } - - public static IHighlightingStrategy CreateHighlightingStrategy(string name) - { - IHighlightingStrategy highlightingStrategy = HighlightingManager.Manager.FindHighlighter(name); - - if (highlightingStrategy == null) { - return CreateHighlightingStrategy(); - } - return highlightingStrategy; - } - - public static IHighlightingStrategy CreateHighlightingStrategyForFile(string fileName) - { - IHighlightingStrategy highlightingStrategy = HighlightingManager.Manager.FindHighlighterForFile(fileName); - if (highlightingStrategy == null) { - return CreateHighlightingStrategy(); - } - return highlightingStrategy; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/IHighlightingStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/IHighlightingStrategy.cs deleted file mode 100644 index e7e3318..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/IHighlightingStrategy.cs +++ /dev/null @@ -1,67 +0,0 @@ -// -// -// -// -// $Revision: 3037 $ -// - -using System; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// A highlighting strategy for a buffer. - /// - public interface IHighlightingStrategy - { - /// - /// The name of the highlighting strategy, must be unique - /// - string Name { - get; - } - - /// - /// The file extenstions on which this highlighting strategy gets - /// used - /// - string[] Extensions { - get; - } - - Dictionary Properties { - get; - } - - // returns special color. (BackGround Color, Cursor Color and so on) - - /// - /// Gets the color of an Environment element. - /// - HighlightColor GetColorFor(string name); - - /// - /// Used internally, do not call - /// - void MarkTokens(IDocument document, List lines); - - /// - /// Used internally, do not call - /// - void MarkTokens(IDocument document); - } - - public interface IHighlightingStrategyUsingRuleSets : IHighlightingStrategy - { - /// - /// Used internally, do not call - /// - HighlightRuleSet GetRuleSet(Span span); - - /// - /// Used internally, do not call - /// - HighlightColor GetColor(IDocument document, LineSegment keyWord, int index, int length); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/NextMarker.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/NextMarker.cs deleted file mode 100644 index de58710..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/NextMarker.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Used for mark next token - /// - public class NextMarker - { - string what; - HighlightColor color; - bool markMarker = false; - - /// - /// String value to indicate to mark next token - /// - public string What { - get { - return what; - } - } - - /// - /// Color for marking next token - /// - public HighlightColor Color { - get { - return color; - } - } - - /// - /// If true the indication text will be marked with the same color - /// too - /// - public bool MarkMarker { - get { - return markMarker; - } - } - - /// - /// Creates a new instance of - /// - public NextMarker(XmlElement mark) - { - color = new HighlightColor(mark); - what = mark.InnerText; - if (mark.Attributes["markmarker"] != null) { - markMarker = Boolean.Parse(mark.Attributes["markmarker"].InnerText); - } - } - } - -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/PrevMarker.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/PrevMarker.cs deleted file mode 100644 index c6ece0d..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/PrevMarker.cs +++ /dev/null @@ -1,63 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Used for mark previous token - /// - public class PrevMarker - { - string what; - HighlightColor color; - bool markMarker = false; - - /// - /// String value to indicate to mark previous token - /// - public string What { - get { - return what; - } - } - - /// - /// Color for marking previous token - /// - public HighlightColor Color { - get { - return color; - } - } - - /// - /// If true the indication text will be marked with the same color - /// too - /// - public bool MarkMarker { - get { - return markMarker; - } - } - - /// - /// Creates a new instance of - /// - public PrevMarker(XmlElement mark) - { - color = new HighlightColor(mark); - what = mark.InnerText; - if (mark.Attributes["markmarker"] != null) { - markMarker = Boolean.Parse(mark.Attributes["markmarker"].InnerText); - } - } - } - -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/Span.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/Span.cs deleted file mode 100644 index 5c98987..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/Span.cs +++ /dev/null @@ -1,157 +0,0 @@ -// -// -// -// -// $Revision: 2115 $ -// - -using System; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - public sealed class Span - { - bool stopEOL; - HighlightColor color; - HighlightColor beginColor; - HighlightColor endColor; - char[] begin; - char[] end; - string name; - string rule; - HighlightRuleSet ruleSet; - char escapeCharacter; - bool ignoreCase; - bool isBeginSingleWord; - bool? isBeginStartOfLine; - bool isEndSingleWord; - - internal HighlightRuleSet RuleSet { - get { - return ruleSet; - } - set { - ruleSet = value; - } - } - - public bool IgnoreCase { - get { - return ignoreCase; - } - set { - ignoreCase = value; - } - } - - public bool StopEOL { - get { - return stopEOL; - } - } - - public bool? IsBeginStartOfLine { - get { - return isBeginStartOfLine; - } - } - - public bool IsBeginSingleWord { - get { - return isBeginSingleWord; - } - } - - public bool IsEndSingleWord { - get { - return isEndSingleWord; - } - } - - public HighlightColor Color { - get { - return color; - } - } - - public HighlightColor BeginColor { - get { - if(beginColor != null) { - return beginColor; - } else { - return color; - } - } - } - - public HighlightColor EndColor { - get { - return endColor!=null ? endColor : color; - } - } - - public char[] Begin { - get { return begin; } - } - - public char[] End { - get { return end; } - } - - public string Name { - get { return name; } - } - - public string Rule { - get { return rule; } - } - - /// - /// Gets the escape character of the span. The escape character is a character that can be used in front - /// of the span end to make it not end the span. The escape character followed by another escape character - /// means the escape character was escaped like in @"a "" b" literals in C#. - /// The default value '\0' means no escape character is allowed. - /// - public char EscapeCharacter { - get { return escapeCharacter; } - } - - public Span(XmlElement span) - { - color = new HighlightColor(span); - - if (span.HasAttribute("rule")) { - rule = span.GetAttribute("rule"); - } - - if (span.HasAttribute("escapecharacter")) { - escapeCharacter = span.GetAttribute("escapecharacter")[0]; - } - - name = span.GetAttribute("name"); - if (span.HasAttribute("stopateol")) { - stopEOL = Boolean.Parse(span.GetAttribute("stopateol")); - } - - begin = span["Begin"].InnerText.ToCharArray(); - beginColor = new HighlightColor(span["Begin"], color); - - if (span["Begin"].HasAttribute("singleword")) { - this.isBeginSingleWord = Boolean.Parse(span["Begin"].GetAttribute("singleword")); - } - if (span["Begin"].HasAttribute("startofline")) { - this.isBeginStartOfLine = Boolean.Parse(span["Begin"].GetAttribute("startofline")); - } - - if (span["End"] != null) { - end = span["End"].InnerText.ToCharArray(); - endColor = new HighlightColor(span["End"], color); - if (span["End"].HasAttribute("singleword")) { - this.isEndSingleWord = Boolean.Parse(span["End"].GetAttribute("singleword")); - } - - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SpanStack.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SpanStack.cs deleted file mode 100644 index c0460e0..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SpanStack.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// -// -// -// $Revision: 1471 $ -// - -using System; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// A stack of Span instances. Works like Stack<Span>, but can be cloned quickly - /// because it is implemented as linked list. - /// - public sealed class SpanStack : ICloneable, IEnumerable - { - internal sealed class StackNode - { - public readonly StackNode Previous; - public readonly Span Data; - - public StackNode(StackNode previous, Span data) - { - this.Previous = previous; - this.Data = data; - } - } - - StackNode top = null; - - public Span Pop() - { - Span s = top.Data; - top = top.Previous; - return s; - } - - public Span Peek() - { - return top.Data; - } - - public void Push(Span s) - { - top = new StackNode(top, s); - } - - public bool IsEmpty { - get { - return top == null; - } - } - - public SpanStack Clone() - { - SpanStack n = new SpanStack(); - n.top = this.top; - return n; - } - object ICloneable.Clone() - { - return this.Clone(); - } - - public Enumerator GetEnumerator() - { - return new Enumerator(new StackNode(top, null)); - } - IEnumerator IEnumerable.GetEnumerator() - { - return this.GetEnumerator(); - } - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return this.GetEnumerator(); - } - - public struct Enumerator : IEnumerator - { - StackNode c; - - internal Enumerator(StackNode node) - { - c = node; - } - - public Span Current { - get { - return c.Data; - } - } - - object System.Collections.IEnumerator.Current { - get { - return c.Data; - } - } - - public void Dispose() - { - c = null; - } - - public bool MoveNext() - { - c = c.Previous; - return c != null; - } - - public void Reset() - { - throw new NotSupportedException(); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/FileSyntaxModeProvider.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/FileSyntaxModeProvider.cs deleted file mode 100644 index 9d02baf..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/FileSyntaxModeProvider.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// -// -// -// $Revision: 2533 $ -// - -using System; -using System.Collections.Generic; -using System.IO; -using System.Windows.Forms; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - public class FileSyntaxModeProvider : ISyntaxModeFileProvider - { - string directory; - List syntaxModes = null; - - public ICollection SyntaxModes { - get { - return syntaxModes; - } - } - - public FileSyntaxModeProvider(string directory) - { - this.directory = directory; - UpdateSyntaxModeList(); - } - - public void UpdateSyntaxModeList() - { - string syntaxModeFile = Path.Combine(directory, "SyntaxModes.xml"); - if (File.Exists(syntaxModeFile)) { - Stream s = File.OpenRead(syntaxModeFile); - syntaxModes = SyntaxMode.GetSyntaxModes(s); - s.Close(); - } else { - syntaxModes = ScanDirectory(directory); - } - } - - public XmlTextReader GetSyntaxModeFile(SyntaxMode syntaxMode) - { - string syntaxModeFile = Path.Combine(directory, syntaxMode.FileName); - if (!File.Exists(syntaxModeFile)) { - throw new HighlightingDefinitionInvalidException("Can't load highlighting definition " + syntaxModeFile + " (file not found)!"); - } - return new XmlTextReader(File.OpenRead(syntaxModeFile)); - } - - List ScanDirectory(string directory) - { - string[] files = Directory.GetFiles(directory); - List modes = new List(); - foreach (string file in files) { - if (Path.GetExtension(file).Equals(".XSHD", StringComparison.OrdinalIgnoreCase)) { - XmlTextReader reader = new XmlTextReader(file); - while (reader.Read()) { - if (reader.NodeType == XmlNodeType.Element) { - switch (reader.Name) { - case "SyntaxDefinition": - string name = reader.GetAttribute("name"); - string extensions = reader.GetAttribute("extensions"); - modes.Add(new SyntaxMode(Path.GetFileName(file), - name, - extensions)); - goto bailout; - default: - throw new HighlightingDefinitionInvalidException("Unknown root node in syntax highlighting file :" + reader.Name); - } - } - } - bailout: - reader.Close(); - - } - } - return modes; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ISyntaxModeFileProvider.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ISyntaxModeFileProvider.cs deleted file mode 100644 index 0093edf..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ISyntaxModeFileProvider.cs +++ /dev/null @@ -1,23 +0,0 @@ -// -// -// -// -// $Revision: 1301 $ -// - -using System; -using System.Collections.Generic; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - public interface ISyntaxModeFileProvider - { - ICollection SyntaxModes { - get; - } - - XmlTextReader GetSyntaxModeFile(SyntaxMode syntaxMode); - void UpdateSyntaxModeList(); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ResourceSyntaxModeProvider.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ResourceSyntaxModeProvider.cs deleted file mode 100644 index a6005fe..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/ResourceSyntaxModeProvider.cs +++ /dev/null @@ -1,48 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Collections.Generic; -using System.IO; -using System.Reflection; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - public class ResourceSyntaxModeProvider : ISyntaxModeFileProvider - { - List syntaxModes = null; - - public ICollection SyntaxModes { - get { - return syntaxModes; - } - } - - public ResourceSyntaxModeProvider() - { - Assembly assembly = typeof(SyntaxMode).Assembly; - Stream syntaxModeStream = assembly.GetManifestResourceStream("ICSharpCode.TextEditor.Resources.SyntaxModes.xml"); - if (syntaxModeStream != null) { - syntaxModes = SyntaxMode.GetSyntaxModes(syntaxModeStream); - } else { - syntaxModes = new List(); - } - } - - public XmlTextReader GetSyntaxModeFile(SyntaxMode syntaxMode) - { - Assembly assembly = typeof(SyntaxMode).Assembly; - return new XmlTextReader(assembly.GetManifestResourceStream("ICSharpCode.TextEditor.Resources." + syntaxMode.FileName)); - } - - public void UpdateSyntaxModeList() - { - // resources don't change during runtime - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/SyntaxMode.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/SyntaxMode.cs deleted file mode 100644 index dd10e2b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/SyntaxModes/SyntaxMode.cs +++ /dev/null @@ -1,96 +0,0 @@ -// -// -// -// -// $Revision: 2533 $ -// - -using System; -using System.Collections.Generic; -using System.IO; -using System.Windows.Forms; -using System.Xml; - -namespace ICSharpCode.TextEditor.Document -{ - public class SyntaxMode - { - string fileName; - string name; - string[] extensions; - - public string FileName { - get { - return fileName; - } - set { - fileName = value; - } - } - - public string Name { - get { - return name; - } - set { - name = value; - } - } - - public string[] Extensions { - get { - return extensions; - } - set { - extensions = value; - } - } - - public SyntaxMode(string fileName, string name, string extensions) - { - this.fileName = fileName; - this.name = name; - this.extensions = extensions.Split(';', '|', ','); - } - - public SyntaxMode(string fileName, string name, string[] extensions) - { - this.fileName = fileName; - this.name = name; - this.extensions = extensions; - } - - public static List GetSyntaxModes(Stream xmlSyntaxModeStream) - { - XmlTextReader reader = new XmlTextReader(xmlSyntaxModeStream); - List syntaxModes = new List(); - while (reader.Read()) { - switch (reader.NodeType) { - case XmlNodeType.Element: - switch (reader.Name) { - case "SyntaxModes": - string version = reader.GetAttribute("version"); - if (version != "1.0") { - throw new HighlightingDefinitionInvalidException("Unknown syntax mode file defininition with version " + version); - } - break; - case "Mode": - syntaxModes.Add(new SyntaxMode(reader.GetAttribute("file"), - reader.GetAttribute("name"), - reader.GetAttribute("extensions"))); - break; - default: - throw new HighlightingDefinitionInvalidException("Unknown node in syntax mode file :" + reader.Name); - } - break; - } - } - reader.Close(); - return syntaxModes; - } - public override string ToString() - { - return String.Format("[SyntaxMode: FileName={0}, Name={1}, Extensions=({2})]", fileName, name, String.Join(",", extensions)); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/TextWord.cs b/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/TextWord.cs deleted file mode 100644 index 486c594..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/HighlightingStrategy/TextWord.cs +++ /dev/null @@ -1,236 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Diagnostics; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Document -{ - public enum TextWordType { - Word, - Space, - Tab - } - - /// - /// This class represents single words with color information, two special versions of a word are - /// spaces and tabs. - /// - public class TextWord - { - HighlightColor color; - LineSegment line; - IDocument document; - - int offset; - int length; - - public sealed class SpaceTextWord : TextWord - { - public SpaceTextWord() - { - length = 1; - } - - public SpaceTextWord(HighlightColor color) - { - length = 1; - base.SyntaxColor = color; - } - - public override Font GetFont(FontContainer fontContainer) - { - return null; - } - - public override TextWordType Type { - get { - return TextWordType.Space; - } - } - public override bool IsWhiteSpace { - get { - return true; - } - } - } - - public sealed class TabTextWord : TextWord - { - public TabTextWord() - { - length = 1; - } - public TabTextWord(HighlightColor color) - { - length = 1; - base.SyntaxColor = color; - } - - public override Font GetFont(FontContainer fontContainer) - { - return null; - } - - public override TextWordType Type { - get { - return TextWordType.Tab; - } - } - public override bool IsWhiteSpace { - get { - return true; - } - } - } - - static TextWord spaceWord = new SpaceTextWord(); - static TextWord tabWord = new TabTextWord(); - - bool hasDefaultColor; - - public static TextWord Space { - get { - return spaceWord; - } - } - - public static TextWord Tab { - get { - return tabWord; - } - } - - public int Offset { - get { - return offset; - } - } - - public int Length { - get { - return length; - } - } - - /// - /// Splits the into two parts: the part before is assigned to - /// the reference parameter , the part after is returned. - /// - public static TextWord Split(ref TextWord word, int pos) - { - #if DEBUG - if (word.Type != TextWordType.Word) - throw new ArgumentException("word.Type must be Word"); - if (pos <= 0) - throw new ArgumentOutOfRangeException("pos", pos, "pos must be > 0"); - if (pos >= word.Length) - throw new ArgumentOutOfRangeException("pos", pos, "pos must be < word.Length"); - #endif - TextWord after = new TextWord(word.document, word.line, word.offset + pos, word.length - pos, word.color, word.hasDefaultColor); - word = new TextWord(word.document, word.line, word.offset, pos, word.color, word.hasDefaultColor); - return after; - } - - public bool HasDefaultColor { - get { - return hasDefaultColor; - } - } - - public virtual TextWordType Type { - get { - return TextWordType.Word; - } - } - - public string Word { - get { - if (document == null) { - return String.Empty; - } - return document.GetText(line.Offset + offset, length); - } - } - - public virtual Font GetFont(FontContainer fontContainer) - { - return color.GetFont(fontContainer); - } - - public Color Color { - get { - if (color == null) - return Color.Black; - else - return color.Color; - } - } - - public bool Bold { - get { - if (color == null) - return false; - else - return color.Bold; - } - } - - public bool Italic { - get { - if (color == null) - return false; - else - return color.Italic; - } - } - - public HighlightColor SyntaxColor { - get { - return color; - } - set { - Debug.Assert(value != null); - color = value; - } - } - - public virtual bool IsWhiteSpace { - get { - return false; - } - } - - protected TextWord() - { - } - - // TAB - public TextWord(IDocument document, LineSegment line, int offset, int length, HighlightColor color, bool hasDefaultColor) - { - Debug.Assert(document != null); - Debug.Assert(line != null); - Debug.Assert(color != null); - - this.document = document; - this.line = line; - this.offset = offset; - this.length = length; - this.color = color; - this.hasDefaultColor = hasDefaultColor; - } - - /// - /// Converts a instance to string (for debug purposes) - /// - public override string ToString() - { - return "[TextWord: Word = " + Word + ", Color = " + Color + "]"; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/IDocument.cs b/src/ICSharpCode.TextEditor/Src/Document/IDocument.cs deleted file mode 100644 index 48e7455..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/IDocument.cs +++ /dev/null @@ -1,315 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; - -using ICSharpCode.TextEditor.Undo; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This interface represents a container which holds a text sequence and - /// all necessary information about it. It is used as the base for a text editor. - /// - public interface IDocument - { - ITextEditorProperties TextEditorProperties { - get; - set; - } - - UndoStack UndoStack { - get; - } - /// - /// If true the document can't be altered - /// - bool ReadOnly { - get; - set; - } - - /// - /// The attached to the instance - /// - IFormattingStrategy FormattingStrategy { - get; - set; - } - - /// - /// The attached to the instance - /// - ITextBufferStrategy TextBufferStrategy { - get; - } - - /// - /// The attached to the instance - /// - FoldingManager FoldingManager { - get; - } - - /// - /// The attached to the instance - /// - IHighlightingStrategy HighlightingStrategy { - get; - set; - } - - /// - /// The attached to the instance - /// - BookmarkManager BookmarkManager { - get; - } - - MarkerStrategy MarkerStrategy { - get; - } - -// /// -// /// The attached to the instance -// /// -// SelectionManager SelectionManager { -// get; -// } - - #region ILineManager interface - /// - /// A collection of all line segments - /// - /// - /// The collection should only be used if you're aware - /// of the 'last line ends with a delimiter problem'. Otherwise - /// the method should be used. - /// - IList LineSegmentCollection { - get; - } - - /// - /// The total number of lines in the document. - /// - int TotalNumberOfLines { - get; - } - - /// - /// Returns a valid line number for the given offset. - /// - /// - /// A offset which points to a character in the line which - /// line number is returned. - /// - /// - /// An int which value is the line number. - /// - /// If offset points not to a valid position - int GetLineNumberForOffset(int offset); - - /// - /// Returns a for the given offset. - /// - /// - /// A offset which points to a character in the line which - /// is returned. - /// - /// - /// A object. - /// - /// If offset points not to a valid position - LineSegment GetLineSegmentForOffset(int offset); - - /// - /// Returns a for the given line number. - /// This function should be used to get a line instead of getting the - /// line using the . - /// - /// - /// The line number which is requested. - /// - /// - /// A object. - /// - /// If offset points not to a valid position - LineSegment GetLineSegment(int lineNumber); - - /// - /// Get the first logical line for a given visible line. - /// example : lineNumber == 100 foldings are in the linetracker - /// between 0..1 (2 folded, invisible lines) this method returns 102 - /// the 'logical' line number - /// - int GetFirstLogicalLine(int lineNumber); - - /// - /// Get the last logical line for a given visible line. - /// example : lineNumber == 100 foldings are in the linetracker - /// between 0..1 (2 folded, invisible lines) this method returns 102 - /// the 'logical' line number - /// - int GetLastLogicalLine(int lineNumber); - - /// - /// Get the visible line for a given logical line. - /// example : lineNumber == 100 foldings are in the linetracker - /// between 0..1 (2 folded, invisible lines) this method returns 98 - /// the 'visible' line number - /// - int GetVisibleLine(int lineNumber); - -// /// -// /// Get the visible column for a given logical line and logical column. -// /// -// int GetVisibleColumn(int logicalLine, int logicalColumn); - - /// - /// Get the next visible line after lineNumber - /// - int GetNextVisibleLineAbove(int lineNumber, int lineCount); - - /// - /// Get the next visible line below lineNumber - /// - int GetNextVisibleLineBelow(int lineNumber, int lineCount); - - event EventHandler LineLengthChanged; - event EventHandler LineCountChanged; - event EventHandler LineDeleted; - #endregion - - #region ITextBufferStrategy interface - /// - /// Get the whole text as string. - /// When setting the text using the TextContent property, the undo stack is cleared. - /// Set TextContent only for actions such as loading a file; if you want to change the current document - /// use the Replace method instead. - /// - string TextContent { - get; - set; - } - - /// - /// The current length of the sequence of characters that can be edited. - /// - int TextLength { - get; - } - - /// - /// Inserts a string of characters into the sequence. - /// - /// - /// offset where to insert the string. - /// - /// - /// text to be inserted. - /// - void Insert(int offset, string text); - - /// - /// Removes some portion of the sequence. - /// - /// - /// offset of the remove. - /// - /// - /// number of characters to remove. - /// - void Remove(int offset, int length); - - /// - /// Replace some portion of the sequence. - /// - /// - /// offset. - /// - /// - /// number of characters to replace. - /// - /// - /// text to be replaced with. - /// - void Replace(int offset, int length, string text); - - /// - /// Returns a specific char of the sequence. - /// - /// - /// Offset of the char to get. - /// - char GetCharAt(int offset); - - /// - /// Fetches a string of characters contained in the sequence. - /// - /// - /// Offset into the sequence to fetch - /// - /// - /// number of characters to copy. - /// - string GetText(int offset, int length); - #endregion - string GetText(ISegment segment); - - #region ITextModel interface - /// - /// returns the logical line/column position from an offset - /// - TextLocation OffsetToPosition(int offset); - - /// - /// returns the offset from a logical line/column position - /// - int PositionToOffset(TextLocation p); - #endregion - /// - /// A container where all TextAreaUpdate objects get stored - /// - List UpdateQueue { - get; - } - - /// - /// Requests an update of the textarea - /// - void RequestUpdate(TextAreaUpdate update); - - /// - /// Commits all updates in the queue to the textarea (the - /// textarea will be painted) - /// - void CommitUpdate(); - - /// - /// Moves, Resizes, Removes a list of segments on insert/remove/replace events. - /// - void UpdateSegmentListOnDocumentChange(List list, DocumentEventArgs e) where T : ISegment; - - /// - /// Is fired when CommitUpdate is called - /// - event EventHandler UpdateCommited; - - /// - /// - event DocumentEventHandler DocumentAboutToBeChanged; - - /// - /// - event DocumentEventHandler DocumentChanged; - - event EventHandler TextContentChanged; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/ISegment.cs b/src/ICSharpCode.TextEditor/Src/Document/ISegment.cs deleted file mode 100644 index e9bdf4f..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/ISegment.cs +++ /dev/null @@ -1,32 +0,0 @@ -// -// -// -// -// $Revision: 1966 $ -// - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This interface is used to describe a span inside a text sequence - /// - public interface ISegment - { - /// - /// The offset where the span begins - /// - int Offset { - get; - set; - } - - /// - /// The length of the span - /// - int Length { - get; - set; - } - } - -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/ITextEditorProperties.cs b/src/ICSharpCode.TextEditor/Src/Document/ITextEditorProperties.cs deleted file mode 100644 index 9c96d4a..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/ITextEditorProperties.cs +++ /dev/null @@ -1,171 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Drawing; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - public interface ITextEditorProperties - { - bool AutoInsertCurlyBracket { // is wrapped in text editor control - get; - set; - } - - bool HideMouseCursor { // is wrapped in text editor control - get; - set; - } - - bool IsIconBarVisible { // is wrapped in text editor control - get; - set; - } - - bool AllowCaretBeyondEOL { - get; - set; - } - - bool ShowMatchingBracket { // is wrapped in text editor control - get; - set; - } - - bool CutCopyWholeLine { - get; - set; - } - - System.Drawing.Text.TextRenderingHint TextRenderingHint { // is wrapped in text editor control - get; - set; - } - - bool MouseWheelScrollDown { - get; - set; - } - - bool MouseWheelTextZoom { - get; - set; - } - - string LineTerminator { - get; - set; - } - - LineViewerStyle LineViewerStyle { // is wrapped in text editor control - get; - set; - } - - bool ShowInvalidLines { // is wrapped in text editor control - get; - set; - } - - int VerticalRulerRow { // is wrapped in text editor control - get; - set; - } - - bool ShowSpaces { // is wrapped in text editor control - get; - set; - } - - bool ShowTabs { // is wrapped in text editor control - get; - set; - } - - bool ShowEOLMarker { // is wrapped in text editor control - get; - set; - } - - bool ConvertTabsToSpaces { // is wrapped in text editor control - get; - set; - } - - bool ShowHorizontalRuler { // is wrapped in text editor control - get; - set; - } - - bool ShowVerticalRuler { // is wrapped in text editor control - get; - set; - } - - Encoding Encoding { - get; - set; - } - - bool EnableFolding { // is wrapped in text editor control - get; - set; - } - - bool ShowLineNumbers { // is wrapped in text editor control - get; - set; - } - - /// - /// The width of a tab. - /// - int TabIndent { // is wrapped in text editor control - get; - set; - } - - /// - /// The amount of spaces a tab is converted to if ConvertTabsToSpaces is true. - /// - int IndentationSize { - get; - set; - } - - IndentStyle IndentStyle { // is wrapped in text editor control - get; - set; - } - - DocumentSelectionMode DocumentSelectionMode { - get; - set; - } - - Font Font { // is wrapped in text editor control - get; - set; - } - - FontContainer FontContainer { - get; - } - - BracketMatchingStyle BracketMatchingStyle { // is wrapped in text editor control - get; - set; - } - - bool SupportReadOnlySegments { - get; - set; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/LineManager/DeferredEventList.cs b/src/ICSharpCode.TextEditor/Src/Document/LineManager/DeferredEventList.cs deleted file mode 100644 index a72b946..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/LineManager/DeferredEventList.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -// -// -// -// $Revision$ -// -using System; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// A list of events that are fired after the line manager has finished working. - /// - struct DeferredEventList - { - internal List removedLines; - internal List textAnchor; - - public void AddRemovedLine(LineSegment line) - { - if (removedLines == null) - removedLines = new List(); - removedLines.Add(line); - } - - public void AddDeletedAnchor(TextAnchor anchor) - { - if (textAnchor == null) - textAnchor = new List(); - textAnchor.Add(anchor); - } - - public void RaiseEvents() - { - // removedLines is raised by the LineManager - if (textAnchor != null) { - foreach (TextAnchor a in textAnchor) { - a.RaiseDeleted(); - } - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs b/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs deleted file mode 100644 index 9a20723..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManager.cs +++ /dev/null @@ -1,366 +0,0 @@ -// -// -// -// -// $Revision: 3274 $ -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; - -namespace ICSharpCode.TextEditor.Document -{ - internal sealed class LineManager - { - LineSegmentTree lineCollection = new LineSegmentTree(); - - IDocument document; - IHighlightingStrategy highlightingStrategy; - - public IList LineSegmentCollection { - get { - return lineCollection; - } - } - - public int TotalNumberOfLines { - get { - return lineCollection.Count; - } - } - - public IHighlightingStrategy HighlightingStrategy { - get { - return highlightingStrategy; - } - set { - if (highlightingStrategy != value) { - highlightingStrategy = value; - if (highlightingStrategy != null) { - highlightingStrategy.MarkTokens(document); - } - } - } - } - - public LineManager(IDocument document, IHighlightingStrategy highlightingStrategy) - { - this.document = document; - this.highlightingStrategy = highlightingStrategy; - } - - public int GetLineNumberForOffset(int offset) - { - return GetLineSegmentForOffset(offset).LineNumber; - } - - public LineSegment GetLineSegmentForOffset(int offset) - { - return lineCollection.GetByOffset(offset); - } - - public LineSegment GetLineSegment(int lineNr) - { - return lineCollection[lineNr]; - } - - public void Insert(int offset, string text) - { - Replace(offset, 0, text); - } - - public void Remove(int offset, int length) - { - Replace(offset, length, String.Empty); - } - - public void Replace(int offset, int length, string text) - { - Debug.WriteLine("Replace offset="+offset+" length="+length+" text.Length="+text.Length); - int lineStart = GetLineNumberForOffset(offset); - int oldNumberOfLines = this.TotalNumberOfLines; - DeferredEventList deferredEventList = new DeferredEventList(); - RemoveInternal(ref deferredEventList, offset, length); - int numberOfLinesAfterRemoving = this.TotalNumberOfLines; - if (!string.IsNullOrEmpty(text)) { - InsertInternal(offset, text); - } -// #if DEBUG -// Console.WriteLine("New line collection:"); -// Console.WriteLine(lineCollection.GetTreeAsString()); -// Console.WriteLine("New text:"); -// Console.WriteLine("'" + document.TextContent + "'"); -// #endif - // Only fire events after RemoveInternal+InsertInternal finished completely: - // Otherwise we would expose inconsistent state to the event handlers. - RunHighlighter(lineStart, 1 + Math.Max(0, this.TotalNumberOfLines - numberOfLinesAfterRemoving)); - - if (deferredEventList.removedLines != null) { - foreach (LineSegment ls in deferredEventList.removedLines) - OnLineDeleted(new LineEventArgs(document, ls)); - } - deferredEventList.RaiseEvents(); - if (this.TotalNumberOfLines != oldNumberOfLines) { - OnLineCountChanged(new LineCountChangeEventArgs(document, lineStart, this.TotalNumberOfLines - oldNumberOfLines)); - } - } - - void RemoveInternal(ref DeferredEventList deferredEventList, int offset, int length) - { - Debug.Assert(length >= 0); - if (length == 0) return; - LineSegmentTree.Enumerator it = lineCollection.GetEnumeratorForOffset(offset); - LineSegment startSegment = it.Current; - int startSegmentOffset = startSegment.Offset; - if (offset + length < startSegmentOffset + startSegment.TotalLength) { - // just removing a part of this line segment - startSegment.RemovedLinePart(ref deferredEventList, offset - startSegmentOffset, length); - SetSegmentLength(startSegment, startSegment.TotalLength - length); - return; - } - // merge startSegment with another line segment because startSegment's delimiter was deleted - // possibly remove lines in between if multiple delimiters were deleted - int charactersRemovedInStartLine = startSegmentOffset + startSegment.TotalLength - offset; - Debug.Assert(charactersRemovedInStartLine > 0); - startSegment.RemovedLinePart(ref deferredEventList, offset - startSegmentOffset, charactersRemovedInStartLine); - - - LineSegment endSegment = lineCollection.GetByOffset(offset + length); - if (endSegment == startSegment) { - // special case: we are removing a part of the last line up to the - // end of the document - SetSegmentLength(startSegment, startSegment.TotalLength - length); - return; - } - int endSegmentOffset = endSegment.Offset; - int charactersLeftInEndLine = endSegmentOffset + endSegment.TotalLength - (offset + length); - endSegment.RemovedLinePart(ref deferredEventList, 0, endSegment.TotalLength - charactersLeftInEndLine); - startSegment.MergedWith(endSegment, offset - startSegmentOffset); - SetSegmentLength(startSegment, startSegment.TotalLength - charactersRemovedInStartLine + charactersLeftInEndLine); - startSegment.DelimiterLength = endSegment.DelimiterLength; - // remove all segments between startSegment (excl.) and endSegment (incl.) - it.MoveNext(); - LineSegment segmentToRemove; - do { - segmentToRemove = it.Current; - it.MoveNext(); - lineCollection.RemoveSegment(segmentToRemove); - segmentToRemove.Deleted(ref deferredEventList); - } while (segmentToRemove != endSegment); - } - - void InsertInternal(int offset, string text) - { - LineSegment segment = lineCollection.GetByOffset(offset); - DelimiterSegment ds = NextDelimiter(text, 0); - if (ds == null) { - // no newline is being inserted, all text is inserted in a single line - segment.InsertedLinePart(offset - segment.Offset, text.Length); - SetSegmentLength(segment, segment.TotalLength + text.Length); - return; - } - LineSegment firstLine = segment; - firstLine.InsertedLinePart(offset - firstLine.Offset, ds.Offset); - int lastDelimiterEnd = 0; - while (ds != null) { - // split line segment at line delimiter - int lineBreakOffset = offset + ds.Offset + ds.Length; - int segmentOffset = segment.Offset; - int lengthAfterInsertionPos = segmentOffset + segment.TotalLength - (offset + lastDelimiterEnd); - lineCollection.SetSegmentLength(segment, lineBreakOffset - segmentOffset); - LineSegment newSegment = lineCollection.InsertSegmentAfter(segment, lengthAfterInsertionPos); - segment.DelimiterLength = ds.Length; - - segment = newSegment; - lastDelimiterEnd = ds.Offset + ds.Length; - - ds = NextDelimiter(text, lastDelimiterEnd); - } - firstLine.SplitTo(segment); - // insert rest after last delimiter - if (lastDelimiterEnd != text.Length) { - segment.InsertedLinePart(0, text.Length - lastDelimiterEnd); - SetSegmentLength(segment, segment.TotalLength + text.Length - lastDelimiterEnd); - } - } - - void SetSegmentLength(LineSegment segment, int newTotalLength) - { - int delta = newTotalLength - segment.TotalLength; - if (delta != 0) { - lineCollection.SetSegmentLength(segment, newTotalLength); - OnLineLengthChanged(new LineLengthChangeEventArgs(document, segment, delta)); - } - } - - void RunHighlighter(int firstLine, int lineCount) - { - if (highlightingStrategy != null) { - List markLines = new List(); - LineSegmentTree.Enumerator it = lineCollection.GetEnumeratorForIndex(firstLine); - for (int i = 0; i < lineCount && it.IsValid; i++) { - markLines.Add(it.Current); - it.MoveNext(); - } - highlightingStrategy.MarkTokens(document, markLines); - } - } - - public void SetContent(string text) - { - lineCollection.Clear(); - if (text != null) { - Replace(0, 0, text); - } - } - - public int GetVisibleLine(int logicalLineNumber) - { - if (!document.TextEditorProperties.EnableFolding) { - return logicalLineNumber; - } - - int visibleLine = 0; - int foldEnd = 0; - List foldings = document.FoldingManager.GetTopLevelFoldedFoldings(); - foreach (FoldMarker fm in foldings) { - if (fm.StartLine >= logicalLineNumber) { - break; - } - if (fm.StartLine >= foldEnd) { - visibleLine += fm.StartLine - foldEnd; - if (fm.EndLine > logicalLineNumber) { - return visibleLine; - } - foldEnd = fm.EndLine; - } - } -// Debug.Assert(logicalLineNumber >= foldEnd); - visibleLine += logicalLineNumber - foldEnd; - return visibleLine; - } - - public int GetFirstLogicalLine(int visibleLineNumber) - { - if (!document.TextEditorProperties.EnableFolding) { - return visibleLineNumber; - } - int v = 0; - int foldEnd = 0; - List foldings = document.FoldingManager.GetTopLevelFoldedFoldings(); - foreach (FoldMarker fm in foldings) { - if (fm.StartLine >= foldEnd) { - if (v + fm.StartLine - foldEnd >= visibleLineNumber) { - break; - } - v += fm.StartLine - foldEnd; - foldEnd = fm.EndLine; - } - } - // help GC - foldings.Clear(); - foldings = null; - return foldEnd + visibleLineNumber - v; - } - - public int GetLastLogicalLine(int visibleLineNumber) - { - if (!document.TextEditorProperties.EnableFolding) { - return visibleLineNumber; - } - return GetFirstLogicalLine(visibleLineNumber + 1) - 1; - } - - // TODO : speedup the next/prev visible line search - // HOW? : save the foldings in a sorted list and lookup the - // line numbers in this list - public int GetNextVisibleLineAbove(int lineNumber, int lineCount) - { - int curLineNumber = lineNumber; - if (document.TextEditorProperties.EnableFolding) { - for (int i = 0; i < lineCount && curLineNumber < TotalNumberOfLines; ++i) { - ++curLineNumber; - while (curLineNumber < TotalNumberOfLines && (curLineNumber >= lineCollection.Count || !document.FoldingManager.IsLineVisible(curLineNumber))) { - ++curLineNumber; - } - } - } else { - curLineNumber += lineCount; - } - return Math.Min(TotalNumberOfLines - 1, curLineNumber); - } - - public int GetNextVisibleLineBelow(int lineNumber, int lineCount) - { - int curLineNumber = lineNumber; - if (document.TextEditorProperties.EnableFolding) { - for (int i = 0; i < lineCount; ++i) { - --curLineNumber; - while (curLineNumber >= 0 && !document.FoldingManager.IsLineVisible(curLineNumber)) { - --curLineNumber; - } - } - } else { - curLineNumber -= lineCount; - } - return Math.Max(0, curLineNumber); - } - - // use always the same DelimiterSegment object for the NextDelimiter - DelimiterSegment delimiterSegment = new DelimiterSegment(); - - DelimiterSegment NextDelimiter(string text, int offset) - { - for (int i = offset; i < text.Length; i++) { - switch (text[i]) { - case '\r': - if (i + 1 < text.Length) { - if (text[i + 1] == '\n') { - delimiterSegment.Offset = i; - delimiterSegment.Length = 2; - return delimiterSegment; - } - } - goto case '\n'; - case '\n': - delimiterSegment.Offset = i; - delimiterSegment.Length = 1; - return delimiterSegment; - } - } - return null; - } - - void OnLineCountChanged(LineCountChangeEventArgs e) - { - if (LineCountChanged != null) { - LineCountChanged(this, e); - } - } - - void OnLineLengthChanged(LineLengthChangeEventArgs e) - { - if (LineLengthChanged != null) { - LineLengthChanged(this, e); - } - } - - void OnLineDeleted(LineEventArgs e) - { - if (LineDeleted != null) { - LineDeleted(this, e); - } - } - - public event EventHandler LineLengthChanged; - public event EventHandler LineCountChanged; - public event EventHandler LineDeleted; - - sealed class DelimiterSegment - { - internal int Offset; - internal int Length; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManagerEventArgs.cs b/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManagerEventArgs.cs deleted file mode 100644 index 336203c..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineManagerEventArgs.cs +++ /dev/null @@ -1,97 +0,0 @@ -// -// -// -// -// $Revision: 2691 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - public class LineCountChangeEventArgs : EventArgs - { - IDocument document; - int start; - int moved; - - /// - /// always a valid Document which is related to the Event. - /// - public IDocument Document { - get { - return document; - } - } - - /// - /// -1 if no offset was specified for this event - /// - public int LineStart { - get { - return start; - } - } - - /// - /// -1 if no length was specified for this event - /// - public int LinesMoved { - get { - return moved; - } - } - - public LineCountChangeEventArgs(IDocument document, int lineStart, int linesMoved) - { - this.document = document; - this.start = lineStart; - this.moved = linesMoved; - } - } - - public class LineEventArgs : EventArgs - { - IDocument document; - LineSegment lineSegment; - - public IDocument Document { - get { return document; } - } - - public LineSegment LineSegment { - get { return lineSegment; } - } - - public LineEventArgs(IDocument document, LineSegment lineSegment) - { - this.document = document; - this.lineSegment = lineSegment; - } - - public override string ToString() - { - return string.Format("[LineEventArgs Document={0} LineSegment={1}]", this.document, this.lineSegment); - } - } - - public class LineLengthChangeEventArgs : LineEventArgs - { - int lengthDelta; - - public int LengthDelta { - get { return lengthDelta; } - } - - public LineLengthChangeEventArgs(IDocument document, LineSegment lineSegment, int moved) - : base(document, lineSegment) - { - this.lengthDelta = moved; - } - - public override string ToString() - { - return string.Format("[LineLengthEventArgs Document={0} LineSegment={1} LengthDelta={2}]", this.Document, this.LineSegment, this.lengthDelta); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegment.cs b/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegment.cs deleted file mode 100644 index e9dabe4..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegment.cs +++ /dev/null @@ -1,259 +0,0 @@ -// -// -// -// -// $Revision: 3272 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Diagnostics; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - public sealed class LineSegment : ISegment - { - internal LineSegmentTree.Enumerator treeEntry; - int totalLength, delimiterLength; - - List words; - SpanStack highlightSpanStack; - - public TextWord GetWord(int column) - { - int curColumn = 0; - foreach (TextWord word in words) { - if (column < curColumn + word.Length) { - return word; - } - curColumn += word.Length; - } - return null; - } - - public bool IsDeleted { - get { return !treeEntry.IsValid; } - } - - public int LineNumber { - get { return treeEntry.CurrentIndex; } - } - - public int Offset { - get { return treeEntry.CurrentOffset; } - } - - public int Length { - get { return totalLength - delimiterLength; } - } - - int ISegment.Offset { - get { return this.Offset; } - set { throw new NotSupportedException(); } - } - int ISegment.Length { - get { return this.Length; } - set { throw new NotSupportedException(); } - } - - public int TotalLength { - get { return totalLength; } - internal set { totalLength = value; } - } - - public int DelimiterLength { - get { return delimiterLength; } - internal set { delimiterLength = value; } - } - - // highlighting information - public List Words { - get { - return words; - } - set { - words = value; - } - } - - public HighlightColor GetColorForPosition(int x) - { - if (Words != null) { - int xPos = 0; - foreach (TextWord word in Words) { - if (x < xPos + word.Length) { - return word.SyntaxColor; - } - xPos += word.Length; - } - } - return new HighlightColor(Color.Black, false, false); - } - - public SpanStack HighlightSpanStack { - get { - return highlightSpanStack; - } - set { - highlightSpanStack = value; - } - } - - /// - /// Converts a instance to string (for debug purposes) - /// - public override string ToString() - { - if (IsDeleted) - return "[LineSegment: (deleted) Length = " + Length + ", TotalLength = " + TotalLength + ", DelimiterLength = " + delimiterLength + "]"; - else - return "[LineSegment: LineNumber=" + LineNumber + ", Offset = "+ Offset +", Length = " + Length + ", TotalLength = " + TotalLength + ", DelimiterLength = " + delimiterLength + "]"; - } - - #region Anchor management - Util.WeakCollection anchors; - - public TextAnchor CreateAnchor(int column) - { - if (column < 0 || column > Length) - throw new ArgumentOutOfRangeException("column"); - TextAnchor anchor = new TextAnchor(this, column); - AddAnchor(anchor); - return anchor; - } - - void AddAnchor(TextAnchor anchor) - { - Debug.Assert(anchor.Line == this); - - if (anchors == null) - anchors = new Util.WeakCollection(); - - anchors.Add(anchor); - } - - /// - /// Is called when the LineSegment is deleted. - /// - internal void Deleted(ref DeferredEventList deferredEventList) - { - //Console.WriteLine("Deleted"); - treeEntry = LineSegmentTree.Enumerator.Invalid; - if (anchors != null) { - foreach (TextAnchor a in anchors) { - a.Delete(ref deferredEventList); - } - anchors = null; - } - } - - /// - /// Is called when a part of the line is removed. - /// - internal void RemovedLinePart(ref DeferredEventList deferredEventList, int startColumn, int length) - { - if (length == 0) - return; - Debug.Assert(length > 0); - - //Console.WriteLine("RemovedLinePart " + startColumn + ", " + length); - if (anchors != null) { - List deletedAnchors = null; - foreach (TextAnchor a in anchors) { - if (a.ColumnNumber > startColumn) { - if (a.ColumnNumber >= startColumn + length) { - a.ColumnNumber -= length; - } else { - if (deletedAnchors == null) - deletedAnchors = new List(); - a.Delete(ref deferredEventList); - deletedAnchors.Add(a); - } - } - } - if (deletedAnchors != null) { - foreach (TextAnchor a in deletedAnchors) { - anchors.Remove(a); - } - } - } - } - - /// - /// Is called when a part of the line is inserted. - /// - internal void InsertedLinePart(int startColumn, int length) - { - if (length == 0) - return; - Debug.Assert(length > 0); - - //Console.WriteLine("InsertedLinePart " + startColumn + ", " + length); - if (anchors != null) { - foreach (TextAnchor a in anchors) { - if (a.MovementType == AnchorMovementType.BeforeInsertion - ? a.ColumnNumber > startColumn - : a.ColumnNumber >= startColumn) - { - a.ColumnNumber += length; - } - } - } - } - - /// - /// Is called after another line's content is appended to this line because the newline in between - /// was deleted. - /// The DefaultLineManager will call Deleted() on the deletedLine after the MergedWith call. - /// - /// firstLineLength: the length of the line before the merge. - /// - internal void MergedWith(LineSegment deletedLine, int firstLineLength) - { - //Console.WriteLine("MergedWith"); - - if (deletedLine.anchors != null) { - foreach (TextAnchor a in deletedLine.anchors) { - a.Line = this; - AddAnchor(a); - a.ColumnNumber += firstLineLength; - } - deletedLine.anchors = null; - } - } - - /// - /// Is called after a newline was inserted into this line, splitting it into this and followingLine. - /// - internal void SplitTo(LineSegment followingLine) - { - //Console.WriteLine("SplitTo"); - - if (anchors != null) { - List movedAnchors = null; - foreach (TextAnchor a in anchors) { - if (a.MovementType == AnchorMovementType.BeforeInsertion - ? a.ColumnNumber > this.Length - : a.ColumnNumber >= this.Length) - { - a.Line = followingLine; - followingLine.AddAnchor(a); - a.ColumnNumber -= this.Length; - - if (movedAnchors == null) - movedAnchors = new List(); - movedAnchors.Add(a); - } - } - if (movedAnchors != null) { - foreach (TextAnchor a in movedAnchors) { - anchors.Remove(a); - } - } - } - } - #endregion - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegmentTree.cs b/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegmentTree.cs deleted file mode 100644 index 1dae49d..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/LineManager/LineSegmentTree.cs +++ /dev/null @@ -1,477 +0,0 @@ -// -// -// -// -// $Revision: 2683 $ -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using ICSharpCode.TextEditor.Util; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Data structure for efficient management of the line segments (most operations are O(lg n)). - /// This implements an augmented red-black tree where each node has fields for the number of - /// nodes in its subtree (like an order statistics tree) for access by index(=line number). - /// Additionally, each node knows the total length of all segments in its subtree. - /// This means we can find nodes by offset in O(lg n) time. Since the offset itself is not stored in - /// the line segment but computed from the lengths stored in the tree, we adjusting the offsets when - /// text is inserted in one line means we just have to increment the totalLength of the affected line and - /// its parent nodes - an O(lg n) operation. - /// However this means getting the line number or offset from a LineSegment is not a constant time - /// operation, but takes O(lg n). - /// - /// NOTE: The tree is never empty, Clear() causes it to contain an empty segment. - /// - sealed class LineSegmentTree : IList - { - internal struct RBNode - { - internal LineSegment lineSegment; - internal int count; - internal int totalLength; - - public RBNode(LineSegment lineSegment) - { - this.lineSegment = lineSegment; - this.count = 1; - this.totalLength = lineSegment.TotalLength; - } - - public override string ToString() - { - return "[RBNode count=" + count + " totalLength="+totalLength - + " lineSegment.LineNumber=" + lineSegment.LineNumber - + " lineSegment.Offset=" + lineSegment.Offset - + " lineSegment.TotalLength=" + lineSegment.TotalLength - + " lineSegment.DelimiterLength=" + lineSegment.DelimiterLength + "]"; - } - } - - struct MyHost : IRedBlackTreeHost - { - public int Compare(RBNode x, RBNode y) - { - throw new NotImplementedException(); - } - - public bool Equals(RBNode a, RBNode b) - { - throw new NotImplementedException(); - } - - public void UpdateAfterChildrenChange(RedBlackTreeNode node) - { - int count = 1; - int totalLength = node.val.lineSegment.TotalLength; - if (node.left != null) { - count += node.left.val.count; - totalLength += node.left.val.totalLength; - } - if (node.right != null) { - count += node.right.val.count; - totalLength += node.right.val.totalLength; - } - if (count != node.val.count || totalLength != node.val.totalLength) { - node.val.count = count; - node.val.totalLength = totalLength; - if (node.parent != null) UpdateAfterChildrenChange(node.parent); - } - } - - public void UpdateAfterRotateLeft(RedBlackTreeNode node) - { - UpdateAfterChildrenChange(node); - UpdateAfterChildrenChange(node.parent); - } - - public void UpdateAfterRotateRight(RedBlackTreeNode node) - { - UpdateAfterChildrenChange(node); - UpdateAfterChildrenChange(node.parent); - } - } - - readonly AugmentableRedBlackTree tree = new AugmentableRedBlackTree(new MyHost()); - - RedBlackTreeNode GetNode(int index) - { - if (index < 0 || index >= tree.Count) - throw new ArgumentOutOfRangeException("index", index, "index should be between 0 and " + (tree.Count-1)); - RedBlackTreeNode node = tree.root; - while (true) { - if (node.left != null && index < node.left.val.count) { - node = node.left; - } else { - if (node.left != null) { - index -= node.left.val.count; - } - if (index == 0) - return node; - index--; - node = node.right; - } - } - } - - static int GetIndexFromNode(RedBlackTreeNode node) - { - int index = (node.left != null) ? node.left.val.count : 0; - while (node.parent != null) { - if (node == node.parent.right) { - if (node.parent.left != null) - index += node.parent.left.val.count; - index++; - } - node = node.parent; - } - return index; - } - - RedBlackTreeNode GetNodeByOffset(int offset) - { - if (offset < 0 || offset > this.TotalLength) - throw new ArgumentOutOfRangeException("offset", offset, "offset should be between 0 and " + this.TotalLength); - if (offset == this.TotalLength) { - if (tree.root == null) - throw new InvalidOperationException("Cannot call GetNodeByOffset while tree is empty."); - return tree.root.RightMost; - } - RedBlackTreeNode node = tree.root; - while (true) { - if (node.left != null && offset < node.left.val.totalLength) { - node = node.left; - } else { - if (node.left != null) { - offset -= node.left.val.totalLength; - } - offset -= node.val.lineSegment.TotalLength; - if (offset < 0) - return node; - node = node.right; - } - } - } - - static int GetOffsetFromNode(RedBlackTreeNode node) - { - int offset = (node.left != null) ? node.left.val.totalLength : 0; - while (node.parent != null) { - if (node == node.parent.right) { - if (node.parent.left != null) - offset += node.parent.left.val.totalLength; - offset += node.parent.val.lineSegment.TotalLength; - } - node = node.parent; - } - return offset; - } - - public LineSegment GetByOffset(int offset) - { - return GetNodeByOffset(offset).val.lineSegment; - } - - /// - /// Gets the total length of all line segments. Runs in O(1). - /// - public int TotalLength { - get { - if (tree.root == null) - return 0; - else - return tree.root.val.totalLength; - } - } - - /// - /// Updates the length of a line segment. Runs in O(lg n). - /// - public void SetSegmentLength(LineSegment segment, int newTotalLength) - { - if (segment == null) - throw new ArgumentNullException("segment"); - RedBlackTreeNode node = segment.treeEntry.it.node; - segment.TotalLength = newTotalLength; - default(MyHost).UpdateAfterChildrenChange(node); - #if DEBUG - CheckProperties(); - #endif - } - - public void RemoveSegment(LineSegment segment) - { - tree.RemoveAt(segment.treeEntry.it); - #if DEBUG - CheckProperties(); - #endif - } - - public LineSegment InsertSegmentAfter(LineSegment segment, int length) - { - LineSegment newSegment = new LineSegment(); - newSegment.TotalLength = length; - newSegment.DelimiterLength = segment.DelimiterLength; - - newSegment.treeEntry = InsertAfter(segment.treeEntry.it.node, newSegment); - return newSegment; - } - - Enumerator InsertAfter(RedBlackTreeNode node, LineSegment newSegment) - { - RedBlackTreeNode newNode = new RedBlackTreeNode(new RBNode(newSegment)); - if (node.right == null) { - tree.InsertAsRight(node, newNode); - } else { - tree.InsertAsLeft(node.right.LeftMost, newNode); - } - #if DEBUG - CheckProperties(); - #endif - return new Enumerator(new RedBlackTreeIterator(newNode)); - } - - /// - /// Gets the number of items in the collections. Runs in O(1). - /// - public int Count { - get { return tree.Count; } - } - - /// - /// Gets or sets an item by index. Runs in O(lg n). - /// - public LineSegment this[int index] { - get { - return GetNode(index).val.lineSegment; - } - set { - throw new NotSupportedException(); - } - } - - bool ICollection.IsReadOnly { - get { return true; } - } - - /// - /// Gets the index of an item. Runs in O(lg n). - /// - public int IndexOf(LineSegment item) - { - int index = item.LineNumber; - if (index < 0 || index >= this.Count) - return -1; - if (item != this[index]) - return -1; - return index; - } - - void IList.RemoveAt(int index) - { - throw new NotSupportedException(); - } - - #if DEBUG - [Conditional("DATACONSISTENCYTEST")] - void CheckProperties() - { - if (tree.root == null) { - Debug.Assert(this.Count == 0); - } else { - Debug.Assert(tree.root.val.count == this.Count); - CheckProperties(tree.root); - } - } - - void CheckProperties(RedBlackTreeNode node) - { - int count = 1; - int totalLength = node.val.lineSegment.TotalLength; - if (node.left != null) { - CheckProperties(node.left); - count += node.left.val.count; - totalLength += node.left.val.totalLength; - } - if (node.right != null) { - CheckProperties(node.right); - count += node.right.val.count; - totalLength += node.right.val.totalLength; - } - Debug.Assert(node.val.count == count); - Debug.Assert(node.val.totalLength == totalLength); - } - - public string GetTreeAsString() - { - return tree.GetTreeAsString(); - } - #endif - - public LineSegmentTree() - { - Clear(); - } - - /// - /// Clears the list. Runs in O(1). - /// - public void Clear() - { - tree.Clear(); - LineSegment emptySegment = new LineSegment(); - emptySegment.TotalLength = 0; - emptySegment.DelimiterLength = 0; - tree.Add(new RBNode(emptySegment)); - emptySegment.treeEntry = GetEnumeratorForIndex(0); - #if DEBUG - CheckProperties(); - #endif - } - - /// - /// Tests whether an item is in the list. Runs in O(n). - /// - public bool Contains(LineSegment item) - { - return IndexOf(item) >= 0; - } - - /// - /// Copies all elements from the list to the array. - /// - public void CopyTo(LineSegment[] array, int arrayIndex) - { - if (array == null) throw new ArgumentNullException("array"); - foreach (LineSegment val in this) - array[arrayIndex++] = val; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return this.GetEnumerator(); - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return this.GetEnumerator(); - } - - public Enumerator GetEnumerator() - { - return new Enumerator(tree.GetEnumerator()); - } - - public Enumerator GetEnumeratorForIndex(int index) - { - return new Enumerator(new RedBlackTreeIterator(GetNode(index))); - } - - public Enumerator GetEnumeratorForOffset(int offset) - { - return new Enumerator(new RedBlackTreeIterator(GetNodeByOffset(offset))); - } - - public struct Enumerator : IEnumerator - { - /// - /// An invalid enumerator value. Calling MoveNext on the invalid enumerator - /// will always return false, accessing Current will throw an exception. - /// - public static readonly Enumerator Invalid = default(Enumerator); - - internal RedBlackTreeIterator it; - - internal Enumerator(RedBlackTreeIterator it) - { - this.it = it; - } - - /// - /// Gets the current value. Runs in O(1). - /// - public LineSegment Current { - get { - return it.Current.lineSegment; - } - } - - public bool IsValid { - get { - return it.IsValid; - } - } - - /// - /// Gets the index of the current value. Runs in O(lg n). - /// - public int CurrentIndex { - get { - if (it.node == null) - throw new InvalidOperationException(); - return GetIndexFromNode(it.node); - } - } - - /// - /// Gets the offset of the current value. Runs in O(lg n). - /// - public int CurrentOffset { - get { - if (it.node == null) - throw new InvalidOperationException(); - return GetOffsetFromNode(it.node); - } - } - - object System.Collections.IEnumerator.Current { - get { - return it.Current.lineSegment; - } - } - - public void Dispose() - { - } - - /// - /// Moves to the next index. Runs in O(lg n), but for k calls, the combined time is only O(k+lg n). - /// - public bool MoveNext() - { - return it.MoveNext(); - } - - /// - /// Moves to the previous index. Runs in O(lg n), but for k calls, the combined time is only O(k+lg n). - /// - public bool MoveBack() - { - return it.MoveBack(); - } - - void System.Collections.IEnumerator.Reset() - { - throw new NotSupportedException(); - } - } - - void IList.Insert(int index, LineSegment item) - { - throw new NotSupportedException(); - } - - void ICollection.Add(LineSegment item) - { - throw new NotSupportedException(); - } - - bool ICollection.Remove(LineSegment item) - { - throw new NotSupportedException(); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/MarkerStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/MarkerStrategy.cs deleted file mode 100644 index ca31722..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/MarkerStrategy.cs +++ /dev/null @@ -1,119 +0,0 @@ -// -// -// -// -// $Revision: 2659 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Manages the list of markers and provides ways to retrieve markers for specific positions. - /// - public sealed class MarkerStrategy - { - List textMarker = new List(); - IDocument document; - - public IDocument Document { - get { - return document; - } - } - - public IEnumerable TextMarker { - get { - return textMarker.AsReadOnly(); - } - } - - public void AddMarker(TextMarker item) - { - markersTable.Clear(); - textMarker.Add(item); - } - - public void InsertMarker(int index, TextMarker item) - { - markersTable.Clear(); - textMarker.Insert(index, item); - } - - public void RemoveMarker(TextMarker item) - { - markersTable.Clear(); - textMarker.Remove(item); - } - - public void RemoveAll(Predicate match) - { - markersTable.Clear(); - textMarker.RemoveAll(match); - } - - public MarkerStrategy(IDocument document) - { - this.document = document; - document.DocumentChanged += new DocumentEventHandler(DocumentChanged); - } - - Dictionary> markersTable = new Dictionary>(); - - public List GetMarkers(int offset) - { - if (!markersTable.ContainsKey(offset)) { - List markers = new List(); - for (int i = 0; i < textMarker.Count; ++i) { - TextMarker marker = (TextMarker)textMarker[i]; - if (marker.Offset <= offset && offset <= marker.EndOffset) { - markers.Add(marker); - } - } - markersTable[offset] = markers; - } - return markersTable[offset]; - } - - public List GetMarkers(int offset, int length) - { - int endOffset = offset + length - 1; - List markers = new List(); - for (int i = 0; i < textMarker.Count; ++i) { - TextMarker marker = (TextMarker)textMarker[i]; - if (// start in marker region - marker.Offset <= offset && offset <= marker.EndOffset || - // end in marker region - marker.Offset <= endOffset && endOffset <= marker.EndOffset || - // marker start in region - offset <= marker.Offset && marker.Offset <= endOffset || - // marker end in region - offset <= marker.EndOffset && marker.EndOffset <= endOffset - ) - { - markers.Add(marker); - } - } - return markers; - } - - public List GetMarkers(TextLocation position) - { - if (position.Y >= document.TotalNumberOfLines || position.Y < 0) { - return new List(); - } - LineSegment segment = document.GetLineSegment(position.Y); - return GetMarkers(segment.Offset + position.X); - } - - void DocumentChanged(object sender, DocumentEventArgs e) - { - // reset markers table - markersTable.Clear(); - document.UpdateSegmentListOnDocumentChange(textMarker, e); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/TextMarker.cs b/src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/TextMarker.cs deleted file mode 100644 index 6afc36b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/MarkerStrategy/TextMarker.cs +++ /dev/null @@ -1,103 +0,0 @@ -// -// -// -// -// $Revision: 3206 $ -// - -using System; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Document -{ - public enum TextMarkerType - { - Invisible, - SolidBlock, - Underlined, - WaveLine - } - - /// - /// Marks a part of a document. - /// - public class TextMarker : AbstractSegment - { - TextMarkerType textMarkerType; - Color color; - Color foreColor; - string toolTip = null; - bool overrideForeColor = false; - - public TextMarkerType TextMarkerType { - get { - return textMarkerType; - } - } - - public Color Color { - get { - return color; - } - } - - public Color ForeColor { - get { - return foreColor; - } - } - - public bool OverrideForeColor { - get { - return overrideForeColor; - } - } - - /// - /// Marks the text segment as read-only. - /// - public bool IsReadOnly { get; set; } - - public string ToolTip { - get { - return toolTip; - } - set { - toolTip = value; - } - } - - /// - /// Gets the last offset that is inside the marker region. - /// - public int EndOffset { - get { - return Offset + Length - 1; - } - } - - public TextMarker(int offset, int length, TextMarkerType textMarkerType) : this(offset, length, textMarkerType, Color.Red) - { - } - - public TextMarker(int offset, int length, TextMarkerType textMarkerType, Color color) - { - if (length < 1) length = 1; - this.offset = offset; - this.length = length; - this.textMarkerType = textMarkerType; - this.color = color; - } - - public TextMarker(int offset, int length, TextMarkerType textMarkerType, Color color, Color foreColor) - { - if (length < 1) length = 1; - this.offset = offset; - this.length = length; - this.textMarkerType = textMarkerType; - this.color = color; - this.foreColor = foreColor; - this.overrideForeColor = true; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/Selection/ColumnRange.cs b/src/ICSharpCode.TextEditor/Src/Document/Selection/ColumnRange.cs deleted file mode 100644 index 46de7b6..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/Selection/ColumnRange.cs +++ /dev/null @@ -1,66 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - public class ColumnRange - { - public static readonly ColumnRange NoColumn = new ColumnRange(-2, -2); - public static readonly ColumnRange WholeColumn = new ColumnRange(-1, -1); - - int startColumn; - int endColumn; - - public int StartColumn { - get { - return startColumn; - } - set { - startColumn = value; - } - } - - public int EndColumn { - get { - return endColumn; - } - set { - endColumn = value; - } - } - - public ColumnRange(int startColumn, int endColumn) - { - this.startColumn = startColumn; - this.endColumn = endColumn; - - } - - public override int GetHashCode() - { - return startColumn + (endColumn << 16); - } - - public override bool Equals(object obj) - { - if (obj is ColumnRange) { - return ((ColumnRange)obj).startColumn == startColumn && - ((ColumnRange)obj).endColumn == endColumn; - - } - return false; - } - - public override string ToString() - { - return String.Format("[ColumnRange: StartColumn={0}, EndColumn={1}]", startColumn, endColumn); - } - - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/Selection/DefaultSelection.cs b/src/ICSharpCode.TextEditor/Src/Document/Selection/DefaultSelection.cs deleted file mode 100644 index 3feba2d..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/Selection/DefaultSelection.cs +++ /dev/null @@ -1,133 +0,0 @@ -// -// -// -// -// $Revision: 2679 $ -// - -using System; -using System.Diagnostics; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Default implementation of the interface. - /// - public class DefaultSelection : ISelection - { - IDocument document; - bool isRectangularSelection; - TextLocation startPosition; - TextLocation endPosition; - - public TextLocation StartPosition { - get { - return startPosition; - } - set { - DefaultDocument.ValidatePosition(document, value); - startPosition = value; - } - } - - public TextLocation EndPosition { - get { - return endPosition; - } - set { - DefaultDocument.ValidatePosition(document, value); - endPosition = value; - } - } - - public int Offset { - get { - return document.PositionToOffset(startPosition); - } - } - - public int EndOffset { - get { - return document.PositionToOffset(endPosition); - } - } - - public int Length { - get { - return EndOffset - Offset; - } - } - - /// - /// Returns true, if the selection is empty - /// - public bool IsEmpty { - get { - return startPosition == endPosition; - } - } - - /// - /// Returns true, if the selection is rectangular - /// - // TODO : make this unused property used. - public bool IsRectangularSelection { - get { - return isRectangularSelection; - } - set { - isRectangularSelection = value; - } - } - - /// - /// The text which is selected by this selection. - /// - public string SelectedText { - get { - if (document != null) { - if (Length < 0) { - return null; - } - return document.GetText(Offset, Length); - } - return null; - } - } - - /// - /// Creates a new instance of - /// - public DefaultSelection(IDocument document, TextLocation startPosition, TextLocation endPosition) - { - DefaultDocument.ValidatePosition(document, startPosition); - DefaultDocument.ValidatePosition(document, endPosition); - Debug.Assert(startPosition <= endPosition); - this.document = document; - this.startPosition = startPosition; - this.endPosition = endPosition; - } - - /// - /// Converts a instance to string (for debug purposes) - /// - public override string ToString() - { - return String.Format("[DefaultSelection : StartPosition={0}, EndPosition={1}]", startPosition, endPosition); - } - public bool ContainsPosition(TextLocation position) - { - if (this.IsEmpty) - return false; - return startPosition.Y < position.Y && position.Y < endPosition.Y || - startPosition.Y == position.Y && startPosition.X <= position.X && (startPosition.Y != endPosition.Y || position.X <= endPosition.X) || - endPosition.Y == position.Y && startPosition.Y != endPosition.Y && position.X <= endPosition.X; - } - - public bool ContainsOffset(int offset) - { - return Offset <= offset && offset <= EndOffset; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/Selection/ISelection.cs b/src/ICSharpCode.TextEditor/Src/Document/Selection/ISelection.cs deleted file mode 100644 index f2cab5a..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/Selection/ISelection.cs +++ /dev/null @@ -1,64 +0,0 @@ -// -// -// -// -// $Revision: 2659 $ -// - -using System.Drawing; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// An interface representing a portion of the current selection. - /// - public interface ISelection - { - TextLocation StartPosition { - get; - set; - } - - TextLocation EndPosition { - get; - set; - } - - int Offset { - get; - } - - int EndOffset { - get; - } - - int Length { - get; - } - - /// - /// Returns true, if the selection is rectangular - /// - bool IsRectangularSelection { - get; - } - - /// - /// Returns true, if the selection is empty - /// - bool IsEmpty { - get; - } - - /// - /// The text which is selected by this selection. - /// - string SelectedText { - get; - } - - bool ContainsOffset(int offset); - - bool ContainsPosition(TextLocation position); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/Selection/SelectionManager.cs b/src/ICSharpCode.TextEditor/Src/Document/Selection/SelectionManager.cs deleted file mode 100644 index ec0365e..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/Selection/SelectionManager.cs +++ /dev/null @@ -1,466 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// This class manages the selections in a document. - /// - public class SelectionManager : IDisposable - { - TextLocation selectionStart; - - internal TextLocation SelectionStart { - get { return selectionStart; } - set { - DefaultDocument.ValidatePosition(document, value); - selectionStart = value; - } - } - IDocument document; - TextArea textArea; - internal SelectFrom selectFrom = new SelectFrom(); - - internal List selectionCollection = new List(); - - /// - /// A collection containing all selections. - /// - public List SelectionCollection { - get { - return selectionCollection; - } - } - - /// - /// true if the is not empty, false otherwise. - /// - public bool HasSomethingSelected { - get { - return selectionCollection.Count > 0; - } - } - - public bool SelectionIsReadonly { - get { - if (document.ReadOnly) - return true; - foreach (ISelection sel in selectionCollection) { - if (SelectionIsReadOnly(document, sel)) - return true; - } - return false; - } - } - - internal static bool SelectionIsReadOnly(IDocument document, ISelection sel) - { - if (document.TextEditorProperties.SupportReadOnlySegments) - return document.MarkerStrategy.GetMarkers(sel.Offset, sel.Length).Exists(m=>m.IsReadOnly); - else - return false; - } - - /// - /// The text that is currently selected. - /// - public string SelectedText { - get { - StringBuilder builder = new StringBuilder(); - -// PriorityQueue queue = new PriorityQueue(); - - foreach (ISelection s in selectionCollection) { - builder.Append(s.SelectedText); -// queue.Insert(-s.Offset, s); - } - -// while (queue.Count > 0) { -// ISelection s = ((ISelection)queue.Remove()); -// builder.Append(s.SelectedText); -// } - - return builder.ToString(); - } - } - - /// - /// Creates a new instance of - /// - public SelectionManager(IDocument document) - { - this.document = document; - document.DocumentChanged += new DocumentEventHandler(DocumentChanged); - } - - /// - /// Creates a new instance of - /// - public SelectionManager(IDocument document, TextArea textArea) - { - this.document = document; - this.textArea = textArea; - document.DocumentChanged += new DocumentEventHandler(DocumentChanged); - } - - public void Dispose() - { - if (this.document != null) { - document.DocumentChanged -= new DocumentEventHandler(DocumentChanged); - this.document = null; - } - } - - void DocumentChanged(object sender, DocumentEventArgs e) - { - if (e.Text == null) { - Remove(e.Offset, e.Length); - } else { - if (e.Length < 0) { - Insert(e.Offset, e.Text); - } else { - Replace(e.Offset, e.Length, e.Text); - } - } - } - - /// - /// Clears the selection and sets a new selection - /// using the given object. - /// - public void SetSelection(ISelection selection) - { -// autoClearSelection = false; - if (selection != null) { - if (SelectionCollection.Count == 1 && - selection.StartPosition == SelectionCollection[0].StartPosition && - selection.EndPosition == SelectionCollection[0].EndPosition ) { - return; - } - ClearWithoutUpdate(); - selectionCollection.Add(selection); - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, selection.StartPosition.Y, selection.EndPosition.Y)); - document.CommitUpdate(); - OnSelectionChanged(EventArgs.Empty); - } else { - ClearSelection(); - } - } - - public void SetSelection(TextLocation startPosition, TextLocation endPosition) - { - SetSelection(new DefaultSelection(document, startPosition, endPosition)); - } - - public bool GreaterEqPos(TextLocation p1, TextLocation p2) - { - return p1.Y > p2.Y || p1.Y == p2.Y && p1.X >= p2.X; - } - - public void ExtendSelection(TextLocation oldPosition, TextLocation newPosition) - { - // where oldposition is where the cursor was, - // and newposition is where it has ended up from a click (both zero based) - - if (oldPosition == newPosition) - { - return; - } - - TextLocation min; - TextLocation max; - int oldnewX = newPosition.X; - bool oldIsGreater = GreaterEqPos(oldPosition, newPosition); - if (oldIsGreater) { - min = newPosition; - max = oldPosition; - } else { - min = oldPosition; - max = newPosition; - } - - if (min == max) { - return; - } - - if (!HasSomethingSelected) - { - SetSelection(new DefaultSelection(document, min, max)); - // initialise selectFrom for a cursor selection - if (selectFrom.where == WhereFrom.None) - SelectionStart = oldPosition; //textArea.Caret.Position; - return; - } - - ISelection selection = this.selectionCollection[0]; - - if (min == max) { - //selection.StartPosition = newPosition; - return; - } else { - // changed selection via gutter - if (selectFrom.where == WhereFrom.Gutter) - { - // selection new position is always at the left edge for gutter selections - newPosition.X = 0; - } - - if (GreaterEqPos(newPosition, SelectionStart)) // selecting forward - { - selection.StartPosition = SelectionStart; - // this handles last line selection - if (selectFrom.where == WhereFrom.Gutter ) //&& newPosition.Y != oldPosition.Y) - selection.EndPosition = new TextLocation(textArea.Caret.Column, textArea.Caret.Line); - else { - newPosition.X = oldnewX; - selection.EndPosition = newPosition; - } - } else { // selecting back - if (selectFrom.where == WhereFrom.Gutter && selectFrom.first == WhereFrom.Gutter) - { // gutter selection - selection.EndPosition = NextValidPosition(SelectionStart.Y); - } else { // internal text selection - selection.EndPosition = SelectionStart; //selection.StartPosition; - } - selection.StartPosition = newPosition; - } - } - - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, min.Y, max.Y)); - document.CommitUpdate(); - OnSelectionChanged(EventArgs.Empty); - } - - // retrieve the next available line - // - checks that there are more lines available after the current one - // - if there are then the next line is returned - // - if there are NOT then the last position on the given line is returned - public TextLocation NextValidPosition(int line) - { - if (line < document.TotalNumberOfLines - 1) - return new TextLocation(0, line + 1); - else - return new TextLocation(document.GetLineSegment(document.TotalNumberOfLines - 1).Length + 1, line); - } - - void ClearWithoutUpdate() - { - while (selectionCollection.Count > 0) { - ISelection selection = selectionCollection[selectionCollection.Count - 1]; - selectionCollection.RemoveAt(selectionCollection.Count - 1); - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.LinesBetween, selection.StartPosition.Y, selection.EndPosition.Y)); - OnSelectionChanged(EventArgs.Empty); - } - } - /// - /// Clears the selection. - /// - public void ClearSelection() - { - Point mousepos; - mousepos = textArea.mousepos; - // this is the most logical place to reset selection starting - // positions because it is always called before a new selection - selectFrom.first = selectFrom.where; - TextLocation newSelectionStart = textArea.TextView.GetLogicalPosition(mousepos.X - textArea.TextView.DrawingPosition.X, mousepos.Y - textArea.TextView.DrawingPosition.Y); - if (selectFrom.where == WhereFrom.Gutter) { - newSelectionStart.X = 0; -// selectionStart.Y = -1; - } - if (newSelectionStart.Line >= document.TotalNumberOfLines) { - newSelectionStart.Line = document.TotalNumberOfLines-1; - newSelectionStart.Column = document.GetLineSegment(document.TotalNumberOfLines-1).Length; - } - this.SelectionStart = newSelectionStart; - - ClearWithoutUpdate(); - document.CommitUpdate(); - } - - /// - /// Removes the selected text from the buffer and clears - /// the selection. - /// - public void RemoveSelectedText() - { - if (SelectionIsReadonly) { - ClearSelection(); - return; - } - List lines = new List(); - int offset = -1; - bool oneLine = true; -// PriorityQueue queue = new PriorityQueue(); - foreach (ISelection s in selectionCollection) { -// ISelection s = ((ISelection)queue.Remove()); - if (oneLine) { - int lineBegin = s.StartPosition.Y; - if (lineBegin != s.EndPosition.Y) { - oneLine = false; - } else { - lines.Add(lineBegin); - } - } - offset = s.Offset; - document.Remove(s.Offset, s.Length); - -// queue.Insert(-s.Offset, s); - } - ClearSelection(); - if (offset >= 0) { - // TODO: -// document.Caret.Offset = offset; - } - if (offset != -1) { - if (oneLine) { - foreach (int i in lines) { - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.SingleLine, i)); - } - } else { - document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - } - document.CommitUpdate(); - } - } - - - bool SelectionsOverlap(ISelection s1, ISelection s2) - { - return (s1.Offset <= s2.Offset && s2.Offset <= s1.Offset + s1.Length) || - (s1.Offset <= s2.Offset + s2.Length && s2.Offset + s2.Length <= s1.Offset + s1.Length) || - (s1.Offset >= s2.Offset && s1.Offset + s1.Length <= s2.Offset + s2.Length); - } - - /// - /// Returns true if the given offset points to a section which is - /// selected. - /// - public bool IsSelected(int offset) - { - return GetSelectionAt(offset) != null; - } - - /// - /// Returns a object giving the selection in which - /// the offset points to. - /// - /// - /// null if the offset doesn't point to a selection - /// - public ISelection GetSelectionAt(int offset) - { - foreach (ISelection s in selectionCollection) { - if (s.ContainsOffset(offset)) { - return s; - } - } - return null; - } - - /// - /// Used internally, do not call. - /// - internal void Insert(int offset, string text) - { -// foreach (ISelection selection in SelectionCollection) { -// if (selection.Offset > offset) { -// selection.Offset += text.Length; -// } else if (selection.Offset + selection.Length > offset) { -// selection.Length += text.Length; -// } -// } - } - - /// - /// Used internally, do not call. - /// - internal void Remove(int offset, int length) - { -// foreach (ISelection selection in selectionCollection) { -// if (selection.Offset > offset) { -// selection.Offset -= length; -// } else if (selection.Offset + selection.Length > offset) { -// selection.Length -= length; -// } -// } - } - - /// - /// Used internally, do not call. - /// - internal void Replace(int offset, int length, string text) - { -// foreach (ISelection selection in selectionCollection) { -// if (selection.Offset > offset) { -// selection.Offset = selection.Offset - length + text.Length; -// } else if (selection.Offset + selection.Length > offset) { -// selection.Length = selection.Length - length + text.Length; -// } -// } - } - - public ColumnRange GetSelectionAtLine(int lineNumber) - { - foreach (ISelection selection in selectionCollection) { - int startLine = selection.StartPosition.Y; - int endLine = selection.EndPosition.Y; - if (startLine < lineNumber && lineNumber < endLine) { - return ColumnRange.WholeColumn; - } - - if (startLine == lineNumber) { - LineSegment line = document.GetLineSegment(startLine); - int startColumn = selection.StartPosition.X; - int endColumn = endLine == lineNumber ? selection.EndPosition.X : line.Length + 1; - return new ColumnRange(startColumn, endColumn); - } - - if (endLine == lineNumber) { - int endColumn = selection.EndPosition.X; - return new ColumnRange(0, endColumn); - } - } - - return ColumnRange.NoColumn; - } - - public void FireSelectionChanged() - { - OnSelectionChanged(EventArgs.Empty); - } - protected virtual void OnSelectionChanged(EventArgs e) - { - if (SelectionChanged != null) { - SelectionChanged(this, e); - } - } - - public event EventHandler SelectionChanged; - } - - // selection initiated from... - internal class SelectFrom { - public int where = WhereFrom.None; // last selection initiator - public int first = WhereFrom.None; // first selection initiator - - public SelectFrom() - { - } - } - - // selection initiated from type... - internal class WhereFrom { - public const int None = 0; - public const int Gutter = 1; - public const int TArea = 2; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/TextAnchor.cs b/src/ICSharpCode.TextEditor/Src/Document/TextAnchor.cs deleted file mode 100644 index 6dca73c..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/TextAnchor.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// -// -// -// $Revision: 3272 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Document -{ - public enum AnchorMovementType - { - /// - /// Behaves like a start marker - when text is inserted at the anchor position, the anchor will stay - /// before the inserted text. - /// - BeforeInsertion, - /// - /// Behave like an end marker - when text is insered at the anchor position, the anchor will move - /// after the inserted text. - /// - AfterInsertion - } - - /// - /// An anchor that can be put into a document and moves around when the document is changed. - /// - public sealed class TextAnchor - { - static Exception AnchorDeletedError() - { - return new InvalidOperationException("The text containing the anchor was deleted"); - } - - LineSegment lineSegment; - int columnNumber; - - public LineSegment Line { - get { - if (lineSegment == null) throw AnchorDeletedError(); - return lineSegment; - } - internal set { - lineSegment = value; - } - } - - public bool IsDeleted { - get { - return lineSegment == null; - } - } - - public int LineNumber { - get { - return this.Line.LineNumber; - } - } - - public int ColumnNumber { - get { - if (lineSegment == null) throw AnchorDeletedError(); - return columnNumber; - } - internal set { - columnNumber = value; - } - } - - public TextLocation Location { - get { - return new TextLocation(this.ColumnNumber, this.LineNumber); - } - } - - public int Offset { - get { - return this.Line.Offset + columnNumber; - } - } - - /// - /// Controls how the anchor moves. - /// - public AnchorMovementType MovementType { get; set; } - - public event EventHandler Deleted; - - internal void Delete(ref DeferredEventList deferredEventList) - { - // we cannot fire an event here because this method is called while the LineManager adjusts the - // lineCollection, so an event handler could see inconsistent state - lineSegment = null; - deferredEventList.AddDeletedAnchor(this); - } - - internal void RaiseDeleted() - { - if (Deleted != null) - Deleted(this, EventArgs.Empty); - } - - internal TextAnchor(LineSegment lineSegment, int columnNumber) - { - this.lineSegment = lineSegment; - this.columnNumber = columnNumber; - } - - public override string ToString() - { - if (this.IsDeleted) - return "[TextAnchor (deleted)]"; - else - return "[TextAnchor " + this.Location.ToString() + "]"; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs deleted file mode 100644 index cbc233d..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/GapTextBufferStrategy.cs +++ /dev/null @@ -1,179 +0,0 @@ -// -// -// -// -// $Revision: 2667 $ -// - -using System; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - public class GapTextBufferStrategy : ITextBufferStrategy - { - #if DEBUG - int creatorThread = System.Threading.Thread.CurrentThread.ManagedThreadId; - - void CheckThread() - { - if (System.Threading.Thread.CurrentThread.ManagedThreadId != creatorThread) - throw new InvalidOperationException("GapTextBufferStategy is not thread-safe!"); - } - #endif - - char[] buffer = new char[0]; - - int gapBeginOffset = 0; - int gapEndOffset = 0; - int gapLength = 0; // gapLength == gapEndOffset - gapBeginOffset - - const int minGapLength = 128; - const int maxGapLength = 2048; - - public int Length { - get { - return buffer.Length - gapLength; - } - } - - public void SetContent(string text) - { - if (text == null) { - text = String.Empty; - } - buffer = text.ToCharArray(); - gapBeginOffset = gapEndOffset = gapLength = 0; - } - - public char GetCharAt(int offset) - { - #if DEBUG - CheckThread(); - #endif - - if (offset < 0 || offset >= Length) { - throw new ArgumentOutOfRangeException("offset", offset, "0 <= offset < " + Length.ToString()); - } - - return offset < gapBeginOffset ? buffer[offset] : buffer[offset + gapLength]; - } - - public string GetText(int offset, int length) - { - #if DEBUG - CheckThread(); - #endif - - if (offset < 0 || offset > Length) { - throw new ArgumentOutOfRangeException("offset", offset, "0 <= offset <= " + Length.ToString()); - } - if (length < 0 || offset + length > Length) { - throw new ArgumentOutOfRangeException("length", length, "0 <= length, offset(" + offset + ")+length <= " + Length.ToString()); - } - - int end = offset + length; - - if (end < gapBeginOffset) { - return new string(buffer, offset, length); - } - - if (offset > gapBeginOffset) { - return new string(buffer, offset + gapLength, length); - } - - int block1Size = gapBeginOffset - offset; - int block2Size = end - gapBeginOffset; - - StringBuilder buf = new StringBuilder(block1Size + block2Size); - buf.Append(buffer, offset, block1Size); - buf.Append(buffer, gapEndOffset, block2Size); - return buf.ToString(); - } - - public void Insert(int offset, string text) - { - Replace(offset, 0, text); - } - - public void Remove(int offset, int length) - { - Replace(offset, length, String.Empty); - } - - public void Replace(int offset, int length, string text) - { - if (text == null) { - text = String.Empty; - } - - #if DEBUG - CheckThread(); - #endif - - if (offset < 0 || offset > Length) { - throw new ArgumentOutOfRangeException("offset", offset, "0 <= offset <= " + Length.ToString()); - } - if (length < 0 || offset + length > Length) { - throw new ArgumentOutOfRangeException("length", length, "0 <= length, offset+length <= " + Length.ToString()); - } - - // Math.Max is used so that if we need to resize the array - // the new array has enough space for all old chars - PlaceGap(offset, text.Length - length); - gapEndOffset += length; // delete removed text - text.CopyTo(0, buffer, gapBeginOffset, text.Length); - gapBeginOffset += text.Length; - gapLength = gapEndOffset - gapBeginOffset; - if (gapLength > maxGapLength) { - MakeNewBuffer(gapBeginOffset, minGapLength); - } - } - - void PlaceGap(int newGapOffset, int minRequiredGapLength) - { - if (gapLength < minRequiredGapLength) { - // enlarge gap - MakeNewBuffer(newGapOffset, minRequiredGapLength); - } else { - while (newGapOffset < gapBeginOffset) { - buffer[--gapEndOffset] = buffer[--gapBeginOffset]; - } - while (newGapOffset > gapBeginOffset) { - buffer[gapBeginOffset++] = buffer[gapEndOffset++]; - } - } - } - - void MakeNewBuffer(int newGapOffset, int newGapLength) - { - if (newGapLength < minGapLength) newGapLength = minGapLength; - - char[] newBuffer = new char[Length + newGapLength]; - if (newGapOffset < gapBeginOffset) { - // gap is moving backwards - - // first part: - Array.Copy(buffer, 0, newBuffer, 0, newGapOffset); - // moving middle part: - Array.Copy(buffer, newGapOffset, newBuffer, newGapOffset + newGapLength, gapBeginOffset - newGapOffset); - // last part: - Array.Copy(buffer, gapEndOffset, newBuffer, newBuffer.Length - (buffer.Length - gapEndOffset), buffer.Length - gapEndOffset); - } else { - // gap is moving forwards - // first part: - Array.Copy(buffer, 0, newBuffer, 0, gapBeginOffset); - // moving middle part: - Array.Copy(buffer, gapEndOffset, newBuffer, gapBeginOffset, newGapOffset - gapBeginOffset); - // last part: - int lastPartLength = newBuffer.Length - (newGapOffset + newGapLength); - Array.Copy(buffer, buffer.Length - lastPartLength, newBuffer, newGapOffset + newGapLength, lastPartLength); - } - - gapBeginOffset = newGapOffset; - gapEndOffset = newGapOffset + newGapLength; - gapLength = newGapLength; - buffer = newBuffer; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/ITextBufferStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/ITextBufferStrategy.cs deleted file mode 100644 index 5acb272..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/ITextBufferStrategy.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// -// -// -// $Revision: 1966 $ -// - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Interface to describe a sequence of characters that can be edited. - /// - public interface ITextBufferStrategy - { - /// - /// The current length of the sequence of characters that can be edited. - /// - int Length { - get; - } - - /// - /// Inserts a string of characters into the sequence. - /// - /// - /// offset where to insert the string. - /// - /// - /// text to be inserted. - /// - void Insert(int offset, string text); - - /// - /// Removes some portion of the sequence. - /// - /// - /// offset of the remove. - /// - /// - /// number of characters to remove. - /// - void Remove(int offset, int length); - - /// - /// Replace some portion of the sequence. - /// - /// - /// offset. - /// - /// - /// number of characters to replace. - /// - /// - /// text to be replaced with. - /// - void Replace(int offset, int length, string text); - - /// - /// Fetches a string of characters contained in the sequence. - /// - /// - /// Offset into the sequence to fetch - /// - /// - /// number of characters to copy. - /// - string GetText(int offset, int length); - - /// - /// Returns a specific char of the sequence. - /// - /// - /// Offset of the char to get. - /// - char GetCharAt(int offset); - - /// - /// This method sets the stored content. - /// - /// - /// The string that represents the character sequence. - /// - void SetContent(string text); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/StringTextBufferStrategy.cs b/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/StringTextBufferStrategy.cs deleted file mode 100644 index 2255527..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/TextBufferStrategy/StringTextBufferStrategy.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// -// -// -// $Revision: 2682 $ -// - -using System; -using System.IO; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - /// - /// Simple implementation of the ITextBuffer interface implemented using a - /// string. - /// Only for fall-back purposes. - /// - public class StringTextBufferStrategy : ITextBufferStrategy - { - string storedText = ""; - - public int Length { - get { - return storedText.Length; - } - } - - public void Insert(int offset, string text) - { - if (text != null) { - storedText = storedText.Insert(offset, text); - } - } - - public void Remove(int offset, int length) - { - storedText = storedText.Remove(offset, length); - } - - public void Replace(int offset, int length, string text) - { - Remove(offset, length); - Insert(offset, text); - } - - public string GetText(int offset, int length) - { - if (length == 0) { - return ""; - } - if (offset == 0 && length >= storedText.Length) { - return storedText; - } - return storedText.Substring(offset, Math.Min(length, storedText.Length - offset)); - } - - public char GetCharAt(int offset) - { - if (offset == Length) { - return '\0'; - } - return storedText[offset]; - } - - public void SetContent(string text) - { - storedText = text; - } - - public StringTextBufferStrategy() - { - } - - public static ITextBufferStrategy CreateTextBufferFromFile(string fileName) - { - if (!File.Exists(fileName)) { - throw new System.IO.FileNotFoundException(fileName); - } - StringTextBufferStrategy s = new StringTextBufferStrategy(); - s.SetContent(Util.FileReader.ReadFileContent(fileName, Encoding.Default)); - return s; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/TextLocation.cs b/src/ICSharpCode.TextEditor/Src/Document/TextLocation.cs deleted file mode 100644 index 74c3d3e..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/TextLocation.cs +++ /dev/null @@ -1,128 +0,0 @@ -// -// -// -// -// $Revision: 2658$ -// - -using System; - -namespace ICSharpCode.TextEditor -{ - /// - /// A line/column position. - /// Text editor lines/columns are counting from zero. - /// - public struct TextLocation : IComparable, IEquatable - { - /// - /// Represents no text location (-1, -1). - /// - public static readonly TextLocation Empty = new TextLocation(-1, -1); - - public TextLocation(int column, int line) - { - x = column; - y = line; - } - - int x, y; - - public int X { - get { return x; } - set { x = value; } - } - - public int Y { - get { return y; } - set { y = value; } - } - - public int Line { - get { return y; } - set { y = value; } - } - - public int Column { - get { return x; } - set { x = value; } - } - - public bool IsEmpty { - get { - return x <= 0 && y <= 0; - } - } - - public override string ToString() - { - return string.Format("(Line {1}, Col {0})", this.x, this.y); - } - - public override int GetHashCode() - { - return unchecked (87 * x.GetHashCode() ^ y.GetHashCode()); - } - - public override bool Equals(object obj) - { - if (!(obj is TextLocation)) return false; - return (TextLocation)obj == this; - } - - public bool Equals(TextLocation other) - { - return this == other; - } - - public static bool operator ==(TextLocation a, TextLocation b) - { - return a.x == b.x && a.y == b.y; - } - - public static bool operator !=(TextLocation a, TextLocation b) - { - return a.x != b.x || a.y != b.y; - } - - public static bool operator <(TextLocation a, TextLocation b) - { - if (a.y < b.y) - return true; - else if (a.y == b.y) - return a.x < b.x; - else - return false; - } - - public static bool operator >(TextLocation a, TextLocation b) - { - if (a.y > b.y) - return true; - else if (a.y == b.y) - return a.x > b.x; - else - return false; - } - - public static bool operator <=(TextLocation a, TextLocation b) - { - return !(a > b); - } - - public static bool operator >=(TextLocation a, TextLocation b) - { - return !(a < b); - } - - public int CompareTo(TextLocation other) - { - if (this == other) - return 0; - if (this < other) - return -1; - else - return 1; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Document/TextUtilities.cs b/src/ICSharpCode.TextEditor/Src/Document/TextUtilities.cs deleted file mode 100644 index 5d120f4..0000000 --- a/src/ICSharpCode.TextEditor/Src/Document/TextUtilities.cs +++ /dev/null @@ -1,313 +0,0 @@ -// -// -// -// -// $Revision: 3020 $ -// - -using System; -using System.Diagnostics; -using System.Text; - -namespace ICSharpCode.TextEditor.Document -{ - - public sealed class TextUtilities - { - /// - /// This function takes a string and converts the whitespace in front of - /// it to tabs. If the length of the whitespace at the start of the string - /// was not a whole number of tabs then there will still be some spaces just - /// before the text starts. - /// the output string will be of the form: - /// 1. zero or more tabs - /// 2. zero or more spaces (less than tabIndent) - /// 3. the rest of the line - /// - public static string LeadingWhiteSpaceToTabs(string line, int tabIndent) { - StringBuilder sb = new StringBuilder(line.Length); - int consecutiveSpaces = 0; - int i = 0; - for(i = 0; i < line.Length; i++) { - if(line[i] == ' ') { - consecutiveSpaces++; - if(consecutiveSpaces == tabIndent) { - sb.Append('\t'); - consecutiveSpaces = 0; - } - } - else if(line[i] == '\t') { - sb.Append('\t'); - // if we had say 3 spaces then a tab and tabIndent was 4 then - // we would want to simply replace all of that with 1 tab - consecutiveSpaces = 0; - } - else { - break; - } - } - - if(i < line.Length) { - sb.Append(line.Substring(i-consecutiveSpaces)); - } - return sb.ToString(); - } - - public static bool IsLetterDigitOrUnderscore(char c) - { - if(!Char.IsLetterOrDigit(c)) { - return c == '_'; - } - return true; - } - - public enum CharacterType { - LetterDigitOrUnderscore, - WhiteSpace, - Other - } - - /// - /// This method returns the expression before a specified offset. - /// That method is used in code completion to determine the expression given - /// to the parser for type resolve. - /// - public static string GetExpressionBeforeOffset(TextArea textArea, int initialOffset) - { - IDocument document = textArea.Document; - int offset = initialOffset; - while (offset - 1 > 0) { - switch (document.GetCharAt(offset - 1)) { - case '\n': - case '\r': - case '}': - goto done; -// offset = SearchBracketBackward(document, offset - 2, '{','}'); -// break; - case ']': - offset = SearchBracketBackward(document, offset - 2, '[',']'); - break; - case ')': - offset = SearchBracketBackward(document, offset - 2, '(',')'); - break; - case '.': - --offset; - break; - case '"': - if (offset < initialOffset - 1) { - return null; - } - return "\"\""; - case '\'': - if (offset < initialOffset - 1) { - return null; - } - return "'a'"; - case '>': - if (document.GetCharAt(offset - 2) == '-') { - offset -= 2; - break; - } - goto done; - default: - if (Char.IsWhiteSpace(document.GetCharAt(offset - 1))) { - --offset; - break; - } - int start = offset - 1; - if (!IsLetterDigitOrUnderscore(document.GetCharAt(start))) { - goto done; - } - - while (start > 0 && IsLetterDigitOrUnderscore(document.GetCharAt(start - 1))) { - --start; - } - string word = document.GetText(start, offset - start).Trim(); - switch (word) { - case "ref": - case "out": - case "in": - case "return": - case "throw": - case "case": - goto done; - } - - if (word.Length > 0 && !IsLetterDigitOrUnderscore(word[0])) { - goto done; - } - offset = start; - break; - } - } - done: - //// simple exit fails when : is inside comment line or any other character - //// we have to check if we got several ids in resulting line, which usually happens when - //// id. is typed on next line after comment one - //// Would be better if lexer would parse properly such expressions. However this will cause - //// modifications in this area too - to get full comment line and remove it afterwards - if (offset < 0) - return string.Empty; - - string resText=document.GetText(offset, textArea.Caret.Offset - offset ).Trim(); - int pos=resText.LastIndexOf('\n'); - if (pos>=0) { - offset+=pos+1; - //// whitespaces and tabs, which might be inside, will be skipped by trim below - } - string expression = document.GetText(offset, textArea.Caret.Offset - offset ).Trim(); - return expression; - } - - - public static CharacterType GetCharacterType(char c) - { - if(IsLetterDigitOrUnderscore(c)) - return CharacterType.LetterDigitOrUnderscore; - if(Char.IsWhiteSpace(c)) - return CharacterType.WhiteSpace; - return CharacterType.Other; - } - - public static int GetFirstNonWSChar(IDocument document, int offset) - { - while (offset < document.TextLength && Char.IsWhiteSpace(document.GetCharAt(offset))) { - ++offset; - } - return offset; - } - - public static int FindWordEnd(IDocument document, int offset) - { - LineSegment line = document.GetLineSegmentForOffset(offset); - int endPos = line.Offset + line.Length; - while (offset < endPos && IsLetterDigitOrUnderscore(document.GetCharAt(offset))) { - ++offset; - } - - return offset; - } - - public static int FindWordStart(IDocument document, int offset) - { - LineSegment line = document.GetLineSegmentForOffset(offset); - int lineOffset = line.Offset; - while (offset > lineOffset && IsLetterDigitOrUnderscore(document.GetCharAt(offset - 1))) { - --offset; - } - - return offset; - } - - // go forward to the start of the next word - // if the cursor is at the start or in the middle of a word we move to the end of the word - // and then past any whitespace that follows it - // if the cursor is at the start or in the middle of some whitespace we move to the start of the - // next word - public static int FindNextWordStart(IDocument document, int offset) - { - int originalOffset = offset; - LineSegment line = document.GetLineSegmentForOffset(offset); - int endPos = line.Offset + line.Length; - // lets go to the end of the word, whitespace or operator - CharacterType t = GetCharacterType(document.GetCharAt(offset)); - while (offset < endPos && GetCharacterType(document.GetCharAt(offset)) == t) { - ++offset; - } - - // now we're at the end of the word, lets find the start of the next one by skipping whitespace - while (offset < endPos && GetCharacterType(document.GetCharAt(offset)) == CharacterType.WhiteSpace) { - ++offset; - } - - return offset; - } - - // go back to the start of the word we are on - // if we are already at the start of a word or if we are in whitespace, then go back - // to the start of the previous word - public static int FindPrevWordStart(IDocument document, int offset) - { - int originalOffset = offset; - if (offset > 0) { - LineSegment line = document.GetLineSegmentForOffset(offset); - CharacterType t = GetCharacterType(document.GetCharAt(offset - 1)); - while (offset > line.Offset && GetCharacterType(document.GetCharAt(offset - 1)) == t) { - --offset; - } - - // if we were in whitespace, and now we're at the end of a word or operator, go back to the beginning of it - if(t == CharacterType.WhiteSpace && offset > line.Offset) { - t = GetCharacterType(document.GetCharAt(offset - 1)); - while (offset > line.Offset && GetCharacterType(document.GetCharAt(offset - 1)) == t) { - --offset; - } - } - } - - return offset; - } - - public static string GetLineAsString(IDocument document, int lineNumber) - { - LineSegment line = document.GetLineSegment(lineNumber); - return document.GetText(line.Offset, line.Length); - } - - public static int SearchBracketBackward(IDocument document, int offset, char openBracket, char closingBracket) - { - return document.FormattingStrategy.SearchBracketBackward(document, offset, openBracket, closingBracket); - } - - public static int SearchBracketForward(IDocument document, int offset, char openBracket, char closingBracket) - { - return document.FormattingStrategy.SearchBracketForward(document, offset, openBracket, closingBracket); - } - - /// - /// Returns true, if the line lineNumber is empty or filled with whitespaces. - /// - public static bool IsEmptyLine(IDocument document, int lineNumber) - { - return IsEmptyLine(document, document.GetLineSegment(lineNumber)); - } - - /// - /// Returns true, if the line lineNumber is empty or filled with whitespaces. - /// - public static bool IsEmptyLine(IDocument document, LineSegment line) - { - for (int i = line.Offset; i < line.Offset + line.Length; ++i) { - char ch = document.GetCharAt(i); - if (!Char.IsWhiteSpace(ch)) { - return false; - } - } - return true; - } - - static bool IsWordPart(char ch) - { - return IsLetterDigitOrUnderscore(ch) || ch == '.'; - } - - public static string GetWordAt(IDocument document, int offset) - { - if (offset < 0 || offset >= document.TextLength - 1 || !IsWordPart(document.GetCharAt(offset))) { - return String.Empty; - } - int startOffset = offset; - int endOffset = offset; - while (startOffset > 0 && IsWordPart(document.GetCharAt(startOffset - 1))) { - --startOffset; - } - - while (endOffset < document.TextLength - 1 && IsWordPart(document.GetCharAt(endOffset + 1))) { - ++endOffset; - } - - Debug.Assert(endOffset >= startOffset); - return document.GetText(startOffset, endOffset - startOffset + 1); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/AbstractMargin.cs b/src/ICSharpCode.TextEditor/Src/Gui/AbstractMargin.cs deleted file mode 100644 index 462c625..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/AbstractMargin.cs +++ /dev/null @@ -1,115 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Drawing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - public delegate void MarginMouseEventHandler(AbstractMargin sender, Point mousepos, MouseButtons mouseButtons); - public delegate void MarginPaintEventHandler(AbstractMargin sender, Graphics g, Rectangle rect); - - /// - /// This class views the line numbers and folding markers. - /// - public abstract class AbstractMargin - { - Cursor cursor = Cursors.Default; - - [CLSCompliant(false)] - protected Rectangle drawingPosition = new Rectangle(0, 0, 0, 0); - [CLSCompliant(false)] - protected TextArea textArea; - - public Rectangle DrawingPosition { - get { - return drawingPosition; - } - set { - drawingPosition = value; - } - } - - public TextArea TextArea { - get { - return textArea; - } - } - - public IDocument Document { - get { - return textArea.Document; - } - } - - public ITextEditorProperties TextEditorProperties { - get { - return textArea.Document.TextEditorProperties; - } - } - - public virtual Cursor Cursor { - get { - return cursor; - } - set { - cursor = value; - } - } - - public virtual Size Size { - get { - return new Size(-1, -1); - } - } - - public virtual bool IsVisible { - get { - return true; - } - } - - protected AbstractMargin(TextArea textArea) - { - this.textArea = textArea; - } - - public virtual void HandleMouseDown(Point mousepos, MouseButtons mouseButtons) - { - if (MouseDown != null) { - MouseDown(this, mousepos, mouseButtons); - } - } - public virtual void HandleMouseMove(Point mousepos, MouseButtons mouseButtons) - { - if (MouseMove != null) { - MouseMove(this, mousepos, mouseButtons); - } - } - public virtual void HandleMouseLeave(EventArgs e) - { - if (MouseLeave != null) { - MouseLeave(this, e); - } - } - - public virtual void Paint(Graphics g, Rectangle rect) - { - if (Painted != null) { - Painted(this, g, rect); - } - } - - public event MarginPaintEventHandler Painted; - public event MarginMouseEventHandler MouseDown; - public event MarginMouseEventHandler MouseMove; - public event EventHandler MouseLeave; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/BracketHighlighter.cs b/src/ICSharpCode.TextEditor/Src/Gui/BracketHighlighter.cs deleted file mode 100644 index a6710d0..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/BracketHighlighter.cs +++ /dev/null @@ -1,86 +0,0 @@ -// -// -// -// -// $Revision: 2659 $ -// - -using System; -using System.Drawing; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - public class BracketHighlight - { - public TextLocation OpenBrace { get; set; } - public TextLocation CloseBrace { get; set; } - - public BracketHighlight(TextLocation openBrace, TextLocation closeBrace) - { - this.OpenBrace = openBrace; - this.CloseBrace = closeBrace; - } - } - - public class BracketHighlightingSheme - { - char opentag; - char closingtag; - - public char OpenTag { - get { - return opentag; - } - set { - opentag = value; - } - } - - public char ClosingTag { - get { - return closingtag; - } - set { - closingtag = value; - } - } - - public BracketHighlightingSheme(char opentag, char closingtag) - { - this.opentag = opentag; - this.closingtag = closingtag; - } - - public BracketHighlight GetHighlight(IDocument document, int offset) - { - int searchOffset; - if (document.TextEditorProperties.BracketMatchingStyle == BracketMatchingStyle.After) { - searchOffset = offset; - } else { - searchOffset = offset + 1; - } - char word = document.GetCharAt(Math.Max(0, Math.Min(document.TextLength - 1, searchOffset))); - - TextLocation endP = document.OffsetToPosition(searchOffset); - if (word == opentag) { - if (searchOffset < document.TextLength) { - int bracketOffset = TextUtilities.SearchBracketForward(document, searchOffset + 1, opentag, closingtag); - if (bracketOffset >= 0) { - TextLocation p = document.OffsetToPosition(bracketOffset); - return new BracketHighlight(p, endP); - } - } - } else if (word == closingtag) { - if (searchOffset > 0) { - int bracketOffset = TextUtilities.SearchBracketBackward(document, searchOffset - 1, opentag, closingtag); - if (bracketOffset >= 0) { - TextLocation p = document.OffsetToPosition(bracketOffset); - return new BracketHighlight(p, endP); - } - } - } - return null; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/BrushRegistry.cs b/src/ICSharpCode.TextEditor/Src/Gui/BrushRegistry.cs deleted file mode 100644 index 9bcd248..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/BrushRegistry.cs +++ /dev/null @@ -1,61 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Collections; -using System.Drawing; -using System.Drawing.Drawing2D; - -namespace ICSharpCode.TextEditor -{ - /// - /// Contains brushes/pens for the text editor to speed up drawing. Re-Creation of brushes and pens - /// seems too costly. - /// - public class BrushRegistry - { - static Hashtable brushes = new Hashtable(); - static Hashtable pens = new Hashtable(); - static Hashtable dotPens = new Hashtable(); - - public static Brush GetBrush(Color color) - { - if (!brushes.Contains(color)) { - Brush newBrush = new SolidBrush(color); - brushes.Add(color, newBrush); - return newBrush; - } - return brushes[color] as Brush; - } - - public static Pen GetPen(Color color) - { - if (!pens.Contains(color)) { - Pen newPen = new Pen(color); - pens.Add(color, newPen); - return newPen; - } - return pens[color] as Pen; - } - - public static Pen GetDotPen(Color bgColor, Color fgColor) - { - bool containsBgColor = dotPens.Contains(bgColor); - if (!containsBgColor || !((Hashtable)dotPens[bgColor]).Contains(fgColor)) { - if (!containsBgColor) { - dotPens[bgColor] = new Hashtable(); - } - - HatchBrush hb = new HatchBrush(HatchStyle.Percent50, bgColor, fgColor); - Pen newPen = new Pen(hb); - ((Hashtable)dotPens[bgColor])[fgColor] = newPen; - return newPen; - } - return ((Hashtable)dotPens[bgColor])[fgColor] as Pen; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/Caret.cs b/src/ICSharpCode.TextEditor/Src/Gui/Caret.cs deleted file mode 100644 index bcfcca4..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/Caret.cs +++ /dev/null @@ -1,491 +0,0 @@ -// -// -// -// -// $Revision: 3279 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Diagnostics; -using System.Runtime.InteropServices; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// In this enumeration are all caret modes listed. - /// - public enum CaretMode { - /// - /// If the caret is in insert mode typed characters will be - /// inserted at the caret position - /// - InsertMode, - - /// - /// If the caret is in overwirte mode typed characters will - /// overwrite the character at the caret position - /// - OverwriteMode - } - - - public class Caret : System.IDisposable - { - int line = 0; - int column = 0; - int desiredXPos = 0; - CaretMode caretMode; - - static bool caretCreated = false; - bool hidden = true; - TextArea textArea; - Point currentPos = new Point(-1, -1); - Ime ime = null; - CaretImplementation caretImplementation; - - /// - /// The 'prefered' xPos in which the caret moves, when it is moved - /// up/down. Measured in pixels, not in characters! - /// - public int DesiredColumn { - get { - return desiredXPos; - } - set { - desiredXPos = value; - } - } - - /// - /// The current caret mode. - /// - public CaretMode CaretMode { - get { - return caretMode; - } - set { - caretMode = value; - OnCaretModeChanged(EventArgs.Empty); - } - } - - public int Line { - get { - return line; - } - set { - line = value; - ValidateCaretPos(); - UpdateCaretPosition(); - OnPositionChanged(EventArgs.Empty); - } - } - - public int Column { - get { - return column; - } - set { - column = value; - ValidateCaretPos(); - UpdateCaretPosition(); - OnPositionChanged(EventArgs.Empty); - } - } - - public TextLocation Position { - get { - return new TextLocation(column, line); - } - set { - line = value.Y; - column = value.X; - ValidateCaretPos(); - UpdateCaretPosition(); - OnPositionChanged(EventArgs.Empty); - } - } - - public int Offset { - get { - return textArea.Document.PositionToOffset(Position); - } - } - - public Caret(TextArea textArea) - { - this.textArea = textArea; - textArea.GotFocus += new EventHandler(GotFocus); - textArea.LostFocus += new EventHandler(LostFocus); - if (Environment.OSVersion.Platform == PlatformID.Unix) - caretImplementation = new ManagedCaret(this); - else - caretImplementation = new Win32Caret(this); - } - - public void Dispose() - { - textArea.GotFocus -= new EventHandler(GotFocus); - textArea.LostFocus -= new EventHandler(LostFocus); - textArea = null; - caretImplementation.Dispose(); - } - - public TextLocation ValidatePosition(TextLocation pos) - { - int line = Math.Max(0, Math.Min(textArea.Document.TotalNumberOfLines - 1, pos.Y)); - int column = Math.Max(0, pos.X); - - if (column == int.MaxValue || !textArea.TextEditorProperties.AllowCaretBeyondEOL) { - LineSegment lineSegment = textArea.Document.GetLineSegment(line); - column = Math.Min(column, lineSegment.Length); - } - return new TextLocation(column, line); - } - - /// - /// If the caret position is outside the document text bounds - /// it is set to the correct position by calling ValidateCaretPos. - /// - public void ValidateCaretPos() - { - line = Math.Max(0, Math.Min(textArea.Document.TotalNumberOfLines - 1, line)); - column = Math.Max(0, column); - - if (column == int.MaxValue || !textArea.TextEditorProperties.AllowCaretBeyondEOL) { - LineSegment lineSegment = textArea.Document.GetLineSegment(line); - column = Math.Min(column, lineSegment.Length); - } - } - - void CreateCaret() - { - while (!caretCreated) { - switch (caretMode) { - case CaretMode.InsertMode: - caretCreated = caretImplementation.Create(2, textArea.TextView.FontHeight); - break; - case CaretMode.OverwriteMode: - caretCreated = caretImplementation.Create((int)textArea.TextView.SpaceWidth, textArea.TextView.FontHeight); - break; - } - } - if (currentPos.X < 0) { - ValidateCaretPos(); - currentPos = ScreenPosition; - } - caretImplementation.SetPosition(currentPos.X, currentPos.Y); - caretImplementation.Show(); - } - - public void RecreateCaret() - { - Log("RecreateCaret"); - DisposeCaret(); - if (!hidden) { - CreateCaret(); - } - } - - void DisposeCaret() - { - if (caretCreated) { - caretCreated = false; - caretImplementation.Hide(); - caretImplementation.Destroy(); - } - } - - void GotFocus(object sender, EventArgs e) - { - Log("GotFocus, IsInUpdate=" + textArea.MotherTextEditorControl.IsInUpdate); - hidden = false; - if (!textArea.MotherTextEditorControl.IsInUpdate) { - CreateCaret(); - UpdateCaretPosition(); - } - } - - void LostFocus(object sender, EventArgs e) - { - Log("LostFocus"); - hidden = true; - DisposeCaret(); - } - - public Point ScreenPosition { - get { - int xpos = textArea.TextView.GetDrawingXPos(this.line, this.column); - return new Point(textArea.TextView.DrawingPosition.X + xpos, - textArea.TextView.DrawingPosition.Y - + (textArea.Document.GetVisibleLine(this.line)) * textArea.TextView.FontHeight - - textArea.TextView.TextArea.VirtualTop.Y); - } - } - int oldLine = -1; - bool outstandingUpdate; - - internal void OnEndUpdate() - { - if (outstandingUpdate) - UpdateCaretPosition(); - } - - public void UpdateCaretPosition() - { - Log("UpdateCaretPosition"); - - if (caretImplementation.RequireRedrawOnPositionChange) { - textArea.UpdateLine(oldLine); - if (line != oldLine) - textArea.UpdateLine(line); - } else { - if (textArea.MotherTextAreaControl.TextEditorProperties.LineViewerStyle == LineViewerStyle.FullRow && oldLine != line) { - textArea.UpdateLine(oldLine); - textArea.UpdateLine(line); - } - } - oldLine = line; - - - if (hidden || textArea.MotherTextEditorControl.IsInUpdate) { - outstandingUpdate = true; - return; - } else { - outstandingUpdate = false; - } - ValidateCaretPos(); - int lineNr = this.line; - int xpos = textArea.TextView.GetDrawingXPos(lineNr, this.column); - //LineSegment lineSegment = textArea.Document.GetLineSegment(lineNr); - Point pos = ScreenPosition; - if (xpos >= 0) { - CreateCaret(); - bool success = caretImplementation.SetPosition(pos.X, pos.Y); - if (!success) { - caretImplementation.Destroy(); - caretCreated = false; - UpdateCaretPosition(); - } - } else { - caretImplementation.Destroy(); - } - - // set the input method editor location - if (ime == null) { - ime = new Ime(textArea.Handle, textArea.Document.TextEditorProperties.Font); - } else { - ime.HWnd = textArea.Handle; - ime.Font = textArea.Document.TextEditorProperties.Font; - } - ime.SetIMEWindowLocation(pos.X, pos.Y); - - currentPos = pos; - } - - [Conditional("DEBUG")] - static void Log(string text) - { - //Console.WriteLine(text); - } - - #region Caret implementation - internal void PaintCaret(Graphics g) - { - caretImplementation.PaintCaret(g); - } - - abstract class CaretImplementation : IDisposable - { - public bool RequireRedrawOnPositionChange; - - public abstract bool Create(int width, int height); - public abstract void Hide(); - public abstract void Show(); - public abstract bool SetPosition(int x, int y); - public abstract void PaintCaret(Graphics g); - public abstract void Destroy(); - - public virtual void Dispose() - { - Destroy(); - } - } - - class ManagedCaret : CaretImplementation - { - System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer { Interval = 300 }; - bool visible; - bool blink = true; - int x, y, width, height; - TextArea textArea; - Caret parentCaret; - - public ManagedCaret(Caret caret) - { - base.RequireRedrawOnPositionChange = true; - this.textArea = caret.textArea; - this.parentCaret = caret; - timer.Tick += CaretTimerTick; - } - - void CaretTimerTick(object sender, EventArgs e) - { - blink = !blink; - if (visible) - textArea.UpdateLine(parentCaret.Line); - } - - public override bool Create(int width, int height) - { - this.visible = true; - this.width = width - 2; - this.height = height; - timer.Enabled = true; - return true; - } - public override void Hide() - { - visible = false; - } - public override void Show() - { - visible = true; - } - public override bool SetPosition(int x, int y) - { - this.x = x - 1; - this.y = y; - return true; - } - public override void PaintCaret(Graphics g) - { - if (visible && blink) - g.DrawRectangle(Pens.Gray, x, y, width, height); - } - public override void Destroy() - { - visible = false; - timer.Enabled = false; - } - public override void Dispose() - { - base.Dispose(); - timer.Dispose(); - } - } - - class Win32Caret : CaretImplementation - { - [DllImport("User32.dll")] - static extern bool CreateCaret(IntPtr hWnd, int hBitmap, int nWidth, int nHeight); - - [DllImport("User32.dll")] - static extern bool SetCaretPos(int x, int y); - - [DllImport("User32.dll")] - static extern bool DestroyCaret(); - - [DllImport("User32.dll")] - static extern bool ShowCaret(IntPtr hWnd); - - [DllImport("User32.dll")] - static extern bool HideCaret(IntPtr hWnd); - - TextArea textArea; - - public Win32Caret(Caret caret) - { - this.textArea = caret.textArea; - } - - public override bool Create(int width, int height) - { - return CreateCaret(textArea.Handle, 0, width, height); - } - public override void Hide() - { - HideCaret(textArea.Handle); - } - public override void Show() - { - ShowCaret(textArea.Handle); - } - public override bool SetPosition(int x, int y) - { - return SetCaretPos(x, y); - } - public override void PaintCaret(Graphics g) - { - } - public override void Destroy() - { - DestroyCaret(); - } - } - #endregion - - bool firePositionChangedAfterUpdateEnd; - - void FirePositionChangedAfterUpdateEnd(object sender, EventArgs e) - { - OnPositionChanged(EventArgs.Empty); - } - - protected virtual void OnPositionChanged(EventArgs e) - { - if (this.textArea.MotherTextEditorControl.IsInUpdate) { - if (firePositionChangedAfterUpdateEnd == false) { - firePositionChangedAfterUpdateEnd = true; - this.textArea.Document.UpdateCommited += FirePositionChangedAfterUpdateEnd; - } - return; - } else if (firePositionChangedAfterUpdateEnd) { - this.textArea.Document.UpdateCommited -= FirePositionChangedAfterUpdateEnd; - firePositionChangedAfterUpdateEnd = false; - } - - List foldings = textArea.Document.FoldingManager.GetFoldingsFromPosition(line, column); - bool shouldUpdate = false; - foreach (FoldMarker foldMarker in foldings) { - shouldUpdate |= foldMarker.IsFolded; - foldMarker.IsFolded = false; - } - - if (shouldUpdate) { - textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); - } - - if (PositionChanged != null) { - PositionChanged(this, e); - } - textArea.ScrollToCaret(); - } - - protected virtual void OnCaretModeChanged(EventArgs e) - { - if (CaretModeChanged != null) { - CaretModeChanged(this, e); - } - caretImplementation.Hide(); - caretImplementation.Destroy(); - caretCreated = false; - CreateCaret(); - caretImplementation.Show(); - } - - /// - /// Is called each time the caret is moved. - /// - public event EventHandler PositionChanged; - - /// - /// Is called each time the CaretMode has changed. - /// - public event EventHandler CaretModeChanged; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs b/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs deleted file mode 100644 index 15c0963..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/AbstractCompletionWindow.cs +++ /dev/null @@ -1,214 +0,0 @@ -// -// -// -// -// $Revision: 2681 $ -// - -using System; -using System.Drawing; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Gui.CompletionWindow -{ - /// - /// Description of AbstractCompletionWindow. - /// - public abstract class AbstractCompletionWindow : System.Windows.Forms.Form - { - protected TextEditorControl control; - protected Size drawingSize; - Rectangle workingScreen; - Form parentForm; - - protected AbstractCompletionWindow(Form parentForm, TextEditorControl control) - { - workingScreen = Screen.GetWorkingArea(parentForm); -// SetStyle(ControlStyles.Selectable, false); - this.parentForm = parentForm; - this.control = control; - - SetLocation(); - StartPosition = FormStartPosition.Manual; - FormBorderStyle = FormBorderStyle.None; - ShowInTaskbar = false; - MinimumSize = new Size(1, 1); - Size = new Size(1, 1); - } - - protected virtual void SetLocation() - { - TextArea textArea = control.ActiveTextAreaControl.TextArea; - TextLocation caretPos = textArea.Caret.Position; - - int xpos = textArea.TextView.GetDrawingXPos(caretPos.Y, caretPos.X); - int rulerHeight = textArea.TextEditorProperties.ShowHorizontalRuler ? textArea.TextView.FontHeight : 0; - Point pos = new Point(textArea.TextView.DrawingPosition.X + xpos, - textArea.TextView.DrawingPosition.Y + (textArea.Document.GetVisibleLine(caretPos.Y)) * textArea.TextView.FontHeight - - textArea.TextView.TextArea.VirtualTop.Y + textArea.TextView.FontHeight + rulerHeight); - - Point location = control.ActiveTextAreaControl.PointToScreen(pos); - - // set bounds - Rectangle bounds = new Rectangle(location, drawingSize); - - if (!workingScreen.Contains(bounds)) { - if (bounds.Right > workingScreen.Right) { - bounds.X = workingScreen.Right - bounds.Width; - } - if (bounds.Left < workingScreen.Left) { - bounds.X = workingScreen.Left; - } - if (bounds.Top < workingScreen.Top) { - bounds.Y = workingScreen.Top; - } - if (bounds.Bottom > workingScreen.Bottom) { - bounds.Y = bounds.Y - bounds.Height - control.ActiveTextAreaControl.TextArea.TextView.FontHeight; - if (bounds.Bottom > workingScreen.Bottom) { - bounds.Y = workingScreen.Bottom - bounds.Height; - } - } - } - Bounds = bounds; - } - - protected override CreateParams CreateParams { - get { - CreateParams p = base.CreateParams; - AddShadowToWindow(p); - return p; - } - } - - static int shadowStatus; - - /// - /// Adds a shadow to the create params if it is supported by the operating system. - /// - public static void AddShadowToWindow(CreateParams createParams) - { - if (shadowStatus == 0) { - // Test OS version - shadowStatus = -1; // shadow not supported - if (Environment.OSVersion.Platform == PlatformID.Win32NT) { - Version ver = Environment.OSVersion.Version; - if (ver.Major > 5 || ver.Major == 5 && ver.Minor >= 1) { - shadowStatus = 1; - } - } - } - if (shadowStatus == 1) { - createParams.ClassStyle |= 0x00020000; // set CS_DROPSHADOW - } - } - - protected override bool ShowWithoutActivation { - get { - return true; - } - } - - protected void ShowCompletionWindow() - { - Owner = parentForm; - Enabled = true; - this.Show(); - - control.Focus(); - - if (parentForm != null) { - parentForm.LocationChanged += new EventHandler(this.ParentFormLocationChanged); - } - - control.ActiveTextAreaControl.VScrollBar.ValueChanged += new EventHandler(ParentFormLocationChanged); - control.ActiveTextAreaControl.HScrollBar.ValueChanged += new EventHandler(ParentFormLocationChanged); - control.ActiveTextAreaControl.TextArea.DoProcessDialogKey += new DialogKeyProcessor(ProcessTextAreaKey); - control.ActiveTextAreaControl.Caret.PositionChanged += new EventHandler(CaretOffsetChanged); - control.ActiveTextAreaControl.TextArea.LostFocus += new EventHandler(this.TextEditorLostFocus); - control.Resize += new EventHandler(ParentFormLocationChanged); - - foreach (Control c in Controls) { - c.MouseMove += ControlMouseMove; - } - } - - void ParentFormLocationChanged(object sender, EventArgs e) - { - SetLocation(); - } - - public virtual bool ProcessKeyEvent(char ch) - { - return false; - } - - protected virtual bool ProcessTextAreaKey(Keys keyData) - { - if (!Visible) { - return false; - } - switch (keyData) { - case Keys.Escape: - Close(); - return true; - } - return false; - } - - protected virtual void CaretOffsetChanged(object sender, EventArgs e) - { - } - - protected void TextEditorLostFocus(object sender, EventArgs e) - { - if (!control.ActiveTextAreaControl.TextArea.Focused && !this.ContainsFocus) { - Close(); - } - } - - protected override void OnClosed(EventArgs e) - { - base.OnClosed(e); - - // take out the inserted methods - parentForm.LocationChanged -= new EventHandler(ParentFormLocationChanged); - - foreach (Control c in Controls) { - c.MouseMove -= ControlMouseMove; - } - - if (control.ActiveTextAreaControl.VScrollBar != null) { - control.ActiveTextAreaControl.VScrollBar.ValueChanged -= new EventHandler(ParentFormLocationChanged); - } - if (control.ActiveTextAreaControl.HScrollBar != null) { - control.ActiveTextAreaControl.HScrollBar.ValueChanged -= new EventHandler(ParentFormLocationChanged); - } - - control.ActiveTextAreaControl.TextArea.LostFocus -= new EventHandler(this.TextEditorLostFocus); - control.ActiveTextAreaControl.Caret.PositionChanged -= new EventHandler(CaretOffsetChanged); - control.ActiveTextAreaControl.TextArea.DoProcessDialogKey -= new DialogKeyProcessor(ProcessTextAreaKey); - control.Resize -= new EventHandler(ParentFormLocationChanged); - Dispose(); - } - - protected override void OnMouseMove(MouseEventArgs e) - { - base.OnMouseMove(e); - ControlMouseMove(this, e); - } - - /// - /// Invoked when the mouse moves over this form or any child control. - /// Shows the mouse cursor on the text area if it has been hidden. - /// - /// - /// Derived classes should attach this handler to the MouseMove event - /// of all created controls which are not added to the Controls - /// collection. - /// - protected void ControlMouseMove(object sender, MouseEventArgs e) - { - control.ActiveTextAreaControl.TextArea.ShowHiddenCursor(false); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionListView.cs b/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionListView.cs deleted file mode 100644 index 5aa8940..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionListView.cs +++ /dev/null @@ -1,293 +0,0 @@ -// -// -// -// -// $Revision: 2932 $ -// - -using System; -using System.Drawing; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Gui.CompletionWindow -{ - /// - /// Description of CodeCompletionListView. - /// - public class CodeCompletionListView : System.Windows.Forms.UserControl - { - ICompletionData[] completionData; - int firstItem = 0; - int selectedItem = -1; - ImageList imageList; - - public ImageList ImageList { - get { - return imageList; - } - set { - imageList = value; - } - } - - public int FirstItem { - get { - return firstItem; - } - set { - if (firstItem != value) { - firstItem = value; - OnFirstItemChanged(EventArgs.Empty); - } - } - } - - public ICompletionData SelectedCompletionData { - get { - if (selectedItem < 0) { - return null; - } - return completionData[selectedItem]; - } - } - - public int ItemHeight { - get { - return Math.Max(imageList.ImageSize.Height, (int)(Font.Height * 1.25)); - } - } - - public int MaxVisibleItem { - get { - return Height / ItemHeight; - } - } - - public CodeCompletionListView(ICompletionData[] completionData) - { - Array.Sort(completionData, DefaultCompletionData.Compare); - this.completionData = completionData; - -// this.KeyDown += new System.Windows.Forms.KeyEventHandler(OnKey); -// SetStyle(ControlStyles.Selectable, false); -// SetStyle(ControlStyles.UserPaint, true); -// SetStyle(ControlStyles.DoubleBuffer, false); - } - - public void Close() - { - if (completionData != null) { - Array.Clear(completionData, 0, completionData.Length); - } - base.Dispose(); - } - - public void SelectIndex(int index) - { - int oldSelectedItem = selectedItem; - int oldFirstItem = firstItem; - - index = Math.Max(0, index); - selectedItem = Math.Max(0, Math.Min(completionData.Length - 1, index)); - if (selectedItem < firstItem) { - FirstItem = selectedItem; - } - if (firstItem + MaxVisibleItem <= selectedItem) { - FirstItem = selectedItem - MaxVisibleItem + 1; - } - if (oldSelectedItem != selectedItem) { - if (firstItem != oldFirstItem) { - Invalidate(); - } else { - int min = Math.Min(selectedItem, oldSelectedItem) - firstItem; - int max = Math.Max(selectedItem, oldSelectedItem) - firstItem; - Invalidate(new Rectangle(0, 1 + min * ItemHeight, Width, (max - min + 1) * ItemHeight)); - } - OnSelectedItemChanged(EventArgs.Empty); - } - } - - public void CenterViewOn(int index) - { - int oldFirstItem = this.FirstItem; - int firstItem = index - MaxVisibleItem / 2; - if (firstItem < 0) - this.FirstItem = 0; - else if (firstItem >= completionData.Length - MaxVisibleItem) - this.FirstItem = completionData.Length - MaxVisibleItem; - else - this.FirstItem = firstItem; - if (this.FirstItem != oldFirstItem) { - Invalidate(); - } - } - - public void ClearSelection() - { - if (selectedItem < 0) - return; - int itemNum = selectedItem - firstItem; - selectedItem = -1; - Invalidate(new Rectangle(0, itemNum * ItemHeight, Width, (itemNum + 1) * ItemHeight + 1)); - Update(); - OnSelectedItemChanged(EventArgs.Empty); - } - - public void PageDown() - { - SelectIndex(selectedItem + MaxVisibleItem); - } - - public void PageUp() - { - SelectIndex(selectedItem - MaxVisibleItem); - } - - public void SelectNextItem() - { - SelectIndex(selectedItem + 1); - } - - public void SelectPrevItem() - { - SelectIndex(selectedItem - 1); - } - - public void SelectItemWithStart(string startText) - { - if (startText == null || startText.Length == 0) return; - string originalStartText = startText; - startText = startText.ToLower(); - int bestIndex = -1; - int bestQuality = -1; - // Qualities: 0 = match start - // 1 = match start case sensitive - // 2 = full match - // 3 = full match case sensitive - double bestPriority = 0; - for (int i = 0; i < completionData.Length; ++i) { - string itemText = completionData[i].Text; - string lowerText = itemText.ToLower(); - if (lowerText.StartsWith(startText)) { - double priority = completionData[i].Priority; - int quality; - if (lowerText == startText) { - if (itemText == originalStartText) - quality = 3; - else - quality = 2; - } else if (itemText.StartsWith(originalStartText)) { - quality = 1; - } else { - quality = 0; - } - bool useThisItem; - if (bestQuality < quality) { - useThisItem = true; - } else { - if (bestIndex == selectedItem) { - useThisItem = false; - } else if (i == selectedItem) { - useThisItem = bestQuality == quality; - } else { - useThisItem = bestQuality == quality && bestPriority < priority; - } - } - if (useThisItem) { - bestIndex = i; - bestPriority = priority; - bestQuality = quality; - } - } - } - if (bestIndex < 0) { - ClearSelection(); - } else { - if (bestIndex < firstItem || firstItem + MaxVisibleItem <= bestIndex) { - SelectIndex(bestIndex); - CenterViewOn(bestIndex); - } else { - SelectIndex(bestIndex); - } - } - } - - protected override void OnPaint(PaintEventArgs pe) - { - float yPos = 1; - float itemHeight = ItemHeight; - // Maintain aspect ratio - int imageWidth = (int)(itemHeight * imageList.ImageSize.Width / imageList.ImageSize.Height); - - int curItem = firstItem; - Graphics g = pe.Graphics; - while (curItem < completionData.Length && yPos < Height) { - RectangleF drawingBackground = new RectangleF(1, yPos, Width - 2, itemHeight); - if (drawingBackground.IntersectsWith(pe.ClipRectangle)) { - // draw Background - if (curItem == selectedItem) { - g.FillRectangle(SystemBrushes.Highlight, drawingBackground); - } else { - g.FillRectangle(SystemBrushes.Window, drawingBackground); - } - - // draw Icon - int xPos = 0; - if (imageList != null && completionData[curItem].ImageIndex < imageList.Images.Count) { - g.DrawImage(imageList.Images[completionData[curItem].ImageIndex], new RectangleF(1, yPos, imageWidth, itemHeight)); - xPos = imageWidth; - } - - // draw text - if (curItem == selectedItem) { - g.DrawString(completionData[curItem].Text, Font, SystemBrushes.HighlightText, xPos, yPos); - } else { - g.DrawString(completionData[curItem].Text, Font, SystemBrushes.WindowText, xPos, yPos); - } - } - - yPos += itemHeight; - ++curItem; - } - g.DrawRectangle(SystemPens.Control, new Rectangle(0, 0, Width - 1, Height - 1)); - } - - protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e) - { - float yPos = 1; - int curItem = firstItem; - float itemHeight = ItemHeight; - - while (curItem < completionData.Length && yPos < Height) { - RectangleF drawingBackground = new RectangleF(1, yPos, Width - 2, itemHeight); - if (drawingBackground.Contains(e.X, e.Y)) { - SelectIndex(curItem); - break; - } - yPos += itemHeight; - ++curItem; - } - } - - protected override void OnPaintBackground(PaintEventArgs pe) - { - } - - protected virtual void OnSelectedItemChanged(EventArgs e) - { - if (SelectedItemChanged != null) { - SelectedItemChanged(this, e); - } - } - - protected virtual void OnFirstItemChanged(EventArgs e) - { - if (FirstItemChanged != null) { - FirstItemChanged(this, e); - } - } - - public event EventHandler SelectedItemChanged; - public event EventHandler FirstItemChanged; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs b/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs deleted file mode 100644 index 8de3d28..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/CodeCompletionWindow.cs +++ /dev/null @@ -1,352 +0,0 @@ -// -// -// -// -// $Revision: 3244 $ -// - -using System; -using System.Drawing; -using System.Diagnostics; -using System.Windows.Forms; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Gui.CompletionWindow -{ - public class CodeCompletionWindow : AbstractCompletionWindow - { - ICompletionData[] completionData; - CodeCompletionListView codeCompletionListView; - VScrollBar vScrollBar = new VScrollBar(); - ICompletionDataProvider dataProvider; - IDocument document; - bool showDeclarationWindow = true; - bool fixedListViewWidth = true; - const int ScrollbarWidth = 16; - const int MaxListLength = 10; - - int startOffset; - int endOffset; - DeclarationViewWindow declarationViewWindow = null; - Rectangle workingScreen; - - public static CodeCompletionWindow ShowCompletionWindow(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar) - { - return ShowCompletionWindow(parent, control, fileName, completionDataProvider, firstChar, true, true); - } - - public static CodeCompletionWindow ShowCompletionWindow(Form parent, TextEditorControl control, string fileName, ICompletionDataProvider completionDataProvider, char firstChar, bool showDeclarationWindow, bool fixedListViewWidth) - { - ICompletionData[] completionData = completionDataProvider.GenerateCompletionData(fileName, control.ActiveTextAreaControl.TextArea, firstChar); - if (completionData == null || completionData.Length == 0) { - return null; - } - CodeCompletionWindow codeCompletionWindow = new CodeCompletionWindow(completionDataProvider, completionData, parent, control, showDeclarationWindow, fixedListViewWidth); - codeCompletionWindow.CloseWhenCaretAtBeginning = firstChar == '\0'; - codeCompletionWindow.ShowCompletionWindow(); - return codeCompletionWindow; - } - - CodeCompletionWindow(ICompletionDataProvider completionDataProvider, ICompletionData[] completionData, Form parentForm, TextEditorControl control, bool showDeclarationWindow, bool fixedListViewWidth) : base(parentForm, control) - { - this.dataProvider = completionDataProvider; - this.completionData = completionData; - this.document = control.Document; - this.showDeclarationWindow = showDeclarationWindow; - this.fixedListViewWidth = fixedListViewWidth; - - workingScreen = Screen.GetWorkingArea(Location); - startOffset = control.ActiveTextAreaControl.Caret.Offset + 1; - endOffset = startOffset; - if (completionDataProvider.PreSelection != null) { - startOffset -= completionDataProvider.PreSelection.Length + 1; - endOffset--; - } - - codeCompletionListView = new CodeCompletionListView(completionData); - codeCompletionListView.ImageList = completionDataProvider.ImageList; - codeCompletionListView.Dock = DockStyle.Fill; - codeCompletionListView.SelectedItemChanged += new EventHandler(CodeCompletionListViewSelectedItemChanged); - codeCompletionListView.DoubleClick += new EventHandler(CodeCompletionListViewDoubleClick); - codeCompletionListView.Click += new EventHandler(CodeCompletionListViewClick); - Controls.Add(codeCompletionListView); - - if (completionData.Length > MaxListLength) { - vScrollBar.Dock = DockStyle.Right; - vScrollBar.Minimum = 0; - vScrollBar.Maximum = completionData.Length - 1; - vScrollBar.SmallChange = 1; - vScrollBar.LargeChange = MaxListLength; - codeCompletionListView.FirstItemChanged += new EventHandler(CodeCompletionListViewFirstItemChanged); - Controls.Add(vScrollBar); - } - - this.drawingSize = GetListViewSize(); - SetLocation(); - - if (declarationViewWindow == null) { - declarationViewWindow = new DeclarationViewWindow(parentForm); - } - SetDeclarationViewLocation(); - declarationViewWindow.ShowDeclarationViewWindow(); - declarationViewWindow.MouseMove += ControlMouseMove; - control.Focus(); - CodeCompletionListViewSelectedItemChanged(this, EventArgs.Empty); - - if (completionDataProvider.DefaultIndex >= 0) { - codeCompletionListView.SelectIndex(completionDataProvider.DefaultIndex); - } - - if (completionDataProvider.PreSelection != null) { - CaretOffsetChanged(this, EventArgs.Empty); - } - - vScrollBar.ValueChanged += VScrollBarValueChanged; - document.DocumentAboutToBeChanged += DocumentAboutToBeChanged; - } - - bool inScrollUpdate; - - void CodeCompletionListViewFirstItemChanged(object sender, EventArgs e) - { - if (inScrollUpdate) return; - inScrollUpdate = true; - vScrollBar.Value = Math.Min(vScrollBar.Maximum, codeCompletionListView.FirstItem); - inScrollUpdate = false; - } - - void VScrollBarValueChanged(object sender, EventArgs e) - { - if (inScrollUpdate) return; - inScrollUpdate = true; - codeCompletionListView.FirstItem = vScrollBar.Value; - codeCompletionListView.Refresh(); - control.ActiveTextAreaControl.TextArea.Focus(); - inScrollUpdate = false; - } - - void SetDeclarationViewLocation() - { - // This method uses the side with more free space - int leftSpace = Bounds.Left - workingScreen.Left; - int rightSpace = workingScreen.Right - Bounds.Right; - Point pos; - // The declaration view window has better line break when used on - // the right side, so prefer the right side to the left. - if (rightSpace * 2 > leftSpace) - pos = new Point(Bounds.Right, Bounds.Top); - else - pos = new Point(Bounds.Left - declarationViewWindow.Width, Bounds.Top); - if (declarationViewWindow.Location != pos) { - declarationViewWindow.Location = pos; - } - } - - protected override void SetLocation() - { - base.SetLocation(); - if (declarationViewWindow != null) { - SetDeclarationViewLocation(); - } - } - - Util.MouseWheelHandler mouseWheelHandler = new Util.MouseWheelHandler(); - - public void HandleMouseWheel(MouseEventArgs e) - { - int scrollDistance = mouseWheelHandler.GetScrollAmount(e); - if (scrollDistance == 0) - return; - if (control.TextEditorProperties.MouseWheelScrollDown) - scrollDistance = -scrollDistance; - int newValue = vScrollBar.Value + vScrollBar.SmallChange * scrollDistance; - vScrollBar.Value = Math.Max(vScrollBar.Minimum, Math.Min(vScrollBar.Maximum - vScrollBar.LargeChange + 1, newValue)); - } - - void CodeCompletionListViewSelectedItemChanged(object sender, EventArgs e) - { - ICompletionData data = codeCompletionListView.SelectedCompletionData; - if (showDeclarationWindow && data != null && data.Description != null && data.Description.Length > 0) { - declarationViewWindow.Description = data.Description; - SetDeclarationViewLocation(); - } else { - declarationViewWindow.Description = null; - } - } - - public override bool ProcessKeyEvent(char ch) - { - switch (dataProvider.ProcessKey(ch)) { - case CompletionDataProviderKeyResult.BeforeStartKey: - // increment start+end, then process as normal char - ++startOffset; - ++endOffset; - return base.ProcessKeyEvent(ch); - case CompletionDataProviderKeyResult.NormalKey: - // just process normally - return base.ProcessKeyEvent(ch); - case CompletionDataProviderKeyResult.InsertionKey: - return InsertSelectedItem(ch); - default: - throw new InvalidOperationException("Invalid return value of dataProvider.ProcessKey"); - } - } - - void DocumentAboutToBeChanged(object sender, DocumentEventArgs e) - { - // => startOffset test required so that this startOffset/endOffset are not incremented again - // for BeforeStartKey characters - if (e.Offset >= startOffset && e.Offset <= endOffset) { - if (e.Length > 0) { // length of removed region - endOffset -= e.Length; - } - if (!string.IsNullOrEmpty(e.Text)) { - endOffset += e.Text.Length; - } - } - } - - /// - /// When this flag is set, code completion closes if the caret moves to the - /// beginning of the allowed range. This is useful in Ctrl+Space and "complete when typing", - /// but not in dot-completion. - /// - public bool CloseWhenCaretAtBeginning { get; set; } - - protected override void CaretOffsetChanged(object sender, EventArgs e) - { - int offset = control.ActiveTextAreaControl.Caret.Offset; - if (offset == startOffset) { - if (CloseWhenCaretAtBeginning) - Close(); - return; - } - if (offset < startOffset || offset > endOffset) { - Close(); - } else { - codeCompletionListView.SelectItemWithStart(control.Document.GetText(startOffset, offset - startOffset)); - } - } - - protected override bool ProcessTextAreaKey(Keys keyData) - { - if (!Visible) { - return false; - } - - switch (keyData) { - case Keys.Home: - codeCompletionListView.SelectIndex(0); - return true; - case Keys.End: - codeCompletionListView.SelectIndex(completionData.Length-1); - return true; - case Keys.PageDown: - codeCompletionListView.PageDown(); - return true; - case Keys.PageUp: - codeCompletionListView.PageUp(); - return true; - case Keys.Down: - codeCompletionListView.SelectNextItem(); - return true; - case Keys.Up: - codeCompletionListView.SelectPrevItem(); - return true; - case Keys.Tab: - InsertSelectedItem('\t'); - return true; - case Keys.Return: - InsertSelectedItem('\n'); - return true; - } - return base.ProcessTextAreaKey(keyData); - } - - void CodeCompletionListViewDoubleClick(object sender, EventArgs e) - { - InsertSelectedItem('\0'); - } - - void CodeCompletionListViewClick(object sender, EventArgs e) - { - control.ActiveTextAreaControl.TextArea.Focus(); - } - - protected override void Dispose(bool disposing) - { - if (disposing) { - document.DocumentAboutToBeChanged -= DocumentAboutToBeChanged; - if (codeCompletionListView != null) { - codeCompletionListView.Dispose(); - codeCompletionListView = null; - } - if (declarationViewWindow != null) { - declarationViewWindow.Dispose(); - declarationViewWindow = null; - } - } - base.Dispose(disposing); - } - - bool InsertSelectedItem(char ch) - { - document.DocumentAboutToBeChanged -= DocumentAboutToBeChanged; - ICompletionData data = codeCompletionListView.SelectedCompletionData; - bool result = false; - if (data != null) { - control.BeginUpdate(); - - try { - if (endOffset - startOffset > 0) { - control.Document.Remove(startOffset, endOffset - startOffset); - } - Debug.Assert(startOffset <= document.TextLength); - result = dataProvider.InsertAction(data, control.ActiveTextAreaControl.TextArea, startOffset, ch); - } finally { - control.EndUpdate(); - } - } - Close(); - return result; - } - - Size GetListViewSize() - { - int height = codeCompletionListView.ItemHeight * Math.Min(MaxListLength, completionData.Length); - int width = codeCompletionListView.ItemHeight * 10; - if (!fixedListViewWidth) { - width = GetListViewWidth(width, height); - } - return new Size(width, height); - } - - /// - /// Gets the list view width large enough to handle the longest completion data - /// text string. - /// - /// The default width of the list view. - /// The height of the list view. This is - /// used to determine if the scrollbar is visible. - /// The list view width to accommodate the longest completion - /// data text string; otherwise the default width. - int GetListViewWidth(int defaultWidth, int height) - { - float width = defaultWidth; - using (Graphics graphics = codeCompletionListView.CreateGraphics()) { - for (int i = 0; i < completionData.Length; ++i) { - float itemWidth = graphics.MeasureString(completionData[i].Text.ToString(), codeCompletionListView.Font).Width; - if(itemWidth > width) { - width = itemWidth; - } - } - } - - float totalItemsHeight = codeCompletionListView.ItemHeight * completionData.Length; - if (totalItemsHeight > height) { - width += ScrollbarWidth; // Compensate for scroll bar. - } - return (int)width; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/DeclarationViewWindow.cs b/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/DeclarationViewWindow.cs deleted file mode 100644 index 1b0db6b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/DeclarationViewWindow.cs +++ /dev/null @@ -1,101 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Drawing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Util; - -namespace ICSharpCode.TextEditor.Gui.CompletionWindow -{ - public interface IDeclarationViewWindow - { - string Description { - get; - set; - } - void ShowDeclarationViewWindow(); - void CloseDeclarationViewWindow(); - } - - public class DeclarationViewWindow : Form, IDeclarationViewWindow - { - string description = String.Empty; - - public string Description { - get { - return description; - } - set { - description = value; - if (value == null && Visible) { - Visible = false; - } else if (value != null) { - if (!Visible) ShowDeclarationViewWindow(); - Refresh(); - } - } - } - - public bool HideOnClick; - - public DeclarationViewWindow(Form parent) - { - SetStyle(ControlStyles.Selectable, false); - StartPosition = FormStartPosition.Manual; - FormBorderStyle = FormBorderStyle.None; - Owner = parent; - ShowInTaskbar = false; - Size = new Size(0, 0); - base.CreateHandle(); - } - - protected override CreateParams CreateParams { - get { - CreateParams p = base.CreateParams; - AbstractCompletionWindow.AddShadowToWindow(p); - return p; - } - } - - protected override bool ShowWithoutActivation { - get { - return true; - } - } - - protected override void OnClick(EventArgs e) - { - base.OnClick(e); - if (HideOnClick) Hide(); - } - - public void ShowDeclarationViewWindow() - { - Show(); - } - - public void CloseDeclarationViewWindow() - { - Close(); - Dispose(); - } - - protected override void OnPaint(PaintEventArgs pe) - { - if (description != null && description.Length > 0) { - TipPainterTools.DrawHelpTipFromCombinedDescription(this, pe.Graphics, Font, null, description); - } - } - - protected override void OnPaintBackground(PaintEventArgs pe) - { - pe.Graphics.FillRectangle(SystemBrushes.Info, pe.ClipRectangle); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionData.cs b/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionData.cs deleted file mode 100644 index 6100dd9..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionData.cs +++ /dev/null @@ -1,108 +0,0 @@ -// -// -// -// -// $Revision: 2932 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Gui.CompletionWindow -{ - public interface ICompletionData - { - int ImageIndex { - get; - } - - string Text { - get; - set; - } - - string Description { - get; - } - - /// - /// Gets a priority value for the completion data item. - /// When selecting items by their start characters, the item with the highest - /// priority is selected first. - /// - double Priority { - get; - } - - /// - /// Insert the element represented by the completion data into the text - /// editor. - /// - /// TextArea to insert the completion data in. - /// Character that should be inserted after the completion data. - /// \0 when no character should be inserted. - /// Returns true when the insert action has processed the character - /// ; false when the character was not processed. - bool InsertAction(TextArea textArea, char ch); - } - - public class DefaultCompletionData : ICompletionData - { - string text; - string description; - int imageIndex; - - public int ImageIndex { - get { - return imageIndex; - } - } - - public string Text { - get { - return text; - } - set { - text = value; - } - } - - public string Description { - get { - return description; - } - } - - double priority; - - public double Priority { - get { - return priority; - } - set { - priority = value; - } - } - - public virtual bool InsertAction(TextArea textArea, char ch) - { - textArea.InsertString(text); - return false; - } - - public DefaultCompletionData(string text, string description, int imageIndex) - { - this.text = text; - this.description = description; - this.imageIndex = imageIndex; - } - - public static int Compare(ICompletionData a, ICompletionData b) - { - if (a == null) - throw new ArgumentNullException("a"); - if (b == null) - throw new ArgumentNullException("b"); - return string.Compare(a.Text, b.Text, StringComparison.InvariantCultureIgnoreCase); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionDataProvider.cs b/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionDataProvider.cs deleted file mode 100644 index e6cc19a..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/CompletionWindow/ICompletionDataProvider.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// -// -// -// $Revision: 2074 $ -// - -using System; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Gui.CompletionWindow -{ - public interface ICompletionDataProvider - { - ImageList ImageList { - get; - } - string PreSelection { - get; - } - /// - /// Gets the index of the element in the list that is chosen by default. - /// - int DefaultIndex { - get; - } - - /// - /// Processes a keypress. Returns the action to be run with the key. - /// - CompletionDataProviderKeyResult ProcessKey(char key); - - /// - /// Executes the insertion. The provider should set the caret position and then - /// call data.InsertAction. - /// - bool InsertAction(ICompletionData data, TextArea textArea, int insertionOffset, char key); - - /// - /// Generates the completion data. This method is called by the text editor control. - /// - ICompletionData[] GenerateCompletionData(string fileName, TextArea textArea, char charTyped); - } - - public enum CompletionDataProviderKeyResult - { - /// - /// Normal key, used to choose an entry from the completion list - /// - NormalKey, - /// - /// This key triggers insertion of the completed expression - /// - InsertionKey, - /// - /// Increment both start and end offset of completion region when inserting this - /// key. Can be used to insert whitespace (or other characters) in front of the expression - /// while the completion window is open. - /// - BeforeStartKey - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/DrawableLine.cs b/src/ICSharpCode.TextEditor/Src/Gui/DrawableLine.cs deleted file mode 100644 index d31b96a..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/DrawableLine.cs +++ /dev/null @@ -1,190 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// A class that is able to draw a line on any control (outside the text editor) - /// - public class DrawableLine - { - static StringFormat sf = (StringFormat)System.Drawing.StringFormat.GenericTypographic.Clone(); - - List words = new List(); - SizeF spaceSize; - Font monospacedFont; - Font boldMonospacedFont; - - private class SimpleTextWord { - internal TextWordType Type; - internal string Word; - internal bool Bold; - internal Color Color; - - public SimpleTextWord(TextWordType Type, string Word, bool Bold, Color Color) - { - this.Type = Type; - this.Word = Word; - this.Bold = Bold; - this.Color = Color; - } - - internal readonly static SimpleTextWord Space = new SimpleTextWord(TextWordType.Space, " ", false, Color.Black); - internal readonly static SimpleTextWord Tab = new SimpleTextWord(TextWordType.Tab, "\t", false, Color.Black); - } - - public DrawableLine(IDocument document, LineSegment line, Font monospacedFont, Font boldMonospacedFont) - { - this.monospacedFont = monospacedFont; - this.boldMonospacedFont = boldMonospacedFont; - if (line.Words != null) { - foreach (TextWord word in line.Words) { - if (word.Type == TextWordType.Space) { - words.Add(SimpleTextWord.Space); - } else if (word.Type == TextWordType.Tab) { - words.Add(SimpleTextWord.Tab); - } else { - words.Add(new SimpleTextWord(TextWordType.Word, word.Word, word.Bold, word.Color)); - } - } - } else { - words.Add(new SimpleTextWord(TextWordType.Word, document.GetText(line), false, Color.Black)); - } - } - - public int LineLength { - get { - int length = 0; - foreach (SimpleTextWord word in words) { - length += word.Word.Length; - } - return length; - } - } - - public void SetBold(int startIndex, int endIndex, bool bold) - { - if (startIndex < 0) - throw new ArgumentException("startIndex must be >= 0"); - if (startIndex > endIndex) - throw new ArgumentException("startIndex must be <= endIndex"); - if (startIndex == endIndex) return; - int pos = 0; - for (int i = 0; i < words.Count; i++) { - SimpleTextWord word = words[i]; - if (pos >= endIndex) - break; - int wordEnd = pos + word.Word.Length; - // 3 possibilities: - if (startIndex <= pos && endIndex >= wordEnd) { - // word is fully in region: - word.Bold = bold; - } else if (startIndex <= pos) { - // beginning of word is in region - int inRegionLength = endIndex - pos; - SimpleTextWord newWord = new SimpleTextWord(word.Type, word.Word.Substring(inRegionLength), word.Bold, word.Color); - words.Insert(i + 1, newWord); - - word.Bold = bold; - word.Word = word.Word.Substring(0, inRegionLength); - } else if (startIndex < wordEnd) { - // end of word is in region (or middle of word is in region) - int notInRegionLength = startIndex - pos; - - SimpleTextWord newWord = new SimpleTextWord(word.Type, word.Word.Substring(notInRegionLength), word.Bold, word.Color); - // newWord.Bold will be set in the next iteration - words.Insert(i + 1, newWord); - - word.Word = word.Word.Substring(0, notInRegionLength); - } - pos = wordEnd; - } - } - - public static float DrawDocumentWord(Graphics g, string word, PointF position, Font font, Color foreColor) - { - if (word == null || word.Length == 0) { - return 0f; - } - SizeF wordSize = g.MeasureString(word, font, 32768, sf); - - g.DrawString(word, - font, - BrushRegistry.GetBrush(foreColor), - position, - sf); - return wordSize.Width; - } - - public SizeF GetSpaceSize(Graphics g) - { - if (spaceSize.IsEmpty) { - spaceSize = g.MeasureString("-", boldMonospacedFont, new PointF(0, 0), sf); - } - return spaceSize; - } - - public void DrawLine(Graphics g, ref float xPos, float xOffset, float yPos, Color c) - { - SizeF spaceSize = GetSpaceSize(g); - foreach (SimpleTextWord word in words) { - switch (word.Type) { - case TextWordType.Space: - xPos += spaceSize.Width; - break; - case TextWordType.Tab: - float tabWidth = spaceSize.Width * 4; - xPos += tabWidth; - xPos = (int)((xPos + 2) / tabWidth) * tabWidth; - break; - case TextWordType.Word: - xPos += DrawDocumentWord(g, - word.Word, - new PointF(xPos + xOffset, yPos), - word.Bold ? boldMonospacedFont : monospacedFont, - c == Color.Empty ? word.Color : c - ); - break; - } - } - } - - public void DrawLine(Graphics g, ref float xPos, float xOffset, float yPos) - { - DrawLine(g, ref xPos, xOffset, yPos, Color.Empty); - } - - public float MeasureWidth(Graphics g, float xPos) - { - SizeF spaceSize = GetSpaceSize(g); - foreach (SimpleTextWord word in words) { - switch (word.Type) { - case TextWordType.Space: - xPos += spaceSize.Width; - break; - case TextWordType.Tab: - float tabWidth = spaceSize.Width * 4; - xPos += tabWidth; - xPos = (int)((xPos + 2) / tabWidth) * tabWidth; - break; - case TextWordType.Word: - if (word.Word != null && word.Word.Length > 0) { - xPos += g.MeasureString(word.Word, word.Bold ? boldMonospacedFont : monospacedFont, 32768, sf).Width; - } - break; - } - } - return xPos; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/FoldMargin.cs b/src/ICSharpCode.TextEditor/Src/Gui/FoldMargin.cs deleted file mode 100644 index 57f8cc0..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/FoldMargin.cs +++ /dev/null @@ -1,275 +0,0 @@ -// -// -// -// -// $Revision: 2063 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class views the line numbers and folding markers. - /// - public class FoldMargin : AbstractMargin - { - int selectedFoldLine = -1; - - public override Size Size { - get { - return new Size((int)(textArea.TextView.FontHeight), - -1); - } - } - - public override bool IsVisible { - get { - return textArea.TextEditorProperties.EnableFolding; - } - } - - public FoldMargin(TextArea textArea) : base(textArea) - { - } - - public override void Paint(Graphics g, Rectangle rect) - { - if (rect.Width <= 0 || rect.Height <= 0) { - return; - } - HighlightColor lineNumberPainterColor = textArea.Document.HighlightingStrategy.GetColorFor("LineNumbers"); - HighlightColor foldLineColor = textArea.Document.HighlightingStrategy.GetColorFor("FoldLine"); - - - for (int y = 0; y < (DrawingPosition.Height + textArea.TextView.VisibleLineDrawingRemainder) / textArea.TextView.FontHeight + 1; ++y) { - Rectangle markerRectangle = new Rectangle(DrawingPosition.X, - DrawingPosition.Top + y * textArea.TextView.FontHeight - textArea.TextView.VisibleLineDrawingRemainder, - DrawingPosition.Width, - textArea.TextView.FontHeight); - - if (rect.IntersectsWith(markerRectangle)) { - // draw dotted separator line - if (textArea.Document.TextEditorProperties.ShowLineNumbers) { - g.FillRectangle(BrushRegistry.GetBrush(textArea.Enabled ? lineNumberPainterColor.BackgroundColor : SystemColors.InactiveBorder), - new Rectangle(markerRectangle.X + 1, markerRectangle.Y, markerRectangle.Width - 1, markerRectangle.Height)); - - g.DrawLine(BrushRegistry.GetDotPen(lineNumberPainterColor.Color, lineNumberPainterColor.BackgroundColor), - base.drawingPosition.X, - markerRectangle.Y, - base.drawingPosition.X, - markerRectangle.Bottom); - } else { - g.FillRectangle(BrushRegistry.GetBrush(textArea.Enabled ? lineNumberPainterColor.BackgroundColor : SystemColors.InactiveBorder), markerRectangle); - } - - int currentLine = textArea.Document.GetFirstLogicalLine(textArea.TextView.FirstPhysicalLine + y); - if (currentLine < textArea.Document.TotalNumberOfLines) { - PaintFoldMarker(g, currentLine, markerRectangle); - } - } - } - } - - bool SelectedFoldingFrom(List list) - { - if (list != null) { - for (int i = 0; i < list.Count; ++i) { - if (this.selectedFoldLine == list[i].StartLine) { - return true; - } - } - } - return false; - } - - void PaintFoldMarker(Graphics g, int lineNumber, Rectangle drawingRectangle) - { - HighlightColor foldLineColor = textArea.Document.HighlightingStrategy.GetColorFor("FoldLine"); - HighlightColor selectedFoldLine = textArea.Document.HighlightingStrategy.GetColorFor("SelectedFoldLine"); - - List foldingsWithStart = textArea.Document.FoldingManager.GetFoldingsWithStart(lineNumber); - List foldingsBetween = textArea.Document.FoldingManager.GetFoldingsContainsLineNumber(lineNumber); - List foldingsWithEnd = textArea.Document.FoldingManager.GetFoldingsWithEnd(lineNumber); - - bool isFoldStart = foldingsWithStart.Count > 0; - bool isBetween = foldingsBetween.Count > 0; - bool isFoldEnd = foldingsWithEnd.Count > 0; - - bool isStartSelected = SelectedFoldingFrom(foldingsWithStart); - bool isBetweenSelected = SelectedFoldingFrom(foldingsBetween); - bool isEndSelected = SelectedFoldingFrom(foldingsWithEnd); - - int foldMarkerSize = (int)Math.Round(textArea.TextView.FontHeight * 0.57f); - foldMarkerSize -= (foldMarkerSize) % 2; - int foldMarkerYPos = drawingRectangle.Y + (int)((drawingRectangle.Height - foldMarkerSize) / 2); - int xPos = drawingRectangle.X + (drawingRectangle.Width - foldMarkerSize) / 2 + foldMarkerSize / 2; - - - if (isFoldStart) { - bool isVisible = true; - bool moreLinedOpenFold = false; - foreach (FoldMarker foldMarker in foldingsWithStart) { - if (foldMarker.IsFolded) { - isVisible = false; - } else { - moreLinedOpenFold = foldMarker.EndLine > foldMarker.StartLine; - } - } - - bool isFoldEndFromUpperFold = false; - foreach (FoldMarker foldMarker in foldingsWithEnd) { - if (foldMarker.EndLine > foldMarker.StartLine && !foldMarker.IsFolded) { - isFoldEndFromUpperFold = true; - } - } - - DrawFoldMarker(g, new RectangleF(drawingRectangle.X + (drawingRectangle.Width - foldMarkerSize) / 2, - foldMarkerYPos, - foldMarkerSize, - foldMarkerSize), - isVisible, - isStartSelected - ); - - // draw line above fold marker - if (isBetween || isFoldEndFromUpperFold) { - g.DrawLine(BrushRegistry.GetPen(isBetweenSelected ? selectedFoldLine.Color : foldLineColor.Color), - xPos, - drawingRectangle.Top, - xPos, - foldMarkerYPos - 1); - } - - // draw line below fold marker - if (isBetween || moreLinedOpenFold) { - g.DrawLine(BrushRegistry.GetPen(isEndSelected || (isStartSelected && isVisible) || isBetweenSelected ? selectedFoldLine.Color : foldLineColor.Color), - xPos, - foldMarkerYPos + foldMarkerSize + 1, - xPos, - drawingRectangle.Bottom); - } - } else { - if (isFoldEnd) { - int midy = drawingRectangle.Top + drawingRectangle.Height / 2; - - // draw fold end marker - g.DrawLine(BrushRegistry.GetPen(isEndSelected ? selectedFoldLine.Color : foldLineColor.Color), - xPos, - midy, - xPos + foldMarkerSize / 2, - midy); - - // draw line above fold end marker - // must be drawn after fold marker because it might have a different color than the fold marker - g.DrawLine(BrushRegistry.GetPen(isBetweenSelected || isEndSelected ? selectedFoldLine.Color : foldLineColor.Color), - xPos, - drawingRectangle.Top, - xPos, - midy); - - // draw line below fold end marker - if (isBetween) { - g.DrawLine(BrushRegistry.GetPen(isBetweenSelected ? selectedFoldLine.Color : foldLineColor.Color), - xPos, - midy + 1, - xPos, - drawingRectangle.Bottom); - } - } else if (isBetween) { - // just draw the line :) - g.DrawLine(BrushRegistry.GetPen(isBetweenSelected ? selectedFoldLine.Color : foldLineColor.Color), - xPos, - drawingRectangle.Top, - xPos, - drawingRectangle.Bottom); - } - } - } - - public override void HandleMouseMove(Point mousepos, MouseButtons mouseButtons) - { - bool showFolding = textArea.Document.TextEditorProperties.EnableFolding; - int physicalLine = + (int)((mousepos.Y + textArea.VirtualTop.Y) / textArea.TextView.FontHeight); - int realline = textArea.Document.GetFirstLogicalLine(physicalLine); - - if (!showFolding || realline < 0 || realline + 1 >= textArea.Document.TotalNumberOfLines) { - return; - } - - List foldMarkers = textArea.Document.FoldingManager.GetFoldingsWithStart(realline); - int oldSelection = selectedFoldLine; - if (foldMarkers.Count > 0) { - selectedFoldLine = realline; - } else { - selectedFoldLine = -1; - } - if (oldSelection != selectedFoldLine) { - textArea.Refresh(this); - } - } - - public override void HandleMouseDown(Point mousepos, MouseButtons mouseButtons) - { - bool showFolding = textArea.Document.TextEditorProperties.EnableFolding; - int physicalLine = + (int)((mousepos.Y + textArea.VirtualTop.Y) / textArea.TextView.FontHeight); - int realline = textArea.Document.GetFirstLogicalLine(physicalLine); - - // focus the textarea if the user clicks on the line number view - textArea.Focus(); - - if (!showFolding || realline < 0 || realline + 1 >= textArea.Document.TotalNumberOfLines) { - return; - } - - List foldMarkers = textArea.Document.FoldingManager.GetFoldingsWithStart(realline); - foreach (FoldMarker fm in foldMarkers) { - fm.IsFolded = !fm.IsFolded; - } - textArea.Document.FoldingManager.NotifyFoldingsChanged(EventArgs.Empty); - } - - public override void HandleMouseLeave(EventArgs e) - { - if (selectedFoldLine != -1) { - selectedFoldLine = -1; - textArea.Refresh(this); - } - } - - #region Drawing functions - void DrawFoldMarker(Graphics g, RectangleF rectangle, bool isOpened, bool isSelected) - { - HighlightColor foldMarkerColor = textArea.Document.HighlightingStrategy.GetColorFor("FoldMarker"); - HighlightColor foldLineColor = textArea.Document.HighlightingStrategy.GetColorFor("FoldLine"); - HighlightColor selectedFoldLine = textArea.Document.HighlightingStrategy.GetColorFor("SelectedFoldLine"); - - Rectangle intRect = new Rectangle((int)rectangle.X, (int)rectangle.Y, (int)rectangle.Width, (int)rectangle.Height); - g.FillRectangle(BrushRegistry.GetBrush(foldMarkerColor.BackgroundColor), intRect); - g.DrawRectangle(BrushRegistry.GetPen(isSelected ? selectedFoldLine.Color : foldMarkerColor.Color), intRect); - - int space = (int)Math.Round(((double)rectangle.Height) / 8d) + 1; - int mid = intRect.Height / 2 + intRect.Height % 2; - - g.DrawLine(BrushRegistry.GetPen(foldLineColor.BackgroundColor), - rectangle.X + space, - rectangle.Y + mid, - rectangle.X + rectangle.Width - space, - rectangle.Y + mid); - - if (!isOpened) { - g.DrawLine(BrushRegistry.GetPen(foldLineColor.BackgroundColor), - rectangle.X + mid, - rectangle.Y + space, - rectangle.X + mid, - rectangle.Y + rectangle.Height - space); - } - } - #endregion - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/GutterMargin.cs b/src/ICSharpCode.TextEditor/Src/Gui/GutterMargin.cs deleted file mode 100644 index d2c1d60..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/GutterMargin.cs +++ /dev/null @@ -1,159 +0,0 @@ -// -// -// -// -// $Revision: 3050 $ -// - -using System; -using System.Drawing; -using System.IO; -using System.Reflection; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class views the line numbers and folding markers. - /// - public class GutterMargin : AbstractMargin, IDisposable - { - StringFormat numberStringFormat = (StringFormat)StringFormat.GenericTypographic.Clone(); - - public static Cursor RightLeftCursor; - - static GutterMargin() - { - Stream cursorStream = Assembly.GetCallingAssembly().GetManifestResourceStream("ICSharpCode.TextEditor.Resources.RightArrow.cur"); - if (cursorStream == null) throw new Exception("could not find cursor resource"); - RightLeftCursor = new Cursor(cursorStream); - cursorStream.Close(); - } - - public void Dispose() - { - numberStringFormat.Dispose(); - } - - public override Cursor Cursor { - get { - return RightLeftCursor; - } - } - - public override Size Size { - get { - return new Size((int)(textArea.TextView.WideSpaceWidth - * Math.Max(3, (int)Math.Log10(textArea.Document.TotalNumberOfLines) + 1)), - -1); - } - } - - public override bool IsVisible { - get { - return textArea.TextEditorProperties.ShowLineNumbers; - } - } - - public GutterMargin(TextArea textArea) : base(textArea) - { - numberStringFormat.LineAlignment = StringAlignment.Far; - numberStringFormat.FormatFlags = StringFormatFlags.MeasureTrailingSpaces | StringFormatFlags.FitBlackBox | - StringFormatFlags.NoWrap | StringFormatFlags.NoClip; - } - - public override void Paint(Graphics g, Rectangle rect) - { - if (rect.Width <= 0 || rect.Height <= 0) { - return; - } - HighlightColor lineNumberPainterColor = textArea.Document.HighlightingStrategy.GetColorFor("LineNumbers"); - int fontHeight = textArea.TextView.FontHeight; - Brush fillBrush = textArea.Enabled ? BrushRegistry.GetBrush(lineNumberPainterColor.BackgroundColor) : SystemBrushes.InactiveBorder; - Brush drawBrush = BrushRegistry.GetBrush(lineNumberPainterColor.Color); - for (int y = 0; y < (DrawingPosition.Height + textArea.TextView.VisibleLineDrawingRemainder) / fontHeight + 1; ++y) { - int ypos = drawingPosition.Y + fontHeight * y - textArea.TextView.VisibleLineDrawingRemainder; - Rectangle backgroundRectangle = new Rectangle(drawingPosition.X, ypos, drawingPosition.Width, fontHeight); - if (rect.IntersectsWith(backgroundRectangle)) { - g.FillRectangle(fillBrush, backgroundRectangle); - int curLine = textArea.Document.GetFirstLogicalLine(textArea.Document.GetVisibleLine(textArea.TextView.FirstVisibleLine) + y); - - if (curLine < textArea.Document.TotalNumberOfLines) { - g.DrawString((curLine + 1).ToString(), - lineNumberPainterColor.GetFont(TextEditorProperties.FontContainer), - drawBrush, - backgroundRectangle, - numberStringFormat); - } - } - } - } - - public override void HandleMouseDown(Point mousepos, MouseButtons mouseButtons) - { - TextLocation selectionStartPos; - - textArea.SelectionManager.selectFrom.where = WhereFrom.Gutter; - int realline = textArea.TextView.GetLogicalLine(mousepos.Y); - if (realline >= 0 && realline < textArea.Document.TotalNumberOfLines) { - // shift-select - if((Control.ModifierKeys & Keys.Shift) != 0) { - if(!textArea.SelectionManager.HasSomethingSelected && realline != textArea.Caret.Position.Y) { - if (realline >= textArea.Caret.Position.Y) - { // at or below starting selection, place the cursor on the next line - // nothing is selected so make a new selection from cursor - selectionStartPos = textArea.Caret.Position; - // whole line selection - start of line to start of next line - if (realline < textArea.Document.TotalNumberOfLines - 1) - { - textArea.SelectionManager.SetSelection(new DefaultSelection(textArea.Document, selectionStartPos, new TextLocation(0, realline + 1))); - textArea.Caret.Position = new TextLocation(0, realline + 1); - } - else - { - textArea.SelectionManager.SetSelection(new DefaultSelection(textArea.Document, selectionStartPos, new TextLocation(textArea.Document.GetLineSegment(realline).Length + 1, realline))); - textArea.Caret.Position = new TextLocation(textArea.Document.GetLineSegment(realline).Length + 1, realline); - } - } - else - { // prior lines to starting selection, place the cursor on the same line as the new selection - // nothing is selected so make a new selection from cursor - selectionStartPos = textArea.Caret.Position; - // whole line selection - start of line to start of next line - textArea.SelectionManager.SetSelection(new DefaultSelection(textArea.Document, selectionStartPos, new TextLocation(selectionStartPos.X, selectionStartPos.Y))); - textArea.SelectionManager.ExtendSelection(new TextLocation(selectionStartPos.X, selectionStartPos.Y), new TextLocation(0, realline)); - textArea.Caret.Position = new TextLocation(0, realline); - } - } - else - { - // let MouseMove handle a shift-click in a gutter - MouseEventArgs e = new MouseEventArgs(mouseButtons, 1, mousepos.X, mousepos.Y, 0); - textArea.RaiseMouseMove(e); - } - } else { // this is a new selection with no shift-key - // sync the textareamousehandler mouse location - // (fixes problem with clicking out into a menu then back to the gutter whilst - // there is a selection) - textArea.mousepos = mousepos; - - selectionStartPos = new TextLocation(0, realline); - textArea.SelectionManager.ClearSelection(); - // whole line selection - start of line to start of next line - if (realline < textArea.Document.TotalNumberOfLines - 1) - { - textArea.SelectionManager.SetSelection(new DefaultSelection(textArea.Document, selectionStartPos, new TextLocation(selectionStartPos.X, selectionStartPos.Y + 1))); - textArea.Caret.Position = new TextLocation(selectionStartPos.X, selectionStartPos.Y + 1); - } - else - { - textArea.SelectionManager.SetSelection(new DefaultSelection(textArea.Document, new TextLocation(0, realline), new TextLocation(textArea.Document.GetLineSegment(realline).Length + 1, selectionStartPos.Y))); - textArea.Caret.Position = new TextLocation(textArea.Document.GetLineSegment(realline).Length + 1, selectionStartPos.Y); - } - } - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/HRuler.cs b/src/ICSharpCode.TextEditor/Src/Gui/HRuler.cs deleted file mode 100644 index cfd972c..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/HRuler.cs +++ /dev/null @@ -1,54 +0,0 @@ -// -// -// -// -// $Revision: 1925 $ -// - -using System; -using System.Drawing; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor -{ - /// - /// Horizontal ruler - text column measuring ruler at the top of the text area. - /// - public class HRuler : Control - { - TextArea textArea; - - public HRuler(TextArea textArea) - { - this.textArea = textArea; - } - - protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) - { - Graphics g = e.Graphics; - int num = 0; - for (float x = textArea.TextView.DrawingPosition.Left; x < textArea.TextView.DrawingPosition.Right; x += textArea.TextView.WideSpaceWidth) { - int offset = (Height * 2) / 3; - if (num % 5 == 0) { - offset = (Height * 4) / 5; - } - - if (num % 10 == 0) { - offset = 1; - } - ++num; - g.DrawLine(Pens.Black, - (int)x, offset, (int)x, Height - offset); - } - } - - protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs e) - { - e.Graphics.FillRectangle(Brushes.White, - new Rectangle(0, - 0, - Width, - Height)); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/IconBarMargin.cs b/src/ICSharpCode.TextEditor/Src/Gui/IconBarMargin.cs deleted file mode 100644 index 9b080a9..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/IconBarMargin.cs +++ /dev/null @@ -1,254 +0,0 @@ -// -// -// -// -// $Revision: 3176 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Drawing2D; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class views the line numbers and folding markers. - /// - public class IconBarMargin : AbstractMargin - { - const int iconBarWidth = 18; - - static readonly Size iconBarSize = new Size(iconBarWidth, -1); - - public override Size Size { - get { - return iconBarSize; - } - } - - public override bool IsVisible { - get { - return textArea.TextEditorProperties.IsIconBarVisible; - } - } - - - public IconBarMargin(TextArea textArea) : base(textArea) - { - } - - public override void Paint(Graphics g, Rectangle rect) - { - if (rect.Width <= 0 || rect.Height <= 0) { - return; - } - // paint background - g.FillRectangle(SystemBrushes.Control, new Rectangle(drawingPosition.X, rect.Top, drawingPosition.Width - 1, rect.Height)); - g.DrawLine(SystemPens.ControlDark, base.drawingPosition.Right - 1, rect.Top, base.drawingPosition.Right - 1, rect.Bottom); - - // paint icons - foreach (Bookmark mark in textArea.Document.BookmarkManager.Marks) { - int lineNumber = textArea.Document.GetVisibleLine(mark.LineNumber); - int lineHeight = textArea.TextView.FontHeight; - int yPos = (int)(lineNumber * lineHeight) - textArea.VirtualTop.Y; - if (IsLineInsideRegion(yPos, yPos + lineHeight, rect.Y, rect.Bottom)) { - if (lineNumber == textArea.Document.GetVisibleLine(mark.LineNumber - 1)) { - // marker is inside folded region, do not draw it - continue; - } - mark.Draw(this, g, new Point(0, yPos)); - } - } - base.Paint(g, rect); - } - - public override void HandleMouseDown(Point mousePos, MouseButtons mouseButtons) - { - int clickedVisibleLine = (mousePos.Y + textArea.VirtualTop.Y) / textArea.TextView.FontHeight; - int lineNumber = textArea.Document.GetFirstLogicalLine(clickedVisibleLine); - - if ((mouseButtons & MouseButtons.Right) == MouseButtons.Right) { - if (textArea.Caret.Line != lineNumber) { - textArea.Caret.Line = lineNumber; - } - } - - IList marks = textArea.Document.BookmarkManager.Marks; - List marksInLine = new List(); - int oldCount = marks.Count; - foreach (Bookmark mark in marks) { - if (mark.LineNumber == lineNumber) { - marksInLine.Add(mark); - } - } - for (int i = marksInLine.Count - 1; i >= 0; i--) { - Bookmark mark = marksInLine[i]; - if (mark.Click(textArea, new MouseEventArgs(mouseButtons, 1, mousePos.X, mousePos.Y, 0))) { - if (oldCount != marks.Count) { - textArea.UpdateLine(lineNumber); - } - return; - } - } - base.HandleMouseDown(mousePos, mouseButtons); - } - - #region Drawing functions - public void DrawBreakpoint(Graphics g, int y, bool isEnabled, bool isHealthy) - { - int diameter = Math.Min(iconBarWidth - 2, textArea.TextView.FontHeight); - Rectangle rect = new Rectangle(1, - y + (textArea.TextView.FontHeight - diameter) / 2, - diameter, - diameter); - - - using (GraphicsPath path = new GraphicsPath()) { - path.AddEllipse(rect); - using (PathGradientBrush pthGrBrush = new PathGradientBrush(path)) { - pthGrBrush.CenterPoint = new PointF(rect.Left + rect.Width / 3 , rect.Top + rect.Height / 3); - pthGrBrush.CenterColor = Color.MistyRose; - Color[] colors = {isHealthy ? Color.Firebrick : Color.Olive}; - pthGrBrush.SurroundColors = colors; - - if (isEnabled) { - g.FillEllipse(pthGrBrush, rect); - } else { - g.FillEllipse(SystemBrushes.Control, rect); - using (Pen pen = new Pen(pthGrBrush)) { - g.DrawEllipse(pen, new Rectangle(rect.X + 1, rect.Y + 1, rect.Width - 2, rect.Height - 2)); - } - } - } - } - } - - public void DrawBookmark(Graphics g, int y, bool isEnabled) - { - int delta = textArea.TextView.FontHeight / 8; - Rectangle rect = new Rectangle(1, y + delta, base.drawingPosition.Width - 4, textArea.TextView.FontHeight - delta * 2); - - if (isEnabled) { - using (Brush brush = new LinearGradientBrush(new Point(rect.Left, rect.Top), - new Point(rect.Right, rect.Bottom), - Color.SkyBlue, - Color.White)) { - FillRoundRect(g, brush, rect); - } - } else { - FillRoundRect(g, Brushes.White, rect); - } - using (Brush brush = new LinearGradientBrush(new Point(rect.Left, rect.Top), - new Point(rect.Right, rect.Bottom), - Color.SkyBlue, - Color.Blue)) { - using (Pen pen = new Pen(brush)) { - DrawRoundRect(g, pen, rect); - } - } - } - - public void DrawArrow(Graphics g, int y) - { - int delta = textArea.TextView.FontHeight / 8; - Rectangle rect = new Rectangle(1, y + delta, base.drawingPosition.Width - 4, textArea.TextView.FontHeight - delta * 2); - using (Brush brush = new LinearGradientBrush(new Point(rect.Left, rect.Top), - new Point(rect.Right, rect.Bottom), - Color.LightYellow, - Color.Yellow)) { - FillArrow(g, brush, rect); - } - - using (Brush brush = new LinearGradientBrush(new Point(rect.Left, rect.Top), - new Point(rect.Right, rect.Bottom), - Color.Yellow, - Color.Brown)) { - using (Pen pen = new Pen(brush)) { - DrawArrow(g, pen, rect); - } - } - } - - GraphicsPath CreateArrowGraphicsPath(Rectangle r) - { - GraphicsPath gp = new GraphicsPath(); - int halfX = r.Width / 2; - int halfY = r.Height/ 2; - gp.AddLine(r.X, r.Y + halfY/2, r.X + halfX, r.Y + halfY/2); - gp.AddLine(r.X + halfX, r.Y + halfY/2, r.X + halfX, r.Y); - gp.AddLine(r.X + halfX, r.Y, r.Right, r.Y + halfY); - gp.AddLine(r.Right, r.Y + halfY, r.X + halfX, r.Bottom); - gp.AddLine(r.X + halfX, r.Bottom, r.X + halfX, r.Bottom - halfY/2); - gp.AddLine(r.X + halfX, r.Bottom - halfY/2, r.X, r.Bottom - halfY/2); - gp.AddLine(r.X, r.Bottom - halfY/2, r.X, r.Y + halfY/2); - gp.CloseFigure(); - return gp; - } - - GraphicsPath CreateRoundRectGraphicsPath(Rectangle r) - { - GraphicsPath gp = new GraphicsPath(); - int radius = r.Width / 2; - gp.AddLine(r.X + radius, r.Y, r.Right - radius, r.Y); - gp.AddArc(r.Right - radius, r.Y, radius, radius, 270, 90); - - gp.AddLine(r.Right, r.Y + radius, r.Right, r.Bottom - radius); - gp.AddArc(r.Right - radius, r.Bottom - radius, radius, radius, 0, 90); - - gp.AddLine(r.Right - radius, r.Bottom, r.X + radius, r.Bottom); - gp.AddArc(r.X, r.Bottom - radius, radius, radius, 90, 90); - - gp.AddLine(r.X, r.Bottom - radius, r.X, r.Y + radius); - gp.AddArc(r.X, r.Y, radius, radius, 180, 90); - - gp.CloseFigure(); - return gp; - } - - void DrawRoundRect(Graphics g, Pen p , Rectangle r) - { - using (GraphicsPath gp = CreateRoundRectGraphicsPath(r)) { - g.DrawPath(p, gp); - } - } - - void FillRoundRect(Graphics g, Brush b , Rectangle r) - { - using (GraphicsPath gp = CreateRoundRectGraphicsPath(r)) { - g.FillPath(b, gp); - } - } - - void DrawArrow(Graphics g, Pen p , Rectangle r) - { - using (GraphicsPath gp = CreateArrowGraphicsPath(r)) { - g.DrawPath(p, gp); - } - } - - void FillArrow(Graphics g, Brush b , Rectangle r) - { - using (GraphicsPath gp = CreateArrowGraphicsPath(r)) { - g.FillPath(b, gp); - } - } - - #endregion - - static bool IsLineInsideRegion(int top, int bottom, int regionTop, int regionBottom) - { - if (top >= regionTop && top <= regionBottom) { - // Region overlaps the line's top edge. - return true; - } else if(regionTop > top && regionTop < bottom) { - // Region's top edge inside line. - return true; - } - return false; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/Ime.cs b/src/ICSharpCode.TextEditor/Src/Gui/Ime.cs deleted file mode 100644 index 970eacc..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/Ime.cs +++ /dev/null @@ -1,177 +0,0 @@ -// -// -// -// -// $Revision: 3113 $ -// - -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor -{ - /// - /// Used internally, not for own use. - /// - internal class Ime - { - public Ime(IntPtr hWnd, Font font) - { - string PROCESSOR_ARCHITEW6432 = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"); - if (PROCESSOR_ARCHITEW6432 == "IA64" || PROCESSOR_ARCHITEW6432 == "AMD64" || Environment.OSVersion.Platform == PlatformID.Unix) { - disableIME = true; - } else { - this.hIMEWnd = ImmGetDefaultIMEWnd(hWnd); - } - this.hWnd = hWnd; - this.font = font; - SetIMEWindowFont(font); - } - - private Font font = null; - public Font Font - { - get { - return font; - } - set { - if (!value.Equals(font)) { - font = value; - lf = null; - SetIMEWindowFont(value); - } - } - } - - public IntPtr HWnd - { - set { - if (this.hWnd != value) { - this.hWnd = value; - if (!disableIME) - this.hIMEWnd = ImmGetDefaultIMEWnd(value); - SetIMEWindowFont(font); - } - } - } - - [ DllImport("imm32.dll") ] - private static extern IntPtr ImmGetDefaultIMEWnd(IntPtr hWnd); - - [ DllImport("user32.dll") ] - private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, COMPOSITIONFORM lParam); - [ DllImport("user32.dll") ] - private static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, [In, MarshalAs(UnmanagedType.LPStruct)] LOGFONT lParam); - - [ StructLayout(LayoutKind.Sequential) ] - private class COMPOSITIONFORM - { - public int dwStyle = 0; - public POINT ptCurrentPos = null; - public RECT rcArea = null; - } - - [ StructLayout(LayoutKind.Sequential) ] - private class POINT - { - public int x = 0; - public int y = 0; - } - - [ StructLayout(LayoutKind.Sequential) ] - private class RECT - { - public int left = 0; - public int top = 0; - public int right = 0; - public int bottom = 0; - } - - private const int WM_IME_CONTROL = 0x0283; - - private const int IMC_SETCOMPOSITIONWINDOW = 0x000c; - private IntPtr hIMEWnd; - private IntPtr hWnd; - private const int CFS_POINT = 0x0002; - - [ StructLayout(LayoutKind.Sequential) ] - private class LOGFONT - { - public int lfHeight = 0; - public int lfWidth = 0; - public int lfEscapement = 0; - public int lfOrientation = 0; - public int lfWeight = 0; - public byte lfItalic = 0; - public byte lfUnderline = 0; - public byte lfStrikeOut = 0; - public byte lfCharSet = 0; - public byte lfOutPrecision = 0; - public byte lfClipPrecision = 0; - public byte lfQuality = 0; - public byte lfPitchAndFamily = 0; - [ MarshalAs(UnmanagedType.ByValTStr, SizeConst=32) ] public string lfFaceName = null; - } - private const int IMC_SETCOMPOSITIONFONT = 0x000a; - LOGFONT lf = null; - static bool disableIME; - - private void SetIMEWindowFont(Font f) - { - if (disableIME || hIMEWnd == IntPtr.Zero) return; - - if (lf == null) { - lf = new LOGFONT(); - f.ToLogFont(lf); - lf.lfFaceName = f.Name; // This is very important! "Font.ToLogFont" Method sets invalid value to LOGFONT.lfFaceName - } - - try { - SendMessage( - hIMEWnd, - WM_IME_CONTROL, - new IntPtr(IMC_SETCOMPOSITIONFONT), - lf - ); - } catch (AccessViolationException ex) { - Handle(ex); - } - } - - public void SetIMEWindowLocation(int x, int y) - { - if (disableIME || hIMEWnd == IntPtr.Zero) return; - - POINT p = new POINT(); - p.x = x; - p.y = y; - - COMPOSITIONFORM lParam = new COMPOSITIONFORM(); - lParam.dwStyle = CFS_POINT; - lParam.ptCurrentPos = p; - lParam.rcArea = new RECT(); - - try { - SendMessage( - hIMEWnd, - WM_IME_CONTROL, - new IntPtr(IMC_SETCOMPOSITIONWINDOW), - lParam - ); - } catch (AccessViolationException ex) { - Handle(ex); - } - } - - void Handle(Exception ex) - { - Console.WriteLine(ex); - if (!disableIME) { - disableIME = true; - MessageBox.Show("Error calling IME: " + ex.Message + "\nIME is disabled.", "IME error"); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/IInsightDataProvider.cs b/src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/IInsightDataProvider.cs deleted file mode 100644 index 8e84b91..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/IInsightDataProvider.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// -// -// -// $Revision: 2318 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Gui.InsightWindow -{ - public interface IInsightDataProvider - { - /// - /// Tells the insight provider to prepare its data. - /// - /// The name of the edited file - /// The text area in which the file is being edited - void SetupDataProvider(string fileName, TextArea textArea); - - /// - /// Notifies the insight provider that the caret offset has changed. - /// - /// Return true to close the insight window (e.g. when the - /// caret was moved outside the region where insight is displayed for). - /// Return false to keep the window open. - bool CaretOffsetChanged(); - - /// - /// Gets the text to display in the insight window. - /// - /// The number of the active insight entry. - /// Multiple insight entries might be multiple overloads of the same method. - /// The text to display, e.g. a multi-line string where - /// the first line is the method definition, followed by a description. - string GetInsightData(int number); - - /// - /// Gets the number of available insight entries, e.g. the number of available - /// overloads to call. - /// - int InsightDataCount { - get; - } - - /// - /// Gets the index of the entry to initially select. - /// - int DefaultIndex { - get; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/InsightWindow.cs b/src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/InsightWindow.cs deleted file mode 100644 index ea08593..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/InsightWindow/InsightWindow.cs +++ /dev/null @@ -1,199 +0,0 @@ -// -// -// -// -// $Revision: 3064 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Gui.CompletionWindow; -using ICSharpCode.TextEditor.Util; - -namespace ICSharpCode.TextEditor.Gui.InsightWindow -{ - public class InsightWindow : AbstractCompletionWindow - { - public InsightWindow(Form parentForm, TextEditorControl control) : base(parentForm, control) - { - SetStyle(ControlStyles.UserPaint, true); - SetStyle(ControlStyles.OptimizedDoubleBuffer, true); - } - - public void ShowInsightWindow() - { - if (!Visible) { - if (insightDataProviderStack.Count > 0) { - ShowCompletionWindow(); - } - } else { - Refresh(); - } - } - - #region Event handling routines - protected override bool ProcessTextAreaKey(Keys keyData) - { - if (!Visible) { - return false; - } - switch (keyData) { - case Keys.Down: - if (DataProvider != null && DataProvider.InsightDataCount > 0) { - CurrentData = (CurrentData + 1) % DataProvider.InsightDataCount; - Refresh(); - } - return true; - case Keys.Up: - if (DataProvider != null && DataProvider.InsightDataCount > 0) { - CurrentData = (CurrentData + DataProvider.InsightDataCount - 1) % DataProvider.InsightDataCount; - Refresh(); - } - return true; - } - return base.ProcessTextAreaKey(keyData); - } - - protected override void CaretOffsetChanged(object sender, EventArgs e) - { - // move the window under the caret (don't change the x position) - TextLocation caretPos = control.ActiveTextAreaControl.Caret.Position; - int y = (int)((1 + caretPos.Y) * control.ActiveTextAreaControl.TextArea.TextView.FontHeight) - - control.ActiveTextAreaControl.TextArea.VirtualTop.Y - 1 - + control.ActiveTextAreaControl.TextArea.TextView.DrawingPosition.Y; - - int xpos = control.ActiveTextAreaControl.TextArea.TextView.GetDrawingXPos(caretPos.Y, caretPos.X); - int ypos = (control.ActiveTextAreaControl.Document.GetVisibleLine(caretPos.Y) + 1) * control.ActiveTextAreaControl.TextArea.TextView.FontHeight - - control.ActiveTextAreaControl.TextArea.VirtualTop.Y; - int rulerHeight = control.TextEditorProperties.ShowHorizontalRuler ? control.ActiveTextAreaControl.TextArea.TextView.FontHeight : 0; - - Point p = control.ActiveTextAreaControl.PointToScreen(new Point(xpos, ypos + rulerHeight)); - if (p.Y != Location.Y) { - Location = p; - } - - while (DataProvider != null && DataProvider.CaretOffsetChanged()) { - CloseCurrentDataProvider(); - } - } - - protected override void OnMouseDown(MouseEventArgs e) - { - base.OnMouseDown(e); - control.ActiveTextAreaControl.TextArea.Focus(); - if (TipPainterTools.DrawingRectangle1.Contains(e.X, e.Y)) { - CurrentData = (CurrentData + DataProvider.InsightDataCount - 1) % DataProvider.InsightDataCount; - Refresh(); - } - if (TipPainterTools.DrawingRectangle2.Contains(e.X, e.Y)) { - CurrentData = (CurrentData + 1) % DataProvider.InsightDataCount; - Refresh(); - } - } - - #endregion - - MouseWheelHandler mouseWheelHandler = new MouseWheelHandler(); - - public void HandleMouseWheel(MouseEventArgs e) - { - if (DataProvider != null && DataProvider.InsightDataCount > 0) { - int distance = mouseWheelHandler.GetScrollAmount(e); - if (control.TextEditorProperties.MouseWheelScrollDown) - distance = -distance; - if (distance > 0) { - CurrentData = (CurrentData + 1) % DataProvider.InsightDataCount; - } else if (distance < 0) { - CurrentData = (CurrentData + DataProvider.InsightDataCount - 1) % DataProvider.InsightDataCount; - } - Refresh(); - } - } - - #region Insight Window Drawing routines - protected override void OnPaint(PaintEventArgs pe) - { - string methodCountMessage = null, description; - if (DataProvider == null || DataProvider.InsightDataCount < 1) { - description = "Unknown Method"; - } else { - if (DataProvider.InsightDataCount > 1) { - methodCountMessage = control.GetRangeDescription(CurrentData + 1, DataProvider.InsightDataCount); - } - description = DataProvider.GetInsightData(CurrentData); - } - - drawingSize = TipPainterTools.GetDrawingSizeHelpTipFromCombinedDescription(this, - pe.Graphics, - Font, - methodCountMessage, - description); - if (drawingSize != Size) { - SetLocation(); - } else { - TipPainterTools.DrawHelpTipFromCombinedDescription(this, pe.Graphics, Font, methodCountMessage, description); - } - } - - protected override void OnPaintBackground(PaintEventArgs pe) - { - pe.Graphics.FillRectangle(SystemBrushes.Info, pe.ClipRectangle); - } - #endregion - - #region InsightDataProvider handling - Stack insightDataProviderStack = new Stack(); - - int CurrentData { - get { - return insightDataProviderStack.Peek().currentData; - } - set { - insightDataProviderStack.Peek().currentData = value; - } - } - - IInsightDataProvider DataProvider { - get { - if (insightDataProviderStack.Count == 0) { - return null; - } - return insightDataProviderStack.Peek().dataProvider; - } - } - - public void AddInsightDataProvider(IInsightDataProvider provider, string fileName) - { - provider.SetupDataProvider(fileName, control.ActiveTextAreaControl.TextArea); - if (provider.InsightDataCount > 0) { - insightDataProviderStack.Push(new InsightDataProviderStackElement(provider)); - } - } - - void CloseCurrentDataProvider() - { - insightDataProviderStack.Pop(); - if (insightDataProviderStack.Count == 0) { - Close(); - } else { - Refresh(); - } - } - - class InsightDataProviderStackElement - { - public int currentData; - public IInsightDataProvider dataProvider; - - public InsightDataProviderStackElement(IInsightDataProvider dataProvider) - { - this.currentData = Math.Max(dataProvider.DefaultIndex, 0); - this.dataProvider = dataProvider; - } - } - #endregion - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextArea.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextArea.cs deleted file mode 100644 index 14c05cb..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextArea.cs +++ /dev/null @@ -1,946 +0,0 @@ -// -// -// -// -// $Revision: 3323 $ -// - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Drawing; -using System.Drawing.Text; -using System.Text; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Actions; -using ICSharpCode.TextEditor.Document; -using ICSharpCode.TextEditor.Gui.CompletionWindow; - -namespace ICSharpCode.TextEditor -{ - public delegate bool KeyEventHandler(char ch); - public delegate bool DialogKeyProcessor(Keys keyData); - - /// - /// This class paints the textarea. - /// - [ToolboxItem(false)] - public class TextArea : Control - { - bool hiddenMouseCursor = false; - /// - /// The position where the mouse cursor was when it was hidden. Sometimes the text editor gets MouseMove - /// events when typing text even if the mouse is not moved. - /// - Point mouseCursorHidePosition; - - Point virtualTop = new Point(0, 0); - TextAreaControl motherTextAreaControl; - TextEditorControl motherTextEditorControl; - - List bracketshemes = new List(); - TextAreaClipboardHandler textAreaClipboardHandler; - bool autoClearSelection = false; - - List leftMargins = new List(); - - TextView textView; - GutterMargin gutterMargin; - FoldMargin foldMargin; - IconBarMargin iconBarMargin; - - SelectionManager selectionManager; - Caret caret; - - internal Point mousepos = new Point(0, 0); - //public Point selectionStartPos = new Point(0,0); - - bool disposed; - - [Browsable(false)] - public IList LeftMargins { - get { - return leftMargins.AsReadOnly(); - } - } - - public void InsertLeftMargin(int index, AbstractMargin margin) - { - leftMargins.Insert(index, margin); - Refresh(); - } - - public TextEditorControl MotherTextEditorControl { - get { - return motherTextEditorControl; - } - } - - public TextAreaControl MotherTextAreaControl { - get { - return motherTextAreaControl; - } - } - - public SelectionManager SelectionManager { - get { - return selectionManager; - } - } - - public Caret Caret { - get { - return caret; - } - } - - public TextView TextView { - get { - return textView; - } - } - - public GutterMargin GutterMargin { - get { - return gutterMargin; - } - } - - public FoldMargin FoldMargin { - get { - return foldMargin; - } - } - - public IconBarMargin IconBarMargin { - get { - return iconBarMargin; - } - } - - public Encoding Encoding { - get { - return motherTextEditorControl.Encoding; - } - } - public int MaxVScrollValue { - get { - return (Document.GetVisibleLine(Document.TotalNumberOfLines - 1) + 1 + TextView.VisibleLineCount * 2 / 3) * TextView.FontHeight; - } - } - - public Point VirtualTop { - get { - return virtualTop; - } - set { - Point newVirtualTop = new Point(value.X, Math.Min(MaxVScrollValue, Math.Max(0, value.Y))); - if (virtualTop != newVirtualTop) { - virtualTop = newVirtualTop; - motherTextAreaControl.VScrollBar.Value = virtualTop.Y; - Invalidate(); - } - caret.UpdateCaretPosition(); - } - } - - public bool AutoClearSelection { - get { - return autoClearSelection; - } - set { - autoClearSelection = value; - } - } - - [Browsable(false)] - public IDocument Document { - get { - return motherTextEditorControl.Document; - } - } - - public TextAreaClipboardHandler ClipboardHandler { - get { - return textAreaClipboardHandler; - } - } - - - public ITextEditorProperties TextEditorProperties { - get { - return motherTextEditorControl.TextEditorProperties; - } - } - - public TextArea(TextEditorControl motherTextEditorControl, TextAreaControl motherTextAreaControl) - { - this.motherTextAreaControl = motherTextAreaControl; - this.motherTextEditorControl = motherTextEditorControl; - - caret = new Caret(this); - selectionManager = new SelectionManager(Document, this); - - this.textAreaClipboardHandler = new TextAreaClipboardHandler(this); - - ResizeRedraw = true; - - SetStyle(ControlStyles.OptimizedDoubleBuffer, true); -// SetStyle(ControlStyles.AllPaintingInWmPaint, true); -// SetStyle(ControlStyles.UserPaint, true); - SetStyle(ControlStyles.Opaque, false); - SetStyle(ControlStyles.ResizeRedraw, true); - SetStyle(ControlStyles.Selectable, true); - - textView = new TextView(this); - - gutterMargin = new GutterMargin(this); - foldMargin = new FoldMargin(this); - iconBarMargin = new IconBarMargin(this); - leftMargins.AddRange(new AbstractMargin[] { iconBarMargin, gutterMargin, foldMargin }); - OptionsChanged(); - - - new TextAreaMouseHandler(this).Attach(); - new TextAreaDragDropHandler().Attach(this); - - bracketshemes.Add(new BracketHighlightingSheme('{', '}')); - bracketshemes.Add(new BracketHighlightingSheme('(', ')')); - bracketshemes.Add(new BracketHighlightingSheme('[', ']')); - - caret.PositionChanged += new EventHandler(SearchMatchingBracket); - Document.TextContentChanged += new EventHandler(TextContentChanged); - Document.FoldingManager.FoldingsChanged += new EventHandler(DocumentFoldingsChanged); - } - - public void UpdateMatchingBracket() - { - SearchMatchingBracket(null, null); - } - - void TextContentChanged(object sender, EventArgs e) - { - Caret.Position = new TextLocation(0, 0); - SelectionManager.SelectionCollection.Clear(); - } - void SearchMatchingBracket(object sender, EventArgs e) - { - if (!TextEditorProperties.ShowMatchingBracket) { - textView.Highlight = null; - return; - } - int oldLine1 = -1, oldLine2 = -1; - if (textView.Highlight != null && textView.Highlight.OpenBrace.Y >=0 && textView.Highlight.OpenBrace.Y < Document.TotalNumberOfLines) { - oldLine1 = textView.Highlight.OpenBrace.Y; - } - if (textView.Highlight != null && textView.Highlight.CloseBrace.Y >=0 && textView.Highlight.CloseBrace.Y < Document.TotalNumberOfLines) { - oldLine2 = textView.Highlight.CloseBrace.Y; - } - textView.Highlight = FindMatchingBracketHighlight(); - if (oldLine1 >= 0) - UpdateLine(oldLine1); - if (oldLine2 >= 0 && oldLine2 != oldLine1) - UpdateLine(oldLine2); - if (textView.Highlight != null) { - int newLine1 = textView.Highlight.OpenBrace.Y; - int newLine2 = textView.Highlight.CloseBrace.Y; - if (newLine1 != oldLine1 && newLine1 != oldLine2) - UpdateLine(newLine1); - if (newLine2 != oldLine1 && newLine2 != oldLine2 && newLine2 != newLine1) - UpdateLine(newLine2); - } - } - - public BracketHighlight FindMatchingBracketHighlight() - { - if (Caret.Offset == 0) - return null; - foreach (BracketHighlightingSheme bracketsheme in bracketshemes) { - BracketHighlight highlight = bracketsheme.GetHighlight(Document, Caret.Offset - 1); - if (highlight != null) { - return highlight; - } - } - return null; - } - - public void SetDesiredColumn() - { - Caret.DesiredColumn = TextView.GetDrawingXPos(Caret.Line, Caret.Column) + VirtualTop.X; - } - - public void SetCaretToDesiredColumn() - { - FoldMarker dummy; - Caret.Position = textView.GetLogicalColumn(Caret.Line, Caret.DesiredColumn + VirtualTop.X, out dummy); - } - - public void OptionsChanged() - { - UpdateMatchingBracket(); - textView.OptionsChanged(); - caret.RecreateCaret(); - caret.UpdateCaretPosition(); - Refresh(); - } - - AbstractMargin lastMouseInMargin; - - protected override void OnMouseLeave(System.EventArgs e) - { - base.OnMouseLeave(e); - this.Cursor = Cursors.Default; - if (lastMouseInMargin != null) { - lastMouseInMargin.HandleMouseLeave(EventArgs.Empty); - lastMouseInMargin = null; - } - CloseToolTip(); - } - - protected override void OnMouseDown(System.Windows.Forms.MouseEventArgs e) - { - // this corrects weird problems when text is selected, - // then a menu item is selected, then the text is - // clicked again - it correctly synchronises the - // click position - mousepos = new Point(e.X, e.Y); - - base.OnMouseDown(e); - CloseToolTip(); - - foreach (AbstractMargin margin in leftMargins) { - if (margin.DrawingPosition.Contains(e.X, e.Y)) { - margin.HandleMouseDown(new Point(e.X, e.Y), e.Button); - } - } - } - - /// - /// Shows the mouse cursor if it has been hidden. - /// - /// true to always show the cursor or false to show it only if it has been moved since it was hidden. - internal void ShowHiddenCursor(bool forceShow) - { - if (hiddenMouseCursor) { - if (mouseCursorHidePosition != Cursor.Position || forceShow) { - Cursor.Show(); - hiddenMouseCursor = false; - } - } - } - - - // static because the mouse can only be in one text area and we don't want to have - // tooltips of text areas from inactive tabs floating around. - static DeclarationViewWindow toolTip; - static string oldToolTip; - - void SetToolTip(string text, int lineNumber) - { - if (toolTip == null || toolTip.IsDisposed) - toolTip = new DeclarationViewWindow(this.FindForm()); - if (oldToolTip == text) - return; - if (text == null) { - toolTip.Hide(); - } else { - Point p = Control.MousePosition; - Point cp = PointToClient(p); - if (lineNumber >= 0) { - lineNumber = this.Document.GetVisibleLine(lineNumber); - p.Y = (p.Y - cp.Y) + (lineNumber * this.TextView.FontHeight) - this.virtualTop.Y; - } - p.Offset(3, 3); - toolTip.Location = p; - toolTip.Description = text; - toolTip.HideOnClick = true; - toolTip.Show(); - } - oldToolTip = text; - } - - public event ToolTipRequestEventHandler ToolTipRequest; - - protected virtual void OnToolTipRequest(ToolTipRequestEventArgs e) - { - if (ToolTipRequest != null) { - ToolTipRequest(this, e); - } - } - - bool toolTipActive; - /// - /// Rectangle in text area that caused the current tool tip. - /// Prevents tooltip from re-showing when it was closed because of a click or keyboard - /// input and the mouse was not used. - /// - Rectangle toolTipRectangle; - - void CloseToolTip() - { - if (toolTipActive) { - //Console.WriteLine("Closing tooltip"); - toolTipActive = false; - SetToolTip(null, -1); - } - ResetMouseEventArgs(); - } - - protected override void OnMouseHover(EventArgs e) - { - base.OnMouseHover(e); - //Console.WriteLine("Hover raised at " + PointToClient(Control.MousePosition)); - if (MouseButtons == MouseButtons.None) { - RequestToolTip(PointToClient(Control.MousePosition)); - } else { - CloseToolTip(); - } - } - - protected void RequestToolTip(Point mousePos) - { - if (toolTipRectangle.Contains(mousePos)) { - if (!toolTipActive) - ResetMouseEventArgs(); - return; - } - - //Console.WriteLine("Request tooltip for " + mousePos); - - toolTipRectangle = new Rectangle(mousePos.X - 4, mousePos.Y - 4, 8, 8); - - TextLocation logicPos = textView.GetLogicalPosition(mousePos.X - textView.DrawingPosition.Left, - mousePos.Y - textView.DrawingPosition.Top); - bool inDocument = textView.DrawingPosition.Contains(mousePos) - && logicPos.Y >= 0 && logicPos.Y < Document.TotalNumberOfLines; - ToolTipRequestEventArgs args = new ToolTipRequestEventArgs(mousePos, logicPos, inDocument); - OnToolTipRequest(args); - if (args.ToolTipShown) { - //Console.WriteLine("Set tooltip to " + args.toolTipText); - toolTipActive = true; - SetToolTip(args.toolTipText, inDocument ? logicPos.Y + 1 : -1); - } else { - CloseToolTip(); - } - } - - // external interface to the attached event - internal void RaiseMouseMove(MouseEventArgs e) - { - OnMouseMove(e); - } - - protected override void OnMouseMove(MouseEventArgs e) - { - base.OnMouseMove(e); - if (!toolTipRectangle.Contains(e.Location)) { - toolTipRectangle = Rectangle.Empty; - if (toolTipActive) - RequestToolTip(e.Location); - } - foreach (AbstractMargin margin in leftMargins) { - if (margin.DrawingPosition.Contains(e.X, e.Y)) { - this.Cursor = margin.Cursor; - margin.HandleMouseMove(new Point(e.X, e.Y), e.Button); - if (lastMouseInMargin != margin) { - if (lastMouseInMargin != null) { - lastMouseInMargin.HandleMouseLeave(EventArgs.Empty); - } - lastMouseInMargin = margin; - } - return; - } - } - if (lastMouseInMargin != null) { - lastMouseInMargin.HandleMouseLeave(EventArgs.Empty); - lastMouseInMargin = null; - } - if (textView.DrawingPosition.Contains(e.X, e.Y)) { - TextLocation realmousepos = TextView.GetLogicalPosition(e.X - TextView.DrawingPosition.X, e.Y - TextView.DrawingPosition.Y); - if(SelectionManager.IsSelected(Document.PositionToOffset(realmousepos)) && MouseButtons == MouseButtons.None) { - // mouse is hovering over a selection, so show default mouse - this.Cursor = Cursors.Default; - } else { - // mouse is hovering over text area, not a selection, so show the textView cursor - this.Cursor = textView.Cursor; - } - return; - } - this.Cursor = Cursors.Default; - } - AbstractMargin updateMargin = null; - - public void Refresh(AbstractMargin margin) - { - updateMargin = margin; - Invalidate(updateMargin.DrawingPosition); - Update(); - updateMargin = null; - } - - protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs pevent) - { - } - - protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) - { - int currentXPos = 0; - int currentYPos = 0; - bool adjustScrollBars = false; - Graphics g = e.Graphics; - Rectangle clipRectangle = e.ClipRectangle; - - bool isFullRepaint = clipRectangle.X == 0 && clipRectangle.Y == 0 - && clipRectangle.Width == this.Width && clipRectangle.Height == this.Height; - - g.TextRenderingHint = this.TextEditorProperties.TextRenderingHint; - - if (updateMargin != null) { - updateMargin.Paint(g, updateMargin.DrawingPosition); -// clipRectangle.Intersect(updateMargin.DrawingPosition); - } - - if (clipRectangle.Width <= 0 || clipRectangle.Height <= 0) { - return; - } - - foreach (AbstractMargin margin in leftMargins) { - if (margin.IsVisible) { - Rectangle marginRectangle = new Rectangle(currentXPos , currentYPos, margin.Size.Width, Height - currentYPos); - if (marginRectangle != margin.DrawingPosition) { - // margin changed size - if (!isFullRepaint && !clipRectangle.Contains(marginRectangle)) { - Invalidate(); // do a full repaint - } - adjustScrollBars = true; - margin.DrawingPosition = marginRectangle; - } - currentXPos += margin.DrawingPosition.Width; - if (clipRectangle.IntersectsWith(marginRectangle)) { - marginRectangle.Intersect(clipRectangle); - if (!marginRectangle.IsEmpty) { - margin.Paint(g, marginRectangle); - } - } - } - } - - Rectangle textViewArea = new Rectangle(currentXPos, currentYPos, Width - currentXPos, Height - currentYPos); - if (textViewArea != textView.DrawingPosition) { - adjustScrollBars = true; - textView.DrawingPosition = textViewArea; - // update caret position (but outside of WM_PAINT!) - BeginInvoke((MethodInvoker)caret.UpdateCaretPosition); - } - if (clipRectangle.IntersectsWith(textViewArea)) { - textViewArea.Intersect(clipRectangle); - if (!textViewArea.IsEmpty) { - textView.Paint(g, textViewArea); - } - } - - if (adjustScrollBars) { - this.motherTextAreaControl.AdjustScrollBars(); - } - - // we cannot update the caret position here, it's not allowed to call the caret API inside WM_PAINT - //Caret.UpdateCaretPosition(); - - base.OnPaint(e); - } - void DocumentFoldingsChanged(object sender, EventArgs e) - { - Caret.UpdateCaretPosition(); - Invalidate(); - this.motherTextAreaControl.AdjustScrollBars(); - } - - #region keyboard handling methods - - /// - /// This method is called on each Keypress - /// - /// - /// True, if the key is handled by this method and should NOT be - /// inserted in the textarea. - /// - protected internal virtual bool HandleKeyPress(char ch) - { - if (KeyEventHandler != null) { - return KeyEventHandler(ch); - } - return false; - } - - // Fixes SD2-747: Form containing the text editor and a button with a shortcut - protected override bool IsInputChar(char charCode) - { - return true; - } - - internal bool IsReadOnly(int offset) - { - if (Document.ReadOnly) { - return true; - } - if (TextEditorProperties.SupportReadOnlySegments) { - return Document.MarkerStrategy.GetMarkers(offset).Exists(m=>m.IsReadOnly); - } else { - return false; - } - } - - internal bool IsReadOnly(int offset, int length) - { - if (Document.ReadOnly) { - return true; - } - if (TextEditorProperties.SupportReadOnlySegments) { - return Document.MarkerStrategy.GetMarkers(offset, length).Exists(m=>m.IsReadOnly); - } else { - return false; - } - } - - public void SimulateKeyPress(char ch) - { - if (SelectionManager.HasSomethingSelected) { - if (SelectionManager.SelectionIsReadonly) - return; - } else if (IsReadOnly(Caret.Offset)) { - return; - } - - if (ch < ' ') { - return; - } - - if (!hiddenMouseCursor && TextEditorProperties.HideMouseCursor) { - if (this.ClientRectangle.Contains(PointToClient(Cursor.Position))) { - mouseCursorHidePosition = Cursor.Position; - hiddenMouseCursor = true; - Cursor.Hide(); - } - } - CloseToolTip(); - - BeginUpdate(); - Document.UndoStack.StartUndoGroup(); - try { - // INSERT char - if (!HandleKeyPress(ch)) { - switch (Caret.CaretMode) { - case CaretMode.InsertMode: - InsertChar(ch); - break; - case CaretMode.OverwriteMode: - ReplaceChar(ch); - break; - default: - Debug.Assert(false, "Unknown caret mode " + Caret.CaretMode); - break; - } - } - - int currentLineNr = Caret.Line; - Document.FormattingStrategy.FormatLine(this, currentLineNr, Document.PositionToOffset(Caret.Position), ch); - - EndUpdate(); - } finally { - Document.UndoStack.EndUndoGroup(); - } - } - - protected override void OnKeyPress(KeyPressEventArgs e) - { - base.OnKeyPress(e); - SimulateKeyPress(e.KeyChar); - e.Handled = true; - } - - /// - /// This method executes a dialog key - /// - public bool ExecuteDialogKey(Keys keyData) - { - // try, if a dialog key processor was set to use this - if (DoProcessDialogKey != null && DoProcessDialogKey(keyData)) { - return true; - } - - // if not (or the process was 'silent', use the standard edit actions - IEditAction action = motherTextEditorControl.GetEditAction(keyData); - AutoClearSelection = true; - if (action != null) { - BeginUpdate(); - try { - lock (Document) { - action.Execute(this); - if (SelectionManager.HasSomethingSelected && AutoClearSelection /*&& caretchanged*/) { - if (Document.TextEditorProperties.DocumentSelectionMode == DocumentSelectionMode.Normal) { - SelectionManager.ClearSelection(); - } - } - } - } finally { - EndUpdate(); - Caret.UpdateCaretPosition(); - } - return true; - } - return false; - } - - protected override bool ProcessDialogKey(Keys keyData) - { - return ExecuteDialogKey(keyData) || base.ProcessDialogKey(keyData); - } - #endregion - - public void ScrollToCaret() - { - motherTextAreaControl.ScrollToCaret(); - } - - public void ScrollTo(int line) - { - motherTextAreaControl.ScrollTo(line); - } - - public void BeginUpdate() - { - motherTextEditorControl.BeginUpdate(); - } - - public void EndUpdate() - { - motherTextEditorControl.EndUpdate(); - } - - public bool EnableCutOrPaste { - get { - if (motherTextAreaControl == null) - return false; - if (SelectionManager.HasSomethingSelected) - return !SelectionManager.SelectionIsReadonly; - else - return !IsReadOnly(Caret.Offset); - } - } - - string GenerateWhitespaceString(int length) - { - return new String(' ', length); - } - /// - /// Inserts a single character at the caret position - /// - public void InsertChar(char ch) - { - bool updating = motherTextEditorControl.IsInUpdate; - if (!updating) { - BeginUpdate(); - } - - // filter out forgein whitespace chars and replace them with standard space (ASCII 32) - if (Char.IsWhiteSpace(ch) && ch != '\t' && ch != '\n') { - ch = ' '; - } - - Document.UndoStack.StartUndoGroup(); - if (Document.TextEditorProperties.DocumentSelectionMode == DocumentSelectionMode.Normal && - SelectionManager.SelectionCollection.Count > 0) { - Caret.Position = SelectionManager.SelectionCollection[0].StartPosition; - SelectionManager.RemoveSelectedText(); - } - LineSegment caretLine = Document.GetLineSegment(Caret.Line); - int offset = Caret.Offset; - // use desired column for generated whitespaces - int dc = Caret.Column; - if (caretLine.Length < dc && ch != '\n') { - Document.Insert(offset, GenerateWhitespaceString(dc - caretLine.Length) + ch); - } else { - Document.Insert(offset, ch.ToString()); - } - Document.UndoStack.EndUndoGroup(); - ++Caret.Column; - - if (!updating) { - EndUpdate(); - UpdateLineToEnd(Caret.Line, Caret.Column); - } - - // I prefer to set NOT the standard column, if you type something -// ++Caret.DesiredColumn; - } - - /// - /// Inserts a whole string at the caret position - /// - public void InsertString(string str) - { - bool updating = motherTextEditorControl.IsInUpdate; - if (!updating) { - BeginUpdate(); - } - try { - Document.UndoStack.StartUndoGroup(); - if (Document.TextEditorProperties.DocumentSelectionMode == DocumentSelectionMode.Normal && - SelectionManager.SelectionCollection.Count > 0) { - Caret.Position = SelectionManager.SelectionCollection[0].StartPosition; - SelectionManager.RemoveSelectedText(); - } - - int oldOffset = Document.PositionToOffset(Caret.Position); - int oldLine = Caret.Line; - LineSegment caretLine = Document.GetLineSegment(Caret.Line); - if (caretLine.Length < Caret.Column) { - int whiteSpaceLength = Caret.Column - caretLine.Length; - Document.Insert(oldOffset, GenerateWhitespaceString(whiteSpaceLength) + str); - Caret.Position = Document.OffsetToPosition(oldOffset + str.Length + whiteSpaceLength); - } else { - Document.Insert(oldOffset, str); - Caret.Position = Document.OffsetToPosition(oldOffset + str.Length); - } - Document.UndoStack.EndUndoGroup(); - if (oldLine != Caret.Line) { - UpdateToEnd(oldLine); - } else { - UpdateLineToEnd(Caret.Line, Caret.Column); - } - } finally { - if (!updating) { - EndUpdate(); - } - } - } - - /// - /// Replaces a char at the caret position - /// - public void ReplaceChar(char ch) - { - bool updating = motherTextEditorControl.IsInUpdate; - if (!updating) { - BeginUpdate(); - } - if (Document.TextEditorProperties.DocumentSelectionMode == DocumentSelectionMode.Normal && SelectionManager.SelectionCollection.Count > 0) { - Caret.Position = SelectionManager.SelectionCollection[0].StartPosition; - SelectionManager.RemoveSelectedText(); - } - - int lineNr = Caret.Line; - LineSegment line = Document.GetLineSegment(lineNr); - int offset = Document.PositionToOffset(Caret.Position); - if (offset < line.Offset + line.Length) { - Document.Replace(offset, 1, ch.ToString()); - } else { - Document.Insert(offset, ch.ToString()); - } - if (!updating) { - EndUpdate(); - UpdateLineToEnd(lineNr, Caret.Column); - } - ++Caret.Column; -// ++Caret.DesiredColumn; - } - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - if (disposing) { - if (!disposed) { - disposed = true; - if (caret != null) { - caret.PositionChanged -= new EventHandler(SearchMatchingBracket); - caret.Dispose(); - } - if (selectionManager != null) { - selectionManager.Dispose(); - } - Document.TextContentChanged -= new EventHandler(TextContentChanged); - Document.FoldingManager.FoldingsChanged -= new EventHandler(DocumentFoldingsChanged); - motherTextAreaControl = null; - motherTextEditorControl = null; - foreach (AbstractMargin margin in leftMargins) { - if (margin is IDisposable) - (margin as IDisposable).Dispose(); - } - textView.Dispose(); - } - } - } - - #region UPDATE Commands - internal void UpdateLine(int line) - { - UpdateLines(0, line, line); - } - - internal void UpdateLines(int lineBegin, int lineEnd) - { - UpdateLines(0, lineBegin, lineEnd); - } - - internal void UpdateToEnd(int lineBegin) - { -// if (lineBegin > FirstPhysicalLine + textView.VisibleLineCount) { -// return; -// } - - lineBegin = Document.GetVisibleLine(lineBegin); - int y = Math.Max( 0, (int)(lineBegin * textView.FontHeight)); - y = Math.Max(0, y - this.virtualTop.Y); - Rectangle r = new Rectangle(0, - y, - Width, - Height - y); - Invalidate(r); - } - - internal void UpdateLineToEnd(int lineNr, int xStart) - { - UpdateLines(xStart, lineNr, lineNr); - } - - internal void UpdateLine(int line, int begin, int end) - { - UpdateLines(line, line); - } - int FirstPhysicalLine { - get { - return VirtualTop.Y / textView.FontHeight; - } - } - internal void UpdateLines(int xPos, int lineBegin, int lineEnd) - { -// if (lineEnd < FirstPhysicalLine || lineBegin > FirstPhysicalLine + textView.VisibleLineCount) { -// return; -// } - - InvalidateLines((int)(xPos * this.TextView.WideSpaceWidth), lineBegin, lineEnd); - } - - void InvalidateLines(int xPos, int lineBegin, int lineEnd) - { - lineBegin = Math.Max(Document.GetVisibleLine(lineBegin), FirstPhysicalLine); - lineEnd = Math.Min(Document.GetVisibleLine(lineEnd), FirstPhysicalLine + textView.VisibleLineCount); - int y = Math.Max( 0, (int)(lineBegin * textView.FontHeight)); - int height = Math.Min(textView.DrawingPosition.Height, (int)((1 + lineEnd - lineBegin) * (textView.FontHeight + 1))); - - Rectangle r = new Rectangle(0, - y - 1 - this.virtualTop.Y, - Width, - height + 3); - - Invalidate(r); - } - #endregion - public event KeyEventHandler KeyEventHandler; - public event DialogKeyProcessor DoProcessDialogKey; - - //internal void - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaClipboardHandler.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextAreaClipboardHandler.cs deleted file mode 100644 index 5cb6587..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaClipboardHandler.cs +++ /dev/null @@ -1,248 +0,0 @@ -// -// -// -// -// $Revision: 3359 $ -// - -using System; -using System.Drawing; -using System.IO; -using System.Runtime.InteropServices; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; -using ICSharpCode.TextEditor.Util; - -namespace ICSharpCode.TextEditor -{ - public class TextAreaClipboardHandler - { - TextArea textArea; - - public bool EnableCut { - get { - return textArea.EnableCutOrPaste; //textArea.SelectionManager.HasSomethingSelected; - } - } - - public bool EnableCopy { - get { - return true; //textArea.SelectionManager.HasSomethingSelected; - } - } - - public bool EnablePaste { - get { - if (!textArea.EnableCutOrPaste) - return false; - try { - return Clipboard.ContainsText(); - } catch (ExternalException) { - return false; - } - } - } - - public bool EnableDelete { - get { - return textArea.SelectionManager.HasSomethingSelected && !textArea.SelectionManager.SelectionIsReadonly; - } - } - - public bool EnableSelectAll { - get { - return true; - } - } - - public TextAreaClipboardHandler(TextArea textArea) - { - this.textArea = textArea; - textArea.SelectionManager.SelectionChanged += new EventHandler(DocumentSelectionChanged); - } - - void DocumentSelectionChanged(object sender, EventArgs e) - { -// ((DefaultWorkbench)WorkbenchSingleton.Workbench).UpdateToolbars(); - } - - const string LineSelectedType = "MSDEVLineSelect"; // This is the type VS 2003 and 2005 use for flagging a whole line copy - - bool CopyTextToClipboard(string stringToCopy, bool asLine) - { - if (stringToCopy.Length > 0) { - DataObject dataObject = new DataObject(); - dataObject.SetData(DataFormats.UnicodeText, true, stringToCopy); - if (asLine) { - MemoryStream lineSelected = new MemoryStream(1); - lineSelected.WriteByte(1); - dataObject.SetData(LineSelectedType, false, lineSelected); - } - // Default has no highlighting, therefore we don't need RTF output - if (textArea.Document.HighlightingStrategy.Name != "Default") { - dataObject.SetData(DataFormats.Rtf, RtfWriter.GenerateRtf(textArea)); - } - OnCopyText(new CopyTextEventArgs(stringToCopy)); - - SafeSetClipboard(dataObject); - return true; - } else { - return false; - } - } - - // Code duplication: TextAreaClipboardHandler.cs also has SafeSetClipboard - [ThreadStatic] static int SafeSetClipboardDataVersion; - - static void SafeSetClipboard(object dataObject) - { - // Work around ExternalException bug. (SD2-426) - // Best reproducable inside Virtual PC. - int version = unchecked(++SafeSetClipboardDataVersion); - try { - Clipboard.SetDataObject(dataObject, true); - } catch (ExternalException) { - Timer timer = new Timer(); - timer.Interval = 100; - timer.Tick += delegate { - timer.Stop(); - timer.Dispose(); - if (SafeSetClipboardDataVersion == version) { - try { - Clipboard.SetDataObject(dataObject, true, 10, 50); - } catch (ExternalException) { } - } - }; - timer.Start(); - } - } - - bool CopyTextToClipboard(string stringToCopy) - { - return CopyTextToClipboard(stringToCopy, false); - } - - public void Cut(object sender, EventArgs e) - { - if (textArea.SelectionManager.HasSomethingSelected) { - if (CopyTextToClipboard(textArea.SelectionManager.SelectedText)) { - if (textArea.SelectionManager.SelectionIsReadonly) - return; - // Remove text - textArea.BeginUpdate(); - textArea.Caret.Position = textArea.SelectionManager.SelectionCollection[0].StartPosition; - textArea.SelectionManager.RemoveSelectedText(); - textArea.EndUpdate(); - } - } else if (textArea.Document.TextEditorProperties.CutCopyWholeLine) { - // No text was selected, select and cut the entire line - int curLineNr = textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset); - LineSegment lineWhereCaretIs = textArea.Document.GetLineSegment(curLineNr); - string caretLineText = textArea.Document.GetText(lineWhereCaretIs.Offset, lineWhereCaretIs.TotalLength); - textArea.SelectionManager.SetSelection(textArea.Document.OffsetToPosition(lineWhereCaretIs.Offset), textArea.Document.OffsetToPosition(lineWhereCaretIs.Offset + lineWhereCaretIs.TotalLength)); - if (CopyTextToClipboard(caretLineText, true)) { - if (textArea.SelectionManager.SelectionIsReadonly) - return; - // remove line - textArea.BeginUpdate(); - textArea.Caret.Position = textArea.Document.OffsetToPosition(lineWhereCaretIs.Offset); - textArea.SelectionManager.RemoveSelectedText(); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.PositionToEnd, new TextLocation(0, curLineNr))); - textArea.EndUpdate(); - } - } - } - - public void Copy(object sender, EventArgs e) - { - if (!CopyTextToClipboard(textArea.SelectionManager.SelectedText) && textArea.Document.TextEditorProperties.CutCopyWholeLine) { - // No text was selected, select the entire line, copy it, and then deselect - int curLineNr = textArea.Document.GetLineNumberForOffset(textArea.Caret.Offset); - LineSegment lineWhereCaretIs = textArea.Document.GetLineSegment(curLineNr); - string caretLineText = textArea.Document.GetText(lineWhereCaretIs.Offset, lineWhereCaretIs.TotalLength); - CopyTextToClipboard(caretLineText, true); - } - } - - public void Paste(object sender, EventArgs e) - { - if (!textArea.EnableCutOrPaste) { - return; - } - // Clipboard.GetDataObject may throw an exception... - for (int i = 0;; i++) { - try { - IDataObject data = Clipboard.GetDataObject(); - if (data == null) - return; - bool fullLine = data.GetDataPresent(LineSelectedType); - if (data.GetDataPresent(DataFormats.UnicodeText)) { - string text = (string)data.GetData(DataFormats.UnicodeText); - if (text.Length > 0) { - textArea.Document.UndoStack.StartUndoGroup(); - try { - if (textArea.SelectionManager.HasSomethingSelected) { - textArea.Caret.Position = textArea.SelectionManager.SelectionCollection[0].StartPosition; - textArea.SelectionManager.RemoveSelectedText(); - } - if (fullLine) { - int col = textArea.Caret.Column; - textArea.Caret.Column = 0; - if (!textArea.IsReadOnly(textArea.Caret.Offset)) - textArea.InsertString(text); - textArea.Caret.Column = col; - } else { - // textArea.EnableCutOrPaste already checked readonly for this case - textArea.InsertString(text); - } - } finally { - textArea.Document.UndoStack.EndUndoGroup(); - } - } - } - return; - } catch (ExternalException) { - // GetDataObject does not provide RetryTimes parameter - if (i > 5) throw; - } - } - } - - public void Delete(object sender, EventArgs e) - { - new ICSharpCode.TextEditor.Actions.Delete().Execute(textArea); - } - - public void SelectAll(object sender, EventArgs e) - { - new ICSharpCode.TextEditor.Actions.SelectWholeDocument().Execute(textArea); - } - - protected virtual void OnCopyText(CopyTextEventArgs e) - { - if (CopyText != null) { - CopyText(this, e); - } - } - - public event CopyTextEventHandler CopyText; - } - - public delegate void CopyTextEventHandler(object sender, CopyTextEventArgs e); - public class CopyTextEventArgs : EventArgs - { - string text; - - public string Text { - get { - return text; - } - } - - public CopyTextEventArgs(string text) - { - this.text = text; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaControl.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextAreaControl.cs deleted file mode 100644 index 8e340e8..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaControl.cs +++ /dev/null @@ -1,463 +0,0 @@ -// -// -// -// -// $Revision: 3078 $ -// - -using System; -using System.ComponentModel; -using System.Drawing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class paints the textarea. - /// - [ToolboxItem(false)] - public class TextAreaControl : Panel - { - TextEditorControl motherTextEditorControl; - - HRuler hRuler = null; - - VScrollBar vScrollBar = new VScrollBar(); - HScrollBar hScrollBar = new HScrollBar(); - TextArea textArea; - bool doHandleMousewheel = true; - bool disposed; - - public TextArea TextArea { - get { - return textArea; - } - } - - public SelectionManager SelectionManager { - get { - return textArea.SelectionManager; - } - } - - public Caret Caret { - get { - return textArea.Caret; - } - } - - [Browsable(false)] - public IDocument Document { - get { - if (motherTextEditorControl != null) - return motherTextEditorControl.Document; - return null; - } - } - - public ITextEditorProperties TextEditorProperties { - get { - if (motherTextEditorControl != null) - return motherTextEditorControl.TextEditorProperties; - return null; - } - } - - public VScrollBar VScrollBar { - get { - return vScrollBar; - } - } - - public HScrollBar HScrollBar { - get { - return hScrollBar; - } - } - - public bool DoHandleMousewheel { - get { - return doHandleMousewheel; - } - set { - doHandleMousewheel = value; - } - } - - public TextAreaControl(TextEditorControl motherTextEditorControl) - { - this.motherTextEditorControl = motherTextEditorControl; - - this.textArea = new TextArea(motherTextEditorControl, this); - Controls.Add(textArea); - - vScrollBar.ValueChanged += new EventHandler(VScrollBarValueChanged); - Controls.Add(this.vScrollBar); - - hScrollBar.ValueChanged += new EventHandler(HScrollBarValueChanged); - Controls.Add(this.hScrollBar); - ResizeRedraw = true; - - Document.TextContentChanged += DocumentTextContentChanged; - Document.DocumentChanged += AdjustScrollBarsOnDocumentChange; - Document.UpdateCommited += DocumentUpdateCommitted; - } - - protected override void Dispose(bool disposing) - { - if (disposing) { - if (!disposed) { - disposed = true; - Document.TextContentChanged -= DocumentTextContentChanged; - Document.DocumentChanged -= AdjustScrollBarsOnDocumentChange; - Document.UpdateCommited -= DocumentUpdateCommitted; - motherTextEditorControl = null; - if (vScrollBar != null) { - vScrollBar.Dispose(); - vScrollBar = null; - } - if (hScrollBar != null) { - hScrollBar.Dispose(); - hScrollBar = null; - } - if (hRuler != null) { - hRuler.Dispose(); - hRuler = null; - } - } - } - base.Dispose(disposing); - } - - void DocumentTextContentChanged(object sender, EventArgs e) - { - // after the text content is changed abruptly, we need to validate the - // caret position - otherwise the caret position is invalid for a short amount - // of time, which can break client code that expects that the caret position is always valid - Caret.ValidateCaretPos(); - } - - protected override void OnResize(System.EventArgs e) - { - base.OnResize(e); - ResizeTextArea(); - } - - public void ResizeTextArea() - { - int y = 0; - int h = 0; - if (hRuler != null) { - hRuler.Bounds = new Rectangle(0, - 0, - Width - SystemInformation.HorizontalScrollBarArrowWidth, - textArea.TextView.FontHeight); - - y = hRuler.Bounds.Bottom; - h = hRuler.Bounds.Height; - } - - textArea.Bounds = new Rectangle(0, y, - Width - SystemInformation.HorizontalScrollBarArrowWidth, - Height - SystemInformation.VerticalScrollBarArrowHeight - h); - SetScrollBarBounds(); - } - - public void SetScrollBarBounds() - { - vScrollBar.Bounds = new Rectangle(textArea.Bounds.Right, 0, SystemInformation.HorizontalScrollBarArrowWidth, Height - SystemInformation.VerticalScrollBarArrowHeight); - hScrollBar.Bounds = new Rectangle(0, - textArea.Bounds.Bottom, - Width - SystemInformation.HorizontalScrollBarArrowWidth, - SystemInformation.VerticalScrollBarArrowHeight); - } - - bool adjustScrollBarsOnNextUpdate; - Point scrollToPosOnNextUpdate; - - void AdjustScrollBarsOnDocumentChange(object sender, DocumentEventArgs e) - { - if (motherTextEditorControl.IsInUpdate == false) { - AdjustScrollBarsClearCache(); - AdjustScrollBars(); - } else { - adjustScrollBarsOnNextUpdate = true; - } - } - - void DocumentUpdateCommitted(object sender, EventArgs e) - { - if (motherTextEditorControl.IsInUpdate == false) { - Caret.ValidateCaretPos(); - - // AdjustScrollBarsOnCommittedUpdate - if (!scrollToPosOnNextUpdate.IsEmpty) { - ScrollTo(scrollToPosOnNextUpdate.Y, scrollToPosOnNextUpdate.X); - } - if (adjustScrollBarsOnNextUpdate) { - AdjustScrollBarsClearCache(); - AdjustScrollBars(); - } - } - } - - int[] lineLengthCache; - const int LineLengthCacheAdditionalSize = 100; - - void AdjustScrollBarsClearCache() - { - if (lineLengthCache != null) { - if (lineLengthCache.Length < this.Document.TotalNumberOfLines + 2 * LineLengthCacheAdditionalSize) { - lineLengthCache = null; - } else { - Array.Clear(lineLengthCache, 0, lineLengthCache.Length); - } - } - } - - public void AdjustScrollBars() - { - adjustScrollBarsOnNextUpdate = false; - vScrollBar.Minimum = 0; - // number of visible lines in document (folding!) - vScrollBar.Maximum = textArea.MaxVScrollValue; - int max = 0; - - int firstLine = textArea.TextView.FirstVisibleLine; - int lastLine = this.Document.GetFirstLogicalLine(textArea.TextView.FirstPhysicalLine + textArea.TextView.VisibleLineCount); - if (lastLine >= this.Document.TotalNumberOfLines) - lastLine = this.Document.TotalNumberOfLines - 1; - - if (lineLengthCache == null || lineLengthCache.Length <= lastLine) { - lineLengthCache = new int[lastLine + LineLengthCacheAdditionalSize]; - } - - for (int lineNumber = firstLine; lineNumber <= lastLine; lineNumber++) { - LineSegment lineSegment = this.Document.GetLineSegment(lineNumber); - if (Document.FoldingManager.IsLineVisible(lineNumber)) { - if (lineLengthCache[lineNumber] > 0) { - max = Math.Max(max, lineLengthCache[lineNumber]); - } else { - int visualLength = textArea.TextView.GetVisualColumnFast(lineSegment, lineSegment.Length); - lineLengthCache[lineNumber] = Math.Max(1, visualLength); - max = Math.Max(max, visualLength); - } - } - } - hScrollBar.Minimum = 0; - hScrollBar.Maximum = (Math.Max(max + 20, textArea.TextView.VisibleColumnCount - 1)); - - vScrollBar.LargeChange = Math.Max(0, textArea.TextView.DrawingPosition.Height); - vScrollBar.SmallChange = Math.Max(0, textArea.TextView.FontHeight); - - hScrollBar.LargeChange = Math.Max(0, textArea.TextView.VisibleColumnCount - 1); - hScrollBar.SmallChange = Math.Max(0, (int)textArea.TextView.SpaceWidth); - } - - public void OptionsChanged() - { - textArea.OptionsChanged(); - - if (textArea.TextEditorProperties.ShowHorizontalRuler) { - if (hRuler == null) { - hRuler = new HRuler(textArea); - Controls.Add(hRuler); - ResizeTextArea(); - } else { - hRuler.Invalidate(); - } - } else { - if (hRuler != null) { - Controls.Remove(hRuler); - hRuler.Dispose(); - hRuler = null; - ResizeTextArea(); - } - } - - AdjustScrollBars(); - } - - void VScrollBarValueChanged(object sender, EventArgs e) - { - textArea.VirtualTop = new Point(textArea.VirtualTop.X, vScrollBar.Value); - textArea.Invalidate(); - AdjustScrollBars(); - } - - void HScrollBarValueChanged(object sender, EventArgs e) - { - textArea.VirtualTop = new Point(hScrollBar.Value * textArea.TextView.WideSpaceWidth, textArea.VirtualTop.Y); - textArea.Invalidate(); - } - - Util.MouseWheelHandler mouseWheelHandler = new Util.MouseWheelHandler(); - - public void HandleMouseWheel(MouseEventArgs e) - { - int scrollDistance = mouseWheelHandler.GetScrollAmount(e); - if (scrollDistance == 0) - return; - if ((Control.ModifierKeys & Keys.Control) != 0 && TextEditorProperties.MouseWheelTextZoom) { - if (scrollDistance > 0) { - motherTextEditorControl.Font = new Font(motherTextEditorControl.Font.Name, - motherTextEditorControl.Font.Size + 1); - } else { - motherTextEditorControl.Font = new Font(motherTextEditorControl.Font.Name, - Math.Max(6, motherTextEditorControl.Font.Size - 1)); - } - } else { - if (TextEditorProperties.MouseWheelScrollDown) - scrollDistance = -scrollDistance; - int newValue = vScrollBar.Value + vScrollBar.SmallChange * scrollDistance; - vScrollBar.Value = Math.Max(vScrollBar.Minimum, Math.Min(vScrollBar.Maximum - vScrollBar.LargeChange + 1, newValue)); - } - } - - protected override void OnMouseWheel(MouseEventArgs e) - { - base.OnMouseWheel(e); - if (DoHandleMousewheel) { - HandleMouseWheel(e); - } - } - - public void ScrollToCaret() - { - ScrollTo(textArea.Caret.Line, textArea.Caret.Column); - } - - public void ScrollTo(int line, int column) - { - if (motherTextEditorControl.IsInUpdate) { - scrollToPosOnNextUpdate = new Point(column, line); - return; - } else { - scrollToPosOnNextUpdate = Point.Empty; - } - - ScrollTo(line); - - int curCharMin = (int)(this.hScrollBar.Value - this.hScrollBar.Minimum); - int curCharMax = curCharMin + textArea.TextView.VisibleColumnCount; - - int pos = textArea.TextView.GetVisualColumn(line, column); - - if (textArea.TextView.VisibleColumnCount < 0) { - hScrollBar.Value = 0; - } else { - if (pos < curCharMin) { - hScrollBar.Value = (int)(Math.Max(0, pos - scrollMarginHeight)); - } else { - if (pos > curCharMax) { - hScrollBar.Value = (int)Math.Max(0, Math.Min(hScrollBar.Maximum, (pos - textArea.TextView.VisibleColumnCount + scrollMarginHeight))); - } - } - } - } - - int scrollMarginHeight = 3; - - /// - /// Ensure that is visible. - /// - public void ScrollTo(int line) - { - line = Math.Max(0, Math.Min(Document.TotalNumberOfLines - 1, line)); - line = Document.GetVisibleLine(line); - int curLineMin = textArea.TextView.FirstPhysicalLine; - if (textArea.TextView.LineHeightRemainder > 0) { - curLineMin ++; - } - - if (line - scrollMarginHeight + 3 < curLineMin) { - this.vScrollBar.Value = Math.Max(0, Math.Min(this.vScrollBar.Maximum, (line - scrollMarginHeight + 3) * textArea.TextView.FontHeight)) ; - VScrollBarValueChanged(this, EventArgs.Empty); - } else { - int curLineMax = curLineMin + this.textArea.TextView.VisibleLineCount; - if (line + scrollMarginHeight - 1 > curLineMax) { - if (this.textArea.TextView.VisibleLineCount == 1) { - this.vScrollBar.Value = Math.Max(0, Math.Min(this.vScrollBar.Maximum, (line - scrollMarginHeight - 1) * textArea.TextView.FontHeight)) ; - } else { - this.vScrollBar.Value = Math.Min(this.vScrollBar.Maximum, - (line - this.textArea.TextView.VisibleLineCount + scrollMarginHeight - 1)* textArea.TextView.FontHeight) ; - } - VScrollBarValueChanged(this, EventArgs.Empty); - } - } - } - - /// - /// Scroll so that the specified line is centered. - /// - /// Line to center view on - /// If this action would cause scrolling by less than or equal to - /// lines in any direction, don't scroll. - /// Use -1 to always center the view. - public void CenterViewOn(int line, int treshold) - { - line = Math.Max(0, Math.Min(Document.TotalNumberOfLines - 1, line)); - // convert line to visible line: - line = Document.GetVisibleLine(line); - // subtract half the visible line count - line -= textArea.TextView.VisibleLineCount / 2; - - int curLineMin = textArea.TextView.FirstPhysicalLine; - if (textArea.TextView.LineHeightRemainder > 0) { - curLineMin ++; - } - if (Math.Abs(curLineMin - line) > treshold) { - // scroll: - this.vScrollBar.Value = Math.Max(0, Math.Min(this.vScrollBar.Maximum, (line - scrollMarginHeight + 3) * textArea.TextView.FontHeight)) ; - VScrollBarValueChanged(this, EventArgs.Empty); - } - } - - public void JumpTo(int line) - { - line = Math.Min(line, Document.TotalNumberOfLines - 1); - string text = Document.GetText(Document.GetLineSegment(line)); - JumpTo(line, text.Length - text.TrimStart().Length); - } - - public void JumpTo(int line, int column) - { - textArea.Focus(); - textArea.SelectionManager.ClearSelection(); - textArea.Caret.Position = new TextLocation(column, line); - textArea.SetDesiredColumn(); - ScrollToCaret(); - } - - public event MouseEventHandler ShowContextMenu; - - protected override void WndProc(ref Message m) - { - if (m.Msg == 0x007B) { // handle WM_CONTEXTMENU - if (ShowContextMenu != null) { - long lParam = m.LParam.ToInt64(); - int x = unchecked((short)(lParam & 0xffff)); - int y = unchecked((short)((lParam & 0xffff0000) >> 16)); - if (x == -1 && y == -1) { - Point pos = Caret.ScreenPosition; - ShowContextMenu(this, new MouseEventArgs(MouseButtons.None, 0, pos.X, pos.Y + textArea.TextView.FontHeight, 0)); - } else { - Point pos = PointToClient(new Point(x, y)); - ShowContextMenu(this, new MouseEventArgs(MouseButtons.Right, 1, pos.X, pos.Y, 0)); - } - } - } - base.WndProc(ref m); - } - - protected override void OnEnter(EventArgs e) - { - // SD2-1072 - Make sure the caret line is valid if anyone - // has handlers for the Enter event. - Caret.ValidateCaretPos(); - base.OnEnter(e); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaDragDropHandler.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextAreaDragDropHandler.cs deleted file mode 100644 index 8d0612b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaDragDropHandler.cs +++ /dev/null @@ -1,144 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Drawing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - public class TextAreaDragDropHandler - { - public static Action OnDragDropException = ex => MessageBox.Show(ex.ToString()); - - TextArea textArea; - - public void Attach(TextArea textArea) - { - this.textArea = textArea; - textArea.AllowDrop = true; - - textArea.DragEnter += MakeDragEventHandler(OnDragEnter); - textArea.DragDrop += MakeDragEventHandler(OnDragDrop); - textArea.DragOver += MakeDragEventHandler(OnDragOver); - } - - /// - /// Create a drag'n'drop event handler. - /// Windows Forms swallows unhandled exceptions during drag'n'drop, so we report them here. - /// - static DragEventHandler MakeDragEventHandler(DragEventHandler h) - { - return (sender, e) => { - try { - h(sender, e); - } catch (Exception ex) { - OnDragDropException(ex); - } - }; - } - - static DragDropEffects GetDragDropEffect(DragEventArgs e) - { - if ((e.AllowedEffect & DragDropEffects.Move) > 0 && - (e.AllowedEffect & DragDropEffects.Copy) > 0) { - return (e.KeyState & 8) > 0 ? DragDropEffects.Copy : DragDropEffects.Move; - } else if ((e.AllowedEffect & DragDropEffects.Move) > 0) { - return DragDropEffects.Move; - } else if ((e.AllowedEffect & DragDropEffects.Copy) > 0) { - return DragDropEffects.Copy; - } - return DragDropEffects.None; - } - - protected void OnDragEnter(object sender, DragEventArgs e) - { - if (e.Data.GetDataPresent(typeof(string))) { - e.Effect = GetDragDropEffect(e); - } - } - - - void InsertString(int offset, string str) - { - textArea.Document.Insert(offset, str); - - textArea.SelectionManager.SetSelection(new DefaultSelection(textArea.Document, - textArea.Document.OffsetToPosition(offset), - textArea.Document.OffsetToPosition(offset + str.Length))); - textArea.Caret.Position = textArea.Document.OffsetToPosition(offset + str.Length); - textArea.Refresh(); - } - - protected void OnDragDrop(object sender, DragEventArgs e) - { - Point p = textArea.PointToClient(new Point(e.X, e.Y)); - - if (e.Data.GetDataPresent(typeof(string))) { - textArea.BeginUpdate(); - textArea.Document.UndoStack.StartUndoGroup(); - try { - int offset = textArea.Caret.Offset; - if (textArea.IsReadOnly(offset)) { - // prevent dragging text into readonly section - return; - } - if (e.Data.GetDataPresent(typeof(DefaultSelection))) { - ISelection sel = (ISelection)e.Data.GetData(typeof(DefaultSelection)); - if (sel.ContainsPosition(textArea.Caret.Position)) { - return; - } - if (GetDragDropEffect(e) == DragDropEffects.Move) { - if (SelectionManager.SelectionIsReadOnly(textArea.Document, sel)) { - // prevent dragging text out of readonly section - return; - } - int len = sel.Length; - textArea.Document.Remove(sel.Offset, len); - if (sel.Offset < offset) { - offset -= len; - } - } - } - textArea.SelectionManager.ClearSelection(); - InsertString(offset, (string)e.Data.GetData(typeof(string))); - textArea.Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - } finally { - textArea.Document.UndoStack.EndUndoGroup(); - textArea.EndUpdate(); - } - } - } - - protected void OnDragOver(object sender, DragEventArgs e) - { - if (!textArea.Focused) { - textArea.Focus(); - } - - Point p = textArea.PointToClient(new Point(e.X, e.Y)); - - if (textArea.TextView.DrawingPosition.Contains(p.X, p.Y)) { - TextLocation realmousepos= textArea.TextView.GetLogicalPosition(p.X - textArea.TextView.DrawingPosition.X, - p.Y - textArea.TextView.DrawingPosition.Y); - int lineNr = Math.Min(textArea.Document.TotalNumberOfLines - 1, Math.Max(0, realmousepos.Y)); - - textArea.Caret.Position = new TextLocation(realmousepos.X, lineNr); - textArea.SetDesiredColumn(); - if (e.Data.GetDataPresent(typeof(string)) && !textArea.IsReadOnly(textArea.Caret.Offset)) { - e.Effect = GetDragDropEffect(e); - } else { - e.Effect = DragDropEffects.None; - } - } else { - e.Effect = DragDropEffects.None; - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaMouseHandler.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextAreaMouseHandler.cs deleted file mode 100644 index 7e80009..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaMouseHandler.cs +++ /dev/null @@ -1,486 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Text; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class handles all mouse stuff for a textArea. - /// - public class TextAreaMouseHandler - { - TextArea textArea; - bool doubleclick = false; - bool clickedOnSelectedText = false; - - MouseButtons button; - - static readonly Point nilPoint = new Point(-1, -1); - Point mousedownpos = nilPoint; - Point lastmousedownpos = nilPoint; - - bool gotmousedown = false; - bool dodragdrop = false; - - public TextAreaMouseHandler(TextArea ttextArea) - { - textArea = ttextArea; - } - - public void Attach() - { - textArea.Click += new EventHandler(TextAreaClick); - textArea.MouseMove += new MouseEventHandler(TextAreaMouseMove); - - textArea.MouseDown += new MouseEventHandler(OnMouseDown); - textArea.DoubleClick += new EventHandler(OnDoubleClick); - textArea.MouseLeave += new EventHandler(OnMouseLeave); - textArea.MouseUp += new MouseEventHandler(OnMouseUp); - textArea.LostFocus += new EventHandler(TextAreaLostFocus); - textArea.ToolTipRequest += new ToolTipRequestEventHandler(OnToolTipRequest); - } - - void OnToolTipRequest(object sender, ToolTipRequestEventArgs e) - { - if (e.ToolTipShown) - return; - Point mousepos = e.MousePosition; - FoldMarker marker = textArea.TextView.GetFoldMarkerFromPosition(mousepos.X - textArea.TextView.DrawingPosition.X, - mousepos.Y - textArea.TextView.DrawingPosition.Y); - if (marker != null && marker.IsFolded) { - StringBuilder sb = new StringBuilder(marker.InnerText); - - // max 10 lines - int endLines = 0; - for (int i = 0; i < sb.Length; ++i) { - if (sb[i] == '\n') { - ++endLines; - if (endLines >= 10) { - sb.Remove(i + 1, sb.Length - i - 1); - sb.Append(Environment.NewLine); - sb.Append("..."); - break; - - } - } - } - sb.Replace("\t", " "); - e.ShowToolTip(sb.ToString()); - return; - } - - List markers = textArea.Document.MarkerStrategy.GetMarkers(e.LogicalPosition); - foreach (TextMarker tm in markers) { - if (tm.ToolTip != null) { - e.ShowToolTip(tm.ToolTip.Replace("\t", " ")); - return; - } - } - } - - void ShowHiddenCursorIfMovedOrLeft() - { - textArea.ShowHiddenCursor(!textArea.Focused || - !textArea.ClientRectangle.Contains(textArea.PointToClient(Cursor.Position))); - } - - void TextAreaLostFocus(object sender, EventArgs e) - { - // The call to ShowHiddenCursorIfMovedOrLeft is delayed - // until pending messages have been processed - // so that it can properly detect whether the TextArea - // has really lost focus. - // For example, the CodeCompletionWindow gets focus when it is shown, - // but immediately gives back focus to the TextArea. - textArea.BeginInvoke(new MethodInvoker(ShowHiddenCursorIfMovedOrLeft)); - } - - void OnMouseLeave(object sender, EventArgs e) - { - ShowHiddenCursorIfMovedOrLeft(); - gotmousedown = false; - mousedownpos = nilPoint; - } - - void OnMouseUp(object sender, MouseEventArgs e) - { - textArea.SelectionManager.selectFrom.where = WhereFrom.None; - gotmousedown = false; - mousedownpos = nilPoint; - } - - void TextAreaClick(object sender, EventArgs e) - { - Point mousepos; - mousepos = textArea.mousepos; - - if (dodragdrop) - { - return; - } - - if (clickedOnSelectedText && textArea.TextView.DrawingPosition.Contains(mousepos.X, mousepos.Y)) - { - textArea.SelectionManager.ClearSelection(); - - TextLocation clickPosition = textArea.TextView.GetLogicalPosition( - mousepos.X - textArea.TextView.DrawingPosition.X, - mousepos.Y - textArea.TextView.DrawingPosition.Y); - textArea.Caret.Position = clickPosition; - textArea.SetDesiredColumn(); - } - } - - - void TextAreaMouseMove(object sender, MouseEventArgs e) - { - textArea.mousepos = e.Location; - - // honour the starting selection strategy - switch (textArea.SelectionManager.selectFrom.where) - { - case WhereFrom.Gutter: - ExtendSelectionToMouse(); - return; - - case WhereFrom.TArea: - break; - - } - textArea.ShowHiddenCursor(false); - if (dodragdrop) { - dodragdrop = false; - return; - } - - doubleclick = false; - textArea.mousepos = new Point(e.X, e.Y); - - if (clickedOnSelectedText) { - if (Math.Abs(mousedownpos.X - e.X) >= SystemInformation.DragSize.Width / 2 || - Math.Abs(mousedownpos.Y - e.Y) >= SystemInformation.DragSize.Height / 2) - { - clickedOnSelectedText = false; - ISelection selection = textArea.SelectionManager.GetSelectionAt(textArea.Caret.Offset); - if (selection != null) { - string text = selection.SelectedText; - bool isReadOnly = SelectionManager.SelectionIsReadOnly(textArea.Document, selection); - if (text != null && text.Length > 0) { - DataObject dataObject = new DataObject (); - dataObject.SetData(DataFormats.UnicodeText, true, text); - dataObject.SetData(selection); - dodragdrop = true; - textArea.DoDragDrop(dataObject, isReadOnly ? DragDropEffects.All & ~DragDropEffects.Move : DragDropEffects.All); - } - } - } - - return; - } - - if (e.Button == MouseButtons.Left) { - if (gotmousedown && textArea.SelectionManager.selectFrom.where == WhereFrom.TArea) - { - ExtendSelectionToMouse(); - } - } - } - - void ExtendSelectionToMouse() - { - Point mousepos; - mousepos = textArea.mousepos; - TextLocation realmousepos = textArea.TextView.GetLogicalPosition( - Math.Max(0, mousepos.X - textArea.TextView.DrawingPosition.X), - mousepos.Y - textArea.TextView.DrawingPosition.Y); - int y = realmousepos.Y; - realmousepos = textArea.Caret.ValidatePosition(realmousepos); - TextLocation oldPos = textArea.Caret.Position; - if (oldPos == realmousepos && textArea.SelectionManager.selectFrom.where != WhereFrom.Gutter) - { - return; - } - - // the selection is from the gutter - if (textArea.SelectionManager.selectFrom.where == WhereFrom.Gutter) { - if(realmousepos.Y < textArea.SelectionManager.SelectionStart.Y) { - // the selection has moved above the startpoint - textArea.Caret.Position = new TextLocation(0, realmousepos.Y); - } else { - // the selection has moved below the startpoint - textArea.Caret.Position = textArea.SelectionManager.NextValidPosition(realmousepos.Y); - } - } else { - textArea.Caret.Position = realmousepos; - } - - // moves selection across whole words for double-click initiated selection - if (!minSelection.IsEmpty && textArea.SelectionManager.SelectionCollection.Count > 0 && textArea.SelectionManager.selectFrom.where == WhereFrom.TArea) { - // Extend selection when selection was started with double-click - ISelection selection = textArea.SelectionManager.SelectionCollection[0]; - TextLocation min = textArea.SelectionManager.GreaterEqPos(minSelection, maxSelection) ? maxSelection : minSelection; - TextLocation max = textArea.SelectionManager.GreaterEqPos(minSelection, maxSelection) ? minSelection : maxSelection; - if (textArea.SelectionManager.GreaterEqPos(max, realmousepos) && textArea.SelectionManager.GreaterEqPos(realmousepos, min)) { - textArea.SelectionManager.SetSelection(min, max); - } else if (textArea.SelectionManager.GreaterEqPos(max, realmousepos)) { - int moff = textArea.Document.PositionToOffset(realmousepos); - min = textArea.Document.OffsetToPosition(FindWordStart(textArea.Document, moff)); - textArea.SelectionManager.SetSelection(min, max); - } else { - int moff = textArea.Document.PositionToOffset(realmousepos); - max = textArea.Document.OffsetToPosition(FindWordEnd(textArea.Document, moff)); - textArea.SelectionManager.SetSelection(min, max); - } - } else { - textArea.SelectionManager.ExtendSelection(oldPos, textArea.Caret.Position); - } - textArea.SetDesiredColumn(); - } - - void DoubleClickSelectionExtend() - { - Point mousepos; - mousepos = textArea.mousepos; - - textArea.SelectionManager.ClearSelection(); - if (textArea.TextView.DrawingPosition.Contains(mousepos.X, mousepos.Y)) - { - FoldMarker marker = textArea.TextView.GetFoldMarkerFromPosition(mousepos.X - textArea.TextView.DrawingPosition.X, - mousepos.Y - textArea.TextView.DrawingPosition.Y); - if (marker != null && marker.IsFolded) { - marker.IsFolded = false; - textArea.MotherTextAreaControl.AdjustScrollBars(); - } - if (textArea.Caret.Offset < textArea.Document.TextLength) { - switch (textArea.Document.GetCharAt(textArea.Caret.Offset)) { - case '"': - if (textArea.Caret.Offset < textArea.Document.TextLength) { - int next = FindNext(textArea.Document, textArea.Caret.Offset + 1, '"'); - minSelection = textArea.Caret.Position; - if (next > textArea.Caret.Offset && next < textArea.Document.TextLength) - next += 1; - maxSelection = textArea.Document.OffsetToPosition(next); - } - break; - default: - minSelection = textArea.Document.OffsetToPosition(FindWordStart(textArea.Document, textArea.Caret.Offset)); - maxSelection = textArea.Document.OffsetToPosition(FindWordEnd(textArea.Document, textArea.Caret.Offset)); - break; - - } - textArea.Caret.Position = maxSelection; - textArea.SelectionManager.ExtendSelection(minSelection, maxSelection); - } - - if (textArea.SelectionManager.selectionCollection.Count > 0) { - ISelection selection = textArea.SelectionManager.selectionCollection[0]; - - selection.StartPosition = minSelection; - selection.EndPosition = maxSelection; - textArea.SelectionManager.SelectionStart = minSelection; - } - - // after a double-click selection, the caret is placed correctly, - // but it is not positioned internally. The effect is when the cursor - // is moved up or down a line, the caret will take on the column first - // clicked on for the double-click - textArea.SetDesiredColumn(); - - // HACK WARNING !!! - // must refresh here, because when a error tooltip is showed and the underlined - // code is double clicked the textArea don't update corrctly, updateline doesn't - // work ... but the refresh does. - // Mike - textArea.Refresh(); - } - } - - void OnMouseDown(object sender, MouseEventArgs e) - { - Point mousepos; - textArea.mousepos = e.Location; - mousepos = e.Location; - - if (dodragdrop) - { - return; - } - - if (doubleclick) { - doubleclick = false; - return; - } - - if (textArea.TextView.DrawingPosition.Contains(mousepos.X, mousepos.Y)) { - gotmousedown = true; - textArea.SelectionManager.selectFrom.where = WhereFrom.TArea; - button = e.Button; - - // double-click - if (button == MouseButtons.Left && e.Clicks == 2) { - int deltaX = Math.Abs(lastmousedownpos.X - e.X); - int deltaY = Math.Abs(lastmousedownpos.Y - e.Y); - if (deltaX <= SystemInformation.DoubleClickSize.Width && - deltaY <= SystemInformation.DoubleClickSize.Height) { - DoubleClickSelectionExtend(); - lastmousedownpos = new Point(e.X, e.Y); - - if (textArea.SelectionManager.selectFrom.where == WhereFrom.Gutter) { - if (!minSelection.IsEmpty && !maxSelection.IsEmpty && textArea.SelectionManager.SelectionCollection.Count > 0) { - textArea.SelectionManager.SelectionCollection[0].StartPosition = minSelection; - textArea.SelectionManager.SelectionCollection[0].EndPosition = maxSelection; - textArea.SelectionManager.SelectionStart = minSelection; - - minSelection = TextLocation.Empty; - maxSelection = TextLocation.Empty; - } - } - return; - } - } - minSelection = TextLocation.Empty; - maxSelection = TextLocation.Empty; - - lastmousedownpos = mousedownpos = new Point(e.X, e.Y); - - if (button == MouseButtons.Left) { - FoldMarker marker = textArea.TextView.GetFoldMarkerFromPosition(mousepos.X - textArea.TextView.DrawingPosition.X, - mousepos.Y - textArea.TextView.DrawingPosition.Y); - if (marker != null && marker.IsFolded) { - if (textArea.SelectionManager.HasSomethingSelected) { - clickedOnSelectedText = true; - } - - textArea.SelectionManager.SetSelection(new DefaultSelection(textArea.TextView.Document, new TextLocation(marker.StartColumn, marker.StartLine), new TextLocation(marker.EndColumn, marker.EndLine))); - textArea.Focus(); - return; - } - - if ((Control.ModifierKeys & Keys.Shift) == Keys.Shift) { - ExtendSelectionToMouse(); - } else { - TextLocation realmousepos = textArea.TextView.GetLogicalPosition(mousepos.X - textArea.TextView.DrawingPosition.X, mousepos.Y - textArea.TextView.DrawingPosition.Y); - clickedOnSelectedText = false; - - int offset = textArea.Document.PositionToOffset(realmousepos); - - if (textArea.SelectionManager.HasSomethingSelected && - textArea.SelectionManager.IsSelected(offset)) { - clickedOnSelectedText = true; - } else { - textArea.SelectionManager.ClearSelection(); - if (mousepos.Y > 0 && mousepos.Y < textArea.TextView.DrawingPosition.Height) { - TextLocation pos = new TextLocation(); - pos.Y = Math.Min(textArea.Document.TotalNumberOfLines - 1, realmousepos.Y); - pos.X = realmousepos.X; - textArea.Caret.Position = pos; - textArea.SetDesiredColumn(); - } - } - } - } else if (button == MouseButtons.Right) { - // Rightclick sets the cursor to the click position unless - // the previous selection was clicked - TextLocation realmousepos = textArea.TextView.GetLogicalPosition(mousepos.X - textArea.TextView.DrawingPosition.X, mousepos.Y - textArea.TextView.DrawingPosition.Y); - int offset = textArea.Document.PositionToOffset(realmousepos); - if (!textArea.SelectionManager.HasSomethingSelected || - !textArea.SelectionManager.IsSelected(offset)) - { - textArea.SelectionManager.ClearSelection(); - if (mousepos.Y > 0 && mousepos.Y < textArea.TextView.DrawingPosition.Height) { - TextLocation pos = new TextLocation(); - pos.Y = Math.Min(textArea.Document.TotalNumberOfLines - 1, realmousepos.Y); - pos.X = realmousepos.X; - textArea.Caret.Position = pos; - textArea.SetDesiredColumn(); - } - } - } - } - textArea.Focus(); - } - - int FindNext(IDocument document, int offset, char ch) - { - LineSegment line = document.GetLineSegmentForOffset(offset); - int endPos = line.Offset + line.Length; - - while (offset < endPos && document.GetCharAt(offset) != ch) { - ++offset; - } - return offset; - } - - bool IsSelectableChar(char ch) - { - return Char.IsLetterOrDigit(ch) || ch=='_'; - } - - int FindWordStart(IDocument document, int offset) - { - LineSegment line = document.GetLineSegmentForOffset(offset); - - if (offset > 0 && Char.IsWhiteSpace(document.GetCharAt(offset - 1)) && Char.IsWhiteSpace(document.GetCharAt(offset))) { - while (offset > line.Offset && Char.IsWhiteSpace(document.GetCharAt(offset - 1))) { - --offset; - } - } else if (IsSelectableChar(document.GetCharAt(offset)) || (offset > 0 && Char.IsWhiteSpace(document.GetCharAt(offset)) && IsSelectableChar(document.GetCharAt(offset - 1)))) { - while (offset > line.Offset && IsSelectableChar(document.GetCharAt(offset - 1))) { - --offset; - } - } else { - if (offset > 0 && !Char.IsWhiteSpace(document.GetCharAt(offset - 1)) && !IsSelectableChar(document.GetCharAt(offset - 1)) ) { - return Math.Max(0, offset - 1); - } - } - return offset; - } - - int FindWordEnd(IDocument document, int offset) - { - LineSegment line = document.GetLineSegmentForOffset(offset); - int endPos = line.Offset + line.Length; - offset = Math.Min(offset, endPos - 1); - - if (IsSelectableChar(document.GetCharAt(offset))) { - while (offset < endPos && IsSelectableChar(document.GetCharAt(offset))) { - ++offset; - } - } else if (Char.IsWhiteSpace(document.GetCharAt(offset))) { - if (offset > 0 && Char.IsWhiteSpace(document.GetCharAt(offset - 1))) { - while (offset < endPos && Char.IsWhiteSpace(document.GetCharAt(offset))) { - ++offset; - } - } - } else { - return Math.Max(0, offset + 1); - } - - return offset; - } - TextLocation minSelection = TextLocation.Empty; - TextLocation maxSelection = TextLocation.Empty; - - void OnDoubleClick(object sender, System.EventArgs e) - { - if (dodragdrop) { - return; - } - - textArea.SelectionManager.selectFrom.where = WhereFrom.TArea; - doubleclick = true; - - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaUpdate.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextAreaUpdate.cs deleted file mode 100644 index f30c6e5..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextAreaUpdate.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// -// -// -// $Revision: 2659 $ -// - -using System; -using System.Drawing; - -namespace ICSharpCode.TextEditor -{ - /// - /// This enum describes all implemented request types - /// - public enum TextAreaUpdateType { - WholeTextArea, - SingleLine, - SinglePosition, - PositionToLineEnd, - PositionToEnd, - LinesBetween - } - - /// - /// This class is used to request an update of the textarea - /// - public class TextAreaUpdate - { - TextLocation position; - TextAreaUpdateType type; - - public TextAreaUpdateType TextAreaUpdateType { - get { - return type; - } - } - - public TextLocation Position { - get { - return position; - } - } - - /// - /// Creates a new instance of - /// - public TextAreaUpdate(TextAreaUpdateType type) - { - this.type = type; - } - - /// - /// Creates a new instance of - /// - public TextAreaUpdate(TextAreaUpdateType type, TextLocation position) - { - this.type = type; - this.position = position; - } - - /// - /// Creates a new instance of - /// - public TextAreaUpdate(TextAreaUpdateType type, int startLine, int endLine) - { - this.type = type; - this.position = new TextLocation(startLine, endLine); - } - - /// - /// Creates a new instance of - /// - public TextAreaUpdate(TextAreaUpdateType type, int singleLine) - { - this.type = type; - this.position = new TextLocation(0, singleLine); - } - - public override string ToString() - { - return String.Format("[TextAreaUpdate: Type={0}, Position={1}]", type, position); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextEditorControl.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextEditorControl.cs deleted file mode 100644 index b2d9548..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextEditorControl.cs +++ /dev/null @@ -1,396 +0,0 @@ -// -// -// -// -// $Revision: 3078 $ -// - -using System; -using System.ComponentModel; -using System.Drawing; -using System.Drawing.Printing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class is used for a basic text area control - /// - [ToolboxBitmap("ICSharpCode.TextEditor.Resources.TextEditorControl.bmp")] - [ToolboxItem(true)] - public class TextEditorControl : TextEditorControlBase - { - protected Panel textAreaPanel = new Panel(); - TextAreaControl primaryTextArea; - Splitter textAreaSplitter = null; - TextAreaControl secondaryTextArea = null; - - PrintDocument printDocument = null; - - [Browsable(false)] - public PrintDocument PrintDocument { - get { - if (printDocument == null) { - printDocument = new PrintDocument(); - printDocument.BeginPrint += new PrintEventHandler(this.BeginPrint); - printDocument.PrintPage += new PrintPageEventHandler(this.PrintPage); - } - return printDocument; - } - } - - TextAreaControl activeTextAreaControl; - - public override TextAreaControl ActiveTextAreaControl { - get { - return activeTextAreaControl; - } - } - - protected void SetActiveTextAreaControl(TextAreaControl value) - { - if (activeTextAreaControl != value) { - activeTextAreaControl = value; - - if (ActiveTextAreaControlChanged != null) { - ActiveTextAreaControlChanged(this, EventArgs.Empty); - } - } - } - - public event EventHandler ActiveTextAreaControlChanged; - - public TextEditorControl() - { - SetStyle(ControlStyles.ContainerControl, true); - - textAreaPanel.Dock = DockStyle.Fill; - - Document = (new DocumentFactory()).CreateDocument(); - Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy(); - - primaryTextArea = new TextAreaControl(this); - activeTextAreaControl = primaryTextArea; - primaryTextArea.TextArea.GotFocus += delegate { - SetActiveTextAreaControl(primaryTextArea); - }; - primaryTextArea.Dock = DockStyle.Fill; - textAreaPanel.Controls.Add(primaryTextArea); - InitializeTextAreaControl(primaryTextArea); - Controls.Add(textAreaPanel); - ResizeRedraw = true; - Document.UpdateCommited += new EventHandler(CommitUpdateRequested); - OptionsChanged(); - } - - protected virtual void InitializeTextAreaControl(TextAreaControl newControl) - { - } - - public override void OptionsChanged() - { - primaryTextArea.OptionsChanged(); - if (secondaryTextArea != null) { - secondaryTextArea.OptionsChanged(); - } - } - - public void Split() - { - if (secondaryTextArea == null) { - secondaryTextArea = new TextAreaControl(this); - secondaryTextArea.Dock = DockStyle.Bottom; - secondaryTextArea.Height = Height / 2; - - secondaryTextArea.TextArea.GotFocus += delegate { - SetActiveTextAreaControl(secondaryTextArea); - }; - - textAreaSplitter = new Splitter(); - textAreaSplitter.BorderStyle = BorderStyle.FixedSingle ; - textAreaSplitter.Height = 8; - textAreaSplitter.Dock = DockStyle.Bottom; - textAreaPanel.Controls.Add(textAreaSplitter); - textAreaPanel.Controls.Add(secondaryTextArea); - InitializeTextAreaControl(secondaryTextArea); - secondaryTextArea.OptionsChanged(); - } else { - SetActiveTextAreaControl(primaryTextArea); - - textAreaPanel.Controls.Remove(secondaryTextArea); - textAreaPanel.Controls.Remove(textAreaSplitter); - - secondaryTextArea.Dispose(); - textAreaSplitter.Dispose(); - secondaryTextArea = null; - textAreaSplitter = null; - } - } - - [Browsable(false)] - public bool EnableUndo { - get { - return Document.UndoStack.CanUndo; - } - } - - [Browsable(false)] - public bool EnableRedo { - get { - return Document.UndoStack.CanRedo; - } - } - - public void Undo() - { - if (Document.ReadOnly) { - return; - } - if (Document.UndoStack.CanUndo) { - BeginUpdate(); - Document.UndoStack.Undo(); - - Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - this.primaryTextArea.TextArea.UpdateMatchingBracket(); - if (secondaryTextArea != null) { - this.secondaryTextArea.TextArea.UpdateMatchingBracket(); - } - EndUpdate(); - } - } - - public void Redo() - { - if (Document.ReadOnly) { - return; - } - if (Document.UndoStack.CanRedo) { - BeginUpdate(); - Document.UndoStack.Redo(); - - Document.RequestUpdate(new TextAreaUpdate(TextAreaUpdateType.WholeTextArea)); - this.primaryTextArea.TextArea.UpdateMatchingBracket(); - if (secondaryTextArea != null) { - this.secondaryTextArea.TextArea.UpdateMatchingBracket(); - } - EndUpdate(); - } - } - - public void SetHighlighting(string name) - { - Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy(name); - } - - protected override void Dispose(bool disposing) - { - if (disposing) { - if (printDocument != null) { - printDocument.BeginPrint -= new PrintEventHandler(this.BeginPrint); - printDocument.PrintPage -= new PrintPageEventHandler(this.PrintPage); - printDocument = null; - } - Document.UndoStack.ClearAll(); - Document.UpdateCommited -= new EventHandler(CommitUpdateRequested); - if (textAreaPanel != null) { - if (secondaryTextArea != null) { - secondaryTextArea.Dispose(); - textAreaSplitter.Dispose(); - secondaryTextArea = null; - textAreaSplitter = null; - } - if (primaryTextArea != null) { - primaryTextArea.Dispose(); - } - textAreaPanel.Dispose(); - textAreaPanel = null; - } - } - base.Dispose(disposing); - } - - #region Update Methods - public override void EndUpdate() - { - base.EndUpdate(); - Document.CommitUpdate(); - if (!IsInUpdate) { - ActiveTextAreaControl.Caret.OnEndUpdate(); - } - } - - void CommitUpdateRequested(object sender, EventArgs e) - { - if (IsInUpdate) { - return; - } - foreach (TextAreaUpdate update in Document.UpdateQueue) { - switch (update.TextAreaUpdateType) { - case TextAreaUpdateType.PositionToEnd: - this.primaryTextArea.TextArea.UpdateToEnd(update.Position.Y); - if (this.secondaryTextArea != null) { - this.secondaryTextArea.TextArea.UpdateToEnd(update.Position.Y); - } - break; - case TextAreaUpdateType.PositionToLineEnd: - case TextAreaUpdateType.SingleLine: - this.primaryTextArea.TextArea.UpdateLine(update.Position.Y); - if (this.secondaryTextArea != null) { - this.secondaryTextArea.TextArea.UpdateLine(update.Position.Y); - } - break; - case TextAreaUpdateType.SinglePosition: - this.primaryTextArea.TextArea.UpdateLine(update.Position.Y, update.Position.X, update.Position.X); - if (this.secondaryTextArea != null) { - this.secondaryTextArea.TextArea.UpdateLine(update.Position.Y, update.Position.X, update.Position.X); - } - break; - case TextAreaUpdateType.LinesBetween: - this.primaryTextArea.TextArea.UpdateLines(update.Position.X, update.Position.Y); - if (this.secondaryTextArea != null) { - this.secondaryTextArea.TextArea.UpdateLines(update.Position.X, update.Position.Y); - } - break; - case TextAreaUpdateType.WholeTextArea: - this.primaryTextArea.TextArea.Invalidate(); - if (this.secondaryTextArea != null) { - this.secondaryTextArea.TextArea.Invalidate(); - } - break; - } - } - Document.UpdateQueue.Clear(); -// this.primaryTextArea.TextArea.Update(); -// if (this.secondaryTextArea != null) { -// this.secondaryTextArea.TextArea.Update(); -// } - } - #endregion - - #region Printing routines - int curLineNr = 0; - float curTabIndent = 0; - StringFormat printingStringFormat; - - void BeginPrint(object sender, PrintEventArgs ev) - { - curLineNr = 0; - printingStringFormat = (StringFormat)System.Drawing.StringFormat.GenericTypographic.Clone(); - - // 100 should be enough for everyone ...err ? - float[] tabStops = new float[100]; - for (int i = 0; i < tabStops.Length; ++i) { - tabStops[i] = TabIndent * primaryTextArea.TextArea.TextView.WideSpaceWidth; - } - - printingStringFormat.SetTabStops(0, tabStops); - } - - void Advance(ref float x, ref float y, float maxWidth, float size, float fontHeight) - { - if (x + size < maxWidth) { - x += size; - } else { - x = curTabIndent; - y += fontHeight; - } - } - - // btw. I hate source code duplication ... but this time I don't care !!!! - float MeasurePrintingHeight(Graphics g, LineSegment line, float maxWidth) - { - float xPos = 0; - float yPos = 0; - float fontHeight = Font.GetHeight(g); -// bool gotNonWhitespace = false; - curTabIndent = 0; - FontContainer fontContainer = TextEditorProperties.FontContainer; - foreach (TextWord word in line.Words) { - switch (word.Type) { - case TextWordType.Space: - Advance(ref xPos, ref yPos, maxWidth, primaryTextArea.TextArea.TextView.SpaceWidth, fontHeight); -// if (!gotNonWhitespace) { -// curTabIndent = xPos; -// } - break; - case TextWordType.Tab: - Advance(ref xPos, ref yPos, maxWidth, TabIndent * primaryTextArea.TextArea.TextView.WideSpaceWidth, fontHeight); -// if (!gotNonWhitespace) { -// curTabIndent = xPos; -// } - break; - case TextWordType.Word: -// if (!gotNonWhitespace) { -// gotNonWhitespace = true; -// curTabIndent += TabIndent * primaryTextArea.TextArea.TextView.GetWidth(' '); -// } - SizeF drawingSize = g.MeasureString(word.Word, word.GetFont(fontContainer), new SizeF(maxWidth, fontHeight * 100), printingStringFormat); - Advance(ref xPos, ref yPos, maxWidth, drawingSize.Width, fontHeight); - break; - } - } - return yPos + fontHeight; - } - - void DrawLine(Graphics g, LineSegment line, float yPos, RectangleF margin) - { - float xPos = 0; - float fontHeight = Font.GetHeight(g); -// bool gotNonWhitespace = false; - curTabIndent = 0 ; - - FontContainer fontContainer = TextEditorProperties.FontContainer; - foreach (TextWord word in line.Words) { - switch (word.Type) { - case TextWordType.Space: - Advance(ref xPos, ref yPos, margin.Width, primaryTextArea.TextArea.TextView.SpaceWidth, fontHeight); -// if (!gotNonWhitespace) { -// curTabIndent = xPos; -// } - break; - case TextWordType.Tab: - Advance(ref xPos, ref yPos, margin.Width, TabIndent * primaryTextArea.TextArea.TextView.WideSpaceWidth, fontHeight); -// if (!gotNonWhitespace) { -// curTabIndent = xPos; -// } - break; - case TextWordType.Word: -// if (!gotNonWhitespace) { -// gotNonWhitespace = true; -// curTabIndent += TabIndent * primaryTextArea.TextArea.TextView.GetWidth(' '); -// } - g.DrawString(word.Word, word.GetFont(fontContainer), BrushRegistry.GetBrush(word.Color), xPos + margin.X, yPos); - SizeF drawingSize = g.MeasureString(word.Word, word.GetFont(fontContainer), new SizeF(margin.Width, fontHeight * 100), printingStringFormat); - Advance(ref xPos, ref yPos, margin.Width, drawingSize.Width, fontHeight); - break; - } - } - } - - void PrintPage(object sender, PrintPageEventArgs ev) - { - Graphics g = ev.Graphics; - float yPos = ev.MarginBounds.Top; - - while (curLineNr < Document.TotalNumberOfLines) { - LineSegment curLine = Document.GetLineSegment(curLineNr); - if (curLine.Words != null) { - float drawingHeight = MeasurePrintingHeight(g, curLine, ev.MarginBounds.Width); - if (drawingHeight + yPos > ev.MarginBounds.Bottom) { - break; - } - - DrawLine(g, curLine, yPos, ev.MarginBounds); - yPos += drawingHeight; - } - ++curLineNr; - } - - // If more lines exist, print another page. - ev.HasMorePages = curLineNr < Document.TotalNumberOfLines; - } - #endregion - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextEditorControlBase.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextEditorControlBase.cs deleted file mode 100644 index ee318e6..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextEditorControlBase.cs +++ /dev/null @@ -1,758 +0,0 @@ -// -// -// -// -// $Revision: 2932 $ -// - -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Diagnostics; -using System.Drawing; -using System.Drawing.Text; -using System.IO; -using System.Text; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Actions; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class is used for a basic text area control - /// - [ToolboxItem(false)] - public abstract class TextEditorControlBase : UserControl - { - string currentFileName = null; - int updateLevel = 0; - IDocument document; - - /// - /// This hashtable contains all editor keys, where - /// the key is the key combination and the value the - /// action. - /// - protected Dictionary editactions = new Dictionary(); - - [Browsable(false)] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public ITextEditorProperties TextEditorProperties { - get { - return document.TextEditorProperties; - } - set { - document.TextEditorProperties = value; - OptionsChanged(); - } - } - - Encoding encoding; - - /// - /// Current file's character encoding - /// - [Browsable(false)] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public Encoding Encoding { - get { - if (encoding == null) - return TextEditorProperties.Encoding; - return encoding; - } - set { - encoding = value; - } - } - - /// - /// The current file name - /// - [Browsable(false)] - [ReadOnly(true)] - public string FileName { - get { - return currentFileName; - } - set { - if (currentFileName != value) { - currentFileName = value; - OnFileNameChanged(EventArgs.Empty); - } - } - } - - /// - /// The current document - /// - [Browsable(false)] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] - public IDocument Document { - get { - return document; - } - set { - if (value == null) - throw new ArgumentNullException("value"); - if (document != null) { - document.DocumentChanged -= OnDocumentChanged; - } - document = value; - document.UndoStack.TextEditorControl = this; - document.DocumentChanged += OnDocumentChanged; - } - } - - void OnDocumentChanged(object sender, EventArgs e) - { - OnTextChanged(e); - } - - [EditorBrowsable(EditorBrowsableState.Always), Browsable(true)] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] - [Editor("System.ComponentModel.Design.MultilineStringEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))] - public override string Text { - get { - return Document.TextContent; - } - set { - Document.TextContent = value; - } - } - - [EditorBrowsable(EditorBrowsableState.Always), Browsable(true)] - public new event EventHandler TextChanged - { - add { base.TextChanged += value; } - remove { base.TextChanged -= value; } - } - - static Font ParseFont(string font) - { - string[] descr = font.Split(new char[]{',', '='}); - return new Font(descr[1], Single.Parse(descr[3])); - } - - /// - /// If set to true the contents can't be altered. - /// - [Browsable(false)] - public bool IsReadOnly { - get { - return Document.ReadOnly; - } - set { - Document.ReadOnly = value; - } - } - - /// - /// true, if the textarea is updating it's status, while - /// it updates it status no redraw operation occurs. - /// - [Browsable(false)] - public bool IsInUpdate { - get { - return updateLevel > 0; - } - } - - /// - /// supposedly this is the way to do it according to .NET docs, - /// as opposed to setting the size in the constructor - /// - protected override Size DefaultSize { - get { - return new Size(100, 100); - } - } - - #region Document Properties - /// - /// If true spaces are shown in the textarea - /// - [Category("Appearance")] - [DefaultValue(false)] - [Description("If true spaces are shown in the textarea")] - public bool ShowSpaces { - get { - return document.TextEditorProperties.ShowSpaces; - } - set { - document.TextEditorProperties.ShowSpaces = value; - OptionsChanged(); - } - } - - /// - /// Specifies the quality of text rendering (whether to use hinting and/or anti-aliasing). - /// - [Category("Appearance")] - [DefaultValue(TextRenderingHint.SystemDefault)] - [Description("Specifies the quality of text rendering (whether to use hinting and/or anti-aliasing).")] - public TextRenderingHint TextRenderingHint { - get { - return document.TextEditorProperties.TextRenderingHint; - } - set { - document.TextEditorProperties.TextRenderingHint = value; - OptionsChanged(); - } - } - - /// - /// If true tabs are shown in the textarea - /// - [Category("Appearance")] - [DefaultValue(false)] - [Description("If true tabs are shown in the textarea")] - public bool ShowTabs { - get { - return document.TextEditorProperties.ShowTabs; - } - set { - document.TextEditorProperties.ShowTabs = value; - OptionsChanged(); - } - } - - /// - /// If true EOL markers are shown in the textarea - /// - [Category("Appearance")] - [DefaultValue(false)] - [Description("If true EOL markers are shown in the textarea")] - public bool ShowEOLMarkers { - get { - return document.TextEditorProperties.ShowEOLMarker; - } - set { - document.TextEditorProperties.ShowEOLMarker = value; - OptionsChanged(); - } - } - - /// - /// If true the horizontal ruler is shown in the textarea - /// - [Category("Appearance")] - [DefaultValue(false)] - [Description("If true the horizontal ruler is shown in the textarea")] - public bool ShowHRuler { - get { - return document.TextEditorProperties.ShowHorizontalRuler; - } - set { - document.TextEditorProperties.ShowHorizontalRuler = value; - OptionsChanged(); - } - } - - /// - /// If true the vertical ruler is shown in the textarea - /// - [Category("Appearance")] - [DefaultValue(true)] - [Description("If true the vertical ruler is shown in the textarea")] - public bool ShowVRuler { - get { - return document.TextEditorProperties.ShowVerticalRuler; - } - set { - document.TextEditorProperties.ShowVerticalRuler = value; - OptionsChanged(); - } - } - - /// - /// The row in which the vertical ruler is displayed - /// - [Category("Appearance")] - [DefaultValue(80)] - [Description("The row in which the vertical ruler is displayed")] - public int VRulerRow { - get { - return document.TextEditorProperties.VerticalRulerRow; - } - set { - document.TextEditorProperties.VerticalRulerRow = value; - OptionsChanged(); - } - } - - /// - /// If true line numbers are shown in the textarea - /// - [Category("Appearance")] - [DefaultValue(true)] - [Description("If true line numbers are shown in the textarea")] - public bool ShowLineNumbers { - get { - return document.TextEditorProperties.ShowLineNumbers; - } - set { - document.TextEditorProperties.ShowLineNumbers = value; - OptionsChanged(); - } - } - - /// - /// If true invalid lines are marked in the textarea - /// - [Category("Appearance")] - [DefaultValue(false)] - [Description("If true invalid lines are marked in the textarea")] - public bool ShowInvalidLines { - get { - return document.TextEditorProperties.ShowInvalidLines; - } - set { - document.TextEditorProperties.ShowInvalidLines = value; - OptionsChanged(); - } - } - - /// - /// If true folding is enabled in the textarea - /// - [Category("Appearance")] - [DefaultValue(true)] - [Description("If true folding is enabled in the textarea")] - public bool EnableFolding { - get { - return document.TextEditorProperties.EnableFolding; - } - set { - document.TextEditorProperties.EnableFolding = value; - OptionsChanged(); - } - } - - [Category("Appearance")] - [DefaultValue(true)] - [Description("If true matching brackets are highlighted")] - public bool ShowMatchingBracket { - get { - return document.TextEditorProperties.ShowMatchingBracket; - } - set { - document.TextEditorProperties.ShowMatchingBracket = value; - OptionsChanged(); - } - } - - [Category("Appearance")] - [DefaultValue(false)] - [Description("If true the icon bar is displayed")] - public bool IsIconBarVisible { - get { - return document.TextEditorProperties.IsIconBarVisible; - } - set { - document.TextEditorProperties.IsIconBarVisible = value; - OptionsChanged(); - } - } - - /// - /// The width in spaces of a tab character - /// - [Category("Appearance")] - [DefaultValue(4)] - [Description("The width in spaces of a tab character")] - public int TabIndent { - get { - return document.TextEditorProperties.TabIndent; - } - set { - document.TextEditorProperties.TabIndent = value; - OptionsChanged(); - } - } - - /// - /// The line viewer style - /// - [Category("Appearance")] - [DefaultValue(LineViewerStyle.None)] - [Description("The line viewer style")] - public LineViewerStyle LineViewerStyle { - get { - return document.TextEditorProperties.LineViewerStyle; - } - set { - document.TextEditorProperties.LineViewerStyle = value; - OptionsChanged(); - } - } - - /// - /// The indent style - /// - [Category("Behavior")] - [DefaultValue(IndentStyle.Smart)] - [Description("The indent style")] - public IndentStyle IndentStyle { - get { - return document.TextEditorProperties.IndentStyle; - } - set { - document.TextEditorProperties.IndentStyle = value; - OptionsChanged(); - } - } - - /// - /// if true spaces are converted to tabs - /// - [Category("Behavior")] - [DefaultValue(false)] - [Description("Converts tabs to spaces while typing")] - public bool ConvertTabsToSpaces { - get { - return document.TextEditorProperties.ConvertTabsToSpaces; - } - set { - document.TextEditorProperties.ConvertTabsToSpaces = value; - OptionsChanged(); - } - } - - /// - /// if true spaces are converted to tabs - /// - [Category("Behavior")] - [DefaultValue(false)] - [Description("Hide the mouse cursor while typing")] - public bool HideMouseCursor { - get { - return document.TextEditorProperties.HideMouseCursor; - } - set { - document.TextEditorProperties.HideMouseCursor = value; - OptionsChanged(); - } - } - - /// - /// if true spaces are converted to tabs - /// - [Category("Behavior")] - [DefaultValue(false)] - [Description("Allows the caret to be placed beyond the end of line")] - public bool AllowCaretBeyondEOL { - get { - return document.TextEditorProperties.AllowCaretBeyondEOL; - } - set { - document.TextEditorProperties.AllowCaretBeyondEOL = value; - OptionsChanged(); - } - } - /// - /// if true spaces are converted to tabs - /// - [Category("Behavior")] - [DefaultValue(BracketMatchingStyle.After)] - [Description("Specifies if the bracket matching should match the bracket before or after the caret.")] - public BracketMatchingStyle BracketMatchingStyle { - get { - return document.TextEditorProperties.BracketMatchingStyle; - } - set { - document.TextEditorProperties.BracketMatchingStyle = value; - OptionsChanged(); - } - } - - /// - /// The base font of the text area. No bold or italic fonts - /// can be used because bold/italic is reserved for highlighting - /// purposes. - /// - [Browsable(true)] - [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)] - [Description("The base font of the text area. No bold or italic fonts can be used because bold/italic is reserved for highlighting purposes.")] - public override Font Font { - get { - return document.TextEditorProperties.Font; - } - set { - document.TextEditorProperties.Font = value; - OptionsChanged(); - } - } - - #endregion - public abstract TextAreaControl ActiveTextAreaControl { - get; - } - - protected TextEditorControlBase() - { - GenerateDefaultActions(); - HighlightingManager.Manager.ReloadSyntaxHighlighting += new EventHandler(OnReloadHighlighting); - } - - protected virtual void OnReloadHighlighting(object sender, EventArgs e) - { - if (Document.HighlightingStrategy != null) { - try { - Document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategy(Document.HighlightingStrategy.Name); - } catch (HighlightingDefinitionInvalidException ex) { - MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - OptionsChanged(); - } - } - - public bool IsEditAction(Keys keyData) - { - return editactions.ContainsKey(keyData); - } - - internal IEditAction GetEditAction(Keys keyData) - { - if (!IsEditAction(keyData)) { - return null; - } - return (IEditAction)editactions[keyData]; - } - - void GenerateDefaultActions() - { - editactions[Keys.Left] = new CaretLeft(); - editactions[Keys.Left | Keys.Shift] = new ShiftCaretLeft(); - editactions[Keys.Left | Keys.Control] = new WordLeft(); - editactions[Keys.Left | Keys.Control | Keys.Shift] = new ShiftWordLeft(); - editactions[Keys.Right] = new CaretRight(); - editactions[Keys.Right | Keys.Shift] = new ShiftCaretRight(); - editactions[Keys.Right | Keys.Control] = new WordRight(); - editactions[Keys.Right | Keys.Control | Keys.Shift] = new ShiftWordRight(); - editactions[Keys.Up] = new CaretUp(); - editactions[Keys.Up | Keys.Shift] = new ShiftCaretUp(); - editactions[Keys.Up | Keys.Control] = new ScrollLineUp(); - editactions[Keys.Down] = new CaretDown(); - editactions[Keys.Down | Keys.Shift] = new ShiftCaretDown(); - editactions[Keys.Down | Keys.Control] = new ScrollLineDown(); - - editactions[Keys.Insert] = new ToggleEditMode(); - editactions[Keys.Insert | Keys.Control] = new Copy(); - editactions[Keys.Insert | Keys.Shift] = new Paste(); - editactions[Keys.Delete] = new Delete(); - editactions[Keys.Delete | Keys.Shift] = new Cut(); - editactions[Keys.Home] = new Home(); - editactions[Keys.Home | Keys.Shift] = new ShiftHome(); - editactions[Keys.Home | Keys.Control] = new MoveToStart(); - editactions[Keys.Home | Keys.Control | Keys.Shift] = new ShiftMoveToStart(); - editactions[Keys.End] = new End(); - editactions[Keys.End | Keys.Shift] = new ShiftEnd(); - editactions[Keys.End | Keys.Control] = new MoveToEnd(); - editactions[Keys.End | Keys.Control | Keys.Shift] = new ShiftMoveToEnd(); - editactions[Keys.PageUp] = new MovePageUp(); - editactions[Keys.PageUp | Keys.Shift] = new ShiftMovePageUp(); - editactions[Keys.PageDown] = new MovePageDown(); - editactions[Keys.PageDown | Keys.Shift] = new ShiftMovePageDown(); - - editactions[Keys.Return] = new Return(); - editactions[Keys.Tab] = new Tab(); - editactions[Keys.Tab | Keys.Shift] = new ShiftTab(); - editactions[Keys.Back] = new Backspace(); - editactions[Keys.Back | Keys.Shift] = new Backspace(); - - editactions[Keys.X | Keys.Control] = new Cut(); - editactions[Keys.C | Keys.Control] = new Copy(); - editactions[Keys.V | Keys.Control] = new Paste(); - - editactions[Keys.A | Keys.Control] = new SelectWholeDocument(); - editactions[Keys.Escape] = new ClearAllSelections(); - - editactions[Keys.Divide | Keys.Control] = new ToggleComment(); - editactions[Keys.OemQuestion | Keys.Control] = new ToggleComment(); - - editactions[Keys.Back | Keys.Alt] = new Actions.Undo(); - editactions[Keys.Z | Keys.Control] = new Actions.Undo(); - editactions[Keys.Y | Keys.Control] = new Redo(); - - editactions[Keys.Delete | Keys.Control] = new DeleteWord(); - editactions[Keys.Back | Keys.Control] = new WordBackspace(); - editactions[Keys.D | Keys.Control] = new DeleteLine(); - editactions[Keys.D | Keys.Shift | Keys.Control] = new DeleteToLineEnd(); - - editactions[Keys.B | Keys.Control] = new GotoMatchingBrace(); - } - - /// - /// Call this method before a long update operation this - /// 'locks' the text area so that no screen update occurs. - /// - public virtual void BeginUpdate() - { - ++updateLevel; - } - - /// - /// Call this method to 'unlock' the text area. After this call - /// screen update can occur. But no automatical refresh occurs you - /// have to commit the updates in the queue. - /// - public virtual void EndUpdate() - { - Debug.Assert(updateLevel > 0); - updateLevel = Math.Max(0, updateLevel - 1); - } - - public void LoadFile(string fileName) - { - LoadFile(fileName, true, true); - } - - /// - /// Loads a file given by fileName - /// - /// The name of the file to open - /// Automatically load the highlighting for the file - /// Automatically detect file encoding and set Encoding property to the detected encoding. - public void LoadFile(string fileName, bool autoLoadHighlighting, bool autodetectEncoding) - { - using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read)) { - LoadFile(fileName, fs, autoLoadHighlighting, autodetectEncoding); - } - } - - /// - /// Loads a file from the specified stream. - /// - /// The name of the file to open. Used to find the correct highlighting strategy - /// if autoLoadHighlighting is active, and sets the filename property to this value. - /// The stream to actually load the file content from. - /// Automatically load the highlighting for the file - /// Automatically detect file encoding and set Encoding property to the detected encoding. - public void LoadFile(string fileName, Stream stream, bool autoLoadHighlighting, bool autodetectEncoding) - { - if (stream == null) - throw new ArgumentNullException("stream"); - - BeginUpdate(); - document.TextContent = String.Empty; - document.UndoStack.ClearAll(); - document.BookmarkManager.Clear(); - if (autoLoadHighlighting) { - try { - document.HighlightingStrategy = HighlightingStrategyFactory.CreateHighlightingStrategyForFile(fileName); - } catch (HighlightingDefinitionInvalidException ex) { - MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - } - - if (autodetectEncoding) { - Encoding encoding = this.Encoding; - Document.TextContent = Util.FileReader.ReadFileContent(stream, ref encoding); - this.Encoding = encoding; - } else { - using (StreamReader reader = new StreamReader(fileName, this.Encoding)) { - Document.TextContent = reader.ReadToEnd(); - } - } - - this.FileName = fileName; - OptionsChanged(); - Document.UpdateQueue.Clear(); - EndUpdate(); - - Refresh(); - } - - /// - /// Gets if the document can be saved with the current encoding without losing data. - /// - public bool CanSaveWithCurrentEncoding() - { - if (encoding == null || Util.FileReader.IsUnicode(encoding)) - return true; - // not a unicode codepage - string text = document.TextContent; - return encoding.GetString(encoding.GetBytes(text)) == text; - } - - /// - /// Saves the text editor content into the file. - /// - public void SaveFile(string fileName) - { - using (FileStream fs = new FileStream(fileName, FileMode.Create, FileAccess.Write)) { - SaveFile(fs); - } - this.FileName = fileName; - } - - /// - /// Saves the text editor content into the specified stream. - /// Does not close the stream. - /// - public void SaveFile(Stream stream) - { - StreamWriter streamWriter = new StreamWriter(stream, this.Encoding ?? Encoding.UTF8); - - // save line per line to apply the LineTerminator to all lines - // (otherwise we might save files with mixed-up line endings) - foreach (LineSegment line in Document.LineSegmentCollection) { - streamWriter.Write(Document.GetText(line.Offset, line.Length)); - if (line.DelimiterLength > 0) { - char charAfterLine = Document.GetCharAt(line.Offset + line.Length); - if (charAfterLine != '\n' && charAfterLine != '\r') - throw new InvalidOperationException("The document cannot be saved because it is corrupted."); - // only save line terminator if the line has one - streamWriter.Write(document.TextEditorProperties.LineTerminator); - } - } - streamWriter.Flush(); - } - - public abstract void OptionsChanged(); - - // Localization ISSUES - - // used in insight window - public virtual string GetRangeDescription(int selectedItem, int itemCount) - { - StringBuilder sb=new StringBuilder(selectedItem.ToString()); - sb.Append(" from "); - sb.Append(itemCount.ToString()); - return sb.ToString(); - } - - /// - /// Overwritten refresh method that does nothing if the control is in - /// an update cycle. - /// - public override void Refresh() - { - if (IsInUpdate) { - return; - } - base.Refresh(); - } - - protected override void Dispose(bool disposing) - { - if (disposing) { - HighlightingManager.Manager.ReloadSyntaxHighlighting -= new EventHandler(OnReloadHighlighting); - document.HighlightingStrategy = null; - document.UndoStack.TextEditorControl = null; - } - base.Dispose(disposing); - } - - protected virtual void OnFileNameChanged(EventArgs e) - { - if (FileNameChanged != null) { - FileNameChanged(this, e); - } - } - - public event EventHandler FileNameChanged; - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/TextView.cs b/src/ICSharpCode.TextEditor/Src/Gui/TextView.cs deleted file mode 100644 index f44e7a9..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/TextView.cs +++ /dev/null @@ -1,1088 +0,0 @@ -// -// -// -// -// $Revision: 3205 $ -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; -using System.Drawing; -using System.Windows.Forms; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor -{ - /// - /// This class paints the textarea. - /// - public class TextView : AbstractMargin, IDisposable - { - int fontHeight; - //Hashtable charWitdh = new Hashtable(); - //StringFormat measureStringFormat = (StringFormat)StringFormat.GenericTypographic.Clone(); - BracketHighlight highlight; - int physicalColumn = 0; // used for calculating physical column during paint - - public void Dispose() - { - measureCache.Clear(); - //measureStringFormat.Dispose(); - } - - public BracketHighlight Highlight { - get { - return highlight; - } - set { - highlight = value; - } - } - - public int FirstPhysicalLine { - get { - return textArea.VirtualTop.Y / fontHeight; - } - } - public int LineHeightRemainder { - get { - return textArea.VirtualTop.Y % fontHeight; - } - } - /// Gets the first visible logical line. - public int FirstVisibleLine { - get { - return textArea.Document.GetFirstLogicalLine(textArea.VirtualTop.Y / fontHeight); - } - set { - if (FirstVisibleLine != value) { - textArea.VirtualTop = new Point(textArea.VirtualTop.X, textArea.Document.GetVisibleLine(value) * fontHeight); - - } - } - } - - public int VisibleLineDrawingRemainder { - get { - return textArea.VirtualTop.Y % fontHeight; - } - } - - public int FontHeight { - get { - return fontHeight; - } - } - - public int VisibleLineCount { - get { - return 1 + DrawingPosition.Height / fontHeight; - } - } - - public int VisibleColumnCount { - get { - return (int)(DrawingPosition.Width / WideSpaceWidth) - 1; - } - } - - public TextView(TextArea textArea) : base(textArea) - { - base.Cursor = Cursors.IBeam; - OptionsChanged(); - } - - static int GetFontHeight(Font font) - { - int height1 = TextRenderer.MeasureText("_", font).Height; - int height2 = (int)Math.Ceiling(font.GetHeight()); - return Math.Max(height1, height2) + 1; - } - - int spaceWidth; - - /// - /// Gets the width of a space character. - /// This value can be quite small in some fonts - consider using WideSpaceWidth instead. - /// - public int SpaceWidth { - get { - return spaceWidth; - } - } - - int wideSpaceWidth; - - /// - /// Gets the width of a 'wide space' (=one quarter of a tab, if tab is set to 4 spaces). - /// On monospaced fonts, this is the same value as spaceWidth. - /// - public int WideSpaceWidth { - get { - return wideSpaceWidth; - } - } - - Font lastFont; - - public void OptionsChanged() - { - this.lastFont = TextEditorProperties.FontContainer.RegularFont; - this.fontHeight = GetFontHeight(lastFont); - // use minimum width - in some fonts, space has no width but kerning is used instead - // -> DivideByZeroException - this.spaceWidth = Math.Max(GetWidth(' ', lastFont), 1); - // tab should have the width of 4*'x' - this.wideSpaceWidth = Math.Max(spaceWidth, GetWidth('x', lastFont)); - } - - #region Paint functions - public override void Paint(Graphics g, Rectangle rect) - { - if (rect.Width <= 0 || rect.Height <= 0) { - return; - } - - // Just to ensure that fontHeight and char widths are always correct... - if (lastFont != TextEditorProperties.FontContainer.RegularFont) { - OptionsChanged(); - textArea.Invalidate(); - } - - int horizontalDelta = textArea.VirtualTop.X; - if (horizontalDelta > 0) { - g.SetClip(this.DrawingPosition); - } - - for (int y = 0; y < (DrawingPosition.Height + VisibleLineDrawingRemainder) / fontHeight + 1; ++y) { - Rectangle lineRectangle = new Rectangle(DrawingPosition.X - horizontalDelta, - DrawingPosition.Top + y * fontHeight - VisibleLineDrawingRemainder, - DrawingPosition.Width + horizontalDelta, - fontHeight); - - if (rect.IntersectsWith(lineRectangle)) { - int fvl = textArea.Document.GetVisibleLine(FirstVisibleLine); - int currentLine = textArea.Document.GetFirstLogicalLine(textArea.Document.GetVisibleLine(FirstVisibleLine) + y); - PaintDocumentLine(g, currentLine, lineRectangle); - } - } - - DrawMarkerDraw(g); - - if (horizontalDelta > 0) { - g.ResetClip(); - } - textArea.Caret.PaintCaret(g); - } - - void PaintDocumentLine(Graphics g, int lineNumber, Rectangle lineRectangle) - { - Debug.Assert(lineNumber >= 0); - Brush bgColorBrush = GetBgColorBrush(lineNumber); - Brush backgroundBrush = textArea.Enabled ? bgColorBrush : SystemBrushes.InactiveBorder; - - if (lineNumber >= textArea.Document.TotalNumberOfLines) { - g.FillRectangle(backgroundBrush, lineRectangle); - if (TextEditorProperties.ShowInvalidLines) { - DrawInvalidLineMarker(g, lineRectangle.Left, lineRectangle.Top); - } - if (TextEditorProperties.ShowVerticalRuler) { - DrawVerticalRuler(g, lineRectangle); - } -// bgColorBrush.Dispose(); - return; - } - - int physicalXPos = lineRectangle.X; - // there can't be a folding wich starts in an above line and ends here, because the line is a new one, - // there must be a return before this line. - int column = 0; - physicalColumn = 0; - if (TextEditorProperties.EnableFolding) { - while (true) { - List starts = textArea.Document.FoldingManager.GetFoldedFoldingsWithStartAfterColumn(lineNumber, column - 1); - if (starts == null || starts.Count <= 0) { - if (lineNumber < textArea.Document.TotalNumberOfLines) { - physicalXPos = PaintLinePart(g, lineNumber, column, textArea.Document.GetLineSegment(lineNumber).Length, lineRectangle, physicalXPos); - } - break; - } - // search the first starting folding - FoldMarker firstFolding = (FoldMarker)starts[0]; - foreach (FoldMarker fm in starts) { - if (fm.StartColumn < firstFolding.StartColumn) { - firstFolding = fm; - } - } - starts.Clear(); - - physicalXPos = PaintLinePart(g, lineNumber, column, firstFolding.StartColumn, lineRectangle, physicalXPos); - column = firstFolding.EndColumn; - lineNumber = firstFolding.EndLine; - if (lineNumber >= textArea.Document.TotalNumberOfLines) { - Debug.Assert(false, "Folding ends after document end"); - break; - } - - ColumnRange selectionRange2 = textArea.SelectionManager.GetSelectionAtLine(lineNumber); - bool drawSelected = ColumnRange.WholeColumn.Equals(selectionRange2) || firstFolding.StartColumn >= selectionRange2.StartColumn && firstFolding.EndColumn <= selectionRange2.EndColumn; - - physicalXPos = PaintFoldingText(g, lineNumber, physicalXPos, lineRectangle, firstFolding.FoldText, drawSelected); - } - } else { - physicalXPos = PaintLinePart(g, lineNumber, 0, textArea.Document.GetLineSegment(lineNumber).Length, lineRectangle, physicalXPos); - } - - if (lineNumber < textArea.Document.TotalNumberOfLines) { - // Paint things after end of line - ColumnRange selectionRange = textArea.SelectionManager.GetSelectionAtLine(lineNumber); - LineSegment currentLine = textArea.Document.GetLineSegment(lineNumber); - HighlightColor selectionColor = textArea.Document.HighlightingStrategy.GetColorFor("Selection"); - - bool selectionBeyondEOL = selectionRange.EndColumn > currentLine.Length || ColumnRange.WholeColumn.Equals(selectionRange); - - if (TextEditorProperties.ShowEOLMarker) { - HighlightColor eolMarkerColor = textArea.Document.HighlightingStrategy.GetColorFor("EOLMarkers"); - physicalXPos += DrawEOLMarker(g, eolMarkerColor.Color, selectionBeyondEOL ? bgColorBrush : backgroundBrush, physicalXPos, lineRectangle.Y); - } else { - if (selectionBeyondEOL) { - g.FillRectangle(BrushRegistry.GetBrush(selectionColor.BackgroundColor), new RectangleF(physicalXPos, lineRectangle.Y, WideSpaceWidth, lineRectangle.Height)); - physicalXPos += WideSpaceWidth; - } - } - - Brush fillBrush = selectionBeyondEOL && TextEditorProperties.AllowCaretBeyondEOL ? bgColorBrush : backgroundBrush; - g.FillRectangle(fillBrush, - new RectangleF(physicalXPos, lineRectangle.Y, lineRectangle.Width - physicalXPos + lineRectangle.X, lineRectangle.Height)); - } - if (TextEditorProperties.ShowVerticalRuler) { - DrawVerticalRuler(g, lineRectangle); - } -// bgColorBrush.Dispose(); - } - - bool DrawLineMarkerAtLine(int lineNumber) - { - return lineNumber == base.textArea.Caret.Line && textArea.MotherTextAreaControl.TextEditorProperties.LineViewerStyle == LineViewerStyle.FullRow; - } - - Brush GetBgColorBrush(int lineNumber) - { - if (DrawLineMarkerAtLine(lineNumber)) { - HighlightColor caretLine = textArea.Document.HighlightingStrategy.GetColorFor("CaretMarker"); - return BrushRegistry.GetBrush(caretLine.Color); - } - HighlightColor background = textArea.Document.HighlightingStrategy.GetColorFor("Default"); - Color bgColor = background.BackgroundColor; - return BrushRegistry.GetBrush(bgColor); - } - - const int additionalFoldTextSize = 1; - - int PaintFoldingText(Graphics g, int lineNumber, int physicalXPos, Rectangle lineRectangle, string text, bool drawSelected) - { - // TODO: get font and color from the highlighting file - HighlightColor selectionColor = textArea.Document.HighlightingStrategy.GetColorFor("Selection"); - Brush bgColorBrush = drawSelected ? BrushRegistry.GetBrush(selectionColor.BackgroundColor) : GetBgColorBrush(lineNumber); - Brush backgroundBrush = textArea.Enabled ? bgColorBrush : SystemBrushes.InactiveBorder; - - Font font = textArea.TextEditorProperties.FontContainer.RegularFont; - - int wordWidth = MeasureStringWidth(g, text, font) + additionalFoldTextSize; - Rectangle rect = new Rectangle(physicalXPos, lineRectangle.Y, wordWidth, lineRectangle.Height - 1); - - g.FillRectangle(backgroundBrush, rect); - - physicalColumn += text.Length; - DrawString(g, - text, - font, - drawSelected ? selectionColor.Color : Color.Gray, - rect.X + 1, rect.Y); - g.DrawRectangle(BrushRegistry.GetPen(drawSelected ? Color.DarkGray : Color.Gray), rect.X, rect.Y, rect.Width, rect.Height); - - return physicalXPos + wordWidth + 1; - } - - struct MarkerToDraw { - internal TextMarker marker; - internal RectangleF drawingRect; - - public MarkerToDraw(TextMarker marker, RectangleF drawingRect) - { - this.marker = marker; - this.drawingRect = drawingRect; - } - } - - List markersToDraw = new List(); - - void DrawMarker(Graphics g, TextMarker marker, RectangleF drawingRect) - { - // draw markers later so they can overdraw the following text - markersToDraw.Add(new MarkerToDraw(marker, drawingRect)); - } - - void DrawMarkerDraw(Graphics g) - { - foreach (MarkerToDraw m in markersToDraw) { - TextMarker marker = m.marker; - RectangleF drawingRect = m.drawingRect; - float drawYPos = drawingRect.Bottom - 1; - switch (marker.TextMarkerType) { - case TextMarkerType.Underlined: - g.DrawLine(BrushRegistry.GetPen(marker.Color), drawingRect.X, drawYPos, drawingRect.Right, drawYPos); - break; - case TextMarkerType.WaveLine: - int reminder = ((int)drawingRect.X) % 6; - for (float i = (int)drawingRect.X - reminder; i < drawingRect.Right; i += 6) { - g.DrawLine(BrushRegistry.GetPen(marker.Color), i, drawYPos + 3 - 4, i + 3, drawYPos + 1 - 4); - if (i + 3 < drawingRect.Right) { - g.DrawLine(BrushRegistry.GetPen(marker.Color), i + 3, drawYPos + 1 - 4, i + 6, drawYPos + 3 - 4); - } - } - break; - case TextMarkerType.SolidBlock: - g.FillRectangle(BrushRegistry.GetBrush(marker.Color), drawingRect); - break; - } - } - markersToDraw.Clear(); - } - - /// - /// Get the marker brush (for solid block markers) at a given position. - /// - /// The offset. - /// The length. - /// All markers that have been found. - /// The Brush or null when no marker was found. - Brush GetMarkerBrushAt(int offset, int length, ref Color foreColor, out IList markers) - { - markers = Document.MarkerStrategy.GetMarkers(offset, length); - foreach (TextMarker marker in markers) { - if (marker.TextMarkerType == TextMarkerType.SolidBlock) { - if (marker.OverrideForeColor) { - foreColor = marker.ForeColor; - } - return BrushRegistry.GetBrush(marker.Color); - } - } - return null; - } - - int PaintLinePart(Graphics g, int lineNumber, int startColumn, int endColumn, Rectangle lineRectangle, int physicalXPos) - { - bool drawLineMarker = DrawLineMarkerAtLine(lineNumber); - Brush backgroundBrush = textArea.Enabled ? GetBgColorBrush(lineNumber) : SystemBrushes.InactiveBorder; - - HighlightColor selectionColor = textArea.Document.HighlightingStrategy.GetColorFor("Selection"); - ColumnRange selectionRange = textArea.SelectionManager.GetSelectionAtLine(lineNumber); - HighlightColor tabMarkerColor = textArea.Document.HighlightingStrategy.GetColorFor("TabMarkers"); - HighlightColor spaceMarkerColor = textArea.Document.HighlightingStrategy.GetColorFor("SpaceMarkers"); - - LineSegment currentLine = textArea.Document.GetLineSegment(lineNumber); - - Brush selectionBackgroundBrush = BrushRegistry.GetBrush(selectionColor.BackgroundColor); - - if (currentLine.Words == null) { - return physicalXPos; - } - - int currentWordOffset = 0; // we cannot use currentWord.Offset because it is not set on space words - - TextWord currentWord; - TextWord nextCurrentWord = null; - FontContainer fontContainer = TextEditorProperties.FontContainer; - for (int wordIdx = 0; wordIdx < currentLine.Words.Count; wordIdx++) { - currentWord = currentLine.Words[wordIdx]; - if (currentWordOffset < startColumn) { - // TODO: maybe we need to split at startColumn when we support fold markers - // inside words - currentWordOffset += currentWord.Length; - continue; - } - repeatDrawCurrentWord: - //physicalXPos += 10; // leave room between drawn words - useful for debugging the drawing code - if (currentWordOffset >= endColumn || physicalXPos >= lineRectangle.Right) { - break; - } - int currentWordEndOffset = currentWordOffset + currentWord.Length - 1; - TextWordType currentWordType = currentWord.Type; - - IList markers; - Color wordForeColor; - if (currentWordType == TextWordType.Space) - wordForeColor = spaceMarkerColor.Color; - else if (currentWordType == TextWordType.Tab) - wordForeColor = tabMarkerColor.Color; - else - wordForeColor = currentWord.Color; - Brush wordBackBrush = GetMarkerBrushAt(currentLine.Offset + currentWordOffset, currentWord.Length, ref wordForeColor, out markers); - - // It is possible that we have to split the current word because a marker/the selection begins/ends inside it - if (currentWord.Length > 1) { - int splitPos = int.MaxValue; - if (highlight != null) { - // split both before and after highlight - if (highlight.OpenBrace.Y == lineNumber) { - if (highlight.OpenBrace.X >= currentWordOffset && highlight.OpenBrace.X <= currentWordEndOffset) { - splitPos = Math.Min(splitPos, highlight.OpenBrace.X - currentWordOffset); - } - } - if (highlight.CloseBrace.Y == lineNumber) { - if (highlight.CloseBrace.X >= currentWordOffset && highlight.CloseBrace.X <= currentWordEndOffset) { - splitPos = Math.Min(splitPos, highlight.CloseBrace.X - currentWordOffset); - } - } - if (splitPos == 0) { - splitPos = 1; // split after highlight - } - } - if (endColumn < currentWordEndOffset) { // split when endColumn is reached - splitPos = Math.Min(splitPos, endColumn - currentWordOffset); - } - if (selectionRange.StartColumn > currentWordOffset && selectionRange.StartColumn <= currentWordEndOffset) { - splitPos = Math.Min(splitPos, selectionRange.StartColumn - currentWordOffset); - } else if (selectionRange.EndColumn > currentWordOffset && selectionRange.EndColumn <= currentWordEndOffset) { - splitPos = Math.Min(splitPos, selectionRange.EndColumn - currentWordOffset); - } - foreach (TextMarker marker in markers) { - int markerColumn = marker.Offset - currentLine.Offset; - int markerEndColumn = marker.EndOffset - currentLine.Offset + 1; // make end offset exclusive - if (markerColumn > currentWordOffset && markerColumn <= currentWordEndOffset) { - splitPos = Math.Min(splitPos, markerColumn - currentWordOffset); - } else if (markerEndColumn > currentWordOffset && markerEndColumn <= currentWordEndOffset) { - splitPos = Math.Min(splitPos, markerEndColumn - currentWordOffset); - } - } - if (splitPos != int.MaxValue) { - if (nextCurrentWord != null) - throw new ApplicationException("split part invalid: first part cannot be splitted further"); - nextCurrentWord = TextWord.Split(ref currentWord, splitPos); - goto repeatDrawCurrentWord; // get markers for first word part - } - } - - // get colors from selection status: - if (ColumnRange.WholeColumn.Equals(selectionRange) || (selectionRange.StartColumn <= currentWordOffset - && selectionRange.EndColumn > currentWordEndOffset)) - { - // word is completely selected - wordBackBrush = selectionBackgroundBrush; - if (selectionColor.HasForeground) { - wordForeColor = selectionColor.Color; - } - } else if (drawLineMarker) { - wordBackBrush = backgroundBrush; - } - - if (wordBackBrush == null) { // use default background if no other background is set - if (currentWord.SyntaxColor != null && currentWord.SyntaxColor.HasBackground) - wordBackBrush = BrushRegistry.GetBrush(currentWord.SyntaxColor.BackgroundColor); - else - wordBackBrush = backgroundBrush; - } - - RectangleF wordRectangle; - - if (currentWord.Type == TextWordType.Space) { - ++physicalColumn; - - wordRectangle = new RectangleF(physicalXPos, lineRectangle.Y, SpaceWidth, lineRectangle.Height); - g.FillRectangle(wordBackBrush, wordRectangle); - - if (TextEditorProperties.ShowSpaces) { - DrawSpaceMarker(g, wordForeColor, physicalXPos, lineRectangle.Y); - } - physicalXPos += SpaceWidth; - } else if (currentWord.Type == TextWordType.Tab) { - - physicalColumn += TextEditorProperties.TabIndent; - physicalColumn = (physicalColumn / TextEditorProperties.TabIndent) * TextEditorProperties.TabIndent; - // go to next tabstop - int physicalTabEnd = ((physicalXPos + MinTabWidth - lineRectangle.X) - / WideSpaceWidth / TextEditorProperties.TabIndent) - * WideSpaceWidth * TextEditorProperties.TabIndent + lineRectangle.X; - physicalTabEnd += WideSpaceWidth * TextEditorProperties.TabIndent; - - wordRectangle = new RectangleF(physicalXPos, lineRectangle.Y, physicalTabEnd - physicalXPos, lineRectangle.Height); - g.FillRectangle(wordBackBrush, wordRectangle); - - if (TextEditorProperties.ShowTabs) { - DrawTabMarker(g, wordForeColor, physicalXPos, lineRectangle.Y); - } - physicalXPos = physicalTabEnd; - } else { - int wordWidth = DrawDocumentWord(g, - currentWord.Word, - new Point(physicalXPos, lineRectangle.Y), - currentWord.GetFont(fontContainer), - wordForeColor, - wordBackBrush); - wordRectangle = new RectangleF(physicalXPos, lineRectangle.Y, wordWidth, lineRectangle.Height); - physicalXPos += wordWidth; - } - foreach (TextMarker marker in markers) { - if (marker.TextMarkerType != TextMarkerType.SolidBlock) { - DrawMarker(g, marker, wordRectangle); - } - } - - // draw bracket highlight - if (highlight != null) { - if (highlight.OpenBrace.Y == lineNumber && highlight.OpenBrace.X == currentWordOffset || - highlight.CloseBrace.Y == lineNumber && highlight.CloseBrace.X == currentWordOffset) { - DrawBracketHighlight(g, new Rectangle((int)wordRectangle.X, lineRectangle.Y, (int)wordRectangle.Width - 1, lineRectangle.Height - 1)); - } - } - - currentWordOffset += currentWord.Length; - if (nextCurrentWord != null) { - currentWord = nextCurrentWord; - nextCurrentWord = null; - goto repeatDrawCurrentWord; - } - } - if (physicalXPos < lineRectangle.Right && endColumn >= currentLine.Length) { - // draw markers at line end - IList markers = Document.MarkerStrategy.GetMarkers(currentLine.Offset + currentLine.Length); - foreach (TextMarker marker in markers) { - if (marker.TextMarkerType != TextMarkerType.SolidBlock) { - DrawMarker(g, marker, new RectangleF(physicalXPos, lineRectangle.Y, WideSpaceWidth, lineRectangle.Height)); - } - } - } - return physicalXPos; - } - - int DrawDocumentWord(Graphics g, string word, Point position, Font font, Color foreColor, Brush backBrush) - { - if (word == null || word.Length == 0) { - return 0; - } - - if (word.Length > MaximumWordLength) { - int width = 0; - for (int i = 0; i < word.Length; i += MaximumWordLength) { - Point pos = position; - pos.X += width; - if (i + MaximumWordLength < word.Length) - width += DrawDocumentWord(g, word.Substring(i, MaximumWordLength), pos, font, foreColor, backBrush); - else - width += DrawDocumentWord(g, word.Substring(i, word.Length - i), pos, font, foreColor, backBrush); - } - return width; - } - - int wordWidth = MeasureStringWidth(g, word, font); - - //num = ++num % 3; - g.FillRectangle(backBrush, //num == 0 ? Brushes.LightBlue : num == 1 ? Brushes.LightGreen : Brushes.Yellow, - new RectangleF(position.X, position.Y, wordWidth + 1, FontHeight)); - - DrawString(g, - word, - font, - foreColor, - position.X, - position.Y); - return wordWidth; - } - - struct WordFontPair { - string word; - Font font; - public WordFontPair(string word, Font font) { - this.word = word; - this.font = font; - } - public override bool Equals(object obj) { - WordFontPair myWordFontPair = (WordFontPair)obj; - if (!word.Equals(myWordFontPair.word)) return false; - return font.Equals(myWordFontPair.font); - } - - public override int GetHashCode() { - return word.GetHashCode() ^ font.GetHashCode(); - } - } - - Dictionary measureCache = new Dictionary(); - - // split words after 1000 characters. Fixes GDI+ crash on very longs words, for example - // a 100 KB Base64-file without any line breaks. - const int MaximumWordLength = 1000; - const int MaximumCacheSize = 2000; - - int MeasureStringWidth(Graphics g, string word, Font font) - { - int width; - - if (word == null || word.Length == 0) - return 0; - if (word.Length > MaximumWordLength) { - width = 0; - for (int i = 0; i < word.Length; i += MaximumWordLength) { - if (i + MaximumWordLength < word.Length) - width += MeasureStringWidth(g, word.Substring(i, MaximumWordLength), font); - else - width += MeasureStringWidth(g, word.Substring(i, word.Length - i), font); - } - return width; - } - if (measureCache.TryGetValue(new WordFontPair(word, font), out width)) { - return width; - } - if (measureCache.Count > MaximumCacheSize) { - measureCache.Clear(); - } - - // This code here provides better results than MeasureString! - // Example line that is measured wrong: - // txt.GetPositionFromCharIndex(txt.SelectionStart) - // (Verdana 10, highlighting makes GetP... bold) -> note the space between 'x' and '(' - // this also fixes "jumping" characters when selecting in non-monospace fonts - // [...] - // Replaced GDI+ measurement with GDI measurement: faster and even more exact - width = TextRenderer.MeasureText(g, word, font, new Size(short.MaxValue, short.MaxValue), textFormatFlags).Width; - measureCache.Add(new WordFontPair(word, font), width); - return width; - } - - // Important: Some flags combinations work on WinXP, but not on Win2000. - // Make sure to test changes here on all operating systems. - const TextFormatFlags textFormatFlags = - TextFormatFlags.NoPadding | TextFormatFlags.NoPrefix | TextFormatFlags.PreserveGraphicsClipping; - #endregion - - #region Conversion Functions - Dictionary> fontBoundCharWidth = new Dictionary>(); - - public int GetWidth(char ch, Font font) - { - if (!fontBoundCharWidth.ContainsKey(font)) { - fontBoundCharWidth.Add(font, new Dictionary()); - } - if (!fontBoundCharWidth[font].ContainsKey(ch)) { - using (Graphics g = textArea.CreateGraphics()) { - return GetWidth(g, ch, font); - } - } - return fontBoundCharWidth[font][ch]; - } - - public int GetWidth(Graphics g, char ch, Font font) - { - if (!fontBoundCharWidth.ContainsKey(font)) { - fontBoundCharWidth.Add(font, new Dictionary()); - } - if (!fontBoundCharWidth[font].ContainsKey(ch)) { - //Console.WriteLine("Calculate character width: " + ch); - fontBoundCharWidth[font].Add(ch, MeasureStringWidth(g, ch.ToString(), font)); - } - return fontBoundCharWidth[font][ch]; - } - - public int GetVisualColumn(int logicalLine, int logicalColumn) - { - int column = 0; - using (Graphics g = textArea.CreateGraphics()) { - CountColumns(ref column, 0, logicalColumn, logicalLine, g); - } - return column; - } - - public int GetVisualColumnFast(LineSegment line, int logicalColumn) - { - int lineOffset = line.Offset; - int tabIndent = Document.TextEditorProperties.TabIndent; - int guessedColumn = 0; - for (int i = 0; i < logicalColumn; ++i) { - char ch; - if (i >= line.Length) { - ch = ' '; - } else { - ch = Document.GetCharAt(lineOffset + i); - } - switch (ch) { - case '\t': - guessedColumn += tabIndent; - guessedColumn = (guessedColumn / tabIndent) * tabIndent; - break; - default: - ++guessedColumn; - break; - } - } - return guessedColumn; - } - - /// - /// returns line/column for a visual point position - /// - public TextLocation GetLogicalPosition(Point mousePosition) - { - FoldMarker dummy; - return GetLogicalColumn(GetLogicalLine(mousePosition.Y), mousePosition.X, out dummy); - } - - /// - /// returns line/column for a visual point position - /// - public TextLocation GetLogicalPosition(int visualPosX, int visualPosY) - { - FoldMarker dummy; - return GetLogicalColumn(GetLogicalLine(visualPosY), visualPosX, out dummy); - } - - /// - /// returns line/column for a visual point position - /// - public FoldMarker GetFoldMarkerFromPosition(int visualPosX, int visualPosY) - { - FoldMarker foldMarker; - GetLogicalColumn(GetLogicalLine(visualPosY), visualPosX, out foldMarker); - return foldMarker; - } - - /// - /// returns logical line number for a visual point - /// - public int GetLogicalLine(int visualPosY) - { - int clickedVisualLine = Math.Max(0, (visualPosY + this.textArea.VirtualTop.Y) / fontHeight); - return Document.GetFirstLogicalLine(clickedVisualLine); - } - - internal TextLocation GetLogicalColumn(int lineNumber, int visualPosX, out FoldMarker inFoldMarker) - { - visualPosX += textArea.VirtualTop.X; - - inFoldMarker = null; - if (lineNumber >= Document.TotalNumberOfLines) { - return new TextLocation((int)(visualPosX / WideSpaceWidth), lineNumber); - } - if (visualPosX <= 0) { - return new TextLocation(0, lineNumber); - } - - int start = 0; // column - int posX = 0; // visual position - - int result; - using (Graphics g = textArea.CreateGraphics()) { - do { - LineSegment line = Document.GetLineSegment(lineNumber); - FoldMarker nextFolding = FindNextFoldedFoldingOnLineAfterColumn(lineNumber, start-1); - int end = nextFolding != null ? nextFolding.StartColumn : int.MaxValue; - result = GetLogicalColumnInternal(g, line, start, end, ref posX, visualPosX); - if (result < 0) { - // reached fold marker - lineNumber = nextFolding.EndLine; - start = nextFolding.EndColumn; - int newPosX = posX + 1 + MeasureStringWidth(g, nextFolding.FoldText, TextEditorProperties.FontContainer.RegularFont); - if (newPosX >= visualPosX) { - inFoldMarker = nextFolding; - if (IsNearerToAThanB(visualPosX, posX, newPosX)) - return new TextLocation(nextFolding.StartColumn, nextFolding.StartLine); - else - return new TextLocation(nextFolding.EndColumn, nextFolding.EndLine); - } - posX = newPosX; - } - } while (result < 0); - } - return new TextLocation(result, lineNumber); - } - - int GetLogicalColumnInternal(Graphics g, LineSegment line, int start, int end, ref int drawingPos, int targetVisualPosX) - { - if (start == end) - return -1; - Debug.Assert(start < end); - Debug.Assert(drawingPos < targetVisualPosX); - - int tabIndent = Document.TextEditorProperties.TabIndent; - - /*float spaceWidth = SpaceWidth; - float drawingPos = 0; - LineSegment currentLine = Document.GetLineSegment(logicalLine); - List words = currentLine.Words; - if (words == null) return 0; - int wordCount = words.Count; - int wordOffset = 0; - FontContainer fontContainer = TextEditorProperties.FontContainer; - */ - FontContainer fontContainer = TextEditorProperties.FontContainer; - - List words = line.Words; - if (words == null) return 0; - int wordOffset = 0; - for (int i = 0; i < words.Count; i++) { - TextWord word = words[i]; - if (wordOffset >= end) { - return -1; - } - if (wordOffset + word.Length >= start) { - int newDrawingPos; - switch (word.Type) { - case TextWordType.Space: - newDrawingPos = drawingPos + spaceWidth; - if (newDrawingPos >= targetVisualPosX) - return IsNearerToAThanB(targetVisualPosX, drawingPos, newDrawingPos) ? wordOffset : wordOffset+1; - break; - case TextWordType.Tab: - // go to next tab position - drawingPos = (int)((drawingPos + MinTabWidth) / tabIndent / WideSpaceWidth) * tabIndent * WideSpaceWidth; - newDrawingPos = drawingPos + tabIndent * WideSpaceWidth; - if (newDrawingPos >= targetVisualPosX) - return IsNearerToAThanB(targetVisualPosX, drawingPos, newDrawingPos) ? wordOffset : wordOffset+1; - break; - case TextWordType.Word: - int wordStart = Math.Max(wordOffset, start); - int wordLength = Math.Min(wordOffset + word.Length, end) - wordStart; - string text = Document.GetText(line.Offset + wordStart, wordLength); - Font font = word.GetFont(fontContainer) ?? fontContainer.RegularFont; - newDrawingPos = drawingPos + MeasureStringWidth(g, text, font); - if (newDrawingPos >= targetVisualPosX) { - for (int j = 0; j < text.Length; j++) { - newDrawingPos = drawingPos + MeasureStringWidth(g, text[j].ToString(), font); - if (newDrawingPos >= targetVisualPosX) { - if (IsNearerToAThanB(targetVisualPosX, drawingPos, newDrawingPos)) - return wordStart + j; - else - return wordStart + j + 1; - } - drawingPos = newDrawingPos; - } - return wordStart + text.Length; - } - break; - default: - throw new NotSupportedException(); - } - drawingPos = newDrawingPos; - } - wordOffset += word.Length; - } - return wordOffset; - } - - static bool IsNearerToAThanB(int num, int a, int b) - { - return Math.Abs(a - num) < Math.Abs(b - num); - } - - FoldMarker FindNextFoldedFoldingOnLineAfterColumn(int lineNumber, int column) - { - List list = Document.FoldingManager.GetFoldedFoldingsWithStartAfterColumn(lineNumber, column); - if (list.Count != 0) - return list[0]; - else - return null; - } - - const int MinTabWidth = 4; - - float CountColumns(ref int column, int start, int end, int logicalLine, Graphics g) - { - if (start > end) throw new ArgumentException("start > end"); - if (start == end) return 0; - float spaceWidth = SpaceWidth; - float drawingPos = 0; - int tabIndent = Document.TextEditorProperties.TabIndent; - LineSegment currentLine = Document.GetLineSegment(logicalLine); - List words = currentLine.Words; - if (words == null) return 0; - int wordCount = words.Count; - int wordOffset = 0; - FontContainer fontContainer = TextEditorProperties.FontContainer; - for (int i = 0; i < wordCount; i++) { - TextWord word = words[i]; - if (wordOffset >= end) - break; - if (wordOffset + word.Length >= start) { - switch (word.Type) { - case TextWordType.Space: - drawingPos += spaceWidth; - break; - case TextWordType.Tab: - // go to next tab position - drawingPos = (int)((drawingPos + MinTabWidth) / tabIndent / WideSpaceWidth) * tabIndent * WideSpaceWidth; - drawingPos += tabIndent * WideSpaceWidth; - break; - case TextWordType.Word: - int wordStart = Math.Max(wordOffset, start); - int wordLength = Math.Min(wordOffset + word.Length, end) - wordStart; - string text = Document.GetText(currentLine.Offset + wordStart, wordLength); - drawingPos += MeasureStringWidth(g, text, word.GetFont(fontContainer) ?? fontContainer.RegularFont); - break; - } - } - wordOffset += word.Length; - } - for (int j = currentLine.Length; j < end; j++) { - drawingPos += WideSpaceWidth; - } - // add one pixel in column calculation to account for floating point calculation errors - column += (int)((drawingPos + 1) / WideSpaceWidth); - - /* OLD Code (does not work for fonts like Verdana) - for (int j = start; j < end; ++j) { - char ch; - if (j >= line.Length) { - ch = ' '; - } else { - ch = Document.GetCharAt(line.Offset + j); - } - - switch (ch) { - case '\t': - int oldColumn = column; - column += tabIndent; - column = (column / tabIndent) * tabIndent; - drawingPos += (column - oldColumn) * spaceWidth; - break; - default: - ++column; - TextWord word = line.GetWord(j); - if (word == null || word.Font == null) { - drawingPos += GetWidth(ch, TextEditorProperties.Font); - } else { - drawingPos += GetWidth(ch, word.Font); - } - break; - } - } - //*/ - return drawingPos; - } - - public int GetDrawingXPos(int logicalLine, int logicalColumn) - { - List foldings = Document.FoldingManager.GetTopLevelFoldedFoldings(); - int i; - FoldMarker f = null; - // search the last folding that's interresting - for (i = foldings.Count - 1; i >= 0; --i) { - f = foldings[i]; - if (f.StartLine < logicalLine || f.StartLine == logicalLine && f.StartColumn < logicalColumn) { - break; - } - FoldMarker f2 = foldings[i / 2]; - if (f2.StartLine > logicalLine || f2.StartLine == logicalLine && f2.StartColumn >= logicalColumn) { - i /= 2; - } - } - int lastFolding = 0; - int firstFolding = 0; - int column = 0; - int tabIndent = Document.TextEditorProperties.TabIndent; - float drawingPos; - Graphics g = textArea.CreateGraphics(); - // if no folding is interresting - if (f == null || !(f.StartLine < logicalLine || f.StartLine == logicalLine && f.StartColumn < logicalColumn)) { - drawingPos = CountColumns(ref column, 0, logicalColumn, logicalLine, g); - return (int)(drawingPos - textArea.VirtualTop.X); - } - - // if logicalLine/logicalColumn is in folding - if (f.EndLine > logicalLine || f.EndLine == logicalLine && f.EndColumn > logicalColumn) { - logicalColumn = f.StartColumn; - logicalLine = f.StartLine; - --i; - } - lastFolding = i; - - // search backwards until a new visible line is reched - for (; i >= 0; --i) { - f = (FoldMarker)foldings[i]; - if (f.EndLine < logicalLine) { // reached the begin of a new visible line - break; - } - } - firstFolding = i + 1; - - if (lastFolding < firstFolding) { - drawingPos = CountColumns(ref column, 0, logicalColumn, logicalLine, g); - return (int)(drawingPos - textArea.VirtualTop.X); - } - - int foldEnd = 0; - drawingPos = 0; - for (i = firstFolding; i <= lastFolding; ++i) { - f = foldings[i]; - drawingPos += CountColumns(ref column, foldEnd, f.StartColumn, f.StartLine, g); - foldEnd = f.EndColumn; - column += f.FoldText.Length; - drawingPos += additionalFoldTextSize; - drawingPos += MeasureStringWidth(g, f.FoldText, TextEditorProperties.FontContainer.RegularFont); - } - drawingPos += CountColumns(ref column, foldEnd, logicalColumn, logicalLine, g); - g.Dispose(); - return (int)(drawingPos - textArea.VirtualTop.X); - } - #endregion - - #region DrawHelper functions - void DrawBracketHighlight(Graphics g, Rectangle rect) - { - g.FillRectangle(BrushRegistry.GetBrush(Color.FromArgb(50, 0, 0, 255)), rect); - g.DrawRectangle(Pens.Blue, rect); - } - - void DrawString(Graphics g, string text, Font font, Color color, int x, int y) - { - TextRenderer.DrawText(g, text, font, new Point(x, y), color, textFormatFlags); - } - - void DrawInvalidLineMarker(Graphics g, int x, int y) - { - HighlightColor invalidLinesColor = textArea.Document.HighlightingStrategy.GetColorFor("InvalidLines"); - DrawString(g, "~", invalidLinesColor.GetFont(TextEditorProperties.FontContainer), invalidLinesColor.Color, x, y); - } - - void DrawSpaceMarker(Graphics g, Color color, int x, int y) - { - HighlightColor spaceMarkerColor = textArea.Document.HighlightingStrategy.GetColorFor("SpaceMarkers"); - DrawString(g, "\u00B7", spaceMarkerColor.GetFont(TextEditorProperties.FontContainer), color, x, y); - } - - void DrawTabMarker(Graphics g, Color color, int x, int y) - { - HighlightColor tabMarkerColor = textArea.Document.HighlightingStrategy.GetColorFor("TabMarkers"); - DrawString(g, "\u00BB", tabMarkerColor.GetFont(TextEditorProperties.FontContainer), color, x, y); - } - - int DrawEOLMarker(Graphics g, Color color, Brush backBrush, int x, int y) - { - HighlightColor eolMarkerColor = textArea.Document.HighlightingStrategy.GetColorFor("EOLMarkers"); - - int width = GetWidth('\u00B6', eolMarkerColor.GetFont(TextEditorProperties.FontContainer)); - g.FillRectangle(backBrush, - new RectangleF(x, y, width, fontHeight)); - - DrawString(g, "\u00B6", eolMarkerColor.GetFont(TextEditorProperties.FontContainer), color, x, y); - return width; - } - - void DrawVerticalRuler(Graphics g, Rectangle lineRectangle) - { - int xpos = WideSpaceWidth * TextEditorProperties.VerticalRulerRow - textArea.VirtualTop.X; - if (xpos <= 0) { - return; - } - HighlightColor vRulerColor = textArea.Document.HighlightingStrategy.GetColorFor("VRuler"); - - g.DrawLine(BrushRegistry.GetPen(vRulerColor.Color), - drawingPosition.Left + xpos, - lineRectangle.Top, - drawingPosition.Left + xpos, - lineRectangle.Bottom); - } - #endregion - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Gui/ToolTipRequestEventArgs.cs b/src/ICSharpCode.TextEditor/Src/Gui/ToolTipRequestEventArgs.cs deleted file mode 100644 index c34ec4c..0000000 --- a/src/ICSharpCode.TextEditor/Src/Gui/ToolTipRequestEventArgs.cs +++ /dev/null @@ -1,62 +0,0 @@ -// -// -// -// -// $Revision: 2659 $ -// - -using System; -using System.Drawing; - -namespace ICSharpCode.TextEditor -{ - public delegate void ToolTipRequestEventHandler(object sender, ToolTipRequestEventArgs e); - - public class ToolTipRequestEventArgs - { - Point mousePosition; - TextLocation logicalPosition; - bool inDocument; - - public Point MousePosition { - get { - return mousePosition; - } - } - - public TextLocation LogicalPosition { - get { - return logicalPosition; - } - } - - public bool InDocument { - get { - return inDocument; - } - } - - /// - /// Gets if some client handling the event has already shown a tool tip. - /// - public bool ToolTipShown { - get { - return toolTipText != null; - } - } - - internal string toolTipText; - - public void ShowToolTip(string text) - { - toolTipText = text; - } - - public ToolTipRequestEventArgs(Point mousePosition, TextLocation logicalPosition, bool inDocument) - { - this.mousePosition = mousePosition; - this.logicalPosition = logicalPosition; - this.inDocument = inDocument; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Undo/IUndoableOperation.cs b/src/ICSharpCode.TextEditor/Src/Undo/IUndoableOperation.cs deleted file mode 100644 index 1819717..0000000 --- a/src/ICSharpCode.TextEditor/Src/Undo/IUndoableOperation.cs +++ /dev/null @@ -1,26 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -namespace ICSharpCode.TextEditor.Undo -{ - /// - /// This Interface describes a the basic Undo/Redo operation - /// all Undo Operations must implement this interface. - /// - public interface IUndoableOperation - { - /// - /// Undo the last operation - /// - void Undo(); - - /// - /// Redo the last operation - /// - void Redo(); - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Undo/UndoQueue.cs b/src/ICSharpCode.TextEditor/Src/Undo/UndoQueue.cs deleted file mode 100644 index 3b4d24c..0000000 --- a/src/ICSharpCode.TextEditor/Src/Undo/UndoQueue.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -// -// -// -// $Revision: 2161 $ -// - -using System; -using System.Collections.Generic; -using System.Diagnostics; - -namespace ICSharpCode.TextEditor.Undo -{ - /// - /// This class stacks the last x operations from the undostack and makes - /// one undo/redo operation from it. - /// - internal sealed class UndoQueue : IUndoableOperation - { - List undolist = new List(); - - /// - /// - public UndoQueue(Stack stack, int numops) - { - if (stack == null) { - throw new ArgumentNullException("stack"); - } - - Debug.Assert(numops > 0 , "ICSharpCode.TextEditor.Undo.UndoQueue : numops should be > 0"); - if (numops > stack.Count) { - numops = stack.Count; - } - - for (int i = 0; i < numops; ++i) { - undolist.Add(stack.Pop()); - } - } - public void Undo() - { - for (int i = 0; i < undolist.Count; ++i) { - undolist[i].Undo(); - } - } - - public void Redo() - { - for (int i = undolist.Count - 1 ; i >= 0 ; --i) { - undolist[i].Redo(); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Undo/UndoStack.cs b/src/ICSharpCode.TextEditor/Src/Undo/UndoStack.cs deleted file mode 100644 index 712a20d..0000000 --- a/src/ICSharpCode.TextEditor/Src/Undo/UndoStack.cs +++ /dev/null @@ -1,216 +0,0 @@ -// -// -// -// -// $Revision: 2827 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Undo -{ - /// - /// This class implements an undo stack - /// - public class UndoStack - { - Stack undostack = new Stack(); - Stack redostack = new Stack(); - - public TextEditorControlBase TextEditorControl = null; - - /// - /// - public event EventHandler ActionUndone; - /// - /// - public event EventHandler ActionRedone; - - /// - /// Gets/Sets if changes to the document are protocolled by the undo stack. - /// Used internally to disable the undo stack temporarily while undoing an action. - /// - internal bool AcceptChanges = true; - - /// - /// Gets if there are actions on the undo stack. - /// - public bool CanUndo { - get { - return undostack.Count > 0; - } - } - - /// - /// Gets if there are actions on the redo stack. - /// - public bool CanRedo { - get { - return redostack.Count > 0; - } - } - - /// - /// Gets the number of actions on the undo stack. - /// - public int UndoItemCount { - get { - return undostack.Count; - } - } - - /// - /// Gets the number of actions on the redo stack. - /// - public int RedoItemCount { - get { - return redostack.Count; - } - } - - int undoGroupDepth; - int actionCountInUndoGroup; - - public void StartUndoGroup() - { - if (undoGroupDepth == 0) { - actionCountInUndoGroup = 0; - } - undoGroupDepth++; - //Util.LoggingService.Debug("Open undo group (new depth=" + undoGroupDepth + ")"); - } - - public void EndUndoGroup() - { - if (undoGroupDepth == 0) - throw new InvalidOperationException("There are no open undo groups"); - undoGroupDepth--; - //Util.LoggingService.Debug("Close undo group (new depth=" + undoGroupDepth + ")"); - if (undoGroupDepth == 0 && actionCountInUndoGroup > 1) { - undostack.Push(new UndoQueue(undostack, actionCountInUndoGroup)); - } - } - - public void AssertNoUndoGroupOpen() - { - if (undoGroupDepth != 0) { - undoGroupDepth = 0; - throw new InvalidOperationException("No undo group should be open at this point"); - } - } - - /// - /// Call this method to undo the last operation on the stack - /// - public void Undo() - { - AssertNoUndoGroupOpen(); - if (undostack.Count > 0) { - IUndoableOperation uedit = (IUndoableOperation)undostack.Pop(); - redostack.Push(uedit); - uedit.Undo(); - OnActionUndone(); - } - } - - /// - /// Call this method to redo the last undone operation - /// - public void Redo() - { - AssertNoUndoGroupOpen(); - if (redostack.Count > 0) { - IUndoableOperation uedit = (IUndoableOperation)redostack.Pop(); - undostack.Push(uedit); - uedit.Redo(); - OnActionRedone(); - } - } - - /// - /// Call this method to push an UndoableOperation on the undostack, the redostack - /// will be cleared, if you use this method. - /// - public void Push(IUndoableOperation operation) - { - if (operation == null) { - throw new ArgumentNullException("operation"); - } - - if (AcceptChanges) { - StartUndoGroup(); - undostack.Push(operation); - actionCountInUndoGroup++; - if (TextEditorControl != null) { - undostack.Push(new UndoableSetCaretPosition(this, TextEditorControl.ActiveTextAreaControl.Caret.Position)); - actionCountInUndoGroup++; - } - EndUndoGroup(); - ClearRedoStack(); - } - } - - /// - /// Call this method, if you want to clear the redo stack - /// - public void ClearRedoStack() - { - redostack.Clear(); - } - - /// - /// Clears both the undo and redo stack. - /// - public void ClearAll() - { - AssertNoUndoGroupOpen(); - undostack.Clear(); - redostack.Clear(); - actionCountInUndoGroup = 0; - } - - /// - /// - protected void OnActionUndone() - { - if (ActionUndone != null) { - ActionUndone(null, null); - } - } - - /// - /// - protected void OnActionRedone() - { - if (ActionRedone != null) { - ActionRedone(null, null); - } - } - - class UndoableSetCaretPosition : IUndoableOperation - { - UndoStack stack; - TextLocation pos; - TextLocation redoPos; - - public UndoableSetCaretPosition(UndoStack stack, TextLocation pos) - { - this.stack = stack; - this.pos = pos; - } - - public void Undo() - { - redoPos = stack.TextEditorControl.ActiveTextAreaControl.Caret.Position; - stack.TextEditorControl.ActiveTextAreaControl.Caret.Position = pos; - } - - public void Redo() - { - stack.TextEditorControl.ActiveTextAreaControl.Caret.Position = redoPos; - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Undo/UndoableDelete.cs b/src/ICSharpCode.TextEditor/Src/Undo/UndoableDelete.cs deleted file mode 100644 index 1867007..0000000 --- a/src/ICSharpCode.TextEditor/Src/Undo/UndoableDelete.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Diagnostics; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Undo -{ - /// - /// This class is for the undo of Document insert operations - /// - public class UndoableDelete : IUndoableOperation - { - IDocument document; -// int oldCaretPos; - int offset; - string text; - - /// - /// Creates a new instance of - /// - public UndoableDelete(IDocument document, int offset, string text) - { - if (document == null) { - throw new ArgumentNullException("document"); - } - if (offset < 0 || offset > document.TextLength) { - throw new ArgumentOutOfRangeException("offset"); - } - - Debug.Assert(text != null, "text can't be null"); -// oldCaretPos = document.Caret.Offset; - this.document = document; - this.offset = offset; - this.text = text; - } - - /// - /// Undo last operation - /// - public void Undo() - { - // we clear all selection direct, because the redraw - // is done per refresh at the end of the action -// textArea.SelectionManager.SelectionCollection.Clear(); - document.UndoStack.AcceptChanges = false; - document.Insert(offset, text); -// document.Caret.Offset = Math.Min(document.TextLength, Math.Max(0, oldCaretPos)); - document.UndoStack.AcceptChanges = true; - } - - /// - /// Redo last undone operation - /// - public void Redo() - { - // we clear all selection direct, because the redraw - // is done per refresh at the end of the action -// textArea.SelectionManager.SelectionCollection.Clear(); - - document.UndoStack.AcceptChanges = false; - document.Remove(offset, text.Length); -// document.Caret.Offset = Math.Min(document.TextLength, Math.Max(0, document.Caret.Offset)); - document.UndoStack.AcceptChanges = true; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Undo/UndoableInsert.cs b/src/ICSharpCode.TextEditor/Src/Undo/UndoableInsert.cs deleted file mode 100644 index a601f15..0000000 --- a/src/ICSharpCode.TextEditor/Src/Undo/UndoableInsert.cs +++ /dev/null @@ -1,73 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Diagnostics; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Undo -{ - /// - /// This class is for the undo of Document insert operations - /// - public class UndoableInsert : IUndoableOperation - { - IDocument document; -// int oldCaretPos; - int offset; - string text; - - /// - /// Creates a new instance of - /// - public UndoableInsert(IDocument document, int offset, string text) - { - if (document == null) { - throw new ArgumentNullException("document"); - } - if (offset < 0 || offset > document.TextLength) { - throw new ArgumentOutOfRangeException("offset"); - } - - Debug.Assert(text != null, "text can't be null"); -// oldCaretPos = document.Caret.Offset; - this.document = document; - this.offset = offset; - this.text = text; - } - - /// - /// Undo last operation - /// - public void Undo() - { - // we clear all selection direct, because the redraw - // is done per refresh at the end of the action -// document.SelectionCollection.Clear(); - - document.UndoStack.AcceptChanges = false; - document.Remove(offset, text.Length); -// document.Caret.Offset = Math.Min(document.TextLength, Math.Max(0, oldCaretPos)); - document.UndoStack.AcceptChanges = true; - } - - /// - /// Redo last undone operation - /// - public void Redo() - { - // we clear all selection direct, because the redraw - // is done per refresh at the end of the action -// document.SelectionCollection.Clear(); - - document.UndoStack.AcceptChanges = false; - document.Insert(offset, text); -// document.Caret.Offset = Math.Min(document.TextLength, Math.Max(0, document.Caret.Offset)); - document.UndoStack.AcceptChanges = true; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Undo/UndoableReplace.cs b/src/ICSharpCode.TextEditor/Src/Undo/UndoableReplace.cs deleted file mode 100644 index 615d8f9..0000000 --- a/src/ICSharpCode.TextEditor/Src/Undo/UndoableReplace.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Diagnostics; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Undo -{ - /// - /// This class is for the undo of Document insert operations - /// - public class UndoableReplace : IUndoableOperation - { - IDocument document; -// int oldCaretPos; - int offset; - string text; - string origText; - - /// - /// Creates a new instance of - /// - public UndoableReplace(IDocument document, int offset, string origText, string text) - { - if (document == null) { - throw new ArgumentNullException("document"); - } - if (offset < 0 || offset > document.TextLength) { - throw new ArgumentOutOfRangeException("offset"); - } - - Debug.Assert(text != null, "text can't be null"); -// oldCaretPos = document.Caret.Offset; - this.document = document; - this.offset = offset; - this.text = text; - this.origText = origText; - } - - /// - /// Undo last operation - /// - public void Undo() - { - // we clear all selection direct, because the redraw - // is done per refresh at the end of the action -// document.SelectionCollection.Clear(); - - document.UndoStack.AcceptChanges = false; - document.Replace(offset, text.Length, origText); -// document.Caret.Offset = Math.Min(document.TextLength, Math.Max(0, oldCaretPos)); - document.UndoStack.AcceptChanges = true; - } - - /// - /// Redo last undone operation - /// - public void Redo() - { - // we clear all selection direct, because the redraw - // is done per refresh at the end of the action -// document.SelectionCollection.Clear(); - - document.UndoStack.AcceptChanges = false; - document.Replace(offset, origText.Length, text); -// document.Caret.Offset = Math.Min(document.TextLength, Math.Max(0, document.Caret.Offset)); - document.UndoStack.AcceptChanges = true; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/AugmentableRedBlackTree.cs b/src/ICSharpCode.TextEditor/Src/Util/AugmentableRedBlackTree.cs deleted file mode 100644 index 22b9516..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/AugmentableRedBlackTree.cs +++ /dev/null @@ -1,590 +0,0 @@ -// -// -// -// -// $Revision: 2497 $ -// - -using System; -using System.Text; -using System.Diagnostics; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Util -{ - internal sealed class RedBlackTreeNode - { - internal RedBlackTreeNode left, right, parent; - internal T val; - internal bool color; - - internal RedBlackTreeNode(T val) - { - this.val = val; - } - - internal RedBlackTreeNode LeftMost { - get { - RedBlackTreeNode node = this; - while (node.left != null) - node = node.left; - return node; - } - } - - internal RedBlackTreeNode RightMost { - get { - RedBlackTreeNode node = this; - while (node.right != null) - node = node.right; - return node; - } - } - } - - internal interface IRedBlackTreeHost : IComparer - { - bool Equals(T a, T b); - - void UpdateAfterChildrenChange(RedBlackTreeNode node); - void UpdateAfterRotateLeft(RedBlackTreeNode node); - void UpdateAfterRotateRight(RedBlackTreeNode node); - } - - /// - /// Description of RedBlackTree. - /// - internal sealed class AugmentableRedBlackTree : ICollection where Host : IRedBlackTreeHost - { - readonly Host host; - int count; - internal RedBlackTreeNode root; - - public AugmentableRedBlackTree(Host host) - { - if (host == null) throw new ArgumentNullException("host"); - this.host = host; - } - - public int Count { - get { return count; } - } - - public void Clear() - { - root = null; - count = 0; - } - - #region Debugging code - #if DEBUG - /// - /// Check tree for consistency and being balanced. - /// - [Conditional("DATACONSISTENCYTEST")] - void CheckProperties() - { - int blackCount = -1; - CheckNodeProperties(root, null, RED, 0, ref blackCount); - - int nodeCount = 0; - foreach (T val in this) { - nodeCount++; - } - Debug.Assert(count == nodeCount); - } - - /* - 1. A node is either red or black. - 2. The root is black. - 3. All leaves are black. (The leaves are the NIL children.) - 4. Both children of every red node are black. (So every red node must have a black parent.) - 5. Every simple path from a node to a descendant leaf contains the same number of black nodes. (Not counting the leaf node.) - */ - void CheckNodeProperties(RedBlackTreeNode node, RedBlackTreeNode parentNode, bool parentColor, int blackCount, ref int expectedBlackCount) - { - if (node == null) return; - - Debug.Assert(node.parent == parentNode); - - if (parentColor == RED) { - Debug.Assert(node.color == BLACK); - } - if (node.color == BLACK) { - blackCount++; - } - if (node.left == null && node.right == null) { - // node is a leaf node: - if (expectedBlackCount == -1) - expectedBlackCount = blackCount; - else - Debug.Assert(expectedBlackCount == blackCount); - } - CheckNodeProperties(node.left, node, node.color, blackCount, ref expectedBlackCount); - CheckNodeProperties(node.right, node, node.color, blackCount, ref expectedBlackCount); - } - - public string GetTreeAsString() - { - StringBuilder b = new StringBuilder(); - AppendTreeToString(root, b, 0); - return b.ToString(); - } - - static void AppendTreeToString(RedBlackTreeNode node, StringBuilder b, int indent) - { - if (node.color == RED) - b.Append("RED "); - else - b.Append("BLACK "); - b.AppendLine(node.val.ToString()); - indent += 2; - if (node.left != null) { - b.Append(' ', indent); - b.Append("L: "); - AppendTreeToString(node.left, b, indent); - } - if (node.right != null) { - b.Append(' ', indent); - b.Append("R: "); - AppendTreeToString(node.right, b, indent); - } - } - #endif - #endregion - - #region Add - public void Add(T item) - { - AddInternal(new RedBlackTreeNode(item)); - #if DEBUG - CheckProperties(); - #endif - } - - void AddInternal(RedBlackTreeNode newNode) - { - Debug.Assert(newNode.color == BLACK); - if (root == null) { - count = 1; - root = newNode; - return; - } - // Insert into the tree - RedBlackTreeNode parentNode = root; - while (true) { - if (host.Compare(newNode.val, parentNode.val) <= 0) { - if (parentNode.left == null) { - InsertAsLeft(parentNode, newNode); - return; - } - parentNode = parentNode.left; - } else { - if (parentNode.right == null) { - InsertAsRight(parentNode, newNode); - return; - } - parentNode = parentNode.right; - } - } - } - - internal void InsertAsLeft(RedBlackTreeNode parentNode, RedBlackTreeNode newNode) - { - Debug.Assert(parentNode.left == null); - parentNode.left = newNode; - newNode.parent = parentNode; - newNode.color = RED; - host.UpdateAfterChildrenChange(parentNode); - FixTreeOnInsert(newNode); - count++; - } - - internal void InsertAsRight(RedBlackTreeNode parentNode, RedBlackTreeNode newNode) - { - Debug.Assert(parentNode.right == null); - parentNode.right = newNode; - newNode.parent = parentNode; - newNode.color = RED; - host.UpdateAfterChildrenChange(parentNode); - FixTreeOnInsert(newNode); - count++; - } - - void FixTreeOnInsert(RedBlackTreeNode node) - { - Debug.Assert(node != null); - Debug.Assert(node.color == RED); - Debug.Assert(node.left == null || node.left.color == BLACK); - Debug.Assert(node.right == null || node.right.color == BLACK); - - RedBlackTreeNode parentNode = node.parent; - if (parentNode == null) { - // we inserted in the root -> the node must be black - // since this is a root node, making the node black increments the number of black nodes - // on all paths by one, so it is still the same for all paths. - node.color = BLACK; - return; - } - if (parentNode.color == BLACK) { - // if the parent node where we inserted was black, our red node is placed correctly. - // since we inserted a red node, the number of black nodes on each path is unchanged - // -> the tree is still balanced - return; - } - // parentNode is red, so there is a conflict here! - - // because the root is black, parentNode is not the root -> there is a grandparent node - RedBlackTreeNode grandparentNode = parentNode.parent; - RedBlackTreeNode uncleNode = Sibling(parentNode); - if (uncleNode != null && uncleNode.color == RED) { - parentNode.color = BLACK; - uncleNode.color = BLACK; - grandparentNode.color = RED; - FixTreeOnInsert(grandparentNode); - return; - } - // now we know: parent is red but uncle is black - // First rotation: - if (node == parentNode.right && parentNode == grandparentNode.left) { - RotateLeft(parentNode); - node = node.left; - } else if (node == parentNode.left && parentNode == grandparentNode.right) { - RotateRight(parentNode); - node = node.right; - } - // because node might have changed, reassign variables: - parentNode = node.parent; - grandparentNode = parentNode.parent; - - // Now recolor a bit: - parentNode.color = BLACK; - grandparentNode.color = RED; - // Second rotation: - if (node == parentNode.left && parentNode == grandparentNode.left) { - RotateRight(grandparentNode); - } else { - // because of the first rotation, this is guaranteed: - Debug.Assert(node == parentNode.right && parentNode == grandparentNode.right); - RotateLeft(grandparentNode); - } - } - - void ReplaceNode(RedBlackTreeNode replacedNode, RedBlackTreeNode newNode) - { - if (replacedNode.parent == null) { - Debug.Assert(replacedNode == root); - root = newNode; - } else { - if (replacedNode.parent.left == replacedNode) - replacedNode.parent.left = newNode; - else - replacedNode.parent.right = newNode; - } - if (newNode != null) { - newNode.parent = replacedNode.parent; - } - replacedNode.parent = null; - } - - void RotateLeft(RedBlackTreeNode p) - { - // let q be p's right child - RedBlackTreeNode q = p.right; - Debug.Assert(q != null); - Debug.Assert(q.parent == p); - // set q to be the new root - ReplaceNode(p, q); - - // set p's right child to be q's left child - p.right = q.left; - if (p.right != null) p.right.parent = p; - // set q's left child to be p - q.left = p; - p.parent = q; - host.UpdateAfterRotateLeft(p); - } - - void RotateRight(RedBlackTreeNode p) - { - // let q be p's left child - RedBlackTreeNode q = p.left; - Debug.Assert(q != null); - Debug.Assert(q.parent == p); - // set q to be the new root - ReplaceNode(p, q); - - // set p's left child to be q's right child - p.left = q.right; - if (p.left != null) p.left.parent = p; - // set q's right child to be p - q.right = p; - p.parent = q; - host.UpdateAfterRotateRight(p); - } - - RedBlackTreeNode Sibling(RedBlackTreeNode node) - { - if (node == node.parent.left) - return node.parent.right; - else - return node.parent.left; - } - #endregion - - #region Remove - public void RemoveAt(RedBlackTreeIterator iterator) - { - RedBlackTreeNode node = iterator.node; - if (node == null) - throw new ArgumentException("Invalid iterator"); - while (node.parent != null) - node = node.parent; - if (node != root) - throw new ArgumentException("Iterator does not belong to this tree"); - RemoveNode(iterator.node); - #if DEBUG - CheckProperties(); - #endif - } - - internal void RemoveNode(RedBlackTreeNode removedNode) - { - if (removedNode.left != null && removedNode.right != null) { - // replace removedNode with it's in-order successor - - RedBlackTreeNode leftMost = removedNode.right.LeftMost; - RemoveNode(leftMost); // remove leftMost from its current location - - // and overwrite the removedNode with it - ReplaceNode(removedNode, leftMost); - leftMost.left = removedNode.left; - if (leftMost.left != null) leftMost.left.parent = leftMost; - leftMost.right = removedNode.right; - if (leftMost.right != null) leftMost.right.parent = leftMost; - leftMost.color = removedNode.color; - - host.UpdateAfterChildrenChange(leftMost); - if (leftMost.parent != null) host.UpdateAfterChildrenChange(leftMost.parent); - return; - } - - count--; - - // now either removedNode.left or removedNode.right is null - // get the remaining child - RedBlackTreeNode parentNode = removedNode.parent; - RedBlackTreeNode childNode = removedNode.left ?? removedNode.right; - ReplaceNode(removedNode, childNode); - if (parentNode != null) host.UpdateAfterChildrenChange(parentNode); - if (removedNode.color == BLACK) { - if (childNode != null && childNode.color == RED) { - childNode.color = BLACK; - } else { - FixTreeOnDelete(childNode, parentNode); - } - } - } - - static RedBlackTreeNode Sibling(RedBlackTreeNode node, RedBlackTreeNode parentNode) - { - Debug.Assert(node == null || node.parent == parentNode); - if (node == parentNode.left) - return parentNode.right; - else - return parentNode.left; - } - - const bool RED = true; - const bool BLACK = false; - - static bool GetColor(RedBlackTreeNode node) - { - return node != null ? node.color : BLACK; - } - - void FixTreeOnDelete(RedBlackTreeNode node, RedBlackTreeNode parentNode) - { - Debug.Assert(node == null || node.parent == parentNode); - if (parentNode == null) - return; - - // warning: node may be null - RedBlackTreeNode sibling = Sibling(node, parentNode); - if (sibling.color == RED) { - parentNode.color = RED; - sibling.color = BLACK; - if (node == parentNode.left) { - RotateLeft(parentNode); - } else { - RotateRight(parentNode); - } - - sibling = Sibling(node, parentNode); // update value of sibling after rotation - } - - if (parentNode.color == BLACK - && sibling.color == BLACK - && GetColor(sibling.left) == BLACK - && GetColor(sibling.right) == BLACK) - { - sibling.color = RED; - FixTreeOnDelete(parentNode, parentNode.parent); - return; - } - - if (parentNode.color == RED - && sibling.color == BLACK - && GetColor(sibling.left) == BLACK - && GetColor(sibling.right) == BLACK) - { - sibling.color = RED; - parentNode.color = BLACK; - return; - } - - if (node == parentNode.left && - sibling.color == BLACK && - GetColor(sibling.left) == RED && - GetColor(sibling.right) == BLACK) - { - sibling.color = RED; - sibling.left.color = BLACK; - RotateRight(sibling); - } - else if (node == parentNode.right && - sibling.color == BLACK && - GetColor(sibling.right) == RED && - GetColor(sibling.left) == BLACK) - { - sibling.color = RED; - sibling.right.color = BLACK; - RotateLeft(sibling); - } - sibling = Sibling(node, parentNode); // update value of sibling after rotation - - sibling.color = parentNode.color; - parentNode.color = BLACK; - if (node == parentNode.left) { - if (sibling.right != null) { - Debug.Assert(sibling.right.color == RED); - sibling.right.color = BLACK; - } - RotateLeft(parentNode); - } else { - if (sibling.left != null) { - Debug.Assert(sibling.left.color == RED); - sibling.left.color = BLACK; - } - RotateRight(parentNode); - } - } - #endregion - - #region Find/LowerBound/UpperBound/GetEnumerator - /// - /// Returns the iterator pointing to the specified item, or an iterator in End state if the item is not found. - /// - public RedBlackTreeIterator Find(T item) - { - RedBlackTreeIterator it = LowerBound(item); - while (it.IsValid && host.Compare(it.Current, item) == 0) { - if (host.Equals(it.Current, item)) - return it; - it.MoveNext(); - } - return default(RedBlackTreeIterator); - } - - /// - /// Returns the iterator pointing to the first item greater or equal to . - /// - public RedBlackTreeIterator LowerBound(T item) - { - RedBlackTreeNode node = root; - RedBlackTreeNode resultNode = null; - while (node != null) { - if (host.Compare(node.val, item) < 0) { - node = node.right; - } else { - resultNode = node; - node = node.left; - } - } - return new RedBlackTreeIterator(resultNode); - } - - /// - /// Returns the iterator pointing to the first item greater than . - /// - public RedBlackTreeIterator UpperBound(T item) - { - RedBlackTreeIterator it = LowerBound(item); - while (it.IsValid && host.Compare(it.Current, item) == 0) { - it.MoveNext(); - } - return it; - } - - /// - /// Gets a tree iterator that starts on the first node. - /// - public RedBlackTreeIterator Begin() - { - if (root == null) return default(RedBlackTreeIterator); - return new RedBlackTreeIterator(root.LeftMost); - } - - /// - /// Gets a tree iterator that starts one node before the first node. - /// - public RedBlackTreeIterator GetEnumerator() - { - if (root == null) return default(RedBlackTreeIterator); - RedBlackTreeNode dummyNode = new RedBlackTreeNode(default(T)); - dummyNode.right = root; - return new RedBlackTreeIterator(dummyNode); - } - #endregion - - #region ICollection members - public bool Contains(T item) - { - return Find(item).IsValid; - } - - public bool Remove(T item) - { - RedBlackTreeIterator it = Find(item); - if (!it.IsValid) { - return false; - } else { - RemoveAt(it); - return true; - } - } - - IEnumerator IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - - bool ICollection.IsReadOnly { - get { return false; } - } - - public void CopyTo(T[] array, int arrayIndex) - { - if (array == null) throw new ArgumentNullException("array"); - foreach (T val in this) { - array[arrayIndex++] = val; - } - } - #endregion - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/CheckedList.cs b/src/ICSharpCode.TextEditor/Src/Util/CheckedList.cs deleted file mode 100644 index 950f84e..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/CheckedList.cs +++ /dev/null @@ -1,148 +0,0 @@ -// -// -// -// -// $Revision: 3090 $ -// - -using System; -using System.Collections.Generic; -using System.Threading; - -namespace ICSharpCode.TextEditor.Util -{ - /// - /// A IList{T} that checks that it is only accessed on the thread that created it, and that - /// it is not modified while an enumerator is running. - /// - sealed class CheckedList : IList - { - readonly int threadID; - readonly IList baseList; - int enumeratorCount; - - public CheckedList() : this(new List()) {} - - public CheckedList(IList baseList) - { - if (baseList == null) - throw new ArgumentNullException("baseList"); - this.baseList = baseList; - this.threadID = Thread.CurrentThread.ManagedThreadId; - } - - void CheckRead() - { - if (Thread.CurrentThread.ManagedThreadId != threadID) - throw new InvalidOperationException("CheckList cannot be accessed from this thread!"); - } - - void CheckWrite() - { - if (Thread.CurrentThread.ManagedThreadId != threadID) - throw new InvalidOperationException("CheckList cannot be accessed from this thread!"); - if (enumeratorCount != 0) - throw new InvalidOperationException("CheckList cannot be written to while enumerators are active!"); - } - - public T this[int index] { - get { - CheckRead(); - return baseList[index]; - } - set { - CheckWrite(); - baseList[index] = value; - } - } - - public int Count { - get { - CheckRead(); - return baseList.Count; - } - } - - public bool IsReadOnly { - get { - CheckRead(); - return baseList.IsReadOnly; - } - } - - public int IndexOf(T item) - { - CheckRead(); - return baseList.IndexOf(item); - } - - public void Insert(int index, T item) - { - CheckWrite(); - baseList.Insert(index, item); - } - - public void RemoveAt(int index) - { - CheckWrite(); - baseList.RemoveAt(index); - } - - public void Add(T item) - { - CheckWrite(); - baseList.Add(item); - } - - public void Clear() - { - CheckWrite(); - baseList.Clear(); - } - - public bool Contains(T item) - { - CheckRead(); - return baseList.Contains(item); - } - - public void CopyTo(T[] array, int arrayIndex) - { - CheckRead(); - baseList.CopyTo(array, arrayIndex); - } - - public bool Remove(T item) - { - CheckWrite(); - return baseList.Remove(item); - } - - public IEnumerator GetEnumerator() - { - CheckRead(); - return Enumerate(); - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - CheckRead(); - return Enumerate(); - } - - IEnumerator Enumerate() - { - CheckRead(); - try { - enumeratorCount++; - foreach (T val in baseList) { - yield return val; - CheckRead(); - } - } finally { - enumeratorCount--; - CheckRead(); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/FileReader.cs b/src/ICSharpCode.TextEditor/Src/Util/FileReader.cs deleted file mode 100644 index a429666..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/FileReader.cs +++ /dev/null @@ -1,152 +0,0 @@ -// -// -// -// -// $Revision: 2682 $ -// - -using System; -using System.IO; -using System.Text; - -namespace ICSharpCode.TextEditor.Util -{ - /// - /// Class that can open text files with auto-detection of the encoding. - /// - public static class FileReader - { - public static bool IsUnicode(Encoding encoding) - { - int codepage = encoding.CodePage; - // return true if codepage is any UTF codepage - return codepage == 65001 || codepage == 65000 || codepage == 1200 || codepage == 1201; - } - - public static string ReadFileContent(Stream fs, ref Encoding encoding) - { - using (StreamReader reader = OpenStream(fs, encoding)) { - reader.Peek(); - encoding = reader.CurrentEncoding; - return reader.ReadToEnd(); - } - } - - public static string ReadFileContent(string fileName, Encoding encoding) - { - using (FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { - return ReadFileContent(fs, ref encoding); - } - } - - public static StreamReader OpenStream(Stream fs, Encoding defaultEncoding) - { - if (fs == null) - throw new ArgumentNullException("fs"); - - if (fs.Length >= 2) { - // the autodetection of StreamReader is not capable of detecting the difference - // between ISO-8859-1 and UTF-8 without BOM. - int firstByte = fs.ReadByte(); - int secondByte = fs.ReadByte(); - switch ((firstByte << 8) | secondByte) { - case 0x0000: // either UTF-32 Big Endian or a binary file; use StreamReader - case 0xfffe: // Unicode BOM (UTF-16 LE or UTF-32 LE) - case 0xfeff: // UTF-16 BE BOM - case 0xefbb: // start of UTF-8 BOM - // StreamReader autodetection works - fs.Position = 0; - return new StreamReader(fs); - default: - return AutoDetect(fs, (byte)firstByte, (byte)secondByte, defaultEncoding); - } - } else { - if (defaultEncoding != null) { - return new StreamReader(fs, defaultEncoding); - } else { - return new StreamReader(fs); - } - } - } - - static StreamReader AutoDetect(Stream fs, byte firstByte, byte secondByte, Encoding defaultEncoding) - { - int max = (int)Math.Min(fs.Length, 500000); // look at max. 500 KB - const int ASCII = 0; - const int Error = 1; - const int UTF8 = 2; - const int UTF8Sequence = 3; - int state = ASCII; - int sequenceLength = 0; - byte b; - for (int i = 0; i < max; i++) { - if (i == 0) { - b = firstByte; - } else if (i == 1) { - b = secondByte; - } else { - b = (byte)fs.ReadByte(); - } - if (b < 0x80) { - // normal ASCII character - if (state == UTF8Sequence) { - state = Error; - break; - } - } else if (b < 0xc0) { - // 10xxxxxx : continues UTF8 byte sequence - if (state == UTF8Sequence) { - --sequenceLength; - if (sequenceLength < 0) { - state = Error; - break; - } else if (sequenceLength == 0) { - state = UTF8; - } - } else { - state = Error; - break; - } - } else if (b >= 0xc2 && b < 0xf5) { - // beginning of byte sequence - if (state == UTF8 || state == ASCII) { - state = UTF8Sequence; - if (b < 0xe0) { - sequenceLength = 1; // one more byte following - } else if (b < 0xf0) { - sequenceLength = 2; // two more bytes following - } else { - sequenceLength = 3; // three more bytes following - } - } else { - state = Error; - break; - } - } else { - // 0xc0, 0xc1, 0xf5 to 0xff are invalid in UTF-8 (see RFC 3629) - state = Error; - break; - } - } - fs.Position = 0; - switch (state) { - case ASCII: - case Error: - // when the file seems to be ASCII or non-UTF8, - // we read it using the user-specified encoding so it is saved again - // using that encoding. - if (IsUnicode(defaultEncoding)) { - // the file is not Unicode, so don't read it using Unicode even if the - // user has choosen Unicode as the default encoding. - - // If we don't do this, SD will end up always adding a Byte Order Mark - // to ASCII files. - defaultEncoding = Encoding.Default; // use system encoding instead - } - return new StreamReader(fs, defaultEncoding); - default: - return new StreamReader(fs); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/LoggingService.cs b/src/ICSharpCode.TextEditor/Src/Util/LoggingService.cs deleted file mode 100644 index c7d6956..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/LoggingService.cs +++ /dev/null @@ -1,24 +0,0 @@ -// -// -// -// -// $Revision: 2719 $ -// - -using System; - -namespace ICSharpCode.TextEditor.Util -{ - /// - /// Central location for logging calls in the text editor. - /// - static class LoggingService - { - public static void Debug(string text) - { - #if DEBUG - Console.WriteLine(text); - #endif - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/LookupTable.cs b/src/ICSharpCode.TextEditor/Src/Util/LookupTable.cs deleted file mode 100644 index e86b11e..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/LookupTable.cs +++ /dev/null @@ -1,144 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Util -{ - /// - /// This class implements a keyword map. It implements a digital search trees (tries) to find - /// a word. - /// - public class LookupTable - { - Node root = new Node(null, null); - bool casesensitive; - int length; - - /// - /// The number of elements in the table - /// - public int Count { - get { - return length; - } - } - - /// - /// Get the object, which was inserted under the keyword (line, at offset, with length length), - /// returns null, if no such keyword was inserted. - /// - public object this[IDocument document, LineSegment line, int offset, int length] { - get { - if(length == 0) { - return null; - } - Node next = root; - - int wordOffset = line.Offset + offset; - if (casesensitive) { - for (int i = 0; i < length; ++i) { - int index = ((int)document.GetCharAt(wordOffset + i)) % 256; - next = next.leaf[index]; - - if (next == null) { - return null; - } - - if (next.color != null && TextUtility.RegionMatches(document, wordOffset, length, next.word)) { - return next.color; - } - } - } else { - for (int i = 0; i < length; ++i) { - int index = ((int)Char.ToUpper(document.GetCharAt(wordOffset + i))) % 256; - - next = next.leaf[index]; - - if (next == null) { - return null; - } - - if (next.color != null && TextUtility.RegionMatches(document, casesensitive, wordOffset, length, next.word)) { - return next.color; - } - } - } - return null; - } - } - - /// - /// Inserts an object in the tree, under keyword - /// - public object this[string keyword] { - set { - Node node = root; - Node next = root; - if (!casesensitive) { - keyword = keyword.ToUpper(); - } - ++length; - - // insert word into the tree - for (int i = 0; i < keyword.Length; ++i) { - int index = ((int)keyword[i]) % 256; // index of curchar - bool d = keyword[i] == '\\'; - - next = next.leaf[index]; // get node to this index - - if (next == null) { // no node created -> insert word here - node.leaf[index] = new Node(value, keyword); - break; - } - - if (next.word != null && next.word.Length != i) { // node there, take node content and insert them again - string tmpword = next.word; // this word will be inserted 1 level deeper (better, don't need too much - object tmpcolor = next.color; // string comparisons for finding.) - next.color = next.word = null; - this[tmpword] = tmpcolor; - } - - if (i == keyword.Length - 1) { // end of keyword reached, insert node there, if a node was here it was - next.word = keyword; // reinserted, if it has the same length (keyword EQUALS this word) it will be overwritten - next.color = value; - break; - } - - node = next; - } - } - } - - /// - /// Creates a new instance of - /// - public LookupTable(bool casesensitive) - { - this.casesensitive = casesensitive; - } - - class Node - { - public Node(object color, string word) - { - this.word = word; - this.color = color; - } - - public string word; - public object color; - - public Node[] leaf { - get { return _leaf ?? (_leaf = new Node[256]); } - } - private Node[] _leaf; - - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/MouseWheelHandler.cs b/src/ICSharpCode.TextEditor/Src/Util/MouseWheelHandler.cs deleted file mode 100644 index d5179cf..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/MouseWheelHandler.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// -// -// -// $Revision: 3064 $ -// - -using System; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Util -{ - /// - /// Accumulates mouse wheel deltas and reports the actual number of lines to scroll. - /// - class MouseWheelHandler - { - // CODE DUPLICATION: See ICSharpCode.SharpDevelop.Widgets.MouseWheelHandler - - const int WHEEL_DELTA = 120; - - int mouseWheelDelta; - - public int GetScrollAmount(MouseEventArgs e) - { - // accumulate the delta to support high-resolution mice - mouseWheelDelta += e.Delta; - - int linesPerClick = Math.Max(SystemInformation.MouseWheelScrollLines, 1); - - int scrollDistance = mouseWheelDelta * linesPerClick / WHEEL_DELTA; - mouseWheelDelta %= Math.Max(1, WHEEL_DELTA / linesPerClick); - return scrollDistance; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/RedBlackTreeIterator.cs b/src/ICSharpCode.TextEditor/Src/Util/RedBlackTreeIterator.cs deleted file mode 100644 index c44e7bb..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/RedBlackTreeIterator.cs +++ /dev/null @@ -1,85 +0,0 @@ -// -// -// -// -// $Revision: 2497 $ -// - -using System; -using System.Diagnostics; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Util -{ - internal struct RedBlackTreeIterator : IEnumerator - { - internal RedBlackTreeNode node; - - internal RedBlackTreeIterator(RedBlackTreeNode node) - { - this.node = node; - } - - public bool IsValid { - get { return node != null; } - } - - public T Current { - get { - if (node != null) - return node.val; - else - throw new InvalidOperationException(); - } - } - - object System.Collections.IEnumerator.Current { - get { - return this.Current; - } - } - - void IDisposable.Dispose() - { - } - - void System.Collections.IEnumerator.Reset() - { - throw new NotSupportedException(); - } - - public bool MoveNext() - { - if (node == null) - return false; - if (node.right != null) { - node = node.right.LeftMost; - } else { - RedBlackTreeNode oldNode; - do { - oldNode = node; - node = node.parent; - // we are on the way up from the right part, don't output node again - } while (node != null && node.right == oldNode); - } - return node != null; - } - - public bool MoveBack() - { - if (node == null) - return false; - if (node.left != null) { - node = node.left.RightMost; - } else { - RedBlackTreeNode oldNode; - do { - oldNode = node; - node = node.parent; - // we are on the way up from the left part, don't output node again - } while (node != null && node.left == oldNode); - } - return node != null; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/RtfWriter.cs b/src/ICSharpCode.TextEditor/Src/Util/RtfWriter.cs deleted file mode 100644 index 468bdef..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/RtfWriter.cs +++ /dev/null @@ -1,164 +0,0 @@ -// -// -// -// -// $Revision: 1965 $ -// - -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Text; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Util -{ - public class RtfWriter - { - static Dictionary colors; - static int colorNum; - static StringBuilder colorString; - - public static string GenerateRtf(TextArea textArea) - { - colors = new Dictionary(); - colorNum = 0; - colorString = new StringBuilder(); - - - StringBuilder rtf = new StringBuilder(); - - rtf.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1031"); - BuildFontTable(textArea.Document, rtf); - rtf.Append('\n'); - - string fileContent = BuildFileContent(textArea); - BuildColorTable(textArea.Document, rtf); - rtf.Append('\n'); - rtf.Append(@"\viewkind4\uc1\pard"); - rtf.Append(fileContent); - rtf.Append("}"); - return rtf.ToString(); - } - - static void BuildColorTable(IDocument doc, StringBuilder rtf) - { - rtf.Append(@"{\colortbl ;"); - rtf.Append(colorString.ToString()); - rtf.Append("}"); - } - - static void BuildFontTable(IDocument doc, StringBuilder rtf) - { - rtf.Append(@"{\fonttbl"); - rtf.Append(@"{\f0\fmodern\fprq1\fcharset0 " + doc.TextEditorProperties.Font.Name + ";}"); - rtf.Append("}"); - } - - static string BuildFileContent(TextArea textArea) - { - StringBuilder rtf = new StringBuilder(); - bool firstLine = true; - Color curColor = Color.Black; - bool oldItalic = false; - bool oldBold = false; - bool escapeSequence = false; - - foreach (ISelection selection in textArea.SelectionManager.SelectionCollection) { - int selectionOffset = textArea.Document.PositionToOffset(selection.StartPosition); - int selectionEndOffset = textArea.Document.PositionToOffset(selection.EndPosition); - for (int i = selection.StartPosition.Y; i <= selection.EndPosition.Y; ++i) { - LineSegment line = textArea.Document.GetLineSegment(i); - int offset = line.Offset; - if (line.Words == null) { - continue; - } - - foreach (TextWord word in line.Words) { - switch (word.Type) { - case TextWordType.Space: - if (selection.ContainsOffset(offset)) { - rtf.Append(' '); - } - ++offset; - break; - - case TextWordType.Tab: - if (selection.ContainsOffset(offset)) { - rtf.Append(@"\tab"); - } - ++offset; - escapeSequence = true; - break; - - case TextWordType.Word: - Color c = word.Color; - - if (offset + word.Word.Length > selectionOffset && offset < selectionEndOffset) { - string colorstr = c.R + ", " + c.G + ", " + c.B; - - if (!colors.ContainsKey(colorstr)) { - colors[colorstr] = ++colorNum; - colorString.Append(@"\red" + c.R + @"\green" + c.G + @"\blue" + c.B + ";"); - } - if (c != curColor || firstLine) { - rtf.Append(@"\cf" + colors[colorstr].ToString()); - curColor = c; - escapeSequence = true; - } - - if (oldItalic != word.Italic) { - if (word.Italic) { - rtf.Append(@"\i"); - } else { - rtf.Append(@"\i0"); - } - oldItalic = word.Italic; - escapeSequence = true; - } - - if (oldBold != word.Bold) { - if (word.Bold) { - rtf.Append(@"\b"); - } else { - rtf.Append(@"\b0"); - } - oldBold = word.Bold; - escapeSequence = true; - } - - if (firstLine) { - rtf.Append(@"\f0\fs" + (textArea.TextEditorProperties.Font.Size * 2)); - firstLine = false; - } - if (escapeSequence) { - rtf.Append(' '); - escapeSequence = false; - } - string printWord; - if (offset < selectionOffset) { - printWord = word.Word.Substring(selectionOffset - offset); - } else if (offset + word.Word.Length > selectionEndOffset) { - printWord = word.Word.Substring(0, (offset + word.Word.Length) - selectionEndOffset); - } else { - printWord = word.Word; - } - - rtf.Append(printWord.Replace(@"\", @"\\").Replace("{", "\\{").Replace("}", "\\}")); - } - offset += word.Length; - break; - } - } - if (offset < selectionEndOffset) { - rtf.Append(@"\par"); - } - rtf.Append('\n'); - } - } - - return rtf.ToString(); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/TextUtility.cs b/src/ICSharpCode.TextEditor/Src/Util/TextUtility.cs deleted file mode 100644 index 8f20d42..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/TextUtility.cs +++ /dev/null @@ -1,81 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; - -using ICSharpCode.TextEditor.Document; - -namespace ICSharpCode.TextEditor.Util -{ - public class TextUtility - { - - public static bool RegionMatches(IDocument document, int offset, int length, string word) - { - if (length != word.Length || document.TextLength < offset + length) { - return false; - } - - for (int i = 0; i < length; ++i) { - if (document.GetCharAt(offset + i) != word[i]) { - return false; - } - } - return true; - } - - public static bool RegionMatches(IDocument document, bool casesensitive, int offset, int length, string word) - { - if (casesensitive) { - return RegionMatches(document, offset, length, word); - } - - if (length != word.Length || document.TextLength < offset + length) { - return false; - } - - for (int i = 0; i < length; ++i) { - if (Char.ToUpper(document.GetCharAt(offset + i)) != Char.ToUpper(word[i])) { - return false; - } - } - return true; - } - - public static bool RegionMatches(IDocument document, int offset, int length, char[] word) - { - if (length != word.Length || document.TextLength < offset + length) { - return false; - } - - for (int i = 0; i < length; ++i) { - if (document.GetCharAt(offset + i) != word[i]) { - return false; - } - } - return true; - } - - public static bool RegionMatches(IDocument document, bool casesensitive, int offset, int length, char[] word) - { - if (casesensitive) { - return RegionMatches(document, offset, length, word); - } - - if (length != word.Length || document.TextLength < offset + length) { - return false; - } - - for (int i = 0; i < length; ++i) { - if (Char.ToUpper(document.GetCharAt(offset + i)) != Char.ToUpper(word[i])) { - return false; - } - } - return true; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/TipPainter.cs b/src/ICSharpCode.TextEditor/Src/Util/TipPainter.cs deleted file mode 100644 index bc7313b..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/TipPainter.cs +++ /dev/null @@ -1,124 +0,0 @@ -// -// -// -// -// $Revision: 2487 $ -// - -using System.Drawing; -using System.Drawing.Text; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Util -{ - static class TipPainter - { - const float HorizontalBorder = 2; - const float VerticalBorder = 1; - static RectangleF workingArea = RectangleF.Empty; - - //static StringFormat centerTipFormat = CreateTipStringFormat(); - - public static Size GetTipSize(Control control, Graphics graphics, Font font, string description) - { - return GetTipSize(control, graphics, new TipText (graphics, font, description)); - } - - public static Size GetTipSize(Control control, Graphics graphics, TipSection tipData) - { - Size tipSize = Size.Empty; - SizeF tipSizeF = SizeF.Empty; - - if (workingArea == RectangleF.Empty) { - Form ownerForm = control.FindForm(); - if (ownerForm.Owner != null) { - ownerForm = ownerForm.Owner; - } - - workingArea = Screen.GetWorkingArea(ownerForm); - } - - PointF screenLocation = control.PointToScreen(Point.Empty); - - SizeF maxLayoutSize = new SizeF(workingArea.Right - screenLocation.X - HorizontalBorder * 2, - workingArea.Bottom - screenLocation.Y - VerticalBorder * 2); - - if (maxLayoutSize.Width > 0 && maxLayoutSize.Height > 0) { - graphics.TextRenderingHint = - TextRenderingHint.AntiAliasGridFit; - - tipData.SetMaximumSize(maxLayoutSize); - tipSizeF = tipData.GetRequiredSize(); - tipData.SetAllocatedSize(tipSizeF); - - tipSizeF += new SizeF(HorizontalBorder * 2, - VerticalBorder * 2); - tipSize = Size.Ceiling(tipSizeF); - } - - if (control.ClientSize != tipSize) { - control.ClientSize = tipSize; - } - - return tipSize; - } - - public static Size DrawTip(Control control, Graphics graphics, Font font, string description) - { - return DrawTip(control, graphics, new TipText (graphics, font, description)); - } - - public static Size DrawTip(Control control, Graphics graphics, TipSection tipData) - { - Size tipSize = Size.Empty; - SizeF tipSizeF = SizeF.Empty; - - PointF screenLocation = control.PointToScreen(Point.Empty); - - if (workingArea == RectangleF.Empty) { - Form ownerForm = control.FindForm(); - if (ownerForm.Owner != null) { - ownerForm = ownerForm.Owner; - } - - workingArea = Screen.GetWorkingArea(ownerForm); - } - - SizeF maxLayoutSize = new SizeF(workingArea.Right - screenLocation.X - HorizontalBorder * 2, - workingArea.Bottom - screenLocation.Y - VerticalBorder * 2); - - if (maxLayoutSize.Width > 0 && maxLayoutSize.Height > 0) { - graphics.TextRenderingHint = - TextRenderingHint.AntiAliasGridFit; - - tipData.SetMaximumSize(maxLayoutSize); - tipSizeF = tipData.GetRequiredSize(); - tipData.SetAllocatedSize(tipSizeF); - - tipSizeF += new SizeF(HorizontalBorder * 2, - VerticalBorder * 2); - tipSize = Size.Ceiling(tipSizeF); - } - - if (control.ClientSize != tipSize) { - control.ClientSize = tipSize; - } - - if (tipSize != Size.Empty) { - Rectangle borderRectangle = new Rectangle - (Point.Empty, tipSize - new Size(1, 1)); - - RectangleF displayRectangle = new RectangleF - (HorizontalBorder, VerticalBorder, - tipSizeF.Width - HorizontalBorder * 2, - tipSizeF.Height - VerticalBorder * 2); - - // DrawRectangle draws from Left to Left + Width. A bug? :-/ - graphics.DrawRectangle(SystemPens.WindowFrame, - borderRectangle); - tipData.Draw(new PointF(HorizontalBorder, VerticalBorder)); - } - return tipSize; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/TipPainterTools.cs b/src/ICSharpCode.TextEditor/Src/Util/TipPainterTools.cs deleted file mode 100644 index ddb02fa..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/TipPainterTools.cs +++ /dev/null @@ -1,168 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; -using System.Drawing; -using System.Windows.Forms; - -namespace ICSharpCode.TextEditor.Util -{ - class TipPainterTools - { - const int SpacerSize = 4; - - private TipPainterTools() - { - - } - public static Size GetDrawingSizeHelpTipFromCombinedDescription(Control control, - Graphics graphics, - Font font, - string countMessage, - string description) - { - string basicDescription = null; - string documentation = null; - - if (IsVisibleText(description)) { - string[] splitDescription = description.Split(new char[] { '\n' }, 2); - - if (splitDescription.Length > 0) { - basicDescription = splitDescription[0]; - - if (splitDescription.Length > 1) { - documentation = splitDescription[1].Trim(); - } - } - } - - return GetDrawingSizeDrawHelpTip(control, graphics, font, countMessage, basicDescription, documentation); - } - - public static Size DrawHelpTipFromCombinedDescription(Control control, - Graphics graphics, - Font font, - string countMessage, - string description) - { - string basicDescription = null; - string documentation = null; - - if (IsVisibleText(description)) { - string[] splitDescription = description.Split - (new char[] { '\n' }, 2); - - if (splitDescription.Length > 0) { - basicDescription = splitDescription[0]; - - if (splitDescription.Length > 1) { - documentation = splitDescription[1].Trim(); - } - } - } - - return DrawHelpTip(control, graphics, font, countMessage, - basicDescription, documentation); - } - - // btw. I know it's ugly. - public static Rectangle DrawingRectangle1; - public static Rectangle DrawingRectangle2; - - public static Size GetDrawingSizeDrawHelpTip(Control control, - Graphics graphics, Font font, - string countMessage, - string basicDescription, - string documentation) - { - if (IsVisibleText(countMessage) || - IsVisibleText(basicDescription) || - IsVisibleText(documentation)) { - // Create all the TipSection objects. - CountTipText countMessageTip = new CountTipText(graphics, font, countMessage); - - TipSpacer countSpacer = new TipSpacer(graphics, new SizeF(IsVisibleText(countMessage) ? 4 : 0, 0)); - - TipText descriptionTip = new TipText(graphics, font, basicDescription); - - TipSpacer docSpacer = new TipSpacer(graphics, new SizeF(0, IsVisibleText(documentation) ? 4 : 0)); - - TipText docTip = new TipText(graphics, font, documentation); - - // Now put them together. - TipSplitter descSplitter = new TipSplitter(graphics, false, - descriptionTip, - docSpacer - ); - - TipSplitter mainSplitter = new TipSplitter(graphics, true, - countMessageTip, - countSpacer, - descSplitter); - - TipSplitter mainSplitter2 = new TipSplitter(graphics, false, - mainSplitter, - docTip); - - // Show it. - Size size = TipPainter.GetTipSize(control, graphics, mainSplitter2); - DrawingRectangle1 = countMessageTip.DrawingRectangle1; - DrawingRectangle2 = countMessageTip.DrawingRectangle2; - return size; - } - return Size.Empty; - } - public static Size DrawHelpTip(Control control, - Graphics graphics, Font font, - string countMessage, - string basicDescription, - string documentation) - { - if (IsVisibleText(countMessage) || - IsVisibleText(basicDescription) || - IsVisibleText(documentation)) { - // Create all the TipSection objects. - CountTipText countMessageTip = new CountTipText(graphics, font, countMessage); - - TipSpacer countSpacer = new TipSpacer(graphics, new SizeF(IsVisibleText(countMessage) ? 4 : 0, 0)); - - TipText descriptionTip = new TipText(graphics, font, basicDescription); - - TipSpacer docSpacer = new TipSpacer(graphics, new SizeF(0, IsVisibleText(documentation) ? 4 : 0)); - - TipText docTip = new TipText(graphics, font, documentation); - - // Now put them together. - TipSplitter descSplitter = new TipSplitter(graphics, false, - descriptionTip, - docSpacer - ); - - TipSplitter mainSplitter = new TipSplitter(graphics, true, - countMessageTip, - countSpacer, - descSplitter); - - TipSplitter mainSplitter2 = new TipSplitter(graphics, false, - mainSplitter, - docTip); - - // Show it. - Size size = TipPainter.DrawTip(control, graphics, mainSplitter2); - DrawingRectangle1 = countMessageTip.DrawingRectangle1; - DrawingRectangle2 = countMessageTip.DrawingRectangle2; - return size; - } - return Size.Empty; - } - - static bool IsVisibleText(string text) - { - return text != null && text.Length > 0; - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/TipSection.cs b/src/ICSharpCode.TextEditor/Src/Util/TipSection.cs deleted file mode 100644 index 8a66171..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/TipSection.cs +++ /dev/null @@ -1,84 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; -using System.Diagnostics; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Util -{ - abstract class TipSection - { - SizeF tipAllocatedSize; - Graphics tipGraphics; - SizeF tipMaxSize; - SizeF tipRequiredSize; - - protected TipSection(Graphics graphics) - { - tipGraphics = graphics; - } - - public abstract void Draw(PointF location); - - public SizeF GetRequiredSize() - { - return tipRequiredSize; - } - - public void SetAllocatedSize(SizeF allocatedSize) - { - Debug.Assert(allocatedSize.Width >= tipRequiredSize.Width && - allocatedSize.Height >= tipRequiredSize.Height); - - tipAllocatedSize = allocatedSize; OnAllocatedSizeChanged(); - } - - public void SetMaximumSize(SizeF maximumSize) - { - tipMaxSize = maximumSize; OnMaximumSizeChanged(); - } - - protected virtual void OnAllocatedSizeChanged() - { - - } - - protected virtual void OnMaximumSizeChanged() - { - - } - - protected void SetRequiredSize(SizeF requiredSize) - { - requiredSize.Width = Math.Max(0, requiredSize.Width); - requiredSize.Height = Math.Max(0, requiredSize.Height); - requiredSize.Width = Math.Min(tipMaxSize.Width, requiredSize.Width); - requiredSize.Height = Math.Min(tipMaxSize.Height, requiredSize.Height); - - tipRequiredSize = requiredSize; - } - - protected Graphics Graphics { - get { - return tipGraphics; - } - } - - protected SizeF AllocatedSize { - get { - return tipAllocatedSize; - } - } - - protected SizeF MaximumSize { - get { - return tipMaxSize; - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/TipSpacer.cs b/src/ICSharpCode.TextEditor/Src/Util/TipSpacer.cs deleted file mode 100644 index 3409e6d..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/TipSpacer.cs +++ /dev/null @@ -1,36 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Util -{ - class TipSpacer: TipSection - { - SizeF spacerSize; - - public TipSpacer(Graphics graphics, SizeF size): base(graphics) - { - spacerSize = size; - } - - public override void Draw(PointF location) - { - - } - - protected override void OnMaximumSizeChanged() - { - base.OnMaximumSizeChanged(); - - SetRequiredSize(new SizeF - (Math.Min(MaximumSize.Width, spacerSize.Width), - Math.Min(MaximumSize.Height, spacerSize.Height))); - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/TipSplitter.cs b/src/ICSharpCode.TextEditor/Src/Util/TipSplitter.cs deleted file mode 100644 index a45c164..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/TipSplitter.cs +++ /dev/null @@ -1,99 +0,0 @@ -// -// -// -// -// $Revision: 915 $ -// - -using System; -using System.Diagnostics; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Util -{ - class TipSplitter: TipSection - { - bool isHorizontal; - float [] offsets; - TipSection[] tipSections; - - public TipSplitter(Graphics graphics, bool horizontal, params TipSection[] sections): base(graphics) - { - Debug.Assert(sections != null); - - isHorizontal = horizontal; - offsets = new float[sections.Length]; - tipSections = (TipSection[])sections.Clone(); - } - - public override void Draw(PointF location) - { - if (isHorizontal) { - for (int i = 0; i < tipSections.Length; i ++) { - tipSections[i].Draw - (new PointF(location.X + offsets[i], location.Y)); - } - } else { - for (int i = 0; i < tipSections.Length; i ++) { - tipSections[i].Draw - (new PointF(location.X, location.Y + offsets[i])); - } - } - } - - protected override void OnMaximumSizeChanged() - { - base.OnMaximumSizeChanged(); - - float currentDim = 0; - float otherDim = 0; - SizeF availableArea = MaximumSize; - - for (int i = 0; i < tipSections.Length; i ++) { - TipSection section = (TipSection)tipSections[i]; - - section.SetMaximumSize(availableArea); - - SizeF requiredArea = section.GetRequiredSize(); - offsets[i] = currentDim; - - // It's best to start on pixel borders, so this will - // round up to the nearest pixel. Otherwise there are - // weird cutoff artifacts. - float pixelsUsed; - - if (isHorizontal) { - pixelsUsed = (float)Math.Ceiling(requiredArea.Width); - currentDim += pixelsUsed; - - availableArea.Width = Math.Max - (0, availableArea.Width - pixelsUsed); - - otherDim = Math.Max(otherDim, requiredArea.Height); - } else { - pixelsUsed = (float)Math.Ceiling(requiredArea.Height); - currentDim += pixelsUsed; - - availableArea.Height = Math.Max - (0, availableArea.Height - pixelsUsed); - - otherDim = Math.Max(otherDim, requiredArea.Width); - } - } - - foreach (TipSection section in tipSections) { - if (isHorizontal) { - section.SetAllocatedSize(new SizeF(section.GetRequiredSize().Width, otherDim)); - } else { - section.SetAllocatedSize(new SizeF(otherDim, section.GetRequiredSize().Height)); - } - } - - if (isHorizontal) { - SetRequiredSize(new SizeF(currentDim, otherDim)); - } else { - SetRequiredSize(new SizeF(otherDim, currentDim)); - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/TipText.cs b/src/ICSharpCode.TextEditor/Src/Util/TipText.cs deleted file mode 100644 index 6a579ad..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/TipText.cs +++ /dev/null @@ -1,183 +0,0 @@ -// -// -// -// -// $Revision: 2561 $ -// - -using System; -using System.Drawing; - -namespace ICSharpCode.TextEditor.Util -{ - class CountTipText: TipText - { - float triHeight = 10; - float triWidth = 10; - - public CountTipText(Graphics graphics, Font font, string text) : base(graphics, font, text) - { - } - - void DrawTriangle(float x, float y, bool flipped) - { - Brush brush = BrushRegistry.GetBrush(Color.FromArgb(192, 192, 192)); - base.Graphics.FillRectangle(brush, new RectangleF(x, y, triHeight, triHeight)); - float triHeight2 = triHeight / 2; - float triHeight4 = triHeight / 4; - brush = Brushes.Black; - if (flipped) { - base.Graphics.FillPolygon(brush, new PointF[] { - new PointF(x, y + triHeight2 - triHeight4), - new PointF(x + triWidth / 2, y + triHeight2 + triHeight4), - new PointF(x + triWidth, y + triHeight2 - triHeight4), - }); - - } else { - base.Graphics.FillPolygon(brush, new PointF[] { - new PointF(x, y + triHeight2 + triHeight4), - new PointF(x + triWidth / 2, y + triHeight2 - triHeight4), - new PointF(x + triWidth, y + triHeight2 + triHeight4), - }); - } - } - - public Rectangle DrawingRectangle1; - public Rectangle DrawingRectangle2; - - public override void Draw(PointF location) - { - if (tipText != null && tipText.Length > 0) { - base.Draw(new PointF(location.X + triWidth + 4, location.Y)); - DrawingRectangle1 = new Rectangle((int)location.X + 2, - (int)location.Y + 2, - (int)(triWidth), - (int)(triHeight)); - DrawingRectangle2 = new Rectangle((int)(location.X + base.AllocatedSize.Width - triWidth - 2), - (int)location.Y + 2, - (int)(triWidth), - (int)(triHeight)); - DrawTriangle(location.X + 2, location.Y + 2, false); - DrawTriangle(location.X + base.AllocatedSize.Width - triWidth - 2, location.Y + 2, true); - } - } - - protected override void OnMaximumSizeChanged() - { - if (IsTextVisible()) { - SizeF tipSize = Graphics.MeasureString - (tipText, tipFont, MaximumSize, - GetInternalStringFormat()); - tipSize.Width += triWidth * 2 + 8; - SetRequiredSize(tipSize); - } else { - SetRequiredSize(SizeF.Empty); - } - } - - } - - class TipText: TipSection - { - protected StringAlignment horzAlign; - protected StringAlignment vertAlign; - protected Color tipColor; - protected Font tipFont; - protected StringFormat tipFormat; - protected string tipText; - - public TipText(Graphics graphics, Font font, string text): - base(graphics) - { - tipFont = font; tipText = text; - if (text != null && text.Length > short.MaxValue) - throw new ArgumentException("TipText: text too long (max. is " + short.MaxValue + " characters)", "text"); - - Color = SystemColors.InfoText; - HorizontalAlignment = StringAlignment.Near; - VerticalAlignment = StringAlignment.Near; - } - - public override void Draw(PointF location) - { - if (IsTextVisible()) { - RectangleF drawRectangle = new RectangleF(location, AllocatedSize); - - Graphics.DrawString(tipText, tipFont, - BrushRegistry.GetBrush(Color), - drawRectangle, - GetInternalStringFormat()); - } - } - - protected StringFormat GetInternalStringFormat() - { - if (tipFormat == null) { - tipFormat = CreateTipStringFormat(horzAlign, vertAlign); - } - - return tipFormat; - } - - protected override void OnMaximumSizeChanged() - { - base.OnMaximumSizeChanged(); - - if (IsTextVisible()) { - SizeF tipSize = Graphics.MeasureString - (tipText, tipFont, MaximumSize, - GetInternalStringFormat()); - - SetRequiredSize(tipSize); - } else { - SetRequiredSize(SizeF.Empty); - } - } - - static StringFormat CreateTipStringFormat(StringAlignment horizontalAlignment, StringAlignment verticalAlignment) - { - StringFormat format = (StringFormat)StringFormat.GenericTypographic.Clone(); - format.FormatFlags = StringFormatFlags.FitBlackBox | StringFormatFlags.MeasureTrailingSpaces; - // note: Align Near, Line Center seemed to do something before - - format.Alignment = horizontalAlignment; - format.LineAlignment = verticalAlignment; - - return format; - } - - protected bool IsTextVisible() - { - return tipText != null && tipText.Length > 0; - } - - public Color Color { - get { - return tipColor; - } - set { - tipColor = value; - } - } - - public StringAlignment HorizontalAlignment { - get { - return horzAlign; - } - set { - horzAlign = value; - tipFormat = null; - } - } - - public StringAlignment VerticalAlignment { - get { - return vertAlign; - } - set { - vertAlign = value; - tipFormat = null; - } - } - } -} diff --git a/src/ICSharpCode.TextEditor/Src/Util/WeakCollection.cs b/src/ICSharpCode.TextEditor/Src/Util/WeakCollection.cs deleted file mode 100644 index 96efbe1..0000000 --- a/src/ICSharpCode.TextEditor/Src/Util/WeakCollection.cs +++ /dev/null @@ -1,136 +0,0 @@ -// -// -// -// -// $Revision: 2683 $ -// - -using System; -using System.Collections.Generic; - -namespace ICSharpCode.TextEditor.Util -{ - /// - /// A collection that does not allows its elements to be garbage-collected (unless there are other - /// references to the elements). Elements will disappear from the collection when they are - /// garbage-collected. - /// - /// The WeakCollection is not thread-safe, not even for read-only access! - /// No methods may be called on the WeakCollection while it is enumerated, not even a Contains or - /// creating a second enumerator. - /// The WeakCollection does not preserve any order among its contents; the ordering may be different each - /// time the collection is enumerated. - /// - /// Since items may disappear at any time when they are garbage collected, this class - /// cannot provide a useful implementation for Count and thus cannot implement the ICollection interface. - /// - public class WeakCollection : IEnumerable where T : class - { - readonly List innerList = new List(); - - /// - /// Adds an element to the collection. Runtime: O(n). - /// - public void Add(T item) - { - if (item == null) - throw new ArgumentNullException("item"); - CheckNoEnumerator(); - if (innerList.Count == innerList.Capacity || (innerList.Count % 32) == 31) - innerList.RemoveAll(delegate(WeakReference r) { return !r.IsAlive; }); - innerList.Add(new WeakReference(item)); - } - - /// - /// Removes all elements from the collection. Runtime: O(n). - /// - public void Clear() - { - innerList.Clear(); - CheckNoEnumerator(); - } - - /// - /// Checks if the collection contains an item. Runtime: O(n). - /// - public bool Contains(T item) - { - if (item == null) - throw new ArgumentNullException("item"); - CheckNoEnumerator(); - foreach (T element in this) { - if (item.Equals(element)) - return true; - } - return false; - } - - /// - /// Removes an element from the collection. Returns true if the item is found and removed, - /// false when the item is not found. - /// Runtime: O(n). - /// - public bool Remove(T item) - { - if (item == null) - throw new ArgumentNullException("item"); - CheckNoEnumerator(); - for (int i = 0; i < innerList.Count;) { - T element = (T)innerList[i].Target; - if (element == null) { - RemoveAt(i); - } else if (element == item) { - RemoveAt(i); - return true; - } else { - i++; - } - } - return false; - } - - void RemoveAt(int i) - { - int lastIndex = innerList.Count - 1; - innerList[i] = innerList[lastIndex]; - innerList.RemoveAt(lastIndex); - } - - bool hasEnumerator; - - void CheckNoEnumerator() - { - if (hasEnumerator) - throw new InvalidOperationException("The WeakCollection is already being enumerated, it cannot be modified at the same time. Ensure you dispose the first enumerator before modifying the WeakCollection."); - } - - /// - /// Enumerates the collection. - /// Each MoveNext() call on the enumerator is O(1), thus the enumeration is O(n). - /// - public IEnumerator GetEnumerator() - { - if (hasEnumerator) - throw new InvalidOperationException("The WeakCollection is already being enumerated, it cannot be enumerated twice at the same time. Ensure you dispose the first enumerator before using another enumerator."); - try { - hasEnumerator = true; - for (int i = 0; i < innerList.Count;) { - T element = (T)innerList[i].Target; - if (element == null) { - RemoveAt(i); - } else { - yield return element; - i++; - } - } - } finally { - hasEnumerator = false; - } - } - - System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() - { - return GetEnumerator(); - } - } -} diff --git a/src/Log2Console/Log2Console.csproj b/src/Log2Console/Log2Console.csproj index 22babe0..d53bdc0 100644 --- a/src/Log2Console/Log2Console.csproj +++ b/src/Log2Console/Log2Console.csproj @@ -79,12 +79,21 @@ ..\packages\ICSharpCode.TextEditor.3.2.1.6466\lib\Net20\ICSharpCode.TextEditor.dll - True False ..\External\log4net.dll + + ..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll + + + ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll + + + ..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll + + @@ -129,17 +138,6 @@ - - - - - - - - - - - Designer AboutForm.cs @@ -270,9 +268,7 @@ - - - + {8B833B00-BB4C-4FAF-B6C4-BF77824F96A1} diff --git a/src/Log2Console/MainForm.cs b/src/Log2Console/MainForm.cs index 35945f9..1a509da 100644 --- a/src/Log2Console/MainForm.cs +++ b/src/Log2Console/MainForm.cs @@ -44,9 +44,9 @@ public partial class MainForm : Form, ILogMessageNotifiable private Timer _taskbarProgressTimer; private const int _taskbarProgressTimerPeriod = 2000; private bool _addedLogMessage; - private readonly ThumbnailToolbarButton _pauseWinbarBtn; - private readonly ThumbnailToolbarButton _autoScrollWinbarBtn; - private readonly ThumbnailToolbarButton _clearAllWinbarBtn; + private readonly ThumbnailToolBarButton _pauseWinbarBtn; + private readonly ThumbnailToolBarButton _autoScrollWinbarBtn; + private readonly ThumbnailToolBarButton _clearAllWinbarBtn; private readonly Queue _eventQueue; private Timer _logMsgTimer; @@ -110,25 +110,26 @@ public MainForm() try { // Taskbar Progress - TaskbarManager.Instance.ApplicationId = Text; + // This line is needed for pinning current window to TaskbarManager + TaskbarManager.Instance.SetOverlayIcon(null, null); _taskbarProgressTimer = new Timer(OnTaskbarProgressTimer, null, _taskbarProgressTimerPeriod, _taskbarProgressTimerPeriod); // Pause Btn - _pauseWinbarBtn = new ThumbnailToolbarButton(Icon.FromHandle(((Bitmap)pauseBtn.Image).GetHicon()), pauseBtn.ToolTipText); + _pauseWinbarBtn = new ThumbnailToolBarButton(Icon.FromHandle(((Bitmap)pauseBtn.Image).GetHicon()), pauseBtn.ToolTipText); _pauseWinbarBtn.Click += pauseBtn_Click; // Auto Scroll Btn _autoScrollWinbarBtn = - new ThumbnailToolbarButton(Icon.FromHandle(((Bitmap)autoLogToggleBtn.Image).GetHicon()), autoLogToggleBtn.ToolTipText); + new ThumbnailToolBarButton(Icon.FromHandle(((Bitmap)autoLogToggleBtn.Image).GetHicon()), autoLogToggleBtn.ToolTipText); _autoScrollWinbarBtn.Click += autoLogToggleBtn_Click; // Clear All Btn _clearAllWinbarBtn = - new ThumbnailToolbarButton(Icon.FromHandle(((Bitmap)clearLoggersBtn.Image).GetHicon()), clearLoggersBtn.ToolTipText); + new ThumbnailToolBarButton(Icon.FromHandle(((Bitmap)clearLoggersBtn.Image).GetHicon()), clearLoggersBtn.ToolTipText); _clearAllWinbarBtn.Click += clearAll_Click; // Add Btns - TaskbarManager.Instance.ThumbnailToolbars.AddButtons(Handle, _pauseWinbarBtn, _autoScrollWinbarBtn, _clearAllWinbarBtn); + TaskbarManager.Instance.ThumbnailToolBars.AddButtons(Handle, _pauseWinbarBtn, _autoScrollWinbarBtn, _clearAllWinbarBtn); } catch (Exception) { @@ -154,7 +155,7 @@ public MainForm() private const int SIZE_MINIMIZED = 1; /// /// Catch on minimize event - /// @author : Asbjrn Ulsberg -=|=- asbjornu@hotmail.com + /// @author : Asbjшrn Ulsberg -=|=- asbjornu@hotmail.com /// /// protected override void WndProc(ref Message msg) @@ -664,6 +665,7 @@ private void OnTaskbarProgressTimer(object o) { if (_isWin7orLater) { + Process.GetCurrentProcess().Refresh(); TaskbarManager.Instance.SetProgressState(_addedLogMessage ? TaskbarProgressBarState.Indeterminate : TaskbarProgressBarState.NoProgress); diff --git a/src/Log2Console/Win32ApiCodePack/CommonDllNames.cs b/src/Log2Console/Win32ApiCodePack/CommonDllNames.cs deleted file mode 100644 index b92dee1..0000000 --- a/src/Log2Console/Win32ApiCodePack/CommonDllNames.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Microsoft.WindowsAPICodePack.Internal -{ - /// - /// CallSiteClass to hold string references to common interop DLLs. - /// - internal static class CommonDllNames - { - /// - /// User32.dll - /// - public const string User32 = "user32.dll"; - /// - /// Shell32.dll - /// - public const string Shell32 = "shell32.dll"; - } -} diff --git a/src/Log2Console/Win32ApiCodePack/Core.cs b/src/Log2Console/Win32ApiCodePack/Core.cs deleted file mode 100644 index 1f26a78..0000000 --- a/src/Log2Console/Win32ApiCodePack/Core.cs +++ /dev/null @@ -1,260 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Internal -{ - internal enum STPFLAG - { - STPF_NONE = 0x0, - STPF_USEAPPTHUMBNAILALWAYS = 0x1, - STPF_USEAPPTHUMBNAILWHENACTIVE = 0x2, - STPF_USEAPPPEEKALWAYS = 0x4, - STPF_USEAPPPEEKWHENACTIVE = 0x8 - } - - internal enum TBPFLAG - { - TBPF_NOPROGRESS = 0, - TBPF_INDETERMINATE = 0x1, - TBPF_NORMAL = 0x2, - TBPF_ERROR = 0x4, - TBPF_PAUSED = 0x8 - } - - internal enum THBMASK - { - THB_BITMAP = 0x1, - THB_ICON = 0x2, - THB_TOOLTIP = 0x4, - THB_FLAGS = 0x8 - } - - [Flags] - internal enum THBFLAGS - { - THBF_ENABLED = 0x00000000, - THBF_DISABLED = 0x00000001, - THBF_DISMISSONCLICK = 0x00000002, - THBF_NOBACKGROUND = 0x00000004, - THBF_HIDDEN = 0x00000008, - THBF_NONINTERACTIVE = 0x00000010 - } - - [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] - internal struct THUMBBUTTON - { - /// - /// WPARAM value for a THUMBBUTTON being clicked. - /// - internal const int THBN_CLICKED = 0x1800; - - [MarshalAs(UnmanagedType.U4)] - internal THBMASK dwMask; - internal uint iId; - internal uint iBitmap; - internal IntPtr hIcon; - [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 260)] - internal string szTip; - [MarshalAs(UnmanagedType.U4)] - internal THBFLAGS dwFlags; - } - - /// - /// HRESULT Wrapper - /// This is intended for Library Internal use only. - /// - public enum HRESULT : uint - { - /// - /// S_FALSE - /// - S_FALSE = 0x0001, - - /// - /// S_OK - /// - S_OK = 0x0000, - - /// - /// E_INVALIDARG - /// - E_INVALIDARG = 0x80070057, - - /// - /// E_OUTOFMEMORY - /// - E_OUTOFMEMORY = 0x8007000E, - - /// - /// E_NOINTERFACE - /// - E_NOINTERFACE = 0x80004002, - - /// - /// E_FAIL - /// - E_FAIL = 0x80004005, - - /// - /// E_ELEMENTNOTFOUND - /// - E_ELEMENTNOTFOUND = 0x80070490, - - /// - /// TYPE_E_ELEMENTNOTFOUND - /// - TYPE_E_ELEMENTNOTFOUND = 0x8002802B, - - /// - /// NO_OBJECT - /// - NO_OBJECT = 0x800401E5, - - /// - /// Win32 Error code: ERROR_CANCELLED - /// - ERROR_CANCELLED = 1223, - - /// - /// ERROR_CANCELLED - /// - E_ERROR_CANCELLED = 0x800704C7, - - /// - /// The requested resource is in use - /// - RESOURCE_IN_USE = 0x800700AA, - } - - [ComImport] - [Guid("c43dc798-95d1-4bea-9030-bb99e2983a1a")] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - internal interface ITaskbarList4 - { - // ITaskbarList - [PreserveSig] - void HrInit(); - - [PreserveSig] - void AddTab(IntPtr hwnd); - - [PreserveSig] - void DeleteTab(IntPtr hwnd); - - [PreserveSig] - void ActivateTab(IntPtr hwnd); - - [PreserveSig] - void SetActiveAlt(IntPtr hwnd); - - // ITaskbarList2 - [PreserveSig] - void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); - - // ITaskbarList3 - [PreserveSig] - void SetProgressValue(IntPtr hwnd, UInt64 ullCompleted, UInt64 ullTotal); - - [PreserveSig] - void SetProgressState(IntPtr hwnd, TBPFLAG tbpFlags); - - [PreserveSig] - void RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); - - [PreserveSig] - void UnregisterTab(IntPtr hwndTab); - - [PreserveSig] - void SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); - - [PreserveSig] - void SetTabActive(IntPtr hwndTab, IntPtr hwndInsertBefore, uint dwReserved); - - [PreserveSig] - HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray)] THUMBBUTTON[] pButtons); - - [PreserveSig] - HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray)] THUMBBUTTON[] pButtons); - - [PreserveSig] - void ThumbBarSetImageList(IntPtr hwnd, IntPtr himl); - - [PreserveSig] - void SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); - - [PreserveSig] - void SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); - - [PreserveSig] - void SetThumbnailClip(IntPtr hwnd, IntPtr prcClip); - - // ITaskbarList4 - void SetTabProperties(IntPtr hwndTab, STPFLAG stpFlags); - } - - [Guid("56FDF344-FD6D-11d0-958A-006097C9A090")] - [ClassInterface(ClassInterfaceType.None)] - [ComImport] - internal class CTaskbarList { } - - internal static class CoreErrorHelper - { - /// - /// This is intended for Library Internal use only. - /// - /// The error code. - /// True if the error code indicates success. - public static bool Succeeded(int hresult) - { - return (hresult >= 0); - } - } - - internal class CoreHelpers - { - /// - /// Determines if the application is running on Windows Vista or later 7 - /// - public static bool RunningOnVistaOrLater - { - get - { - return Environment.OSVersion.Version.Major >= 6; - } - } - - /// - /// Determines if the application is running on Windows 7 - /// - public static bool RunningOnWin7 - { - get - { - return (Environment.OSVersion.Version.Major > 6) || - (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor >= 1); - } - } - - /// - /// Throws PlatformNotSupportedException if the application is not running on Windows 7 - /// - public static void ThrowIfNotWin7() - { - if (!RunningOnWin7) - throw new PlatformNotSupportedException("Only supported on Windows 7 or newer."); - } - } - - internal static class CoreNativeMethods - { - public static int LOWORD(long dword) - { - return (short)(dword & 0xFFFF); - } - - public static int HIWORD(long dword, int size) - { - return (short)(dword >> size); - } - } -} diff --git a/src/Log2Console/Win32ApiCodePack/TabbedThumbnailNativeMethods.cs b/src/Log2Console/Win32ApiCodePack/TabbedThumbnailNativeMethods.cs deleted file mode 100644 index 13463b0..0000000 --- a/src/Log2Console/Win32ApiCodePack/TabbedThumbnailNativeMethods.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace Microsoft.WindowsAPICodePack.Internal -{ - internal static class TabbedThumbnailNativeMethods - { - internal const uint WM_DESTROY = 0x2; - internal const uint WM_NCDESTROY = 0x0082; - internal const uint WM_SYSCOMMAND = 0x112; - internal const int SC_CLOSE = 0xF060; - } -} diff --git a/src/Log2Console/Win32ApiCodePack/TaskbarManager.cs b/src/Log2Console/Win32ApiCodePack/TaskbarManager.cs deleted file mode 100644 index 705b9fa..0000000 --- a/src/Log2Console/Win32ApiCodePack/TaskbarManager.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Diagnostics; -using System.Drawing; -using Microsoft.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - public sealed class TaskbarManager - { - static readonly object Lock = new object(); - static volatile TaskbarManager _instance; - - TaskbarManager() { } - - /// - /// Indicates whether this feature is supported on the current platform. - /// - public static bool IsPlatformSupported - { - get { return CoreHelpers.RunningOnWin7; } - } - - ThumbnailToolbarManager _thumbnailToolbarManager; - /// - /// Gets the Thumbnail toolbar manager class for adding/updating - /// toolbar buttons. - /// - public ThumbnailToolbarManager ThumbnailToolbars - { - get - { - CoreHelpers.ThrowIfNotWin7(); - - return _thumbnailToolbarManager ?? (_thumbnailToolbarManager = new ThumbnailToolbarManager()); - } - } - - /// - /// Represents an instance of the Windows Taskbar - /// - public static TaskbarManager Instance - { - get - { - CoreHelpers.ThrowIfNotWin7(); - - if (_instance == null) - lock (Lock) - { - if (_instance == null) - _instance = new TaskbarManager(); - } - - return _instance; - } - } - - /// - /// Gets or sets the application user model id. Use this to explicitly - /// set the application id when generating custom jump lists - /// - public string ApplicationId - { - get - { - CoreHelpers.ThrowIfNotWin7(); - - return GetCurrentProcessAppId(); - } - set - { - CoreHelpers.ThrowIfNotWin7(); - - if (string.IsNullOrEmpty(value)) - throw new ArgumentNullException("value", "Application Id cannot be an empty or null string."); - - SetCurrentProcessAppId(value); - } - } - - static void SetCurrentProcessAppId(string value) - { - TaskbarNativeMethods.SetCurrentProcessExplicitAppUserModelID(value); - } - - static string GetCurrentProcessAppId() - { - string appId; - TaskbarNativeMethods.GetCurrentProcessExplicitAppUserModelID(out appId); - return appId; - } - - IntPtr _ownerHandle; - /// - /// Sets the handle of the window whose taskbar button will be used - /// to display progress. - /// - IntPtr OwnerHandle - { - get - { - if (_ownerHandle == IntPtr.Zero) - { - var currentProcess = Process.GetCurrentProcess(); - - if (currentProcess.MainWindowHandle != IntPtr.Zero) - _ownerHandle = currentProcess.MainWindowHandle; - } - - return _ownerHandle; - } - } - - // Internal implemenation of ITaskbarList4 interface - ITaskbarList4 _taskbarList; - internal ITaskbarList4 TaskbarList - { - get - { - if (_taskbarList == null) - lock (Lock) - { - if (_taskbarList == null) - { - _taskbarList = (ITaskbarList4)new CTaskbarList(); - _taskbarList.HrInit(); - } - } - - return _taskbarList; - } - } - - - public void SetProgressState(TaskbarProgressBarState state) - { - CoreHelpers.ThrowIfNotWin7(); - - if (OwnerHandle != IntPtr.Zero) - TaskbarList.SetProgressState(OwnerHandle, (TBPFLAG)state); - } - - public void SetOverlayIcon(Icon icon, string accessibilityText) - { - CoreHelpers.ThrowIfNotWin7(); - - if (OwnerHandle != IntPtr.Zero) - TaskbarList.SetOverlayIcon(OwnerHandle, icon != null ? icon.Handle : IntPtr.Zero, accessibilityText); - } - } -} diff --git a/src/Log2Console/Win32ApiCodePack/TaskbarNativeMethods.cs b/src/Log2Console/Win32ApiCodePack/TaskbarNativeMethods.cs deleted file mode 100644 index c89340a..0000000 --- a/src/Log2Console/Win32ApiCodePack/TaskbarNativeMethods.cs +++ /dev/null @@ -1,20 +0,0 @@ -using System.Runtime.InteropServices; - -namespace Microsoft.WindowsAPICodePack.Internal -{ - internal static class TaskbarNativeMethods - { - internal const int WM_COMMAND = 0x0111; - - [DllImport(CommonDllNames.Shell32)] - internal static extern void GetCurrentProcessExplicitAppUserModelID([Out, MarshalAs(UnmanagedType.LPWStr)] out string AppID); - - [DllImport(CommonDllNames.Shell32)] - internal static extern void SetCurrentProcessExplicitAppUserModelID([MarshalAs(UnmanagedType.LPWStr)] string AppID); - - [DllImport(CommonDllNames.User32, EntryPoint = "RegisterWindowMessage", SetLastError = true, CharSet = CharSet.Unicode)] - internal static extern uint RegisterWindowMessage([MarshalAs(UnmanagedType.LPWStr)] string lpString); - - internal static readonly uint WM_TASKBARBUTTONCREATED = RegisterWindowMessage("TaskbarButtonCreated"); - } -} diff --git a/src/Log2Console/Win32ApiCodePack/TaskbarProgressBarState.cs b/src/Log2Console/Win32ApiCodePack/TaskbarProgressBarState.cs deleted file mode 100644 index 8ae988a..0000000 --- a/src/Log2Console/Win32ApiCodePack/TaskbarProgressBarState.cs +++ /dev/null @@ -1,33 +0,0 @@ -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - /// - /// Represents the thumbnail progress bar state. - /// - public enum TaskbarProgressBarState - { - /// - /// No progress is displayed. - /// - NoProgress = 0, - - /// - /// The progress is indeterminate (marquee). - /// - Indeterminate = 0x1, - - /// - /// Normal progress is displayed. - /// - Normal = 0x2, - - /// - /// An error occurred (red). - /// - Error = 0x4, - - /// - /// The operation is paused (yellow). - /// - Paused = 0x8 - } -} diff --git a/src/Log2Console/Win32ApiCodePack/TaskbarWindow.cs b/src/Log2Console/Win32ApiCodePack/TaskbarWindow.cs deleted file mode 100644 index 0503aa5..0000000 --- a/src/Log2Console/Win32ApiCodePack/TaskbarWindow.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using Microsoft.WindowsAPICodePack.Taskbar; - -namespace Microsoft.WindowsAPICodePack.Internal -{ - internal class TaskbarWindow : IDisposable - { - public TaskbarWindow(IntPtr userWindowHandle, ThumbnailToolbarButton[] buttons) - { - if (userWindowHandle == IntPtr.Zero) - throw new ArgumentException("userWindowHandle"); - - if (buttons == null || buttons.Length == 0) - throw new ArgumentException("buttons"); - - // Create our proxy window - _thumbnailToolbarProxyWindow = new ThumbnailToolbarProxyWindow(userWindowHandle, buttons) { TaskbarWindow = this }; - - // Set our current state - ThumbnailButtons = buttons; - WindowHandle = userWindowHandle; - } - - ThumbnailToolbarProxyWindow _thumbnailToolbarProxyWindow; - - public readonly IntPtr WindowHandle; - - #region ThumbnailButtons Property - - ThumbnailToolbarButton[] _thumbnailButtons; - public ThumbnailToolbarButton[] ThumbnailButtons - { - get { return _thumbnailButtons; } - set - { - _thumbnailButtons = value; - // Set the window handle on the buttons (for future updates) - Array.ForEach(_thumbnailButtons, UpdateHandle); - } - } - - void UpdateHandle(ThumbnailToolbarButton button) - { - button.WindowHandle = _thumbnailToolbarProxyWindow.WindowHandle; - button.AddedToTaskbar = false; - } - - #endregion - - #region IDisposable Members - - ~TaskbarWindow() - { - Dispose(false); - } - - /// - /// Release the native objects. - /// - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - void Dispose(bool disposing) - { - if (!disposing) return; - - if (_thumbnailToolbarProxyWindow != null) - _thumbnailToolbarProxyWindow.Dispose(); - _thumbnailToolbarProxyWindow = null; - - // Don't dispose the thumbnail buttons - // as they might be used in another window. - // Setting them to null will indicate we don't need use anymore. - ThumbnailButtons = null; - } - - #endregion - } -} diff --git a/src/Log2Console/Win32ApiCodePack/TaskbarWindowManager.cs b/src/Log2Console/Win32ApiCodePack/TaskbarWindowManager.cs deleted file mode 100644 index 12e69ff..0000000 --- a/src/Log2Console/Win32ApiCodePack/TaskbarWindowManager.cs +++ /dev/null @@ -1,112 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Windows.Forms; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Taskbar; - -namespace Microsoft.WindowsAPICodePack.Internal -{ - internal class TaskbarWindowManager - { - bool _buttonsAdded; - - static TaskbarWindowManager _instance; - public static TaskbarWindowManager Instance - { - get - { - return _instance ?? (_instance = new TaskbarWindowManager()); - } - } - - public void AddThumbnailButtons(IntPtr windowHandle, ThumbnailToolbarButton[] buttons) - { - // Try to get an existing taskbar window for this user windowhandle, - // or get one that is created for us - var taskbarWindow = GetTaskbarWindow(windowHandle); - - if (taskbarWindow == null) - { - taskbarWindow = new TaskbarWindow(windowHandle, buttons); - _taskbarWindowList.Add(taskbarWindow); - } - else if (taskbarWindow.ThumbnailButtons == null) - taskbarWindow.ThumbnailButtons = buttons; - else - { - // We already have buttons assigned - throw new InvalidOperationException("Toolbar buttons for this window are already added. Once added, neither the order of the buttons cannot be changed, nor can they be added or removed."); - } - } - - TaskbarWindow GetTaskbarWindow(IntPtr userWindowHandle) - { - if (userWindowHandle == IntPtr.Zero) - throw new ArgumentException("userWindowHandle"); - - return _taskbarWindowList.Find(w => w.WindowHandle == userWindowHandle); - } - - readonly List _taskbarWindowList = new List(); - - /// - /// Dispatches a window message so that the appropriate events - /// can be invoked. This is used for the Taskbar's thumbnail toolbar feature. - /// - /// The window message, typically obtained - /// from a Windows Forms or WPF window procedure. - /// Taskbar window for which we are intercepting the messages - /// Returns true if this method handles the window message - internal bool DispatchMessage(ref Message m, TaskbarWindow taskbarWindow) - { - if (m.Msg == (int)TaskbarNativeMethods.WM_TASKBARBUTTONCREATED) - { - AddButtons(taskbarWindow); - } - else - { - if (!_buttonsAdded) - AddButtons(taskbarWindow); - - switch (m.Msg) - { - - case TaskbarNativeMethods.WM_COMMAND: - if (CoreNativeMethods.HIWORD(m.WParam.ToInt64(), 16) == THUMBBUTTON.THBN_CLICKED) - { - int buttonId = CoreNativeMethods.LOWORD(m.WParam.ToInt64()); - - foreach (var button in taskbarWindow.ThumbnailButtons) - if (button.Id == buttonId) - button.FireClick(taskbarWindow); - } - break; - } // End switch - } // End else - - return false; - } - - void AddButtons(TaskbarWindow taskbarWindow) - { - // Add the buttons - // Get the array of thumbnail buttons in native format - var nativeButtons = Array.ConvertAll(taskbarWindow.ThumbnailButtons, i=>i.Win32ThumbButton); - - // Add the buttons on the taskbar - var hr = TaskbarManager.Instance.TaskbarList.ThumbBarAddButtons(taskbarWindow.WindowHandle, (uint)taskbarWindow.ThumbnailButtons.Length, nativeButtons); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - - // Set the window handle on the buttons (for future updates) - _buttonsAdded = true; - Array.ForEach(taskbarWindow.ThumbnailButtons, UpdateHandle); - } - - void UpdateHandle(ThumbnailToolbarButton button) - { - button.AddedToTaskbar = _buttonsAdded; - } - } -} diff --git a/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarButton.cs b/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarButton.cs deleted file mode 100644 index 8586f63..0000000 --- a/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarButton.cs +++ /dev/null @@ -1,188 +0,0 @@ -using System; -using System.Drawing; -using System.Runtime.InteropServices; -using Microsoft.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - public class ThumbnailToolbarButton : IDisposable - { - static uint _nextId = 101; - THUMBBUTTON _win32ThumbButton; - - public readonly uint Id; - THBFLAGS _flags; - - public ThumbnailToolbarButton(Icon icon, string tooltip) - { - // Set our id - Id = _nextId; - - // increment the ID - if (_nextId == Int32.MaxValue) - _nextId = 101; // our starting point - else - _nextId++; - - // Set user settings - Icon = icon; - Tooltip = tooltip; - - // Create a native - _win32ThumbButton = new THUMBBUTTON(); - } - - /// - /// The window manager should call this method to raise the public click event to all - /// the subscribers. - /// - internal void FireClick(TaskbarWindow window) - { - var e = Click; - if (e != null) - e(this, EventArgs.Empty); - } - - public event EventHandler Click; - - #region Icon Property - - Icon _icon; - public Icon Icon - { - get { return _icon; } - set - { - if (_icon == value) return; - _icon = value; - UpdateThumbnailButton(); - } - } - - #endregion - - #region Tooltip Property - - string _tooltip; - public string Tooltip - { - get { return _tooltip; } - set - { - if (_tooltip == value) return; - _tooltip = value; - UpdateThumbnailButton(); - } - } - - #endregion - - #region Enabled Property - - public bool Enabled - { - get - { - return (_flags & THBFLAGS.THBF_DISABLED) == 0; - } - set - { - if (Enabled == value) return; - - if (value) - _flags &= ~(THBFLAGS.THBF_DISABLED); - else - _flags |= THBFLAGS.THBF_DISABLED; - - UpdateThumbnailButton(); - } - } - - #endregion - - #region Visible Property - - public bool Visible - { - get { return (_flags & THBFLAGS.THBF_HIDDEN) == 0; } - set - { - if (Visible == value) return; - - if (value) - _flags &= ~(THBFLAGS.THBF_HIDDEN); - else - _flags |= THBFLAGS.THBF_HIDDEN; - - UpdateThumbnailButton(); - } - } - - #endregion - - internal void UpdateThumbnailButton() - { - if (!AddedToTaskbar) return; - - // Get the array of thumbnail buttons in native format - THUMBBUTTON[] nativeButtons = { Win32ThumbButton }; - - HRESULT hr = TaskbarManager.Instance.TaskbarList.ThumbBarUpdateButtons(WindowHandle, 1, nativeButtons); - - if (!CoreErrorHelper.Succeeded((int)hr)) - Marshal.ThrowExceptionForHR((int)hr); - } - - internal IntPtr WindowHandle; - internal bool AddedToTaskbar; - - /// - /// Native representation of the thumbnail button - /// - internal THUMBBUTTON Win32ThumbButton - { - get - { - _win32ThumbButton.iId = Id; - _win32ThumbButton.szTip = _tooltip; - _win32ThumbButton.dwFlags = _flags; - _win32ThumbButton.dwMask = THBMASK.THB_FLAGS; - - if (_tooltip != null) - _win32ThumbButton.dwMask |= THBMASK.THB_TOOLTIP; - - if (_icon != null) - { - _win32ThumbButton.dwMask |= THBMASK.THB_ICON; - _win32ThumbButton.hIcon = _icon.Handle; - } - - return _win32ThumbButton; - } - } - - #region IDisposable logic - - public void Dispose() - { - Dispose(true); - } - - ~ThumbnailToolbarButton() - { - Dispose(false); - GC.SuppressFinalize(this); - } - - void Dispose(bool disposing) - { - if (!disposing) return; - - if (_icon != null) - _icon.Dispose(); - _tooltip = null; - } - - #endregion - } -} diff --git a/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarManager.cs b/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarManager.cs deleted file mode 100644 index 59cd6e6..0000000 --- a/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarManager.cs +++ /dev/null @@ -1,25 +0,0 @@ -using System; -using Microsoft.WindowsAPICodePack.Internal; - -namespace Microsoft.WindowsAPICodePack.Taskbar -{ - public sealed class ThumbnailToolbarManager - { - internal ThumbnailToolbarManager() { } - - public void AddButtons(IntPtr windowHandle, params ThumbnailToolbarButton[] buttons) - { - if (windowHandle == IntPtr.Zero) - throw new ArgumentException("Window handle cannot be empty", "windowHandle"); - - if (buttons == null || buttons.Length == 0) - throw new ArgumentException("Null or empty arrays are not allowed.", "buttons"); - - if (buttons.Length > 7) - throw new ArgumentException("Maximum number of buttons allowed is 7.", "buttons"); - - // Add the buttons to our window manager, which will also create a proxy window - TaskbarWindowManager.Instance.AddThumbnailButtons(windowHandle, buttons); - } - } -} diff --git a/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarProxyWindow.cs b/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarProxyWindow.cs deleted file mode 100644 index 725cc8b..0000000 --- a/src/Log2Console/Win32ApiCodePack/ThumbnailToolbarProxyWindow.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Windows.Forms; -using Microsoft.WindowsAPICodePack.Taskbar; - -namespace Microsoft.WindowsAPICodePack.Internal -{ - internal class ThumbnailToolbarProxyWindow : NativeWindow, IDisposable - { - public readonly IntPtr WindowHandle; - private ThumbnailToolbarButton[] _thumbnailButtons; - - public ThumbnailToolbarProxyWindow(IntPtr windowHandle, ThumbnailToolbarButton[] buttons) - { - if (windowHandle == IntPtr.Zero) - throw new ArgumentException("Window handle cannot be empty", "windowHandle"); - - if (buttons == null || buttons.Length == 0) - throw new ArgumentException("Null or empty arrays are not allowed.", "buttons"); - - WindowHandle = windowHandle; - _thumbnailButtons = buttons; - - // Set the window handle on the buttons (for future updates) - Array.ForEach(_thumbnailButtons, UpdateHandle); - - // Assign the window handle (coming from the user) to this native window - // so we can intercept the window messages sent from the taskbar to this window. - AssignHandle(windowHandle); - } - - void UpdateHandle(ThumbnailToolbarButton button) - { - button.WindowHandle = WindowHandle; - button.AddedToTaskbar = false; - } - - protected override void WndProc(ref Message m) - { - var handled = TaskbarWindowManager.Instance.DispatchMessage(ref m, TaskbarWindow); - - // If it's a WM_Destroy message, then also forward it to the base class (our native window) - if ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_DESTROY) || - (m.Msg == (int)TabbedThumbnailNativeMethods.WM_NCDESTROY) || - ((m.Msg == (int)TabbedThumbnailNativeMethods.WM_SYSCOMMAND) && (((int)m.WParam) == TabbedThumbnailNativeMethods.SC_CLOSE))) - { - base.WndProc(ref m); - } - else if (!handled) - base.WndProc(ref m); - } - - public TaskbarWindow TaskbarWindow; - - #region IDisposable logic - - ~ThumbnailToolbarProxyWindow() - { - Dispose(false); - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - - public void Dispose(bool disposing) - { - if (disposing) - { - // Dispose managed resources - - // Don't dispose the thumbnail buttons - // as they might be used in another window. - // Setting them to null will indicate we don't need use anymore. - _thumbnailButtons = null; - } - } - - #endregion - } -} diff --git a/src/Log2Console/packages.config b/src/Log2Console/packages.config new file mode 100644 index 0000000..6c92e8e --- /dev/null +++ b/src/Log2Console/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/Log2Console/res/collapse_all.png b/src/Log2Console/res/collapse_all.png new file mode 100644 index 0000000000000000000000000000000000000000..5b3acbe380ef11cd051c1000b0281f3ea414a03b GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPF0$mRX_j!zxw(A$KU_o{QCdy_y2Ey|Nr{`|IdFA0IG$9Q!4QxK#rfMi(`ny z<>VW@tR6g$0u$JbTw)p+&Ll7}<|#C@s<5OjVPu>U$j6f4rXkQE>E-3MD#4B0XQQD2 tgJhGAaU;Wt8)r9haX9eIIGM1a+MJ=^Pp@Wwf5r@uHJ+}1F6*2UngEBLN@4&2 literal 0 HcmV?d00001 diff --git a/src/Log2Console/res/pin.png b/src/Log2Console/res/pin.png new file mode 100644 index 0000000000000000000000000000000000000000..cd16af26133987ddfae0372903b4f182ef77854c GIT binary patch literal 726 zcmV;{0xA88P)I_p_^_Sxea^EnzBxq6ZuCp!w+8tf z{UA@@6-3x=DtdfY-7Cq~z2RLSeuke8%?4>6cs@MKtVR16k>gWrmqe!N<(%%hpt)}j zrL9w-9k)>d?PD;hS6yit#qC_v+v#9M`!udJj-kjthBMbXd3w9Jwt#jqnAF18TtnYv zu>8d&F4g&wXY-@dH3@6?L@2$;#UIaa&0AeSa|}jW+%~Uj{2rD+@`eiuXKTy*a z2+3I20_9jD+%gP+h?T#Xm|6cYxzM$E{@xel)p~K$8NlQI8FY;NLTPgVcbxvv!K^17 z<+hUb1tMwPmc8d}T>9-#kX3$0zSWEBo*5{ry+|p0A3l)NG*20p2-)=od(vy-_etyc zW2GKQ%0Gf_@Iz`CLGpDs5-&6^(YuZaxrlWIg54*o#>J|ku);hFp(sf;g#DTIV9V@q zI2;A^E@UF21v`)4Uri^HH~&7QeuqTmKse#Fb?LIohCmAyU1_xoH0w-EBHHiKr7kc}2>OR88)Ol-@ak)2+z&oCN|@OV5h z7!05}ZnJ_7X*3#!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8X6a5n0T@AiWlZ85N%d zO$7>W^mK6yvGAWd=^fkHQge%f37>2I zHdx7IYn^=_GDjz4)@7;Wb62*BZ@M<2c-pRW6TgRZ9SrVyxc!0ro$nuaGZ<85ZfdyS zb8h>^I~k%MGPEz$`H6k#V3n$n$WwYCxJyj#_->AhmUXSmUn(-mEzEvcS=ZIz{vxU( zG7c>5r`eext=lu1^^dnw#e&wtGS(=G^zeXbv+nJ@t0DD{)6W~|cm_{bKbLh*2~7Y= Cv2#KI literal 0 HcmV?d00001 diff --git a/src/LogFmwk.sln b/src/LogFmwk.sln index 5669cbe..187e263 100644 --- a/src/LogFmwk.sln +++ b/src/LogFmwk.sln @@ -1,48 +1,19 @@  -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26730.16 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj", "{29A745D4-5A2F-4170-A0F1-54C77F151892}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Log2Console", "Log2Console\Log2Console.csproj", "{EE81C506-55E4-417E-B1D6-09453F89C7CD}" EndProject Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "L2C_Setup", "L2C_Setup\L2C_Setup.vdproj", "{19438485-B918-42F2-8DC7-F352D24AC55E}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "WindowsAPICodePack", "WindowsAPICodePack", "{3E29A216-D8DA-4858-9EB0-D9C0C565C50B}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core", "External\WindowsAPICodePack\Core\Core.csproj", "{2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shell", "External\WindowsAPICodePack\Shell\Shell.csproj", "{AA0C00CB-8699-4F37-BFAE-40CA87ACC06D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestNLog", "TestNLog\TestNLog.csproj", "{7C4E8E11-81E3-4297-A4D9-6F6DB90C8EF7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ICSharpCode.TextEditor", "ICSharpCode.TextEditor\ICSharpCode.TextEditor.csproj", "{2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RichTextBoxLinks", "RichTextBoxLinks\RichTextBoxLinks.csproj", "{8B833B00-BB4C-4FAF-B6C4-BF77824F96A1}" EndProject Global - GlobalSection(TeamFoundationVersionControl) = preSolution - SccNumberOfProjects = 6 - SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C} - SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs04 - SccLocalPath0 = . - SccProjectUniqueName1 = Log2Console\\Log2Console.csproj - SccProjectName1 = Log2Console - SccLocalPath1 = Log2Console - SccProjectUniqueName2 = Test\\Test.csproj - SccProjectName2 = Test - SccLocalPath2 = Test - SccProjectUniqueName3 = L2C_Setup\\L2C_Setup.vdproj - SccProjectName3 = L2C_Setup - SccLocalPath3 = L2C_Setup - SccProjectUniqueName4 = External\\WindowsAPICodePack\\Core\\Core.csproj - SccProjectTopLevelParentUniqueName4 = LogFmwk.sln - SccProjectName4 = External/WindowsAPICodePack/Core - SccLocalPath4 = External\\WindowsAPICodePack\\Core - SccProjectUniqueName5 = External\\WindowsAPICodePack\\Shell\\Shell.csproj - SccProjectTopLevelParentUniqueName5 = LogFmwk.sln - SccProjectName5 = External/WindowsAPICodePack/Shell - SccLocalPath5 = External\\WindowsAPICodePack\\Shell - EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution CodeAnalysisDebug|Any CPU = CodeAnalysisDebug|Any CPU Debug|Any CPU = Debug|Any CPU @@ -65,28 +36,11 @@ Global {19438485-B918-42F2-8DC7-F352D24AC55E}.CodeAnalysisDebug|Any CPU.Build.0 = Debug {19438485-B918-42F2-8DC7-F352D24AC55E}.Debug|Any CPU.ActiveCfg = Debug {19438485-B918-42F2-8DC7-F352D24AC55E}.Release|Any CPU.ActiveCfg = Release - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57}.CodeAnalysisDebug|Any CPU.ActiveCfg = Debug|Any CPU - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57}.CodeAnalysisDebug|Any CPU.Build.0 = Debug|Any CPU - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57}.Release|Any CPU.Build.0 = Release|Any CPU - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D}.CodeAnalysisDebug|Any CPU.ActiveCfg = CodeAnalysisDebug|Any CPU - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D}.CodeAnalysisDebug|Any CPU.Build.0 = CodeAnalysisDebug|Any CPU - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D}.Release|Any CPU.Build.0 = Release|Any CPU {7C4E8E11-81E3-4297-A4D9-6F6DB90C8EF7}.CodeAnalysisDebug|Any CPU.ActiveCfg = Debug|Any CPU {7C4E8E11-81E3-4297-A4D9-6F6DB90C8EF7}.CodeAnalysisDebug|Any CPU.Build.0 = Debug|Any CPU {7C4E8E11-81E3-4297-A4D9-6F6DB90C8EF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C4E8E11-81E3-4297-A4D9-6F6DB90C8EF7}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C4E8E11-81E3-4297-A4D9-6F6DB90C8EF7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.CodeAnalysisDebug|Any CPU.ActiveCfg = Debug|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.CodeAnalysisDebug|Any CPU.Build.0 = Debug|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2D18BE89-D210-49EB-A9DD-2246FBB3DF6D}.Release|Any CPU.Build.0 = Release|Any CPU {8B833B00-BB4C-4FAF-B6C4-BF77824F96A1}.CodeAnalysisDebug|Any CPU.ActiveCfg = Debug|Any CPU {8B833B00-BB4C-4FAF-B6C4-BF77824F96A1}.CodeAnalysisDebug|Any CPU.Build.0 = Debug|Any CPU {8B833B00-BB4C-4FAF-B6C4-BF77824F96A1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU @@ -97,8 +51,7 @@ Global GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {2E1FB0DF-F9BB-4909-9F32-2D9D022A8E57} = {3E29A216-D8DA-4858-9EB0-D9C0C565C50B} - {AA0C00CB-8699-4F37-BFAE-40CA87ACC06D} = {3E29A216-D8DA-4858-9EB0-D9C0C565C50B} + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {6ED21835-02B5-4EC2-A696-84EF19CA0486} EndGlobalSection EndGlobal diff --git a/src/LogFmwk.vssscc b/src/LogFmwk.vssscc deleted file mode 100644 index 794f014..0000000 --- a/src/LogFmwk.vssscc +++ /dev/null @@ -1,10 +0,0 @@ -"" -{ -"FILE_VERSION" = "9237" -"ENLISTMENT_CHOICE" = "NEVER" -"PROJECT_FILE_RELATIVE_PATH" = "" -"NUMBER_OF_EXCLUDED_FILES" = "0" -"ORIGINAL_PROJECT_FILE_PATH" = "" -"NUMBER_OF_NESTED_PROJECTS" = "0" -"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT" -} diff --git a/src/Test/..svnbridge/.svnbridge b/src/Test/..svnbridge/.svnbridge deleted file mode 100644 index 44262bd..0000000 --- a/src/Test/..svnbridge/.svnbridge +++ /dev/null @@ -1,8 +0,0 @@ -svn:ignore[Bb]in -obj -[Dd]ebug -[Rr]elease -*.user -*.aps -*.eto - \ No newline at end of file diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj index 8b53006..2056a78 100644 --- a/src/Test/Test.csproj +++ b/src/Test/Test.csproj @@ -58,9 +58,8 @@ AllRules.ruleset - - ..\packages\log4net.2.0.3\lib\net40-full\log4net.dll - True + + ..\packages\log4net.2.0.8\lib\net40-full\log4net.dll diff --git a/src/Test/packages.config b/src/Test/packages.config new file mode 100644 index 0000000..f2691db --- /dev/null +++ b/src/Test/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/TestNLog/..svnbridge/.svnbridge b/src/TestNLog/..svnbridge/.svnbridge deleted file mode 100644 index 44262bd..0000000 --- a/src/TestNLog/..svnbridge/.svnbridge +++ /dev/null @@ -1,8 +0,0 @@ -svn:ignore[Bb]in -obj -[Dd]ebug -[Rr]elease -*.user -*.aps -*.eto - \ No newline at end of file diff --git a/src/TestNLog/TestNLog.csproj b/src/TestNLog/TestNLog.csproj index 4da9938..fc14550 100644 --- a/src/TestNLog/TestNLog.csproj +++ b/src/TestNLog/TestNLog.csproj @@ -47,9 +47,8 @@ true - - False - ..\external\NLog.dll + + ..\packages\NLog.4.4.12\lib\net40\NLog.dll @@ -57,10 +56,10 @@ - PreserveNewest + diff --git a/src/TestNLog/packages.config b/src/TestNLog/packages.config new file mode 100644 index 0000000..4413556 --- /dev/null +++ b/src/TestNLog/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file From c902ec4398269519bfa2d5fbc6ed747cf891bffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9A=D1=83=D1=80?= =?UTF-8?q?=D0=B4=D1=8E=D0=BA=D0=BE=D0=B2?= Date: Wed, 18 Oct 2017 13:40:16 +0300 Subject: [PATCH 2/4] Fixed bug that prevented property logging in message details window --- src/Log2Console/MainForm.cs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Log2Console/MainForm.cs b/src/Log2Console/MainForm.cs index 1a509da..cd47284 100644 --- a/src/Log2Console/MainForm.cs +++ b/src/Log2Console/MainForm.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using System.Windows.Forms; using Log2Console.Properties; using log4net.Config; @@ -720,11 +721,14 @@ private void SetLogMessageDetail(LogMessageItem logMsgItem) sb.Append(logMsgItem.GetMessageDetails()); + // Removing trailing '}' char + sb.Remove(sb.Length - 1, 1); + if (UserSettings.Instance.ShowMsgDetailsProperties) { // Append properties foreach (KeyValuePair kvp in logMsgItem.Message.Properties) - sb.AppendFormat("{0} = {1}{2}", kvp.Key, kvp.Value, Environment.NewLine); + sb.AppendFormat("{0} = {1}{2}", kvp.Key, kvp.Value, "\\line\n"); } @@ -740,9 +744,16 @@ private void SetLogMessageDetail(LogMessageItem logMsgItem) } } + // Closing rtf document + sb.Append('}'); + + var rtf = sb.ToString(); + + // Since rtf only support 7-bit text encoding, we need to escape non-ASCII chars + rtf = Regex.Replace(rtf, "[^\x00-\x7F]", m => string.Format(@"\u{0}{1}", (short)m.Value[0], m.Value[0])); logDetailTextBox.ForeColor = logMsgItem.Message.Level.Color; - logDetailTextBox.Rtf = sb.ToString(); + logDetailTextBox.Rtf = rtf; OpenSourceFile(logMsgItem.Message.SourceFileName, logMsgItem.Message.SourceFileLineNr); } From b904279fe80392a680f3e7a121f32aaf365e397d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9A=D1=83=D1=80?= =?UTF-8?q?=D0=B4=D1=8E=D0=BA=D0=BE=D0=B2?= Date: Wed, 18 Oct 2017 14:42:37 +0300 Subject: [PATCH 3/4] Improved log4j xml message parser --- src/Log2Console/Log2Console.csproj | 5 ++- src/Log2Console/MainForm.cs | 41 ++++++----------------- src/Log2Console/Receiver/ReceiverUtils.cs | 7 ++-- src/Log2Console/packages.config | 1 + 4 files changed, 17 insertions(+), 37 deletions(-) diff --git a/src/Log2Console/Log2Console.csproj b/src/Log2Console/Log2Console.csproj index d53bdc0..f969e8f 100644 --- a/src/Log2Console/Log2Console.csproj +++ b/src/Log2Console/Log2Console.csproj @@ -80,9 +80,8 @@ ..\packages\ICSharpCode.TextEditor.3.2.1.6466\lib\Net20\ICSharpCode.TextEditor.dll - - False - ..\External\log4net.dll + + ..\packages\log4net.2.0.8\lib\net40-full\log4net.dll ..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.2\lib\Microsoft.WindowsAPICodePack.dll diff --git a/src/Log2Console/MainForm.cs b/src/Log2Console/MainForm.cs index cd47284..1d3651e 100644 --- a/src/Log2Console/MainForm.cs +++ b/src/Log2Console/MainForm.cs @@ -58,6 +58,8 @@ public partial class MainForm : Form, ILogMessageNotifiable // Specific event handler on minimized action public event EventHandler Minimized; + private static readonly Regex Stacktrace = new Regex(@"([\S]+\.[\w\d]{1,3}):(line|строка) (\d+)", RegexOptions.Compiled|RegexOptions.IgnoreCase); + public MainForm() { @@ -845,39 +847,16 @@ private bool ParseCSharpStackTraceLine(string line) { bool stackTraceFileDetected = false; - //Detect a C Sharp File - int endOfFileIndex = line.ToLower().LastIndexOf(".cs"); - if (endOfFileIndex != -1) + var match = Stacktrace.Match(line); + if (match.Success) { - var leftTruncatedFile = line.Substring(0, endOfFileIndex + 3); - int startOfFileIndex = leftTruncatedFile.LastIndexOf(":") - 1; - if (startOfFileIndex >= 0) - { - string fileName = leftTruncatedFile.Substring(startOfFileIndex, leftTruncatedFile.Length - startOfFileIndex); + var fileName = match.Groups[1].Value; + var fileLine = match.Groups[3].Value; - const string lineSignature = ":line "; - int lineIndex = line.ToLower().LastIndexOf(lineSignature); - if (lineIndex != -1) - { - int lineSignatureLength = lineSignature.Length; - var lineNrString = line.Substring(lineIndex + lineSignatureLength, - line.Length - lineIndex - lineSignatureLength); - lineNrString = lineNrString.TrimEnd(new[] { ',' }); - if (!string.IsNullOrEmpty(lineNrString)) - { - uint parsedLineNr; - if (uint.TryParse(lineNrString, out parsedLineNr)) - { - int fileLine = (int)parsedLineNr; - stackTraceFileDetected = true; - - tbExceptions.SelectedText = line.Substring(0, startOfFileIndex - 1) + " "; - tbExceptions.InsertLink(string.Format("{0} line:{1}", - fileName, fileLine)); - } - } - } - } + stackTraceFileDetected = true; + + tbExceptions.SelectedText = line.Substring(0, match.Groups[0].Index - 1) + " "; + tbExceptions.InsertLink(string.Format("{0} line:{1}", fileName, fileLine)); } return stackTraceFileDetected; diff --git a/src/Log2Console/Receiver/ReceiverUtils.cs b/src/Log2Console/Receiver/ReceiverUtils.cs index 3ad837b..a99556a 100644 --- a/src/Log2Console/Receiver/ReceiverUtils.cs +++ b/src/Log2Console/Receiver/ReceiverUtils.cs @@ -1,4 +1,4 @@ -using Log2Console.Log; +using Log2Console.Log; using System; using System.ComponentModel; using System.IO; @@ -124,7 +124,7 @@ public static LogMessage ParseLog4JXmlLogEvent(XmlReader reader, string defaultL break; case "log4j:throwable": - logMsg.Message += Environment.NewLine + reader.ReadString(); + logMsg.ExceptionString += reader.ReadString() + Environment.NewLine; break; case "log4j:locationInfo": @@ -144,9 +144,10 @@ public static LogMessage ParseLog4JXmlLogEvent(XmlReader reader, string defaultL break; case "log4j:properties": + case "nlog:properties": reader.Read(); while (reader.MoveToContent() == XmlNodeType.Element - && reader.Name == "log4j:data") + && reader.LocalName == "data") { string name = reader.GetAttribute("name"); string value = reader.GetAttribute("value"); diff --git a/src/Log2Console/packages.config b/src/Log2Console/packages.config index 6c92e8e..782aef2 100644 --- a/src/Log2Console/packages.config +++ b/src/Log2Console/packages.config @@ -1,6 +1,7 @@  + \ No newline at end of file From 81eb65b5cb73b3a915725354a45143d2a8fad37a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B5=D1=80=D0=B3=D0=B5=D0=B9=20=D0=9A=D1=83=D1=80?= =?UTF-8?q?=D0=B4=D1=8E=D0=BA=D0=BE=D0=B2?= Date: Thu, 19 Oct 2017 10:02:10 +0300 Subject: [PATCH 4/4] Fixed exception duplicates --- src/Log2Console/Receiver/ReceiverUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Log2Console/Receiver/ReceiverUtils.cs b/src/Log2Console/Receiver/ReceiverUtils.cs index a99556a..3ba316b 100644 --- a/src/Log2Console/Receiver/ReceiverUtils.cs +++ b/src/Log2Console/Receiver/ReceiverUtils.cs @@ -124,7 +124,7 @@ public static LogMessage ParseLog4JXmlLogEvent(XmlReader reader, string defaultL break; case "log4j:throwable": - logMsg.ExceptionString += reader.ReadString() + Environment.NewLine; + logMsg.ExceptionString = reader.ReadString(); break; case "log4j:locationInfo":