├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── global.json ├── src ├── ImageVisualizer.sln ├── ImageVisualizer10 │ └── ImageVisualizer10.csproj ├── ImageVisualizer11 │ └── ImageVisualizer11.csproj ├── ImageVisualizer12 │ └── ImageVisualizer12.csproj ├── ImageVisualizer14 │ ├── ImageControl.xaml │ ├── ImageControl.xaml.cs │ ├── ImageForm.Designer.cs │ ├── ImageForm.cs │ ├── ImageForm.resx │ ├── ImageVisualizer.cs │ ├── ImageVisualizer14.csproj │ ├── ImageVisualizerObjectSource.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── SerializableBitmapImage.cs ├── ImageVisualizer15 │ └── ImageVisualizer15.csproj ├── ImageVisualizer16.Common │ ├── ImageVisualizer16.Common.csproj │ └── SerializableBitmap.cs ├── ImageVisualizer16.DebuggeeSide │ ├── ImageVisualizer16.DebuggeeSide.csproj │ └── ImageVisualizerBitmapObjectSource.cs ├── ImageVisualizer16.UI │ └── ImageVisualizer16.UI.csproj ├── ImageVisualizer17.6.Common │ ├── ImageVisualizer17.6.Common.csproj │ └── ImageVisualizerImage.cs ├── ImageVisualizer17.6.DebuggeeSide │ ├── ImageVisualizer17.6.DebuggeeSide.csproj │ └── ImageVisualizerJsonObjectSource.cs ├── ImageVisualizer17.6.UI │ └── ImageVisualizer17.6.UI.csproj ├── ImageVisualizer17.Common │ └── ImageVisualizer17.Common.csproj ├── ImageVisualizer17.DebuggeeSide │ └── ImageVisualizer17.DebuggeeSide.csproj ├── ImageVisualizer17.UI │ └── ImageVisualizer17.UI.csproj ├── ImageVisualizerPackage │ ├── ImageVisualizerPackage.csproj │ ├── Logo_128x.png │ ├── Preview_200x.png │ ├── Properties │ │ └── AssemblyInfo.cs │ └── source.extension.vsixmanifest ├── SetupVisualizer │ ├── ImageDebuggerVisaulizer.ico │ ├── ImageDebuggerVisaulizer.pdn │ ├── License.rtf │ ├── Product.wxs │ ├── SetupVisualizer.wixproj │ ├── bannrbmp.bmp │ ├── bannrbmp.pdn │ ├── dlgbmp.bmp │ └── dlgbmp.pdn └── VSVersionAction │ ├── CustomAction.config │ ├── CustomAction.cs │ ├── Properties │ └── AssemblyInfo.cs │ └── VSVersionAction.csproj └── test ├── TestImages ├── 600_315.png ├── VisualStudio256_256.png ├── net.png ├── test_image.png └── tumblr_mwiiixNSpW1qbkusho1_1280.png ├── TestVisualizer.sln ├── TestVisualizerCS ├── Program.cs ├── Properties │ └── AssemblyInfo.cs └── TestVisualizerCS.csproj ├── TestVisualizerCSCore30 ├── Program.cs └── TestVisualizerCSCore30.csproj ├── TestVisualizerCSCore31 ├── Program.cs └── TestVisualizerCSCore31.csproj ├── TestVisualizerCSNet60 ├── Program.cs └── TestVisualizerCSNet60.csproj ├── TestVisualizerCSNet80 ├── Program.cs └── TestVisualizerCSNet80.csproj └── TestVisualizerVB ├── Module1.vb ├── My Project ├── Application.Designer.vb ├── Application.myapp ├── AssemblyInfo.vb ├── Resources.Designer.vb ├── Resources.resx ├── Settings.Designer.vb └── Settings.settings └── TestVisualizerVB.vbproj /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | ko_fi: aberus 4 | 5 | custom: ["https://www.paypal.me/aberus"] 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | [Xx]64/ 19 | [Xx]86/ 20 | [Bb]uild/ 21 | bld/ 22 | [Bb]in/ 23 | [Oo]bj/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | artifacts/ 46 | 47 | *_i.c 48 | *_p.c 49 | *_i.h 50 | *.ilk 51 | *.meta 52 | *.obj 53 | *.pch 54 | *.pdb 55 | *.pgc 56 | *.pgd 57 | *.rsp 58 | *.sbr 59 | *.tlb 60 | *.tli 61 | *.tlh 62 | *.tmp 63 | *.tmp_proj 64 | *.log 65 | *.vspscc 66 | *.vssscc 67 | .builds 68 | *.pidb 69 | *.svclog 70 | *.scc 71 | 72 | # Chutzpah Test files 73 | _Chutzpah* 74 | 75 | # Visual C++ cache files 76 | ipch/ 77 | *.aps 78 | *.ncb 79 | *.opendb 80 | *.opensdf 81 | *.sdf 82 | *.cachefile 83 | *.VC.db 84 | 85 | # Visual Studio profiler 86 | *.psess 87 | *.vsp 88 | *.vspx 89 | *.sap 90 | 91 | # TFS 2012 Local Workspace 92 | $tf/ 93 | 94 | # Guidance Automation Toolkit 95 | *.gpState 96 | 97 | # ReSharper is a .NET coding add-in 98 | _ReSharper*/ 99 | *.[Rr]e[Ss]harper 100 | *.DotSettings.user 101 | 102 | # JustCode is a .NET coding add-in 103 | .JustCode 104 | 105 | # TeamCity is a build add-in 106 | _TeamCity* 107 | 108 | # DotCover is a Code Coverage Tool 109 | *.dotCover 110 | 111 | # NCrunch 112 | _NCrunch_* 113 | .*crunch*.local.xml 114 | nCrunchTemp_* 115 | 116 | # MightyMoose 117 | *.mm.* 118 | AutoTest.Net/ 119 | 120 | # Web workbench (sass) 121 | .sass-cache/ 122 | 123 | # Installshield output folder 124 | [Ee]xpress/ 125 | 126 | # DocProject is a documentation generator add-in 127 | DocProject/buildhelp/ 128 | DocProject/Help/*.HxT 129 | DocProject/Help/*.HxC 130 | DocProject/Help/*.hhc 131 | DocProject/Help/*.hhk 132 | DocProject/Help/*.hhp 133 | DocProject/Help/Html2 134 | DocProject/Help/html 135 | 136 | # Click-Once directory 137 | publish/ 138 | 139 | # Publish Web Output 140 | *.[Pp]ublish.xml 141 | *.azurePubxml 142 | 143 | # TODO: Un-comment the next line if you do not want to checkin 144 | # your web deploy settings because they may include unencrypted 145 | # passwords 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # NuGet Packages 150 | *.nupkg 151 | # The packages folder can be ignored because of Package Restore 152 | **/packages/* 153 | # except build/, which is used as an MSBuild target. 154 | !**/packages/build/ 155 | # Uncomment if necessary however generally it will be regenerated when needed 156 | #!**/packages/repositories.config 157 | # NuGet v3's project.json files produces more ignoreable files 158 | *.nuget.props 159 | *.nuget.targets 160 | 161 | # Microsoft Azure Build Output 162 | csx/ 163 | *.build.csdef 164 | 165 | # Microsoft Azure Emulator 166 | ecf/ 167 | rcf/ 168 | 169 | # Microsoft Azure ApplicationInsights config file 170 | ApplicationInsights.config 171 | 172 | # Windows Store app package directory 173 | AppPackages/ 174 | BundleArtifacts/ 175 | 176 | # Visual Studio cache files 177 | # files ending in .cache can be ignored 178 | *.[Cc]ache 179 | # but keep track of directories ending in .cache 180 | !*.[Cc]ache/ 181 | 182 | # Others 183 | ClientBin/ 184 | [Ss]tyle[Cc]op.* 185 | ~$* 186 | *~ 187 | *.dbmdl 188 | *.dbproj.schemaview 189 | *.pfx 190 | *.publishsettings 191 | node_modules/ 192 | orleans.codegen.cs 193 | 194 | # RIA/Silverlight projects 195 | Generated_Code/ 196 | 197 | # Backup & report files from converting an old project file 198 | # to a newer Visual Studio version. Backup files are not needed, 199 | # because we have git ;-) 200 | _UpgradeReport_Files/ 201 | Backup*/ 202 | UpgradeLog*.XML 203 | UpgradeLog*.htm 204 | 205 | # SQL Server files 206 | *.mdf 207 | *.ldf 208 | 209 | # Business Intelligence projects 210 | *.rdl.data 211 | *.bim.layout 212 | *.bim_*.settings 213 | 214 | # Microsoft Fakes 215 | FakesAssemblies/ 216 | 217 | # GhostDoc plugin setting file 218 | *.GhostDoc.xml 219 | 220 | # Node.js Tools for Visual Studio 221 | .ntvs_analysis.dat 222 | 223 | # Visual Studio 6 build log 224 | *.plg 225 | 226 | # Visual Studio 6 workspace options file 227 | *.opt 228 | 229 | # Visual Studio LightSwitch build output 230 | **/*.HTMLClient/GeneratedArtifacts 231 | **/*.DesktopClient/GeneratedArtifacts 232 | **/*.DesktopClient/ModelManifest.xml 233 | **/*.Server/GeneratedArtifacts 234 | **/*.Server/ModelManifest.xml 235 | _Pvt_Extensions 236 | 237 | # LightSwitch generated files 238 | GeneratedArtifacts/ 239 | ModelManifest.xml 240 | 241 | # Paket dependency manager 242 | .paket/paket.exe 243 | 244 | # FAKE - F# Make 245 | .fake/ 246 | /Assets/ 247 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Aleksander Berus 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Debugger Image Visualizer for Visual Studio 2 | 3 | [![Visual Studio Marketplace Version](https://vsmarketplacebadge.apphb.com/version/AleksanderBerus.DebuggerImageVisualizerPreview.svg)](https://marketplace.visualstudio.com/items?itemName=AleksanderBerus.DebuggerImageVisualizerPreview) 4 | [![Visual Studio Marketplace Install](https://vsmarketplacebadge.apphb.com/installs-short/AleksanderBerus.DebuggerImageVisualizerPreview.svg)](https://marketplace.visualstudio.com/items?itemName=AleksanderBerus.DebuggerImageVisualizerPreview) 5 | 6 | Debugger Image Visualizer is a debug visualizer for Visual Studio. It allows you to visually view the graphic content of WPF's images [BitmapImage](https://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapimage.aspx), [BitmapSource](https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.imaging.bitmapsource), [ImageSource](https://docs.microsoft.com/en-us/dotnet/api/system.windows.media.imagesource), and WinForms' images [Bitmap](https://msdn.microsoft.com/en-us/library/system.drawing.bitmap.aspx) during debugging. Supports zooming and paning while previewing images. 7 | 8 | If you want to support the developement you could consider buying me a coffee. 9 | 10 | [![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/M4M32DOPK) 11 | 12 | 13 | ![](https://aleksanderberus.gallerycdn.vsassets.io/extensions/aleksanderberus/debuggerimagevisualizerpreview/0.6.0/1556274284741/219157/1/Preview.gif) 14 | 15 | ## Works with 16 | 17 | * Visual Studio 2022 18 | * Visual Studio 2019 19 | * Visual Studio 2017 20 | * Visual Studio 2015 21 | * Visual Studio 2013 22 | * Visual Studio 2012 23 | * Visual Studio 2010 24 | 25 | .NET Framework 4.0+, .NET Core 3.1+, .NET 6.0+ 26 | 27 | ## Install 28 | 29 | Install the latest version of Debugger Image Visualizer for Visual Studio from the [Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=AleksanderBerus.DebuggerImageVisualizerPreview). 30 | 31 | ## Changelog 32 | 33 | All changes to each version that has been released are available in [Releases](../../releases). 34 | 35 | ## Contribute 36 | 37 | If you have any troubles and/or suggestions please log an issue on the GitHub issue tracker. 38 | 39 | ## License 40 | 41 | The source code is available under [The MIT License (MIT)](LICENSE) 42 | -------------------------------------------------------------------------------- /global.json: -------------------------------------------------------------------------------- 1 | { 2 | "sdk": { 3 | "allowPrerelease": false 4 | } 5 | } -------------------------------------------------------------------------------- /src/ImageVisualizer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.3.32611.2 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer10", "ImageVisualizer10\ImageVisualizer10.csproj", "{8377674C-A112-4DC9-9745-926434AE7B2E}" 7 | EndProject 8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer11", "ImageVisualizer11\ImageVisualizer11.csproj", "{496B16D7-54D1-418B-951B-71DD377156A7}" 9 | EndProject 10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer12", "ImageVisualizer12\ImageVisualizer12.csproj", "{2B4306BF-2E14-4E75-AA09-5423E906C5D8}" 11 | EndProject 12 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer14", "ImageVisualizer14\ImageVisualizer14.csproj", "{318C7CE4-37EE-4185-945D-B7833677A29A}" 13 | EndProject 14 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer15", "ImageVisualizer15\ImageVisualizer15.csproj", "{0A095313-31F1-4677-ACC2-60BCF5ADFC5D}" 15 | EndProject 16 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer16.UI", "ImageVisualizer16.UI\ImageVisualizer16.UI.csproj", "{63D1D741-7C82-447B-B5F8-68B3BE3470D2}" 17 | EndProject 18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageVisualizer16.Common", "ImageVisualizer16.Common\ImageVisualizer16.Common.csproj", "{B271E1B1-BB78-4864-8DB5-BC48FB1CB132}" 19 | EndProject 20 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageVisualizer16.DebuggeeSide", "ImageVisualizer16.DebuggeeSide\ImageVisualizer16.DebuggeeSide.csproj", "{552D4CE4-EF94-4232-B8EA-C5F26E930220}" 21 | EndProject 22 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizerPackage", "ImageVisualizerPackage\ImageVisualizerPackage.csproj", "{FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}" 23 | EndProject 24 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SetupVisualizer", "SetupVisualizer\SetupVisualizer.wixproj", "{49BAF40F-9365-482B-BC8E-43557931B415}" 25 | EndProject 26 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer17.UI", "ImageVisualizer17.UI\ImageVisualizer17.UI.csproj", "{9432AFAF-EEBD-424B-A181-271E9F2A00F7}" 27 | EndProject 28 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageVisualizer17.Common", "ImageVisualizer17.Common\ImageVisualizer17.Common.csproj", "{14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}" 29 | EndProject 30 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImageVisualizer17.DebuggeeSide", "ImageVisualizer17.DebuggeeSide\ImageVisualizer17.DebuggeeSide.csproj", "{2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}" 31 | EndProject 32 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer17.6.DebuggeeSide", "ImageVisualizer17.6.DebuggeeSide\ImageVisualizer17.6.DebuggeeSide.csproj", "{1258707D-E75F-44CA-A5B8-9EB6151F10D1}" 33 | EndProject 34 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer17.6.Common", "ImageVisualizer17.6.Common\ImageVisualizer17.6.Common.csproj", "{2F389236-8D1B-4410-85A9-6CDEA95A0B38}" 35 | EndProject 36 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageVisualizer17.6.UI", "ImageVisualizer17.6.UI\ImageVisualizer17.6.UI.csproj", "{07BD2160-ED5E-4B91-A948-A99400AD4F53}" 37 | EndProject 38 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VSVersionAction", "VSVersionAction\VSVersionAction.csproj", "{B84984BE-B51A-4EB3-BCA0-9476A7C60F18}" 39 | EndProject 40 | Global 41 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 42 | Debug|Any CPU = Debug|Any CPU 43 | Debug|x86 = Debug|x86 44 | Release|Any CPU = Release|Any CPU 45 | Release|x86 = Release|x86 46 | EndGlobalSection 47 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 48 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 49 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Debug|Any CPU.Build.0 = Debug|Any CPU 50 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Debug|x86.ActiveCfg = Debug|Any CPU 51 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Debug|x86.Build.0 = Debug|Any CPU 52 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Release|Any CPU.ActiveCfg = Release|Any CPU 53 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Release|Any CPU.Build.0 = Release|Any CPU 54 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Release|x86.ActiveCfg = Release|Any CPU 55 | {8377674C-A112-4DC9-9745-926434AE7B2E}.Release|x86.Build.0 = Release|Any CPU 56 | {496B16D7-54D1-418B-951B-71DD377156A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 57 | {496B16D7-54D1-418B-951B-71DD377156A7}.Debug|Any CPU.Build.0 = Debug|Any CPU 58 | {496B16D7-54D1-418B-951B-71DD377156A7}.Debug|x86.ActiveCfg = Debug|Any CPU 59 | {496B16D7-54D1-418B-951B-71DD377156A7}.Debug|x86.Build.0 = Debug|Any CPU 60 | {496B16D7-54D1-418B-951B-71DD377156A7}.Release|Any CPU.ActiveCfg = Release|Any CPU 61 | {496B16D7-54D1-418B-951B-71DD377156A7}.Release|Any CPU.Build.0 = Release|Any CPU 62 | {496B16D7-54D1-418B-951B-71DD377156A7}.Release|x86.ActiveCfg = Release|Any CPU 63 | {496B16D7-54D1-418B-951B-71DD377156A7}.Release|x86.Build.0 = Release|Any CPU 64 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 65 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Debug|Any CPU.Build.0 = Debug|Any CPU 66 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Debug|x86.ActiveCfg = Debug|Any CPU 67 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Debug|x86.Build.0 = Debug|Any CPU 68 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Release|Any CPU.ActiveCfg = Release|Any CPU 69 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Release|Any CPU.Build.0 = Release|Any CPU 70 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Release|x86.ActiveCfg = Release|Any CPU 71 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8}.Release|x86.Build.0 = Release|Any CPU 72 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 73 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Debug|Any CPU.Build.0 = Debug|Any CPU 74 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Debug|x86.ActiveCfg = Debug|Any CPU 75 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Debug|x86.Build.0 = Debug|Any CPU 76 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Release|Any CPU.ActiveCfg = Release|Any CPU 77 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Release|Any CPU.Build.0 = Release|Any CPU 78 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Release|x86.ActiveCfg = Release|Any CPU 79 | {318C7CE4-37EE-4185-945D-B7833677A29A}.Release|x86.Build.0 = Release|Any CPU 80 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 81 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Debug|Any CPU.Build.0 = Debug|Any CPU 82 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Debug|x86.ActiveCfg = Debug|Any CPU 83 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Debug|x86.Build.0 = Debug|Any CPU 84 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Release|Any CPU.ActiveCfg = Release|Any CPU 85 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Release|Any CPU.Build.0 = Release|Any CPU 86 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Release|x86.ActiveCfg = Release|Any CPU 87 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D}.Release|x86.Build.0 = Release|Any CPU 88 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 89 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Debug|Any CPU.Build.0 = Debug|Any CPU 90 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Debug|x86.ActiveCfg = Debug|Any CPU 91 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Debug|x86.Build.0 = Debug|Any CPU 92 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Release|Any CPU.ActiveCfg = Release|Any CPU 93 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Release|Any CPU.Build.0 = Release|Any CPU 94 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Release|x86.ActiveCfg = Release|Any CPU 95 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2}.Release|x86.Build.0 = Release|Any CPU 96 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 97 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Debug|Any CPU.Build.0 = Debug|Any CPU 98 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Debug|x86.ActiveCfg = Debug|Any CPU 99 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Debug|x86.Build.0 = Debug|Any CPU 100 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Release|Any CPU.ActiveCfg = Release|Any CPU 101 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Release|Any CPU.Build.0 = Release|Any CPU 102 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Release|x86.ActiveCfg = Release|Any CPU 103 | {B271E1B1-BB78-4864-8DB5-BC48FB1CB132}.Release|x86.Build.0 = Release|Any CPU 104 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 105 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Debug|Any CPU.Build.0 = Debug|Any CPU 106 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Debug|x86.ActiveCfg = Debug|Any CPU 107 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Debug|x86.Build.0 = Debug|Any CPU 108 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Release|Any CPU.ActiveCfg = Release|Any CPU 109 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Release|Any CPU.Build.0 = Release|Any CPU 110 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Release|x86.ActiveCfg = Release|Any CPU 111 | {552D4CE4-EF94-4232-B8EA-C5F26E930220}.Release|x86.Build.0 = Release|Any CPU 112 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 113 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Debug|Any CPU.Build.0 = Debug|Any CPU 114 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Debug|x86.ActiveCfg = Debug|x86 115 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Debug|x86.Build.0 = Debug|x86 116 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Release|Any CPU.ActiveCfg = Release|Any CPU 117 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Release|Any CPU.Build.0 = Release|Any CPU 118 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Release|x86.ActiveCfg = Release|x86 119 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0}.Release|x86.Build.0 = Release|x86 120 | {49BAF40F-9365-482B-BC8E-43557931B415}.Debug|Any CPU.ActiveCfg = Debug|x86 121 | {49BAF40F-9365-482B-BC8E-43557931B415}.Debug|Any CPU.Build.0 = Debug|x86 122 | {49BAF40F-9365-482B-BC8E-43557931B415}.Debug|x86.ActiveCfg = Debug|x86 123 | {49BAF40F-9365-482B-BC8E-43557931B415}.Debug|x86.Build.0 = Debug|x86 124 | {49BAF40F-9365-482B-BC8E-43557931B415}.Release|Any CPU.ActiveCfg = Release|x86 125 | {49BAF40F-9365-482B-BC8E-43557931B415}.Release|Any CPU.Build.0 = Release|x86 126 | {49BAF40F-9365-482B-BC8E-43557931B415}.Release|x86.ActiveCfg = Release|x86 127 | {49BAF40F-9365-482B-BC8E-43557931B415}.Release|x86.Build.0 = Release|x86 128 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 129 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Debug|Any CPU.Build.0 = Debug|Any CPU 130 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Debug|x86.ActiveCfg = Debug|Any CPU 131 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Debug|x86.Build.0 = Debug|Any CPU 132 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Release|Any CPU.ActiveCfg = Release|Any CPU 133 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Release|Any CPU.Build.0 = Release|Any CPU 134 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Release|x86.ActiveCfg = Release|Any CPU 135 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7}.Release|x86.Build.0 = Release|Any CPU 136 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 137 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Debug|Any CPU.Build.0 = Debug|Any CPU 138 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Debug|x86.ActiveCfg = Debug|Any CPU 139 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Debug|x86.Build.0 = Debug|Any CPU 140 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Release|Any CPU.ActiveCfg = Release|Any CPU 141 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Release|Any CPU.Build.0 = Release|Any CPU 142 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Release|x86.ActiveCfg = Release|Any CPU 143 | {14EEBA2B-B2B1-491B-800E-BCC181CFB8FC}.Release|x86.Build.0 = Release|Any CPU 144 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 145 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Debug|Any CPU.Build.0 = Debug|Any CPU 146 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Debug|x86.ActiveCfg = Debug|Any CPU 147 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Debug|x86.Build.0 = Debug|Any CPU 148 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Release|Any CPU.ActiveCfg = Release|Any CPU 149 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Release|Any CPU.Build.0 = Release|Any CPU 150 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Release|x86.ActiveCfg = Release|Any CPU 151 | {2FAA5BDC-192B-4EB7-A7D1-F69F74BE8223}.Release|x86.Build.0 = Release|Any CPU 152 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 153 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Debug|Any CPU.Build.0 = Debug|Any CPU 154 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Debug|x86.ActiveCfg = Debug|Any CPU 155 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Debug|x86.Build.0 = Debug|Any CPU 156 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Release|Any CPU.ActiveCfg = Release|Any CPU 157 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Release|Any CPU.Build.0 = Release|Any CPU 158 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Release|x86.ActiveCfg = Release|Any CPU 159 | {1258707D-E75F-44CA-A5B8-9EB6151F10D1}.Release|x86.Build.0 = Release|Any CPU 160 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 161 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Debug|Any CPU.Build.0 = Debug|Any CPU 162 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Debug|x86.ActiveCfg = Debug|Any CPU 163 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Debug|x86.Build.0 = Debug|Any CPU 164 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Release|Any CPU.ActiveCfg = Release|Any CPU 165 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Release|Any CPU.Build.0 = Release|Any CPU 166 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Release|x86.ActiveCfg = Release|Any CPU 167 | {2F389236-8D1B-4410-85A9-6CDEA95A0B38}.Release|x86.Build.0 = Release|Any CPU 168 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 169 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Debug|Any CPU.Build.0 = Debug|Any CPU 170 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Debug|x86.ActiveCfg = Debug|Any CPU 171 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Debug|x86.Build.0 = Debug|Any CPU 172 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Release|Any CPU.ActiveCfg = Release|Any CPU 173 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Release|Any CPU.Build.0 = Release|Any CPU 174 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Release|x86.ActiveCfg = Release|Any CPU 175 | {07BD2160-ED5E-4B91-A948-A99400AD4F53}.Release|x86.Build.0 = Release|Any CPU 176 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Debug|Any CPU.ActiveCfg = Debug|x86 177 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Debug|Any CPU.Build.0 = Debug|x86 178 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Debug|x86.ActiveCfg = Debug|x86 179 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Debug|x86.Build.0 = Debug|x86 180 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Release|Any CPU.ActiveCfg = Release|x86 181 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Release|Any CPU.Build.0 = Release|x86 182 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Release|x86.ActiveCfg = Release|x86 183 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18}.Release|x86.Build.0 = Release|x86 184 | EndGlobalSection 185 | GlobalSection(SolutionProperties) = preSolution 186 | HideSolutionNode = FALSE 187 | EndGlobalSection 188 | GlobalSection(ExtensibilityGlobals) = postSolution 189 | SolutionGuid = {1AC0DA32-B915-4CD0-BB7B-8676AD8EDD30} 190 | EndGlobalSection 191 | EndGlobal 192 | -------------------------------------------------------------------------------- /src/ImageVisualizer10/ImageVisualizer10.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {8377674C-A112-4DC9-9745-926434AE7B2E} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer 12 | v4.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | TRACE;DEBUG;VS10 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE;VS10 30 | prompt 31 | 4 32 | 33 | 34 | 35 | True 36 | 37 | 38 | False 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | ImageControl.xaml.cs 58 | ImageControl.xaml 59 | 60 | 61 | ImageForm.cs 62 | Form 63 | 64 | 65 | ImageForm.Designer.cs 66 | ImageForm.cs 67 | 68 | 69 | ImageVisualizerObjectSource.cs 70 | 71 | 72 | Properties\AssemblyInfo.cs 73 | 74 | 75 | SerializableBitmapImage.cs 76 | 77 | 78 | ImageVisualizer.cs 79 | 80 | 81 | 82 | 83 | ImageControl.xaml 84 | MSBuild:Compile 85 | Designer 86 | 87 | 88 | 89 | 90 | ImageForm.resx 91 | ImageForm.cs 92 | 93 | 94 | 95 | 102 | -------------------------------------------------------------------------------- /src/ImageVisualizer11/ImageVisualizer11.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {496B16D7-54D1-418B-951B-71DD377156A7} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer 12 | v4.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | TRACE;DEBUG;VS11 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE;VS11 30 | prompt 31 | 4 32 | 33 | 34 | 35 | True 36 | 37 | 38 | False 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | ImageControl.xaml.cs 58 | ImageControl.xaml 59 | 60 | 61 | ImageForm.cs 62 | Form 63 | 64 | 65 | ImageForm.Designer.cs 66 | ImageForm.cs 67 | 68 | 69 | ImageVisualizerObjectSource.cs 70 | 71 | 72 | Properties\AssemblyInfo.cs 73 | 74 | 75 | SerializableBitmapImage.cs 76 | 77 | 78 | ImageVisualizer.cs 79 | 80 | 81 | 82 | 83 | ImageForm.resx 84 | ImageForm.cs 85 | 86 | 87 | 88 | 89 | ImageControl.xaml 90 | MSBuild:Compile 91 | Designer 92 | 93 | 94 | 95 | 102 | -------------------------------------------------------------------------------- /src/ImageVisualizer12/ImageVisualizer12.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {2B4306BF-2E14-4E75-AA09-5423E906C5D8} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer 12 | v4.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | TRACE;DEBUG;VS12 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE;VS12 30 | prompt 31 | 4 32 | 33 | 34 | 35 | True 36 | 37 | 38 | False 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | ImageControl.xaml.cs 58 | ImageControl.xaml 59 | 60 | 61 | ImageForm.cs 62 | Form 63 | 64 | 65 | ImageForm.Designer.cs 66 | ImageForm.cs 67 | 68 | 69 | ImageVisualizerObjectSource.cs 70 | 71 | 72 | Properties\AssemblyInfo.cs 73 | 74 | 75 | SerializableBitmapImage.cs 76 | 77 | 78 | ImageVisualizer.cs 79 | 80 | 81 | 82 | 83 | ImageForm.resx 84 | ImageForm.cs 85 | 86 | 87 | 88 | 89 | ImageControl.xaml 90 | MSBuild:Compile 91 | Designer 92 | 93 | 94 | 95 | 102 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageControl.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Runtime.InteropServices; 4 | using System.Windows; 5 | using System.Windows.Controls; 6 | using System.Windows.Input; 7 | using System.Windows.Media; 8 | using System.Windows.Media.Imaging; 9 | 10 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 11 | { 12 | /// 13 | /// Interaction logic for ImageControl.xaml 14 | /// 15 | public partial class ImageControl : UserControl 16 | { 17 | Point? lastMousePositionOnTarget; 18 | Point? lastDragPoint; 19 | 20 | double _zoomValue = 1.0; 21 | 22 | public ImageControl() 23 | { 24 | InitializeComponent(); 25 | } 26 | 27 | public void SetImage(ImageSource imageSource) 28 | { 29 | if (imageSource != null) 30 | { 31 | DisplayImage.Source = imageSource; 32 | } 33 | } 34 | 35 | private void DisplayImage_MouseWheel(object sender, MouseWheelEventArgs e) 36 | { 37 | var p = Mouse.GetPosition(DisplayImage); 38 | lastMousePositionOnTarget = p; 39 | 40 | if (e.Delta > 0) 41 | { 42 | _zoomValue += 0.1; 43 | } 44 | else if(e.Delta < 0) 45 | { 46 | _zoomValue -= 0.1; 47 | } 48 | 49 | if (_zoomValue <= 0) 50 | _zoomValue = double.Epsilon; 51 | 52 | var zoom = ZoomToFit(); 53 | if (_zoomValue < zoom) 54 | _zoomValue = zoom; 55 | 56 | var scale = new ScaleTransform(_zoomValue, _zoomValue); 57 | DisplayImage.LayoutTransform = scale; 58 | } 59 | 60 | private void ScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) 61 | { 62 | #if DEBUG 63 | if (DisplayScroll.CanContentScroll) 64 | { 65 | Console.WriteLine("ScrollChangedEvent just Occurred"); 66 | Console.WriteLine("ExtentHeight is now " + e.ExtentHeight); 67 | Console.WriteLine("ExtentWidth is now " + e.ExtentWidth); 68 | Console.WriteLine("ExtentHeightChange was " + e.ExtentHeightChange); 69 | Console.WriteLine("ExtentWidthChange was " + e.ExtentWidthChange); 70 | Console.WriteLine("HorizontalOffset is now " + e.HorizontalOffset); 71 | Console.WriteLine("VerticalOffset is now " + e.VerticalOffset); 72 | Console.WriteLine("HorizontalChange was " + e.HorizontalChange); 73 | Console.WriteLine("VerticalChange was " + e.VerticalChange); 74 | Console.WriteLine("ViewportHeight is now " + e.ViewportHeight); 75 | Console.WriteLine("ViewportWidth is now " + e.ViewportWidth); 76 | Console.WriteLine("ViewportHeightChange was " + e.ViewportHeightChange); 77 | Console.WriteLine("ViewportWidthChange was " + e.ViewportWidthChange); 78 | Console.WriteLine("ActualHeight is now " + DisplayScroll.ActualHeight); 79 | Console.WriteLine("ActualWidth is now " + DisplayScroll.ActualWidth); 80 | Console.WriteLine("--------------------------------------------------------------"); 81 | //ActualHeight = ViewportHeight + HorizontalScrollbarHeight 82 | } 83 | #endif 84 | 85 | DisplayScroll.UpdateLayout(); 86 | 87 | if(e.ViewportHeightChange != 0 || e.ViewportWidthChange != 0) 88 | { 89 | _zoomValue = ZoomToFit(); 90 | var scale = new ScaleTransform(_zoomValue, _zoomValue); 91 | DisplayImage.LayoutTransform = scale; 92 | 93 | DisplayScroll.UpdateLayout(); 94 | } 95 | 96 | if (e.ExtentHeightChange != 0 || e.ExtentWidthChange != 0) 97 | { 98 | Point? targetBefore = null; 99 | Point? targetNow = null; 100 | 101 | if (lastMousePositionOnTarget.HasValue) 102 | { 103 | targetBefore = lastMousePositionOnTarget; 104 | targetNow = Mouse.GetPosition(DisplayImage); 105 | 106 | lastMousePositionOnTarget = null; 107 | } 108 | 109 | if (targetBefore.HasValue) 110 | { 111 | double dXInTargetPixels = targetNow.Value.X - targetBefore.Value.X; 112 | double dYInTargetPixels = targetNow.Value.Y - targetBefore.Value.Y; 113 | 114 | double multiplicatorX = e.ExtentWidth / DisplayImage.ActualWidth; 115 | double multiplicatorY = e.ExtentHeight / DisplayImage.ActualHeight; 116 | 117 | double newOffsetX = DisplayScroll.HorizontalOffset - dXInTargetPixels * multiplicatorX; 118 | double newOffsetY = DisplayScroll.VerticalOffset - dYInTargetPixels * multiplicatorY; 119 | 120 | if (double.IsNaN(newOffsetX) || double.IsNaN(newOffsetY)) 121 | { 122 | return; 123 | } 124 | 125 | DisplayScroll.ScrollToHorizontalOffset(newOffsetX); 126 | DisplayScroll.ScrollToVerticalOffset(newOffsetY); 127 | } 128 | } 129 | } 130 | 131 | private double ZoomToFit() 132 | { 133 | if (DisplayImage.Source != null) 134 | { 135 | double width = DisplayScroll.ActualWidth; 136 | double height = DisplayScroll.ActualHeight; 137 | double imageWidth = DisplayImage.Source.Width; 138 | double imageHeight = DisplayImage.Source.Height; 139 | double zoom; 140 | double aspectRatio; 141 | 142 | if(imageWidth <= width || imageHeight <= height) 143 | return 1; 144 | 145 | if (imageWidth > imageHeight) 146 | { 147 | aspectRatio = width / imageWidth; 148 | zoom = aspectRatio; 149 | 150 | if (height < imageHeight * zoom) 151 | { 152 | aspectRatio = height / imageHeight; 153 | zoom = aspectRatio; 154 | } 155 | } 156 | else 157 | { 158 | aspectRatio = height / imageHeight; 159 | zoom = aspectRatio; 160 | 161 | if (width < imageWidth * zoom) 162 | { 163 | aspectRatio = width / imageWidth; 164 | zoom = aspectRatio; 165 | } 166 | } 167 | 168 | return zoom; 169 | } 170 | 171 | return -1; 172 | } 173 | 174 | private void DisplayScroll_Loaded(object sender, RoutedEventArgs e) 175 | { 176 | var zoom = ZoomToFit(); 177 | if (zoom != -1) 178 | { 179 | var scale = new ScaleTransform(zoom, zoom); 180 | DisplayImage.LayoutTransform = scale; 181 | _zoomValue = zoom; 182 | } 183 | } 184 | 185 | private void DisplayScroll_MouseMove(object sender, MouseEventArgs e) 186 | { 187 | if (lastDragPoint.HasValue) 188 | { 189 | Point posNow = e.GetPosition(DisplayScroll); 190 | double dX = posNow.X - lastDragPoint.Value.X; 191 | double dY = posNow.Y - lastDragPoint.Value.Y; 192 | lastDragPoint = posNow; 193 | DisplayScroll.ScrollToHorizontalOffset(DisplayScroll.HorizontalOffset - dX); 194 | DisplayScroll.ScrollToVerticalOffset(DisplayScroll.VerticalOffset - dY); 195 | } 196 | } 197 | 198 | private void DisplayScroll_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) 199 | { 200 | var mousePosition = e.GetPosition(DisplayScroll); 201 | if (mousePosition.X <= DisplayScroll.ViewportWidth && mousePosition.Y < DisplayScroll.ViewportHeight) 202 | { 203 | DisplayScroll.Cursor = Cursors.SizeAll; 204 | lastDragPoint = mousePosition; 205 | Mouse.Capture(DisplayScroll); 206 | } 207 | } 208 | 209 | private void DisplayScroll_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) 210 | { 211 | DisplayScroll.Cursor = Cursors.Arrow; 212 | DisplayScroll.ReleaseMouseCapture(); 213 | lastDragPoint = null; 214 | } 215 | } 216 | } 217 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 2 | { 3 | partial class ImageForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.btnClose = new System.Windows.Forms.Button(); 32 | this.panel1 = new System.Windows.Forms.Panel(); 33 | this.elementHost = new System.Windows.Forms.Integration.ElementHost(); 34 | this.imageControl = new ImageControl(); 35 | this.label1 = new System.Windows.Forms.Label(); 36 | this.label2 = new System.Windows.Forms.Label(); 37 | this.txtExpression = new System.Windows.Forms.TextBox(); 38 | this.panel1.SuspendLayout(); 39 | this.SuspendLayout(); 40 | // 41 | // btnClose 42 | // 43 | this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 44 | this.btnClose.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 45 | this.btnClose.Location = new System.Drawing.Point(270, 322); 46 | this.btnClose.Name = "btnClose"; 47 | this.btnClose.Size = new System.Drawing.Size(102, 27); 48 | this.btnClose.TabIndex = 3; 49 | this.btnClose.Text = "Close"; 50 | this.btnClose.UseVisualStyleBackColor = true; 51 | this.btnClose.Click += new System.EventHandler(this.btnClose_Click); 52 | // 53 | // panel1 54 | // 55 | this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 56 | | System.Windows.Forms.AnchorStyles.Left) 57 | | System.Windows.Forms.AnchorStyles.Right))); 58 | this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 59 | this.panel1.Controls.Add(this.elementHost); 60 | this.panel1.Location = new System.Drawing.Point(12, 64); 61 | this.panel1.Name = "panel1"; 62 | this.panel1.Size = new System.Drawing.Size(360, 252); 63 | this.panel1.TabIndex = 2; 64 | // 65 | // elementHost 66 | // 67 | this.elementHost.BackColorTransparent = true; 68 | this.elementHost.Dock = System.Windows.Forms.DockStyle.Fill; 69 | this.elementHost.Location = new System.Drawing.Point(0, 0); 70 | this.elementHost.Name = "elementHost"; 71 | this.elementHost.Size = new System.Drawing.Size(358, 250); 72 | this.elementHost.TabIndex = 0; 73 | this.elementHost.Text = "elementHost"; 74 | this.elementHost.Child = this.imageControl; 75 | // 76 | // label1 77 | // 78 | this.label1.AutoSize = true; 79 | this.label1.Location = new System.Drawing.Point(14, 17); 80 | this.label1.Name = "label1"; 81 | this.label1.Size = new System.Drawing.Size(61, 13); 82 | this.label1.TabIndex = 4; 83 | this.label1.Text = "&Expression:"; 84 | // 85 | // label2 86 | // 87 | this.label2.AutoSize = true; 88 | this.label2.Location = new System.Drawing.Point(14, 43); 89 | this.label2.Name = "label2"; 90 | this.label2.Size = new System.Drawing.Size(37, 13); 91 | this.label2.TabIndex = 5; 92 | this.label2.Text = "&Value:"; 93 | // 94 | // txtExpression 95 | // 96 | this.txtExpression.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 97 | | System.Windows.Forms.AnchorStyles.Left) 98 | | System.Windows.Forms.AnchorStyles.Right))); 99 | this.txtExpression.BackColor = System.Drawing.SystemColors.Control; 100 | this.txtExpression.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; 101 | this.txtExpression.Location = new System.Drawing.Point(121, 14); 102 | this.txtExpression.Name = "txtExpression"; 103 | this.txtExpression.ReadOnly = true; 104 | this.txtExpression.Size = new System.Drawing.Size(251, 20); 105 | this.txtExpression.TabIndex = 6; 106 | // 107 | // ImageForm 108 | // 109 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 110 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 111 | this.ClientSize = new System.Drawing.Size(384, 361); 112 | this.Controls.Add(this.txtExpression); 113 | this.Controls.Add(this.label2); 114 | this.Controls.Add(this.label1); 115 | this.Controls.Add(this.panel1); 116 | this.Controls.Add(this.btnClose); 117 | this.MinimizeBox = false; 118 | this.MinimumSize = new System.Drawing.Size(400, 400); 119 | this.Name = "ImageForm"; 120 | this.ShowIcon = false; 121 | this.ShowInTaskbar = false; 122 | this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Show; 123 | this.Text = "Image Visualizer"; 124 | this.panel1.ResumeLayout(false); 125 | this.ResumeLayout(false); 126 | this.PerformLayout(); 127 | 128 | } 129 | 130 | #endregion 131 | 132 | private System.Windows.Forms.Integration.ElementHost elementHost; 133 | private ImageControl imageControl; 134 | private System.Windows.Forms.Button btnClose; 135 | private System.Windows.Forms.Panel panel1; 136 | private System.Windows.Forms.Label label1; 137 | private System.Windows.Forms.Label label2; 138 | private System.Windows.Forms.TextBox txtExpression; 139 | } 140 | } -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel; 3 | using System.Drawing; 4 | using System.IO; 5 | using System.Runtime.InteropServices; 6 | using System.Windows; 7 | using System.Windows.Forms; 8 | using System.Windows.Media.Imaging; 9 | 10 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 11 | { 12 | public partial class ImageForm : Form 13 | { 14 | [DllImport("gdi32")] 15 | [return: MarshalAs(UnmanagedType.Bool)] 16 | static extern bool DeleteObject(IntPtr hObject); 17 | 18 | public static Font UIFont 19 | { 20 | get 21 | { 22 | #if VS10 23 | string dteProgID = "VisualStudio.DTE.10.0"; 24 | #elif VS11 25 | string dteProgID = "VisualStudio.DTE.11.0"; 26 | #elif VS12 27 | string dteProgID = "VisualStudio.DTE.12.0"; 28 | #elif VS13 29 | string dteProgID = "VisualStudio.DTE.13.0"; 30 | #elif VS14 31 | string dteProgID = "VisualStudio.DTE.14.0"; 32 | #elif VS15 33 | string dteProgID = "VisualStudio.DTE.15.0"; 34 | #elif VS16 35 | string dteProgID = "VisualStudio.DTE.16.0"; 36 | #elif VS17 || VS17_6 37 | string dteProgID = "VisualStudio.DTE.17.0"; 38 | #endif 39 | var dte = (EnvDTE.DTE)Marshal.GetActiveObject(dteProgID); 40 | var fontProperty = dte.Properties["FontsAndColors", "Dialogs and Tool Windows"]; 41 | if (fontProperty != null) 42 | { 43 | object objValue = fontProperty.Item("FontFamily").Value; 44 | string fontFamily = objValue.ToString(); 45 | objValue = fontProperty.Item("FontSize").Value; 46 | float fontSize = Convert.ToSingle(objValue); 47 | var font = new Font(fontFamily, fontSize); 48 | 49 | return font; 50 | } 51 | 52 | return System.Drawing.SystemFonts.DefaultFont; 53 | } 54 | } 55 | 56 | public ImageForm(object objectBitmap) 57 | { 58 | InitializeComponent(); 59 | 60 | #if DEBUG 61 | this.ShowInTaskbar = true; 62 | #endif 63 | 64 | this.label1.Font = UIFont; 65 | SetFontAndScale(this.label1, UIFont); 66 | this.label2.Font = UIFont; 67 | this.txtExpression.Font = UIFont; 68 | this.btnClose.Font = UIFont; 69 | 70 | if (objectBitmap != null) 71 | { 72 | #if DEBUG 73 | string expression = objectBitmap.ToString(); 74 | #endif 75 | BitmapSource bitmapSource = null; 76 | 77 | #if VS17_6 78 | if (objectBitmap is ImageVisualizerImage visualizerImage) 79 | { 80 | txtExpression.Text = visualizerImage.Name + (visualizerImage.Image?.Length ?? -1); 81 | 82 | if (visualizerImage.Image != null) 83 | { 84 | var stream = new MemoryStream(visualizerImage.Image); 85 | stream.Seek(0, SeekOrigin.Begin); 86 | 87 | var bitmapImage = new BitmapImage(); 88 | bitmapImage.CacheOption = BitmapCacheOption.OnLoad; 89 | bitmapImage.BeginInit(); 90 | bitmapImage.StreamSource = stream; 91 | bitmapImage.EndInit(); 92 | bitmapImage.Freeze(); 93 | 94 | bitmapSource = bitmapImage; 95 | } 96 | } 97 | #else 98 | var method = objectBitmap.GetType().GetMethod("ToBitmap", new Type[] { }); 99 | if (method != null) 100 | { 101 | objectBitmap = method.Invoke(objectBitmap, null); 102 | } 103 | 104 | if (objectBitmap is Bitmap) 105 | { 106 | var hObject = ((Bitmap)objectBitmap).GetHbitmap(); 107 | 108 | try 109 | { 110 | bitmapSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( 111 | hObject, 112 | IntPtr.Zero, 113 | Int32Rect.Empty, 114 | BitmapSizeOptions.FromEmptyOptions()); 115 | } 116 | catch (Win32Exception) 117 | { 118 | bitmapSource = null; 119 | } 120 | finally 121 | { 122 | DeleteObject(hObject); 123 | } 124 | } 125 | #if VS16 || VS17 126 | else if (objectBitmap is SerializableBitmap x) 127 | { 128 | var hObject = ((Bitmap)x).GetHbitmap(); 129 | 130 | try 131 | { 132 | bitmapSource = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap( 133 | hObject, 134 | IntPtr.Zero, 135 | Int32Rect.Empty, 136 | BitmapSizeOptions.FromEmptyOptions()); 137 | } 138 | catch (Win32Exception) 139 | { 140 | bitmapSource = null; 141 | } 142 | finally 143 | { 144 | DeleteObject(hObject); 145 | } 146 | } 147 | #endif 148 | else if (objectBitmap is SerializableBitmapImage serializableBitmapImage) 149 | { 150 | bitmapSource = serializableBitmapImage; 151 | } 152 | #endif 153 | 154 | if (bitmapSource != null) 155 | { 156 | imageControl.SetImage(bitmapSource); 157 | } 158 | 159 | txtExpression.Text = objectBitmap.ToString(); 160 | } 161 | } 162 | 163 | protected override bool ProcessCmdKey(ref Message msg, Keys keyData) 164 | { 165 | if (ModifierKeys == Keys.None && keyData == Keys.Escape) 166 | { 167 | this.Close(); 168 | return true; 169 | } 170 | 171 | return base.ProcessCmdKey(ref msg, keyData); 172 | } 173 | 174 | private void SetFontAndScale(Control ctlControl, Font objFont) 175 | { 176 | float sngRatio = objFont.Size / ctlControl.Font.Size; 177 | if (ctlControl is Form form) 178 | { 179 | form.AutoScaleMode = AutoScaleMode.None; 180 | } 181 | ctlControl.Font = objFont; 182 | ctlControl.Scale(new SizeF(sngRatio, sngRatio)); 183 | } 184 | 185 | private void btnClose_Click(object sender, EventArgs e) 186 | { 187 | this.Close(); 188 | } 189 | } 190 | } 191 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageForm.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageVisualizer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Windows.Forms; 3 | using Aberus.VisualStudio.Debugger.ImageVisualizer; 4 | using Microsoft.VisualStudio.DebuggerVisualizers; 5 | #if VS16 || VS17 || VS17_6 6 | using Microsoft.VisualStudio.Utilities; 7 | #endif 8 | 9 | // System.Drawing.Bitmap 10 | [assembly: System.Diagnostics.DebuggerVisualizer( 11 | typeof(ImageVisualizer), 12 | #if VS17_6 13 | typeof(ImageVisualizerJsonObjectSource), 14 | #elif VS16 || VS17 15 | typeof(ImageVisualizerBitmapObjectSource), 16 | #else 17 | typeof(VisualizerObjectSource), 18 | #endif 19 | Target = typeof(System.Drawing.Bitmap), 20 | Description = "Image Visualizer")] 21 | 22 | // System.Windows.Media.Imaging.BitmapImage, System.Windows.Media.Imaging.BitmapSource 23 | [assembly: System.Diagnostics.DebuggerVisualizer( 24 | typeof(ImageVisualizer), 25 | #if VS17_6 26 | typeof(ImageVisualizerJsonObjectSource), 27 | #else 28 | typeof(ImageVisualizerObjectSource), 29 | #endif 30 | Target = typeof(System.Windows.Media.Imaging.BitmapSource), 31 | Description = "Image Visualizer")] 32 | 33 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 34 | { 35 | /// 36 | /// A Visualizer for and . 37 | /// 38 | public class ImageVisualizer : DialogDebuggerVisualizer 39 | { 40 | 41 | #if VS17_6 42 | public ImageVisualizer() : base(FormatterPolicy.Json) 43 | { 44 | 45 | } 46 | #endif 47 | 48 | protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider) 49 | { 50 | if (windowService == null) 51 | throw new ArgumentNullException(nameof(windowService), "This debugger does not support modal visualizers."); 52 | if (objectProvider == null) 53 | throw new ArgumentNullException(nameof(objectProvider)); 54 | 55 | if (windowService is IWin32Window win32Window) 56 | { 57 | 58 | #if VS17_6 59 | var debugObject = (objectProvider as IVisualizerObjectProvider3).GetObject(); 60 | #else 61 | var debugObject = objectProvider.GetObject(); 62 | #endif 63 | 64 | 65 | #if VS16 || VS17 || VS17_6 66 | using (DpiAwareness.EnterDpiScope(DpiAwarenessContext.PerMonitorAwareV2)) 67 | #endif 68 | using (var imageForm = new ImageForm(debugObject)) 69 | { 70 | windowService.ShowDialog(imageForm); 71 | } 72 | } 73 | } 74 | 75 | #if DEBUG 76 | /// 77 | /// Tests the visualizer by hosting it outside of the debugger. 78 | /// 79 | /// The object to display in the visualizer. 80 | public static void TestShowVisualizer(object objectToVisualize) 81 | { 82 | var visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof(ImageVisualizer), typeof(ImageVisualizerObjectSource)); 83 | visualizerHost.ShowVisualizer(); 84 | } 85 | #endif 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageVisualizer14.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {318C7CE4-37EE-4185-945D-B7833677A29A} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer 12 | v4.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | TRACE;DEBUG;VS14 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE;VS14 30 | prompt 31 | 4 32 | 33 | 34 | 35 | True 36 | 37 | 38 | False 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | ImageControl.xaml 58 | 59 | 60 | Form 61 | 62 | 63 | ImageForm.cs 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | ImageForm.cs 73 | 74 | 75 | 76 | 77 | Designer 78 | MSBuild:Compile 79 | 80 | 81 | 82 | 89 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/ImageVisualizerObjectSource.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Windows.Media; 3 | using System.Windows.Media.Imaging; 4 | using Microsoft.VisualStudio.DebuggerVisualizers; 5 | 6 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 7 | { 8 | public class ImageVisualizerObjectSource : VisualizerObjectSource 9 | { 10 | public override void GetData(object target, Stream outgoingData) 11 | { 12 | if (target is BitmapSource image) 13 | base.GetData(new SerializableBitmapImage(image), outgoingData); 14 | else 15 | base.GetData(target, outgoingData); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Image Debugger Visualizer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Aleksander Berus")] 12 | [assembly: AssemblyProduct("Image Debugger Visualizer")] 13 | [assembly: AssemblyCopyright("Aleksander Berus. All rights reserved.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("318c7ce4-37ee-4185-945d-b7833677a29a")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.2.0.0")] 36 | [assembly: AssemblyFileVersion("1.2.0.0")] 37 | -------------------------------------------------------------------------------- /src/ImageVisualizer14/SerializableBitmapImage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Runtime.InteropServices; 4 | using System.Runtime.Serialization; 5 | using System.Windows.Media.Imaging; 6 | 7 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 8 | { 9 | [Serializable] 10 | public class SerializableBitmapImage : ISerializable 11 | { 12 | public BitmapSource bitmapSource; 13 | private readonly string expression; 14 | 15 | public SerializableBitmapImage(BitmapImage image) 16 | { 17 | bitmapSource = image; 18 | } 19 | 20 | public SerializableBitmapImage(BitmapSource source) 21 | { 22 | bitmapSource = source; 23 | } 24 | 25 | protected SerializableBitmapImage(SerializationInfo info, StreamingContext context) 26 | { 27 | foreach (var i in info) 28 | { 29 | if (string.Equals(i.Name, "Image", StringComparison.OrdinalIgnoreCase)) 30 | { 31 | try 32 | { 33 | if (i.Value is byte[] array) 34 | { 35 | var stream = new MemoryStream(array); 36 | stream.Seek(0, SeekOrigin.Begin); 37 | 38 | var bitmapImage = new BitmapImage(); 39 | bitmapImage.CacheOption = BitmapCacheOption.OnLoad; 40 | bitmapImage.BeginInit(); 41 | bitmapImage.StreamSource = stream; 42 | bitmapImage.EndInit(); 43 | bitmapImage.Freeze(); 44 | 45 | bitmapSource = bitmapImage; 46 | } 47 | } 48 | catch (ExternalException) 49 | { 50 | } 51 | catch (ArgumentException) 52 | { 53 | } 54 | catch (OutOfMemoryException) 55 | { 56 | } 57 | catch (InvalidOperationException) 58 | { 59 | } 60 | catch (NotImplementedException) 61 | { 62 | } 63 | catch (FileNotFoundException) 64 | { 65 | } 66 | } 67 | else if(string.Equals(i.Name, "Name", StringComparison.OrdinalIgnoreCase)) 68 | { 69 | expression = (string)i.Value; 70 | } 71 | } 72 | } 73 | 74 | public static implicit operator SerializableBitmapImage(BitmapImage bitmapImage) 75 | { 76 | return new SerializableBitmapImage(bitmapImage); 77 | } 78 | 79 | public static implicit operator BitmapImage(SerializableBitmapImage serializableBitmapImage) 80 | { 81 | return (BitmapImage)serializableBitmapImage.bitmapSource; 82 | } 83 | 84 | //[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.SerializationFormatter)] 85 | void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) 86 | { 87 | if (bitmapSource != null) 88 | { 89 | using (var memoryStream = new MemoryStream()) 90 | { 91 | var encoder = new PngBitmapEncoder(); 92 | //TODO try/catch 93 | encoder.Frames.Add(BitmapFrame.Create(bitmapSource)); 94 | encoder.Save(memoryStream); 95 | memoryStream.Seek(0, SeekOrigin.Begin); 96 | 97 | info.AddValue("Image", memoryStream.ToArray(), typeof(byte[])); 98 | } 99 | 100 | info.AddValue("Name", bitmapSource.ToString()); 101 | } 102 | } 103 | 104 | public override string ToString() 105 | { 106 | if (!string.IsNullOrEmpty(expression)) 107 | return expression; 108 | 109 | return base.ToString(); 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /src/ImageVisualizer15/ImageVisualizer15.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {0A095313-31F1-4677-ACC2-60BCF5ADFC5D} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer 12 | v4.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | TRACE;DEBUG;VS15 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE;VS15 30 | prompt 31 | 4 32 | 33 | 34 | 35 | True 36 | 37 | 38 | False 39 | C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.DebuggerVisualizers.dll 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | ImageControl.xaml.cs 59 | ImageControl.xaml 60 | 61 | 62 | ImageForm.cs 63 | Form 64 | 65 | 66 | ImageForm.Designer.cs 67 | ImageForm.cs 68 | 69 | 70 | ImageVisualizerObjectSource.cs 71 | 72 | 73 | Properties\AssemblyInfo.cs 74 | 75 | 76 | SerializableBitmapImage.cs 77 | 78 | 79 | ImageVisualizer.cs 80 | 81 | 82 | 83 | 84 | ImageForm.resx 85 | ImageForm.cs 86 | 87 | 88 | 89 | 90 | ImageControl.xaml 91 | MSBuild:Compile 92 | Designer 93 | 94 | 95 | 96 | 103 | -------------------------------------------------------------------------------- /src/ImageVisualizer16.Common/ImageVisualizer16.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0;net40 5 | Aberus.VisualStudio.Debugger.ImageVisualizer 6 | true 7 | Aberus.VisualStudio.Debugger.ImageVisualizer.Common 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 4.5.0 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/ImageVisualizer16.Common/SerializableBitmap.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Drawing; 3 | using System.IO; 4 | using System.Runtime.InteropServices; 5 | using System.Runtime.Serialization; 6 | 7 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 8 | { 9 | [Serializable] 10 | public class SerializableBitmap : ISerializable 11 | { 12 | private readonly Bitmap bitmap; 13 | private readonly string expression; 14 | 15 | public SerializableBitmap(Bitmap bitmap) 16 | { 17 | this.bitmap = bitmap; 18 | } 19 | 20 | protected SerializableBitmap(SerializationInfo info, StreamingContext context) 21 | { 22 | foreach (var i in info) 23 | { 24 | if (string.Equals(i.Name, "Bitmap", StringComparison.OrdinalIgnoreCase)) 25 | { 26 | try 27 | { 28 | if (i.Value is byte[] array) 29 | { 30 | var stream = new MemoryStream(array); 31 | stream.Seek(0, SeekOrigin.Begin); 32 | 33 | bitmap = new Bitmap(stream); 34 | 35 | } 36 | } 37 | catch (ExternalException) 38 | { 39 | } 40 | catch (ArgumentException) 41 | { 42 | } 43 | catch (OutOfMemoryException) 44 | { 45 | } 46 | catch (InvalidOperationException) 47 | { 48 | } 49 | catch (NotImplementedException) 50 | { 51 | } 52 | catch (FileNotFoundException) 53 | { 54 | } 55 | } 56 | else if (string.Equals(i.Name, "Name", StringComparison.OrdinalIgnoreCase)) 57 | { 58 | expression = (string)i.Value; 59 | } 60 | } 61 | } 62 | 63 | public static implicit operator SerializableBitmap(Bitmap bitmap) 64 | { 65 | return new SerializableBitmap(bitmap); 66 | } 67 | 68 | public static implicit operator Bitmap(SerializableBitmap serializableBitmap) 69 | { 70 | return serializableBitmap.bitmap; 71 | } 72 | 73 | public void GetObjectData(SerializationInfo info, StreamingContext context) 74 | { 75 | var source = bitmap; 76 | 77 | if (source != null) 78 | { 79 | using (var memoryStream = new MemoryStream()) 80 | { 81 | bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Bmp); 82 | //TODO try/catch 83 | memoryStream.Seek(0, SeekOrigin.Begin); 84 | 85 | info.AddValue("Bitmap", memoryStream.ToArray(), typeof(byte[])); 86 | } 87 | 88 | info.AddValue("Name", source.ToString()); 89 | } 90 | } 91 | 92 | public override string ToString() 93 | { 94 | if (!string.IsNullOrEmpty(expression)) 95 | return expression; 96 | 97 | return base.ToString(); 98 | } 99 | } 100 | } -------------------------------------------------------------------------------- /src/ImageVisualizer16.DebuggeeSide/ImageVisualizer16.DebuggeeSide.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0;net40 5 | net40 6 | Aberus.VisualStudio.Debugger.ImageVisualizer 7 | true 8 | Aberus.VisualStudio.Debugger.ImageVisualizer.DebuggeeSide 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | False 22 | C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Packages\Debugger\Visualizers\netstandard2.0\Microsoft.VisualStudio.DebuggerVisualizers.dll 23 | 24 | 25 | 26 | 27 | 28 | False 29 | C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Packages\Debugger\Visualizers\net2.0\Microsoft.VisualStudio.DebuggerVisualizers.dll 30 | 31 | 32 | 33 | 34 | 35 | 4.7.2 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/ImageVisualizer16.DebuggeeSide/ImageVisualizerBitmapObjectSource.cs: -------------------------------------------------------------------------------- 1 | #if NETCOREAPP3_0_OR_GREATER 2 | using System.Drawing; 3 | #endif 4 | using System.IO; 5 | using Microsoft.VisualStudio.DebuggerVisualizers; 6 | 7 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 8 | { 9 | public class ImageVisualizerBitmapObjectSource : VisualizerObjectSource 10 | { 11 | public override void GetData(object target, Stream outgoingData) 12 | { 13 | #if NETCOREAPP3_0_OR_GREATER 14 | if (target is Bitmap bitmap && !bitmap.GetType().IsSerializable) 15 | base.GetData(new SerializableBitmap(bitmap), outgoingData); 16 | 17 | else 18 | #endif 19 | base.GetData(target, outgoingData); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/ImageVisualizer16.UI/ImageVisualizer16.UI.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {63D1D741-7C82-447B-B5F8-68B3BE3470D2} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer.UI 12 | v4.6.2 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE;VS16 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE;VS16 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | True 39 | 40 | 41 | False 42 | C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.DebuggerVisualizers.dll 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | ImageControl.xaml.cs 63 | ImageControl.xaml 64 | 65 | 66 | ImageForm.cs 67 | Form 68 | 69 | 70 | ImageForm.Designer.cs 71 | ImageForm.cs 72 | 73 | 74 | Properties\AssemblyInfo.cs 75 | 76 | 77 | ImageVisualizer.cs 78 | 79 | 80 | 81 | 82 | ImageForm.resx 83 | ImageForm.cs 84 | 85 | 86 | 87 | 88 | ImageControl.xaml 89 | MSBuild:Compile 90 | Designer 91 | 92 | 93 | 94 | 95 | {b271e1b1-bb78-4864-8db5-bc48fb1cb132} 96 | ImageVisualizer16.Common 97 | 98 | 99 | {552d4ce4-ef94-4232-b8ea-c5f26e930220} 100 | ImageVisualizer16.DebuggeeSide 101 | 102 | 103 | 104 | 105 | 6.5.29903 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /src/ImageVisualizer17.6.Common/ImageVisualizer17.6.Common.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp3.0;net40 5 | Aberus.VisualStudio.Debugger.ImageVisualizer 6 | true 7 | Aberus.VisualStudio.Debugger.ImageVisualizer.Common 8 | 1.2.0.0 9 | 10 | 11 | 12 | 13 | 4.5.0 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/ImageVisualizer17.6.Common/ImageVisualizerImage.cs: -------------------------------------------------------------------------------- 1 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 2 | { 3 | public class ImageVisualizerImage 4 | { 5 | public string Name { get; set; } 6 | public byte[] Image { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/ImageVisualizer17.6.DebuggeeSide/ImageVisualizer17.6.DebuggeeSide.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0;net40 5 | net40 6 | Aberus.VisualStudio.Debugger.ImageVisualizer 7 | true 8 | Aberus.VisualStudio.Debugger.ImageVisualizer.DebuggeeSide 9 | 1.2.0.0 10 | 1.2.0.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | False 20 | C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Packages\Debugger\Visualizers\netstandard2.0\Microsoft.VisualStudio.DebuggerVisualizers.dll 21 | 22 | 23 | 24 | 25 | 26 | False 27 | C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Packages\Debugger\Visualizers\net2.0\Microsoft.VisualStudio.DebuggerVisualizers.dll 28 | 29 | 30 | 31 | 32 | 33 | 4.7.2 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /src/ImageVisualizer17.6.DebuggeeSide/ImageVisualizerJsonObjectSource.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.VisualStudio.DebuggerVisualizers; 2 | using System; 3 | using System.Drawing; 4 | using System.IO; 5 | using System.Windows.Media.Imaging; 6 | 7 | namespace Aberus.VisualStudio.Debugger.ImageVisualizer 8 | { 9 | public class ImageVisualizerJsonObjectSource : VisualizerObjectSource 10 | { 11 | public override void GetData(object target, Stream outgoingData) 12 | { 13 | if (target is Bitmap bitmap) 14 | { 15 | var result = ConvertBitmap(bitmap); 16 | SerializeAsJson(outgoingData, result); 17 | } 18 | else if (target is BitmapSource bitmapSource) 19 | { 20 | var result = ConvertBitmapSource(bitmapSource); 21 | SerializeAsJson(outgoingData, result); 22 | } 23 | } 24 | 25 | private object ConvertBitmap(Bitmap bitmap) 26 | { 27 | var imageVisualizerImage = new ImageVisualizerImage 28 | { 29 | Name = bitmap.ToString() 30 | }; 31 | 32 | if (bitmap != null) 33 | { 34 | using (var memoryStream = new MemoryStream()) 35 | { 36 | bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Png); 37 | 38 | imageVisualizerImage.Image = memoryStream.ToArray(); 39 | } 40 | } 41 | return imageVisualizerImage; 42 | } 43 | 44 | private ImageVisualizerImage ConvertBitmapSource(BitmapSource bitmapSource) 45 | { 46 | 47 | var imageVisualizerImage = new ImageVisualizerImage 48 | { 49 | Name = bitmapSource.ToString() 50 | }; 51 | 52 | if (bitmapSource != null) 53 | { 54 | using (var memoryStream = new MemoryStream()) 55 | { 56 | var encoder = new PngBitmapEncoder(); 57 | //TODO try/catch 58 | encoder.Frames.Add(BitmapFrame.Create(bitmapSource)); 59 | encoder.Save(memoryStream); 60 | memoryStream.Seek(0, SeekOrigin.Begin); 61 | 62 | imageVisualizerImage.Image =memoryStream.ToArray(); 63 | } 64 | } 65 | return imageVisualizerImage; 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /src/ImageVisualizer17.6.UI/ImageVisualizer17.6.UI.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {07BD2160-ED5E-4B91-A948-A99400AD4F53} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer.UI 12 | v4.7.2 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | TRACE;DEBUG;VS17 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE;VS17_6 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | True 39 | 40 | 41 | False 42 | C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.DebuggerVisualizers.dll 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | ImageControl.xaml.cs 63 | ImageControl.xaml 64 | 65 | 66 | ImageForm.cs 67 | Form 68 | 69 | 70 | ImageForm.Designer.cs 71 | ImageForm.cs 72 | 73 | 74 | Properties\AssemblyInfo.cs 75 | 76 | 77 | ImageVisualizer.cs 78 | 79 | 80 | 81 | 82 | ImageForm.resx 83 | ImageForm.cs 84 | 85 | 86 | 87 | 88 | ImageControl.xaml 89 | MSBuild:Compile 90 | Designer 91 | 92 | 93 | 94 | 95 | 7.1.32210 96 | 97 | 98 | 99 | 100 | {2f389236-8d1b-4410-85a9-6cdea95a0b38} 101 | ImageVisualizer17.6.Common 102 | 103 | 104 | {1258707d-e75f-44ca-a5b8-9eb6151f10d1} 105 | ImageVisualizer17.6.DebuggeeSide 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /src/ImageVisualizer17.Common/ImageVisualizer17.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0;net40 5 | Aberus.VisualStudio.Debugger.ImageVisualizer 6 | true 7 | Aberus.VisualStudio.Debugger.ImageVisualizer.Common 8 | 1.2.0.0 9 | 1.2.0.0 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 4.7.2 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/ImageVisualizer17.DebuggeeSide/ImageVisualizer17.DebuggeeSide.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netcoreapp3.0;net40 5 | net40 6 | Aberus.VisualStudio.Debugger.ImageVisualizer 7 | true 8 | Aberus.VisualStudio.Debugger.ImageVisualizer.DebuggeeSide 9 | 1.2.0.0 10 | 1.2.0.0 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | False 25 | C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Packages\Debugger\Visualizers\netstandard2.0\Microsoft.VisualStudio.DebuggerVisualizers.dll 26 | 27 | 28 | 29 | 30 | 31 | False 32 | C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Packages\Debugger\Visualizers\net2.0\Microsoft.VisualStudio.DebuggerVisualizers.dll 33 | 34 | 35 | 36 | 37 | 38 | 4.7.2 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/ImageVisualizer17.UI/ImageVisualizer17.UI.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {9432AFAF-EEBD-424B-A181-271E9F2A00F7} 8 | Library 9 | Properties 10 | Aberus.VisualStudio.Debugger.ImageVisualizer 11 | Aberus.VisualStudio.Debugger.ImageVisualizer.UI 12 | v4.7.2 13 | 512 14 | true 15 | 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | TRACE;DEBUG;VS17 23 | prompt 24 | 4 25 | false 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE;VS17 32 | prompt 33 | 4 34 | false 35 | 36 | 37 | 38 | True 39 | 40 | 41 | False 42 | C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.DebuggerVisualizers.dll 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | ImageControl.xaml.cs 63 | ImageControl.xaml 64 | 65 | 66 | ImageForm.cs 67 | Form 68 | 69 | 70 | ImageForm.Designer.cs 71 | ImageForm.cs 72 | 73 | 74 | Properties\AssemblyInfo.cs 75 | 76 | 77 | ImageVisualizer.cs 78 | 79 | 80 | 81 | 82 | ImageForm.resx 83 | ImageForm.cs 84 | 85 | 86 | 87 | 88 | ImageControl.xaml 89 | MSBuild:Compile 90 | Designer 91 | 92 | 93 | 94 | 95 | {14eeba2b-b2b1-491b-800e-bcc181cfb8fc} 96 | ImageVisualizer17.Common 97 | 98 | 99 | {2faa5bdc-192b-4eb7-a7d1-f69f74be8223} 100 | ImageVisualizer17.DebuggeeSide 101 | 102 | 103 | 104 | 105 | 7.1.32210 106 | 107 | 108 | 109 | -------------------------------------------------------------------------------- /src/ImageVisualizerPackage/ImageVisualizerPackage.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 17.0 5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) 6 | 7 | 8 | 9 | Debug 10 | AnyCPU 11 | 2.0 12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} 13 | {FB4C20B3-659C-4D7E-9832-7BFB165DF2E0} 14 | Library 15 | Properties 16 | ImageVisualizer 17 | ImageVisualizer 18 | v4.7.2 19 | false 20 | false 21 | false 22 | false 23 | false 24 | false 25 | Program 26 | $(DevEnvDir)devenv.exe 27 | /rootsuffix Exp 28 | 29 | 30 | true 31 | full 32 | false 33 | bin\Debug\ 34 | DEBUG;TRACE 35 | prompt 36 | 4 37 | 38 | 39 | pdbonly 40 | true 41 | bin\Release\ 42 | TRACE 43 | prompt 44 | 4 45 | 46 | 47 | 48 | 49 | 50 | 51 | Designer 52 | 53 | 54 | 55 | 56 | 57 | runtime; build; native; contentfiles; analyzers; buildtransitive 58 | all 59 | 60 | 61 | 62 | 63 | Always 64 | 65 | 66 | Always 67 | 68 | 69 | 70 | 71 | 78 | -------------------------------------------------------------------------------- /src/ImageVisualizerPackage/Logo_128x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/ImageVisualizerPackage/Logo_128x.png -------------------------------------------------------------------------------- /src/ImageVisualizerPackage/Preview_200x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/ImageVisualizerPackage/Preview_200x.png -------------------------------------------------------------------------------- /src/ImageVisualizerPackage/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Image Debugger Visualizer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Aleksander Berus")] 12 | [assembly: AssemblyProduct("Image Debugger Visualizer")] 13 | [assembly: AssemblyCopyright("Aleksander Berus. All rights reserved.")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // Version information for an assembly consists of the following four values: 23 | // 24 | // Major Version 25 | // Minor Version 26 | // Build Number 27 | // Revision 28 | // 29 | // You can specify all the values or you can default the Build and Revision Numbers 30 | // by using the '*' as shown below: 31 | // [assembly: AssemblyVersion("1.0.*")] 32 | [assembly: AssemblyVersion("1.2.0.0")] 33 | [assembly: AssemblyFileVersion("1.2.0.0")] 34 | -------------------------------------------------------------------------------- /src/ImageVisualizerPackage/source.extension.vsixmanifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Debugger Image Visualizer 6 | A debug visualizer for Visual Studio that allows you to visually view the graphic content of images during debugging. 7 | https://github.com/aberus/ImageVisualizer 8 | Logo_128x.png 9 | Preview_200x.png 10 | 11 | 12 | 13 | x86 14 | 15 | 16 | x86 17 | 18 | 19 | x86 20 | 21 | 22 | amd64 23 | 24 | 25 | amd64 26 | 27 | 28 | amd64 29 | 30 | 31 | arm64 32 | 33 | 34 | arm64 35 | 36 | 37 | arm64 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /src/SetupVisualizer/ImageDebuggerVisaulizer.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/SetupVisualizer/ImageDebuggerVisaulizer.ico -------------------------------------------------------------------------------- /src/SetupVisualizer/ImageDebuggerVisaulizer.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/SetupVisualizer/ImageDebuggerVisaulizer.pdn -------------------------------------------------------------------------------- /src/SetupVisualizer/License.rtf: -------------------------------------------------------------------------------- 1 | {\rtf1\ansi\ansicpg1250\deff0\nouicompat\deflang1060{\fonttbl{\f0\fnil\fprq2\fcharset0 Tahoma;}{\f1\fnil\fcharset238 Tahoma;}{\f2\fnil\fcharset0 Tahoma;}} 2 | {\*\generator Riched20 6.3.9600}\viewkind4\uc1 3 | \pard\nowidctlpar\sl480\slmult1\b\f0\fs20\lang1033 Debugger Image Visualizer for Visual Studio\par 4 | \b0\f1 The MIT License (MIT)\par 5 | Copyright (c) 2016\f2 \f1 Aleksander Berus\par 6 | 7 | \pard\nowidctlpar\sa200\sl240\slmult1 Permission is hereby granted, free of charge, to any person obtaining a copy\f2 \f1 of this software and associated documentation files (the "Software"), to deal\f2 \f1 in the Software without restriction, including without limitation the rights\f2 \f1 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\f2 \f1 copies of the Software, and to permit persons to whom the Software is\f2 \f1 furnished to do so, subject to the following conditions:\par 8 | The above copyright notice and this permission notice shall be included in all\f2 \f1 copies or substantial portions of the Software.\par 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\f2 \f1 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\f2 \f1 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\f2 \f1 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\f2 \f1 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\f2 \f1 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\f2 \f1 SOFTWARE.\par 10 | This source code is provided to you compliments of Red Sweater Software under the license as described below. NOTE: This is the MIT License.\b\f0\par 11 | } 12 | -------------------------------------------------------------------------------- /src/SetupVisualizer/SetupVisualizer.wixproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 3.10 7 | 49baf40f-9365-482b-bc8e-43557931b415 8 | 2.0 9 | SetupVisualizer 10 | Package 11 | $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets 12 | $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets 13 | 14 | 15 | bin\$(Configuration)\ 16 | obj\$(Configuration)\ 17 | Debug 18 | ICE30 19 | 20 | 21 | bin\$(Configuration)\ 22 | obj\$(Configuration)\ 23 | ICE30 24 | 25 | 26 | 27 | 28 | 29 | 30 | $(WixExtDir)\WixVSExtension.dll 31 | WixVSExtension 32 | 33 | 34 | $(WixExtDir)\WixUIExtension.dll 35 | WixUIExtension 36 | 37 | 38 | 39 | 40 | ImageVisualizer10 41 | {8377674c-a112-4dc9-9745-926434ae7b2e} 42 | True 43 | True 44 | Binaries;Content;Satellites 45 | INSTALLFOLDER 46 | 47 | 48 | ImageVisualizer11 49 | {496b16d7-54d1-418b-951b-71dd377156a7} 50 | True 51 | True 52 | Binaries;Content;Satellites 53 | INSTALLFOLDER 54 | 55 | 56 | ImageVisualizer12 57 | {2b4306bf-2e14-4e75-aa09-5423e906c5d8} 58 | True 59 | True 60 | Binaries;Content;Satellites 61 | INSTALLFOLDER 62 | 63 | 64 | ImageVisualizer14 65 | {318c7ce4-37ee-4185-945d-b7833677a29a} 66 | True 67 | True 68 | Binaries;Content;Satellites 69 | INSTALLFOLDER 70 | 71 | 72 | ImageVisualizer15 73 | {0a095313-31f1-4677-acc2-60bcf5adfc5d} 74 | True 75 | True 76 | Binaries;Content;Satellites 77 | INSTALLFOLDER 78 | 79 | 80 | ImageVisualizer16.DebuggeeSide 81 | {552d4ce4-ef94-4232-b8ea-c5f26e930220} 82 | True 83 | True 84 | Binaries;Content;Satellites 85 | INSTALLFOLDER 86 | 87 | 88 | ImageVisualizer16.UI 89 | {63d1d741-7c82-447b-b5f8-68b3be3470d2} 90 | True 91 | True 92 | Binaries;Content;Satellites 93 | INSTALLFOLDER 94 | 95 | 96 | ImageVisualizer17.6.DebuggeeSide 97 | {1258707d-e75f-44ca-a5b8-9eb6151f10d1} 98 | True 99 | True 100 | Binaries;Content;Satellites 101 | INSTALLFOLDER 102 | 103 | 104 | ImageVisualizer17.6.UI 105 | {07bd2160-ed5e-4b91-a948-a99400ad4f53} 106 | True 107 | True 108 | Binaries;Content;Satellites 109 | INSTALLFOLDER 110 | 111 | 112 | ImageVisualizer17.DebuggeeSide 113 | {2faa5bdc-192b-4eb7-a7d1-f69f74be8223} 114 | True 115 | True 116 | Binaries;Content;Satellites 117 | INSTALLFOLDER 118 | 119 | 120 | ImageVisualizer17.UI 121 | {9432afaf-eebd-424b-a181-271e9f2a00f7} 122 | True 123 | True 124 | Binaries;Content;Satellites 125 | INSTALLFOLDER 126 | 127 | 128 | ImageVisualizerPackage 129 | {fb4c20b3-659c-4d7e-9832-7bfb165df2e0} 130 | True 131 | True 132 | Binaries;Content;Satellites 133 | INSTALLFOLDER 134 | 135 | 136 | VSVersionAction 137 | {b84984be-b51a-4eb3-bca0-9476a7c60f18} 138 | True 139 | True 140 | Binaries;Content;Satellites 141 | INSTALLFOLDER 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 157 | -------------------------------------------------------------------------------- /src/SetupVisualizer/bannrbmp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/SetupVisualizer/bannrbmp.bmp -------------------------------------------------------------------------------- /src/SetupVisualizer/bannrbmp.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/SetupVisualizer/bannrbmp.pdn -------------------------------------------------------------------------------- /src/SetupVisualizer/dlgbmp.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/SetupVisualizer/dlgbmp.bmp -------------------------------------------------------------------------------- /src/SetupVisualizer/dlgbmp.pdn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/src/SetupVisualizer/dlgbmp.pdn -------------------------------------------------------------------------------- /src/VSVersionAction/CustomAction.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /src/VSVersionAction/CustomAction.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Windows.Forms; 4 | using Microsoft.Deployment.WindowsInstaller; 5 | using Microsoft.VisualStudio.Setup.Configuration; 6 | 7 | namespace VSVersionAction 8 | { 9 | public class CustomActions 10 | { 11 | private const int REGDB_E_CLASSNOTREG = unchecked((int)0x80040154); 12 | 13 | [CustomAction] 14 | public static ActionResult VSFindInstances2(Session session) 15 | { 16 | try 17 | { 18 | var query = new SetupConfiguration(); 19 | var query2 = (ISetupConfiguration2)query; 20 | var e = query2.EnumAllInstances(); 21 | 22 | var helper = (ISetupHelper)query; 23 | 24 | int fetched; 25 | var instances = new ISetupInstance[1]; 26 | do 27 | { 28 | e.Next(1, instances, out fetched); 29 | if (fetched > 0) 30 | { 31 | PrintInstance(instances[0], helper, session); 32 | } 33 | } 34 | while (fetched > 0); 35 | } 36 | catch (COMException ex) when (ex.HResult == REGDB_E_CLASSNOTREG) 37 | { 38 | session.Log("The query API is not registered. Assuming no instances are installed."); 39 | } 40 | catch (Exception ex) 41 | { 42 | session.Log($"Error 0x{ex.HResult:x8}: {ex.Message}"); 43 | } 44 | return ActionResult.Success; 45 | } 46 | 47 | private static void PrintInstance(ISetupInstance instance, ISetupHelper helper, Session session) 48 | { 49 | var instance2 = (ISetupInstance2)instance; 50 | var state = instance2.GetState(); 51 | session.Log($"InstanceId: {instance2.GetInstanceId()} ({(state == InstanceState.Complete ? "Complete" : "Incomplete")})"); 52 | 53 | 54 | if ((state & InstanceState.Local) == InstanceState.Local) 55 | { 56 | string installationVersion = instance.GetInstallationVersion(); 57 | ulong versionNumber = helper.ParseVersion(installationVersion); 58 | session.Log($"InstallationVersion: {installationVersion} ({versionNumber})"); 59 | session.Log($"InstallationPath: {instance2.GetInstallationPath()}"); 60 | 61 | var version = Version.Parse(instance2.GetInstallationVersion()); 62 | 63 | //if (installationVersion.StartsWith("15.") && string.IsNullOrEmpty(session["VS2017_VERSION]"])) 64 | //{ 65 | // session["VS2017_VERSION"] = version.ToString(2); 66 | //} 67 | //if (installationVersion.StartsWith("16.") && string.IsNullOrEmpty(session["VS2019_VERSION"])) 68 | //{ 69 | // session["VS2019_VERSION"] = version.ToString(2); 70 | //} 71 | if (installationVersion.StartsWith("17.") && string.IsNullOrEmpty(session["VS2019_VERSION"])) 72 | { 73 | session["VS2022_VERSION"] = version.ToString(2); 74 | } 75 | } 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/VSVersionAction/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("VSVersionAction")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("VSVersionAction")] 12 | [assembly: AssemblyCopyright("Copyright © 2024")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("b84984be-b51a-4eb3-bca0-9476a7c60f18")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /src/VSVersionAction/VSVersionAction.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Debug 5 | x86 6 | 8.0.30703 7 | 2.0 8 | {B84984BE-B51A-4EB3-BCA0-9476A7C60F18} 9 | Library 10 | Properties 11 | VSVersionAction 12 | VSVersionAction 13 | v4.6.2 14 | 512 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | 25 | 26 | pdbonly 27 | true 28 | bin\Release\ 29 | TRACE 30 | prompt 31 | 4 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | True 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 3.11.2177 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /test/TestImages/600_315.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/test/TestImages/600_315.png -------------------------------------------------------------------------------- /test/TestImages/VisualStudio256_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/test/TestImages/VisualStudio256_256.png -------------------------------------------------------------------------------- /test/TestImages/net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/test/TestImages/net.png -------------------------------------------------------------------------------- /test/TestImages/test_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/test/TestImages/test_image.png -------------------------------------------------------------------------------- /test/TestImages/tumblr_mwiiixNSpW1qbkusho1_1280.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aberus/ImageVisualizer/8c50ae2404012b2bc5712ac84c1168d74e7e6a9e/test/TestImages/tumblr_mwiiixNSpW1qbkusho1_1280.png -------------------------------------------------------------------------------- /test/TestVisualizer.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.3.32611.2 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestVisualizerCS", "TestVisualizerCS\TestVisualizerCS.csproj", "{CBD84815-3DF2-43E9-B483-178DC89054E8}" 7 | EndProject 8 | Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "TestVisualizerVB", "TestVisualizerVB\TestVisualizerVB.vbproj", "{C696B7CD-D21C-4442-91E6-E2E9CBA0D566}" 9 | EndProject 10 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestVisualizerCSCore30", "TestVisualizerCSCore30\TestVisualizerCSCore30.csproj", "{3929F1CD-A5AB-4466-B13E-591BB16C391C}" 11 | EndProject 12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestVisualizerCSCore31", "TestVisualizerCSCore31\TestVisualizerCSCore31.csproj", "{96B645E2-C457-4150-9F09-184201E2D270}" 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestVisualizerCSNet60", "TestVisualizerCSNet60\TestVisualizerCSNet60.csproj", "{644D4DBB-C6BA-48BF-B80E-CC67A18AA0E7}" 15 | EndProject 16 | Global 17 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 18 | Debug|Any CPU = Debug|Any CPU 19 | Release|Any CPU = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 22 | {CBD84815-3DF2-43E9-B483-178DC89054E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 23 | {CBD84815-3DF2-43E9-B483-178DC89054E8}.Debug|Any CPU.Build.0 = Debug|Any CPU 24 | {CBD84815-3DF2-43E9-B483-178DC89054E8}.Release|Any CPU.ActiveCfg = Release|Any CPU 25 | {CBD84815-3DF2-43E9-B483-178DC89054E8}.Release|Any CPU.Build.0 = Release|Any CPU 26 | {C696B7CD-D21C-4442-91E6-E2E9CBA0D566}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {C696B7CD-D21C-4442-91E6-E2E9CBA0D566}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {C696B7CD-D21C-4442-91E6-E2E9CBA0D566}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {C696B7CD-D21C-4442-91E6-E2E9CBA0D566}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {3929F1CD-A5AB-4466-B13E-591BB16C391C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {3929F1CD-A5AB-4466-B13E-591BB16C391C}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {3929F1CD-A5AB-4466-B13E-591BB16C391C}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {3929F1CD-A5AB-4466-B13E-591BB16C391C}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {96B645E2-C457-4150-9F09-184201E2D270}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {96B645E2-C457-4150-9F09-184201E2D270}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {96B645E2-C457-4150-9F09-184201E2D270}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {96B645E2-C457-4150-9F09-184201E2D270}.Release|Any CPU.Build.0 = Release|Any CPU 38 | {644D4DBB-C6BA-48BF-B80E-CC67A18AA0E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 39 | {644D4DBB-C6BA-48BF-B80E-CC67A18AA0E7}.Debug|Any CPU.Build.0 = Debug|Any CPU 40 | {644D4DBB-C6BA-48BF-B80E-CC67A18AA0E7}.Release|Any CPU.ActiveCfg = Release|Any CPU 41 | {644D4DBB-C6BA-48BF-B80E-CC67A18AA0E7}.Release|Any CPU.Build.0 = Release|Any CPU 42 | EndGlobalSection 43 | GlobalSection(SolutionProperties) = preSolution 44 | HideSolutionNode = FALSE 45 | EndGlobalSection 46 | GlobalSection(ExtensibilityGlobals) = postSolution 47 | SolutionGuid = {A72348B5-636F-4D7A-ACA7-2BA3B3C491C3} 48 | EndGlobalSection 49 | EndGlobal 50 | -------------------------------------------------------------------------------- /test/TestVisualizerCS/Program.cs: -------------------------------------------------------------------------------- 1 | namespace TestVisualizer 2 | { 3 | class Program 4 | { 5 | [System.STAThread] 6 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value")] 7 | static void Main() 8 | { 9 | var image1 = System.Drawing.Image.FromFile("tumblr_mwiiixNSpW1qbkusho1_1280.png"); 10 | //System.Diagnostics.Debugger.Break(); 11 | 12 | var image2 = new System.Windows.Media.Imaging.BitmapImage(); 13 | image2.BeginInit(); 14 | image2.UriSource = new System.Uri("tumblr_mwiiixNSpW1qbkusho1_1280.png", System.UriKind.Relative); 15 | image2.EndInit(); 16 | //System.Diagnostics.Debugger.Break(); 17 | 18 | var image3 = new System.Windows.Media.Imaging.BitmapImage(); 19 | image3.BeginInit(); 20 | image3.StreamSource = new System.IO.FileStream("VisualStudio256_256.png", System.IO.FileMode.Open); 21 | image3.EndInit(); 22 | //System.Diagnostics.Debugger.Break(); 23 | 24 | var pixelFormat = System.Windows.Media.PixelFormats.Bgr32; 25 | int width = 1280; 26 | int height = 720; 27 | int rawStride = (width * pixelFormat.BitsPerPixel + 7) / 8; 28 | byte[] rawImage = new byte[rawStride * height]; 29 | var value = new System.Random(); 30 | value.NextBytes(rawImage); 31 | var image4 = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, pixelFormat, null, rawImage, rawStride); 32 | System.Diagnostics.Debugger.Break(); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /test/TestVisualizerCS/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("TestVisualizer")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("TestVisualizer")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("cbd84815-3df2-43e9-b483-178dc89054e8")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /test/TestVisualizerCS/TestVisualizerCS.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {CBD84815-3DF2-43E9-B483-178DC89054E8} 8 | Exe 9 | Properties 10 | TestVisualizer 11 | TestVisualizer 12 | v4.0 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | Always 37 | true 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 600_315.png 59 | Always 60 | 61 | 62 | tumblr_mwiiixNSpW1qbkusho1_1280.png 63 | Always 64 | 65 | 66 | VisualStudio256_256.png 67 | Always 68 | 69 | 70 | 71 | 78 | -------------------------------------------------------------------------------- /test/TestVisualizerCSCore30/Program.cs: -------------------------------------------------------------------------------- 1 | namespace TestVisualizer 2 | { 3 | class Program 4 | { 5 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value")] 6 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter")] 7 | static void Main(string[] args) 8 | { 9 | var image1 = System.Drawing.Image.FromFile("tumblr_mwiiixNSpW1qbkusho1_1280.png"); 10 | //System.Diagnostics.Debugger.Break(); 11 | 12 | var image2 = new System.Windows.Media.Imaging.BitmapImage(); 13 | image2.BeginInit(); 14 | image2.UriSource = new System.Uri("tumblr_mwiiixNSpW1qbkusho1_1280.png", System.UriKind.Relative); 15 | image2.EndInit(); 16 | //System.Diagnostics.Debugger.Break(); 17 | 18 | var image3 = new System.Windows.Media.Imaging.BitmapImage(); 19 | image3.BeginInit(); 20 | image3.StreamSource = new System.IO.FileStream("VisualStudio256_256.png", System.IO.FileMode.Open); 21 | image3.EndInit(); 22 | //System.Diagnostics.Debugger.Break(); 23 | 24 | var pixelFormat = System.Windows.Media.PixelFormats.Bgr32; 25 | int width = 1280; 26 | int height = 720; 27 | int rawStride = (width * pixelFormat.BitsPerPixel + 7) / 8; 28 | byte[] rawImage = new byte[rawStride * height]; 29 | var value = new System.Random(); 30 | value.NextBytes(rawImage); 31 | var image4 = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, pixelFormat, null, rawImage, rawStride); 32 | System.Diagnostics.Debugger.Break(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /test/TestVisualizerCSCore30/TestVisualizerCSCore30.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | netcoreapp3.0 6 | true 7 | 8 | TestVisualizer 9 | TestVisualizer 10 | 11 | 12 | 13 | 14 | Always 15 | 16 | 17 | Always 18 | 19 | 20 | Always 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/TestVisualizerCSCore31/Program.cs: -------------------------------------------------------------------------------- 1 | namespace TestVisualizer 2 | { 3 | class Program 4 | { 5 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value")] 6 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter")] 7 | static void Main(string[] args) 8 | { 9 | var image1 = System.Drawing.Image.FromFile("tumblr_mwiiixNSpW1qbkusho1_1280.png"); 10 | //System.Diagnostics.Debugger.Break(); 11 | 12 | var image2 = new System.Windows.Media.Imaging.BitmapImage(); 13 | image2.BeginInit(); 14 | image2.UriSource = new System.Uri("tumblr_mwiiixNSpW1qbkusho1_1280.png", System.UriKind.Relative); 15 | image2.EndInit(); 16 | //System.Diagnostics.Debugger.Break(); 17 | 18 | var image3 = new System.Windows.Media.Imaging.BitmapImage(); 19 | image3.BeginInit(); 20 | image3.StreamSource = new System.IO.FileStream("VisualStudio256_256.png", System.IO.FileMode.Open); 21 | image3.EndInit(); 22 | //System.Diagnostics.Debugger.Break(); 23 | 24 | var pixelFormat = System.Windows.Media.PixelFormats.Bgr32; 25 | int width = 1280; 26 | int height = 720; 27 | int rawStride = (width * pixelFormat.BitsPerPixel + 7) / 8; 28 | byte[] rawImage = new byte[rawStride * height]; 29 | var value = new System.Random(); 30 | value.NextBytes(rawImage); 31 | var image4 = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, pixelFormat, null, rawImage, rawStride); 32 | System.Diagnostics.Debugger.Break(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /test/TestVisualizerCSCore31/TestVisualizerCSCore31.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | netcoreapp3.1 6 | true 7 | 8 | TestVisualizer 9 | TestVisualizer 10 | 11 | 12 | 13 | 14 | Always 15 | 16 | 17 | Always 18 | 19 | 20 | Always 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/TestVisualizerCSNet60/Program.cs: -------------------------------------------------------------------------------- 1 | namespace TestVisualizer 2 | { 3 | class Program 4 | { 5 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value")] 6 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter")] 7 | static void Main(string[] args) 8 | { 9 | var image1 = System.Drawing.Image.FromFile("tumblr_mwiiixNSpW1qbkusho1_1280.png"); 10 | //System.Diagnostics.Debugger.Break(); 11 | 12 | var image2 = new System.Windows.Media.Imaging.BitmapImage(); 13 | image2.BeginInit(); 14 | image2.UriSource = new System.Uri("tumblr_mwiiixNSpW1qbkusho1_1280.png", System.UriKind.Relative); 15 | image2.EndInit(); 16 | //System.Diagnostics.Debugger.Break(); 17 | 18 | var image3 = new System.Windows.Media.Imaging.BitmapImage(); 19 | image3.BeginInit(); 20 | image3.StreamSource = new System.IO.FileStream("VisualStudio256_256.png", System.IO.FileMode.Open); 21 | image3.EndInit(); 22 | //System.Diagnostics.Debugger.Break(); 23 | 24 | var pixelFormat = System.Windows.Media.PixelFormats.Bgr32; 25 | int width = 1280; 26 | int height = 720; 27 | int rawStride = (width * pixelFormat.BitsPerPixel + 7) / 8; 28 | byte[] rawImage = new byte[rawStride * height]; 29 | var value = new System.Random(); 30 | value.NextBytes(rawImage); 31 | var image4 = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, pixelFormat, null, rawImage, rawStride); 32 | System.Diagnostics.Debugger.Break(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /test/TestVisualizerCSNet60/TestVisualizerCSNet60.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net6.0-windows 6 | true 7 | 8 | TestVisualizer 9 | TestVisualizer 10 | 11 | 12 | 13 | 14 | Always 15 | 16 | 17 | Always 18 | 19 | 20 | Always 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/TestVisualizerCSNet80/Program.cs: -------------------------------------------------------------------------------- 1 | namespace TestVisualizer 2 | { 3 | class Program 4 | { 5 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0059:Unnecessary assignment of a value")] 6 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter")] 7 | static void Main(string[] args) 8 | { 9 | var image1 = System.Drawing.Image.FromFile("tumblr_mwiiixNSpW1qbkusho1_1280.png"); 10 | //System.Diagnostics.Debugger.Break(); 11 | 12 | var image2 = new System.Windows.Media.Imaging.BitmapImage(); 13 | image2.BeginInit(); 14 | image2.UriSource = new System.Uri("tumblr_mwiiixNSpW1qbkusho1_1280.png", System.UriKind.Relative); 15 | image2.EndInit(); 16 | //System.Diagnostics.Debugger.Break(); 17 | 18 | var image3 = new System.Windows.Media.Imaging.BitmapImage(); 19 | image3.BeginInit(); 20 | image3.StreamSource = new System.IO.FileStream("VisualStudio256_256.png", System.IO.FileMode.Open); 21 | image3.EndInit(); 22 | //System.Diagnostics.Debugger.Break(); 23 | 24 | var pixelFormat = System.Windows.Media.PixelFormats.Bgr32; 25 | int width = 1280; 26 | int height = 720; 27 | int rawStride = (width * pixelFormat.BitsPerPixel + 7) / 8; 28 | byte[] rawImage = new byte[rawStride * height]; 29 | var value = new System.Random(); 30 | value.NextBytes(rawImage); 31 | var image4 = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, pixelFormat, null, rawImage, rawStride); 32 | System.Diagnostics.Debugger.Break(); 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /test/TestVisualizerCSNet80/TestVisualizerCSNet80.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net8.0-windows7.0 6 | true 7 | 8 | TestVisualizer 9 | TestVisualizer 10 | 11 | 12 | 13 | 14 | Always 15 | 16 | 17 | Always 18 | 19 | 20 | Always 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/Module1.vb: -------------------------------------------------------------------------------- 1 | Module Module1 2 | 3 | Sub Main() 4 | 5 | Dim image1 = System.Drawing.Image.FromFile("tumblr_mwiiixNSpW1qbkusho1_1280.png") 6 | 'Debugger.Break() 7 | 8 | Dim image2 = New System.Windows.Media.Imaging.BitmapImage() 9 | image2.BeginInit() 10 | image2.UriSource = New Uri("tumblr_mwiiixNSpW1qbkusho1_1280.png", UriKind.Relative) 11 | image2.EndInit() 12 | 'Debugger.Break() 13 | 14 | Dim image3 = New System.Windows.Media.Imaging.BitmapImage() 'new Uri("VisualStudio256_256.png", UriKind.Relative)); 15 | image3.BeginInit() 16 | image3.StreamSource = New System.IO.FileStream("VisualStudio256_256.png", System.IO.FileMode.Open) 17 | image3.EndInit() 18 | 'Debugger.Break() 19 | 20 | Dim pixelFormat = System.Windows.Media.PixelFormats.Bgr32 21 | Dim width As Integer = 1280 22 | Dim height As Integer = 720 23 | Dim rawStride As Integer = (width * pixelFormat.BitsPerPixel + 7) / 8 24 | Dim rawImage As Byte() = New Byte(rawStride * height - 1) {} 25 | Dim value As New Random() 26 | value.NextBytes(rawImage) 27 | Dim image4 = System.Windows.Media.Imaging.BitmapSource.Create(width, height, 96, 96, pixelFormat, Nothing, rawImage, rawStride) 28 | Debugger.Break() 29 | 30 | End Sub 31 | 32 | End Module 33 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/My Project/Application.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/My Project/Application.myapp: -------------------------------------------------------------------------------- 1 |  2 | 3 | false 4 | false 5 | 0 6 | true 7 | 0 8 | 2 9 | true 10 | 11 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System 2 | Imports System.Reflection 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 21 | 22 | 23 | ' Version information for an assembly consists of the following four values: 24 | ' 25 | ' Major Version 26 | ' Minor Version 27 | ' Build Number 28 | ' Revision 29 | ' 30 | ' You can specify all the values or you can default the Build and Revision Numbers 31 | ' by using the '*' as shown below: 32 | ' 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/My Project/Resources.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | Imports System 15 | 16 | Namespace My.Resources 17 | 18 | 'This class was auto-generated by the StronglyTypedResourceBuilder 19 | 'class via a tool like ResGen or Visual Studio. 20 | 'To add or remove a member, edit your .ResX file then rerun ResGen 21 | 'with the /str option, or rebuild your VS project. 22 | ''' 23 | ''' A strongly-typed resource class, for looking up localized strings, etc. 24 | ''' 25 | _ 29 | Friend Module Resources 30 | 31 | Private resourceMan As Global.System.Resources.ResourceManager 32 | 33 | Private resourceCulture As Global.System.Globalization.CultureInfo 34 | 35 | ''' 36 | ''' Returns the cached ResourceManager instance used by this class. 37 | ''' 38 | _ 39 | Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager 40 | Get 41 | If Object.ReferenceEquals(resourceMan, Nothing) Then 42 | Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("TestVisualizer.Resources", GetType(Resources).Assembly) 43 | resourceMan = temp 44 | End If 45 | Return resourceMan 46 | End Get 47 | End Property 48 | 49 | ''' 50 | ''' Overrides the current thread's CurrentUICulture property for all 51 | ''' resource lookups using this strongly typed resource class. 52 | ''' 53 | _ 54 | Friend Property Culture() As Global.System.Globalization.CultureInfo 55 | Get 56 | Return resourceCulture 57 | End Get 58 | Set 59 | resourceCulture = value 60 | End Set 61 | End Property 62 | End Module 63 | End Namespace 64 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/My Project/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/My Project/Settings.Designer.vb: -------------------------------------------------------------------------------- 1 | '------------------------------------------------------------------------------ 2 | ' 3 | ' This code was generated by a tool. 4 | ' Runtime Version:4.0.30319.42000 5 | ' 6 | ' Changes to this file may cause incorrect behavior and will be lost if 7 | ' the code is regenerated. 8 | ' 9 | '------------------------------------------------------------------------------ 10 | 11 | Option Strict On 12 | Option Explicit On 13 | 14 | 15 | Namespace My 16 | 17 | _ 20 | Partial Friend NotInheritable Class MySettings 21 | Inherits Global.System.Configuration.ApplicationSettingsBase 22 | 23 | Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) 24 | 25 | #Region "My.Settings Auto-Save Functionality" 26 | #If _MyType = "WindowsForms" Then 27 | Private Shared addedHandler As Boolean 28 | 29 | Private Shared addedHandlerLockObject As New Object 30 | 31 | _ 32 | Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) 33 | If My.Application.SaveMySettingsOnExit Then 34 | My.Settings.Save() 35 | End If 36 | End Sub 37 | #End If 38 | #End Region 39 | 40 | Public Shared ReadOnly Property [Default]() As MySettings 41 | Get 42 | 43 | #If _MyType = "WindowsForms" Then 44 | If Not addedHandler Then 45 | SyncLock addedHandlerLockObject 46 | If Not addedHandler Then 47 | AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings 48 | addedHandler = True 49 | End If 50 | End SyncLock 51 | End If 52 | #End If 53 | Return defaultInstance 54 | End Get 55 | End Property 56 | End Class 57 | End Namespace 58 | 59 | Namespace My 60 | 61 | _ 64 | Friend Module MySettingsProperty 65 | 66 | _ 67 | Friend ReadOnly Property Settings() As Global.TestVisualizer.My.MySettings 68 | Get 69 | Return Global.TestVisualizer.My.MySettings.Default 70 | End Get 71 | End Property 72 | End Module 73 | End Namespace 74 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/TestVisualizerVB/TestVisualizerVB.vbproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {C696B7CD-D21C-4442-91E6-E2E9CBA0D566} 8 | Exe 9 | TestVisualizer.Module1 10 | TestVisualizer 11 | TestVisualizer 12 | 512 13 | Console 14 | v4.0 15 | true 16 | 17 | 18 | 19 | AnyCPU 20 | true 21 | full 22 | true 23 | true 24 | bin\Debug\ 25 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 26 | false 27 | 28 | 29 | AnyCPU 30 | pdbonly 31 | false 32 | true 33 | true 34 | bin\Release\ 35 | 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 36 | false 37 | 38 | 39 | On 40 | 41 | 42 | Binary 43 | 44 | 45 | Off 46 | 47 | 48 | On 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | True 78 | Application.myapp 79 | 80 | 81 | True 82 | True 83 | Resources.resx 84 | 85 | 86 | True 87 | Settings.settings 88 | True 89 | 90 | 91 | 92 | 93 | VbMyResourcesResXFileCodeGenerator 94 | Resources.Designer.vb 95 | My.Resources 96 | Designer 97 | 98 | 99 | 100 | 101 | MyApplicationCodeGenerator 102 | Application.Designer.vb 103 | 104 | 105 | SettingsSingleFileGenerator 106 | My 107 | Settings.Designer.vb 108 | 109 | 110 | 111 | 112 | 600_315.png 113 | Always 114 | 115 | 116 | tumblr_mwiiixNSpW1qbkusho1_1280.png 117 | Always 118 | 119 | 120 | VisualStudio256_256.png 121 | Always 122 | 123 | 124 | 125 | --------------------------------------------------------------------------------