[
  {
    "path": ".editorconfig",
    "content": "; http://editorconfig.org/\n; https://visualstudiogallery.msdn.microsoft.com/c8bccfe2-650c-4b42-bc5c-845e21f96328\n\nroot=true\n\n[*]\nend_of_line = crlf\ntrim_trailing_whitespace = true\ninsert_final_newline = true\ncharset = utf-8\n\n[*.cs]\nindent_style = space\nindent_size = 2"
  },
  {
    "path": ".github/workflows/codeql-analysis.yml",
    "content": "name: \"CodeQL\"\n\non:\n  push:\n    branches: [master]\n  pull_request:\n    # The branches below must be a subset of the branches above\n    branches: [master]\n  schedule:\n    - cron: '0 7 * * 3'\n\njobs:\n  analyze:\n    name: Analyze\n    runs-on: ubuntu-latest\n\n    strategy:\n      fail-fast: false\n      matrix:\n        # Override automatic language detection by changing the below list\n        # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']\n        language: ['csharp']\n        # Learn more...\n        # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection\n\n    steps:\n    - name: Checkout repository\n      uses: actions/checkout@v2\n      with:\n        # We must fetch at least the immediate parents so that if this is\n        # a pull request then we can checkout the head.\n        fetch-depth: 2\n\n    # If this run was triggered by a pull request event, then checkout\n    # the head of the pull request instead of the merge commit.\n    - run: git checkout HEAD^2\n      if: ${{ github.event_name == 'pull_request' }}\n\n    # Initializes the CodeQL tools for scanning.\n    - name: Initialize CodeQL\n      uses: github/codeql-action/init@v1\n      with:\n        languages: ${{ matrix.language }}\n        # If you wish to specify custom queries, you can do so here or in a config file.\n        # By default, queries listed here will override any specified in a config file. \n        # Prefix the list here with \"+\" to use these queries and those in the config file.\n        # queries: ./path/to/local/query, your-org/your-repo/queries@main\n\n    # Autobuild attempts to build any compiled languages  (C/C++, C#, or Java).\n    # If this step fails, then you should remove it and run the build manually (see below)\n    - name: Autobuild\n      uses: github/codeql-action/autobuild@v1\n\n    # ℹ️ Command-line programs to run using the OS shell.\n    # 📚 https://git.io/JvXDl\n\n    # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines\n    #    and modify them (or add more) to build your code if your project\n    #    uses a compiled language\n\n    #- run: |\n    #   make bootstrap\n    #   make release\n\n    - name: Perform CodeQL Analysis\n      uses: github/codeql-action/analyze@v1\n"
  },
  {
    "path": ".gitignore",
    "content": ".vs/\nbin/\nobj/\n_NCrunch_*\nnuget/\npackages/\nmaps/\n\n*.ncrunch*\n*.user\npush.cmd\n*.suo\n*.ncrunchproject"
  },
  {
    "path": ".markdownlint.json",
    "content": "{\n  \"MD001\": false,\n  \"MD024\": false\n}"
  },
  {
    "path": "CHANGELOG.md",
    "content": "# Cyotek ImageBox Change Log\n\n## 1.4.0\n\n### Added\n\n* Added new `MouseWheelMode` property to control how the mouse\n  wheel is used to interact with the control. When set to `Zoom`\n  (default), the wheel will scroll the control in and out. When\n  set to `ScrollAndZoom`, the wheel scrolls the control\n  vertically. Holding down `Shift` will scroll horizontally, or\n  `Control` to zoom (#18).\n\n## 1.3.1\n\n### Fixed\n\n* Panning only worked if the horizontal scrollbar was present (#45)\n\n## 1.3\n\n### Added\n\n* Added `PanMode` property. This property allows you to determine if panning can be triggered by the left mouse button, the middle mouse button or both. This property replaces the `AutoPan` property.\n* Added `AllowFreePan` property. This property determines if panning only occurs when the mouse button is pressed, or if pressing the mouse button starts free panning and pressing any other button cancels the pan. Free panning only applies when using the middle mouse button.\n\n### Deprecated\n\n* The `AutoPan` property has been deprecated and will be removed in a future version\n\n## 1.2.2\n\n### Fixed\n\n* Any exception during image painting will now be caught, and the error text printed\n  in lieu of the image\n* Fixed a crash that could occur when dragging a selection if the selection was empty\n\n## 1.2\n\n### Changed\n\n* Reworked events to have less overhead\n* Switched to semantic versioning\n\n## 1.1.5.1\n\n### Fixed\n\n* Fixes the `FitRectangle` method from increasing the width or height of the\n  source rectangle if `X` or `Y` were negative (generally seen when the\n  `SelectionMode` is set to `Rectangle` and you draw outside the bounds of the\n  image area)\n* Resizing the selection in the `ImageBoxEx` control now works correctly even if\n  the mouse passes outside the bounds of the image\n\n## 1.1.5.0\n\n### Added\n\n* Added `AllowUnfocusedMouseWheel` property. If set to `true` the control will\n  support mouse wheel zooming even when it does not have focus\n\n### Fixed\n\n* The `fitToBounds` parameter of the `PointToImage` wasn't being used correctly\n\n## 1.1.4.6\n\n### Added\n\n* Added new `MaximumSelectionSize` property to the demonstration `ImageBoxEx`\n  control that allows for more control over default selection\n* Added new overloads to `ZoomIn` and `ZoomOut` to determine if the center point\n  should be preserved\n\n### Changed\n\n* Refactored zoom handling for mouse and keyboard to avoid duplicate\n  calculations\n* Updated copyright year\n\n### Fixed\n\n* Zooming in or out using the default keybinds now preserves the center point\n  relative to the new zoom\n* Fixed the **About** dialog in the demonstration program not loading the\n  default tab correctly\n\n## 1.1.4.5\n\n### Added\n\n* `ImageBoxEx` example control now correctly allows you to move and resize\n  selection regions even when the control is zoomed\n\n### Changed\n\n* If the `InterpolationMode` property is set to `Default`, the `ImageBox`\n  control will now choose an appropriate mode based on the current zoom levels\n\n## 1.1.4.4\n\n### Added\n\n* Added new `DrawBackground` virtual method. This allows you to override how the\n  `ImageBox` draws the image background without having to override the entire\n  `OnPaint` method\n\n## 1.1.4.3\n\n### Added\n\n* Added a new `TextPadding` property and corresponding `DrawLabel` overload.\n  When this property is set, rendered text from the `Text` and `TextAlign`\n  properties is drawn with the appropriate padding. If the `TextBackColor`\n  property is set to something not fully transparent, then the background will\n  be filled in the original render spot, excluding the padding, allowing for\n  labels with wider background borders\n\n## 1.1.4.2\n\n### Added\n\n* Added a new **Resizable Selection** demo. This demo makes use of a subclass of\n  the `ImageBox` to add native dragging and resizing of the region defined by\n  the `SelectionRegion` property\n\n### Changed\n\n* `DrawImage` now also ignores `OutOfMemoryException` exceptions\n* Removed requirement for .NET 3.5 thanks to a commit from\n  [dahmage](https://github.com/dahmage)\n* Added `GetScaledRectangle` overloads using `Point` and `Size` (and the float\n  variant) parameters\n\n### Fixed\n\n* Calling `SelectAll` caused a crash if a backing image wasn't present (even if\n  `VirtualMode` was set)\n\n## 1.1.4.1\n\n### Fixed\n\n* Removed unnecessary `UpdateStyles` calls\n* Changed the `ViewSize` property and `DrawImage` methods to handle disposed\n  images rather than bringing down an entire application\n* Added `TextFormatFlags.NoPadding` to the flags used by `DrawLabel` to avoid a\n  slight gap on left aligned text\n* Fixed a potential crash calling `GetSelectedImage`. Thanks to MutStarburst for\n  finding this bug\n\n## 1.1.4.0\n\n### Added\n\n* Added NuGet package\n* Added a new `SizeMode` property. This allows you to switch between `Normal`,\n  `Fit` and `Stretch` modes. Stretch is a new mode for the `ImageBox`, and acts\n  similar to existing `Fit` functionality except the aspect ratio is not\n  preserved\n* Added a license file to hopefully cut down on questions about usage. The\n  `ImageBox` control is licensed under the MIT license, allowing you free reign\n  to use it in your projects, commercial or otherwise. See `license.txt` for the\n  full text\n* Added a new `CenterPoint` property. This property returns the pixel at the\n  center of the current image viewport\n* Added a bunch of missing XML comments documentation.\n* Added new overloads for most methods that accepted a source `Rectangle`,\n  `Point` or `Size` to also accept `float` and `int` arguments.\n* Added a new `Zoomed` method that uses new `ImageBoxZoomEventArgs` arguments.\n  This new event allows you to tell if the zoom was in or out, how it was\n  raised, and current and previous zoom values. Not hugely thrilled with how\n  aspects of this change has been internally implemented, so implementation\n  methods are private rather than virtual so I can change them without affecting\n  the signature\n* Added new `CenterToImage` method which resets the viewport to be centered of\n  the image, in the same way as zooming via the keyboard used to work.\n* Added support for animated GIF's, thanks to a contribution from\n  [Eggy](https://github.com/teamalpha5441). Note animations only play at\n  runtime, not design time\n* The `Text` and `Font` properties are now available and, if set, will be\n  displayed in the control. You can use the `ForeColor`, `TextBackColor`,\n  `TextAlign`, `TextDisplayMode` and `ScaleText` properties to determine how the\n  text will be rendered\n* A new `DrawLabel` method that performs text drawing is available for use by\n  custom implementations or virtual modes\n* Added a new *Scaled Adornments* demonstration, showing how easy it is to add\n  custom drawing that is scaled and positioned appropriately\n* Added a new *Switch Image During Zoom* demonstration, a demo with an unwieldy\n  name that shows how to switch out a low resolution image with a higher\n  detailed one as you zoom into an `ImageBox`\n* Added new *Text* and *Size Mode* demonstrations\n\n### Fixed\n\n* Zooming in and out with the keyboard now keeps the view centered to the same\n  pixel that was centered prior to the zoom\n* Zooming in and out with the keyboard is now correctly disabled if the\n  `AllowZoom` property is `False`, or the `SizeMode` property is a value other\n  than `Normal`. This means keyboard behaviour now matches mouse behaviour\n* If the mouse wheel was rapidly spun (thus having a multiple of the base\n  delta), the `Zoom` property was only adjusted once\n* Setting the `GridScale` property to `None` rendered the default `Small` grid.\n  Using a scale of `None` now correctly just fills the grid area with a solid\n  brush from the `GridColor` property\n* The `MouseWheel` event is now available\n* Layout changes no longer occur if the `AllowPainting` property is `false`\n  through use of the `BeginUpdate` method\n* Fixed various documentation errors\n\n### Removed\n\n* The `SizeToFit` property has been marked as deprecated and should no longer be\n  used. The `SizeMode` property has a `Fit` value that should be used instead.\n  Setting the `SizeToFit` property will now manipulate `SizeMode` instead\n\n## 1.1.3.0\n\n### Added\n\n* Added new *DragTestForm* demo\n* Added new `Tiny` setting for `ImageBoxGridScale` which is half the size of\n  `Small`\n\n### Changed\n\n* The `Selecting` event now uses `ImageBoxCancelEventArgs` in order to provide\n  further information\n\n### Fixed\n\n* If the `Selecting` event was cancelled, it would continue to be re-raised with\n  every movement of the mouse while the button was pressed. Now the event is\n  only raised once, and if cancelled will not be raised again until the button\n  is released and a new drag initiated\n\n## 1.1.2.2\n\n### Changed\n\n* Changed `PixelGridThreshold` into an instance property, and changed default\n  value to `5`\n\n## 1.1.2.1\n\n### Added\n\n* Added missing `GetOffsetRectangle` overload which supports `Rectangle`\n  structs\n\n### Fixed\n\n* The `ZoomToFit` method didn't support virtual mode and crashed if called\n\n## 1.1.2.0\n\n### Added\n\n* Added `IsPointInImage` method. This function returns if a given point is\n  within the image viewport, and is useful for combining with `PointToImage`\n* Added `ImageBorderColor` property, allowing you to customize the color of the\n  image border\n* Added a new `ImageBoxBorderStyle`, `FixedSingleGlowShadow`. This style allows\n  for a more smoother outer glow shadow instead of the existing clunky drop\n  shadow\n* Added  `ShowPixelGrid` and `PixelGridColor` properties. When set, a dotted\n  grid is displayed around pixels when zooming in on an image\n* Added new overload to `PointToImage` which allows you to specify if the\n  function should map the given point to the nearest available edge(s) if the\n  point is outside the image boundaries\n* Added `AllowDoubleClick` property. When set, the normal double click events\n  and overrides work as expected\n* Additional documentation added via XML comments\n\n### Fixed\n\n* If the `GridDisplayMode` property is set to `Image` an explicit image border\n  is no longer drawn, instead the `ImageBorder` property is correctly honoured\n* Fixes a problem where half the pixels of the first row/column were lost when\n  zooming. Thanks to Rotem for the fix\n* The `GetImageViewport` method now correctly returns a width and height that\n  accounts for control size, padding and zoom levels\n* Fixed incorrect attributes on `AutoSize` property\n* Fixes \"see also\" documentation errors for events\n\n## 1.1.1.0\n\n### Changed\n\n* Added `VirtualMode` and `VirtualSize` properties. These new properties allow\n  you to use all functionality of the ImageBox control without having to set\n  the `Image` property. You can also use the new `VirtualDraw` event to provide\n  custom drawing without having to override existing drawing functionality\n\n### Fixed\n\n* Fixed the image viewport sometimes being the incorrect size when zoomed in.\n  Thanks to WMJ for the fix\n\n## 1.1.0.0\n\n### Added\n\n* Added a `ZoomLevels` property which allows you to configure the different zoom\n  levels supported by the control. Now instead of the control trying to guess\n  the next zoom level, it cycles appropriately through the defined levels.\n  *Currently ZoomLevels (apart from the default series) can only be set at runtime*\n* New `CenterAt` and `ScrollTo` methods allow you to scroll to a given location\n  in the source image\n* Split shortcut handling into two methods `ProcessScrollingShortcuts` for\n  handling arrow keys and `ProcessImageShortcuts` for handling pretty much\n  anything else\n* Added `EnableShortcuts` property, allowing the built in keyboard support to be\n  disabled. When this property is true, `ProcessImageShortcuts` is not called,\n  allowing the control to still be scrolled via the keyboard, but not zoomed etc\n* Added a new `GetSelectedImage` method which creates a new `Bitmap` based on\n  the current selection\n* Added new `FitRectangle` method which takes a given rectangle and ensure it\n  fits within the image boundaries\n* Added a new `ZoomToRegion` method. This will caculate and appropriate zoom\n  level and scrollbar positions to fit a given rectangle\n* Added new `SelectionMode.Zoom`. When this mode is selected, drawing a region\n  will automatically zoom and position the control to fit the region, after\n  which the region is automatically cleared\n\n### Changed\n\n* Zooming with the mouse is now smoother, and the control attempts to keep the\n  area under the mouse before the zoom in the same area after the zoon.\n* The `ZoomIncrement` property has been removed due to the introduction of the\n  new zoom levels\n* Zooming can now be performed by the -/+ keys (`OemMinus` and `Oemplus`)\n* When zooming (except via mouse action), if the `AutoCenter` property is set,\n  the control will always center the image even when scrollbars are present\n* Nestable `BeginUpdate` and `EndUpdate` methods allow you to disable and enable\n  painting of the control, for example when changing multiple properties at once\n* The `AllowClickZoom` property now defaults to `false`\n* The `PointToImage` function no longer adds +1 to the result of the function\n\n### Fixed\n\n* Panning no longer tries to activate if no scrollbars are visible\n* A new base class, `VirtualScrollableControl` is now used instead of\n  `ScrollableControl`. This removes completely the flicker issues present in\n  previous versions of the control\n* The BorderStyle property has been moved to the `ScrollControl` class, so that\n  borders now correctly surround the control (including scrollbars) rather than\n  just the client area\n* If the `AllowZoomClick` property is `true`, the control no longer magically\n  zooms after panning or selecting a region. Code previously in the\n  `OnMouseClick` override is now in `OnMouseUp`\n* If both `AutoPan` and a valid `SelectionMode` are set, only selections are\n  processed, instead of the control tying to do both. As a result of this fix,\n  setting the `SelectionMode` property no longer resets `AutoPan`\n* With the introduction of the `VirtualScrollableControl`, the `MouseWheel`\n  event is now raised as expected\n\n### Known issues\n\n* The `ScrollProperties` class hasn't been fully integrated with the\n  `ScrollControl`, setting properties on this class won't update the owner control\n\n## 1.0.0.5\n\n* Initial GitHub release\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/Cyotek.Windows.Forms.ImageBox.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{4159C8D3-C18D-4BED-8BE6-9BAD1B0CA4F6}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Cyotek.Windows.Forms</RootNamespace>\n    <AssemblyName>Cyotek.Windows.Forms.ImageBox</AssemblyName>\n    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <DocumentationFile>\n    </DocumentationFile>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <DocumentationFile>bin\\Release\\Cyotek.Windows.Forms.ImageBox.xml</DocumentationFile>\n  </PropertyGroup>\n  <PropertyGroup>\n    <SignAssembly>true</SignAssembly>\n  </PropertyGroup>\n  <PropertyGroup>\n    <AssemblyOriginatorKeyFile>cyopublic.snk</AssemblyOriginatorKeyFile>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Windows.Forms\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"ImageBox.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"ImageBoxMouseWheelMessageFilter.cs\" />\n    <Compile Include=\"ImageBoxMouseWheelMode.cs\" />\n    <Compile Include=\"ImageBoxPanMode.cs\" />\n    <Compile Include=\"ImageBoxPanStyle.cs\" />\n    <Compile Include=\"ImageBoxZoomActions.cs\" />\n    <Compile Include=\"ImageBoxActionSources.cs\" />\n    <Compile Include=\"ImageBoxBorderStyle.cs\" />\n    <Compile Include=\"ImageBoxCancelEventArgs.cs\" />\n    <Compile Include=\"ImageBoxZoomEventArgs.cs\" />\n    <Compile Include=\"ImageBoxGridDisplayMode.cs\" />\n    <Compile Include=\"ImageBoxGridScale.cs\" />\n    <Compile Include=\"ImageBoxSelectionMode.cs\" />\n    <Compile Include=\"ImageBoxNativeMethods.cs\" />\n    <Compile Include=\"ImageBoxSizeMode.cs\" />\n    <Compile Include=\"ImageBoxPanDirection.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"ScrollControl.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"ScrollProperties.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"VirtualScrollableControl.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"ZoomLevelCollection.cs\" />\n    <Service Include=\"{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}\" />\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"cyopublic.snk\" />\n    <None Include=\"Cyotek.Windows.Forms.ImageBox.nuspec\" />\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"ImageBox.bmp\" />\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"..\\res\\PanAll.cur\">\n      <Link>PanAll.cur</Link>\n    </EmbeddedResource>\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"..\\res\\PanAllSymbol.png\">\n      <Link>PanAllSymbol.png</Link>\n    </EmbeddedResource>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <PropertyGroup>\n    <PostBuildEvent>\n    </PostBuildEvent>\n  </PropertyGroup>\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/Cyotek.Windows.Forms.ImageBox.nuspec",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<package xmlns=\"http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd\">\n    <metadata>\n        <id>CyotekImageBox</id>\n        <version>$version$-beta.1</version>\n        <title>Cyotek ImageBox Control</title>\n        <authors>Cyotek</authors>\n        <owners>Cyotek</owners>\n        <licenseUrl>https://raw.githubusercontent.com/cyotek/Cyotek.Windows.Forms.ImageBox/master/license.txt</licenseUrl>\n        <projectUrl>http://cyotek.com/blog/tag/imagebox</projectUrl>\n        <iconUrl>http://static.cyotek.com/files/packageicons/imagebox-32x32.png</iconUrl>\n        <requireLicenseAcceptance>false</requireLicenseAcceptance>\n        <description>The ImageBox is a custom control for displaying images. It supports zooming, scrolling, panning, region selection, virtual modes, and much more.</description>\n        <summary>The ImageBox is a custom control for displaying images with built in support for zooming, scrolling, panning, region selection, virtual modes, and much more.</summary>\n        <releaseNotes />\n        <copyright>$copyright$</copyright>\n        <language>en-GB</language>\n        <tags>image picturebox form control imagebox cyotek</tags>\n        <frameworkAssemblies>\n            <frameworkAssembly assemblyName=\"System.Windows.Forms\" targetFramework=\"\" />\n            <frameworkAssembly assemblyName=\"System.Drawing\" targetFramework=\"\" />\n        </frameworkAssemblies>\n    </metadata>\n</package>\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBox.cs",
    "content": "// Cyotek ImageBox\n// http://cyotek.com/blog/tag/imagebox\n\n// Copyright (c) 2010-2021 Cyotek Ltd.\n\n// This work is licensed under the MIT License.\n// See LICENSE.TXT for the full text\n\n// Found this code useful?\n// https://www.cyotek.com/contribute\n\nusing System;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Drawing.Drawing2D;\nusing System.IO;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms\n{\n  /// <summary>\n  ///   Component for displaying images with support for scrolling and zooming.\n  /// </summary>\n  [DefaultProperty(\"Image\")]\n  [ToolboxBitmap(typeof(ImageBox), \"ImageBox.bmp\")]\n  [ToolboxItem(true)]\n  /* [Designer(\"Cyotek.Windows.Forms.Design.ImageBoxDesigner\", Cyotek.Windows.Forms.ImageBox.Design.dll, PublicKeyToken=58daa28b0b2de221\")] */\n  public class ImageBox : VirtualScrollableControl\n  {\n    #region Constants\n\n    private static readonly object _eventAllowClickZoomChanged = new object();\n\n    private static readonly object _eventAllowDoubleClickChanged = new object();\n\n    private static readonly object _eventAllowFreePanChanged = new object();\n\n    private static readonly object _eventAllowUnfocusedMouseWheelChanged = new object();\n\n    private static readonly object _eventAllowZoomChanged = new object();\n\n    private static readonly object _eventAutoCenterChanged = new object();\n\n    private static readonly object _eventAutoPanChanged = new object();\n\n    private static readonly object _eventDropShadowSizeChanged = new object();\n\n    private static readonly object _eventGridCellSizeChanged = new object();\n\n    private static readonly object _eventGridColorAlternateChanged = new object();\n\n    private static readonly object _eventGridColorChanged = new object();\n\n    private static readonly object _eventGridDisplayModeChanged = new object();\n\n    private static readonly object _eventGridScaleChanged = new object();\n\n    private static readonly object _eventImageBorderColorChanged = new object();\n\n    private static readonly object _eventImageBorderStyleChanged = new object();\n\n    private static readonly object _eventImageChanged = new object();\n\n    private static readonly object _eventInterpolationModeChanged = new object();\n\n    private static readonly object _eventInvertMouseChanged = new object();\n\n    private static readonly object _eventLimitSelectionToImageChanged = new object();\n\n    private static readonly object _eventMouseWheelModeChanged = new object();\n\n    private static readonly object _eventPanEnd = new object();\n\n    private static readonly object _eventPanModeChanged = new object();\n\n    private static readonly object _eventPanStart = new object();\n\n    private static readonly object _eventPixelGridColorChanged = new object();\n\n    private static readonly object _eventPixelGridThresholdChanged = new object();\n\n    private static readonly object _eventScaleTextChanged = new object();\n\n    private static readonly object _eventSelected = new object();\n\n    private static readonly object _eventSelecting = new object();\n\n    private static readonly object _eventSelectionColorChanged = new object();\n\n    private static readonly object _eventSelectionModeChanged = new object();\n\n    private static readonly object _eventSelectionRegionChanged = new object();\n\n    private static readonly object _eventShortcutsEnabledChanged = new object();\n\n    private static readonly object _eventShowPixelGridChanged = new object();\n\n    private static readonly object _eventSizeModeChanged = new object();\n\n    private static readonly object _eventSizeToFitChanged = new object();\n\n    private static readonly object _eventTextAlignChanged = new object();\n\n    private static readonly object _eventTextBackColorChanged = new object();\n\n    private static readonly object _eventTextDisplayModeChanged = new object();\n\n    private static readonly object _eventTextPaddingChanged = new object();\n\n    private static readonly object _eventVirtualDraw = new object();\n\n    private static readonly object _eventVirtualModeChanged = new object();\n\n    private static readonly object _eventVirtualSizeChanged = new object();\n\n    private static readonly object _eventZoomChanged = new object();\n\n    private static readonly object _eventZoomed = new object();\n\n    private static readonly object _eventZoomLevelsChanged = new object();\n\n    private const int _freePanTimerInterval = 250;\n\n    private const int _panAllDeadSize = 32;\n\n    private const int MaxZoom = 3500;\n\n    private const int MinZoom = 1;\n\n    private const int SelectionDeadZone = 5;\n\n    #endregion\n\n    #region Fields\n\n    private bool _allowClickZoom;\n\n    private bool _allowDoubleClick;\n\n    private bool _allowFreePan;\n\n    private bool _allowUnfocusedMouseWheel;\n\n    private bool _allowZoom;\n\n    private bool _autoCenter;\n\n    private Cursor _currentCursor;\n\n    private int _dropShadowSize;\n\n    private Timer _freePanTimer;\n\n    private int _gridCellSize;\n\n    private Color _gridColor;\n\n    private Color _gridColorAlternate;\n\n    private ImageBoxGridDisplayMode _gridDisplayMode;\n\n    private ImageBoxGridScale _gridScale;\n\n    private Bitmap _gridTile;\n\n    private Image _image;\n\n    private Color _imageBorderColor;\n\n    private ImageBoxBorderStyle _imageBorderStyle;\n\n    private InterpolationMode _interpolationMode;\n\n    private bool _invertMouse;\n\n    private bool _limitSelectionToImage;\n\n    private double _mouseDownStart;\n\n    private ImageBoxMouseWheelMode _mouseWheelMode;\n\n    private ImageBoxPanMode _panMode;\n\n    private ImageBoxPanStyle _panStyle;\n\n    private Color _pixelGridColor;\n\n    private int _pixelGridThreshold;\n\n    private bool _scaleText;\n\n    private Color _selectionColor;\n\n    private ImageBoxSelectionMode _selectionMode;\n\n    private RectangleF _selectionRegion;\n\n    private bool _shortcutsEnabled;\n\n    private bool _showPixelGrid;\n\n    private ImageBoxSizeMode _sizeMode;\n\n    private Point _startMousePosition;\n\n    private Point _startScrollPosition;\n\n    private ContentAlignment _textAlign;\n\n    private Color _textBackColor;\n\n    private ImageBoxGridDisplayMode _textDisplayMode;\n\n    private Padding _textPadding;\n\n    private Brush _texture;\n\n    private int _updateCount;\n\n    private bool _virtualMode;\n\n    private Size _virtualSize;\n\n    private int _zoom;\n\n    private ZoomLevelCollection _zoomLevels;\n    private bool _isSelecting;\n\n    #endregion\n\n    #region Constructors\n\n    /// <summary>\n    ///   Initializes a new instance of the <see cref=\"ImageBox\" /> class.\n    /// </summary>\n    public ImageBox()\n    {\n      this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw, true);\n      this.SetStyle(ControlStyles.StandardDoubleClick, false);\n\n      // ReSharper disable DoNotCallOverridableMethodsInConstructor\n      this.BeginUpdate();\n      _panMode = ImageBoxPanMode.Both;\n      _allowFreePan = true;\n      this.WheelScrollsControl = false;\n      this.AllowZoom = true;\n      this.MouseWheelMode = ImageBoxMouseWheelMode.Zoom;\n      this.LimitSelectionToImage = true;\n      this.DropShadowSize = 3;\n      this.ImageBorderStyle = ImageBoxBorderStyle.None;\n      this.BackColor = Color.White;\n      this.AutoSize = false;\n      this.AutoScroll = true;\n      this.GridScale = ImageBoxGridScale.Small;\n      this.GridDisplayMode = ImageBoxGridDisplayMode.Client;\n      this.GridColor = Color.Gainsboro;\n      this.GridColorAlternate = Color.White;\n      this.GridCellSize = 8;\n      this.InterpolationMode = InterpolationMode.NearestNeighbor;\n      this.AutoCenter = true;\n      this.SelectionColor = SystemColors.Highlight;\n      this.ActualSize();\n      this.ShortcutsEnabled = true;\n      this.ZoomLevels = ZoomLevelCollection.Default;\n      this.ImageBorderColor = SystemColors.ControlDark;\n      this.PixelGridColor = Color.DimGray;\n      this.PixelGridThreshold = 5;\n      this.TextAlign = ContentAlignment.MiddleCenter;\n      this.TextBackColor = Color.Transparent;\n      this.TextDisplayMode = ImageBoxGridDisplayMode.Client;\n      this.EndUpdate();\n      // ReSharper restore DoNotCallOverridableMethodsInConstructor\n    }\n\n    #endregion\n\n    #region Events\n\n    /// <summary>\n    ///   Occurs when the AllowClickZoom property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AllowClickZoomChanged\n    {\n      add { this.Events.AddHandler(_eventAllowClickZoomChanged, value); }\n      remove { this.Events.RemoveHandler(_eventAllowClickZoomChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the AllowDoubleClick property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AllowDoubleClickChanged\n    {\n      add { this.Events.AddHandler(_eventAllowDoubleClickChanged, value); }\n      remove { this.Events.RemoveHandler(_eventAllowDoubleClickChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the AllowFreePan property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AllowFreePanChanged\n    {\n      add { this.Events.AddHandler(_eventAllowFreePanChanged, value); }\n      remove { this.Events.RemoveHandler(_eventAllowFreePanChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the AllowUnfocusedMouseWheel property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AllowUnfocusedMouseWheelChanged\n    {\n      add { this.Events.AddHandler(_eventAllowUnfocusedMouseWheelChanged, value); }\n      remove { this.Events.RemoveHandler(_eventAllowUnfocusedMouseWheelChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the AllowZoom property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AllowZoomChanged\n    {\n      add { this.Events.AddHandler(_eventAllowZoomChanged, value); }\n      remove { this.Events.RemoveHandler(_eventAllowZoomChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the AutoCenter property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AutoCenterChanged\n    {\n      add { this.Events.AddHandler(_eventAutoCenterChanged, value); }\n      remove { this.Events.RemoveHandler(_eventAutoCenterChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the AutoPan property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AutoPanChanged\n    {\n      add { this.Events.AddHandler(_eventAutoPanChanged, value); }\n      remove { this.Events.RemoveHandler(_eventAutoPanChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the DropShadowSize property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler DropShadowSizeChanged\n    {\n      add { this.Events.AddHandler(_eventDropShadowSizeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventDropShadowSizeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the GridSizeCell property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler GridCellSizeChanged\n    {\n      add { this.Events.AddHandler(_eventGridCellSizeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventGridCellSizeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the GridColorAlternate property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler GridColorAlternateChanged\n    {\n      add { this.Events.AddHandler(_eventGridColorAlternateChanged, value); }\n      remove { this.Events.RemoveHandler(_eventGridColorAlternateChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the GridColor property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler GridColorChanged\n    {\n      add { this.Events.AddHandler(_eventGridColorChanged, value); }\n      remove { this.Events.RemoveHandler(_eventGridColorChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the GridDisplayMode property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler GridDisplayModeChanged\n    {\n      add { this.Events.AddHandler(_eventGridDisplayModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventGridDisplayModeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the GridScale property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler GridScaleChanged\n    {\n      add { this.Events.AddHandler(_eventGridScaleChanged, value); }\n      remove { this.Events.RemoveHandler(_eventGridScaleChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the ImageBorderColor property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ImageBorderColorChanged\n    {\n      add { this.Events.AddHandler(_eventImageBorderColorChanged, value); }\n      remove { this.Events.RemoveHandler(_eventImageBorderColorChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the ImageBorderStyle property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ImageBorderStyleChanged\n    {\n      add { this.Events.AddHandler(_eventImageBorderStyleChanged, value); }\n      remove { this.Events.RemoveHandler(_eventImageBorderStyleChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the Image property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ImageChanged\n    {\n      add { this.Events.AddHandler(_eventImageChanged, value); }\n      remove { this.Events.RemoveHandler(_eventImageChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the InterpolationMode property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler InterpolationModeChanged\n    {\n      add { this.Events.AddHandler(_eventInterpolationModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventInterpolationModeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the InvertMouse property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler InvertMouseChanged\n    {\n      add { this.Events.AddHandler(_eventInvertMouseChanged, value); }\n      remove { this.Events.RemoveHandler(_eventInvertMouseChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the LimitSelectionToImage property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler LimitSelectionToImageChanged\n    {\n      add { this.Events.AddHandler(_eventLimitSelectionToImageChanged, value); }\n      remove { this.Events.RemoveHandler(_eventLimitSelectionToImageChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the MouseWheelMode property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler MouseWheelModeChanged\n    {\n      add { this.Events.AddHandler(_eventMouseWheelModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventMouseWheelModeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when panning the control completes.\n    /// </summary>\n    [Category(\"Action\")]\n    public event EventHandler PanEnd\n    {\n      add { this.Events.AddHandler(_eventPanEnd, value); }\n      remove { this.Events.RemoveHandler(_eventPanEnd, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the PanMode property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler PanModeChanged\n    {\n      add { this.Events.AddHandler(_eventPanModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventPanModeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when panning the control starts.\n    /// </summary>\n    [Category(\"Action\")]\n    public event EventHandler PanStart\n    {\n      add { this.Events.AddHandler(_eventPanStart, value); }\n      remove { this.Events.RemoveHandler(_eventPanStart, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the PixelGridColor property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler PixelGridColorChanged\n    {\n      add { this.Events.AddHandler(_eventPixelGridColorChanged, value); }\n      remove { this.Events.RemoveHandler(_eventPixelGridColorChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the PixelGridThreshold property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler PixelGridThresholdChanged\n    {\n      add { this.Events.AddHandler(_eventPixelGridThresholdChanged, value); }\n      remove { this.Events.RemoveHandler(_eventPixelGridThresholdChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the ScaleText property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ScaleTextChanged\n    {\n      add { this.Events.AddHandler(_eventScaleTextChanged, value); }\n      remove { this.Events.RemoveHandler(_eventScaleTextChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when a selection region has been defined\n    /// </summary>\n    [Category(\"Action\")]\n    public event EventHandler<EventArgs> Selected\n    {\n      // TODO: The event signature is wrong and should just be EventHandler - breaking change however. Do in the 2.0 scroll changes branch.\n      add { this.Events.AddHandler(_eventSelected, value); }\n      remove { this.Events.RemoveHandler(_eventSelected, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the user starts to define a selection region.\n    /// </summary>\n    [Category(\"Action\")]\n    public event EventHandler<ImageBoxCancelEventArgs> Selecting\n    {\n      add { this.Events.AddHandler(_eventSelecting, value); }\n      remove { this.Events.RemoveHandler(_eventSelecting, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the SelectionColor property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler SelectionColorChanged\n    {\n      add { this.Events.AddHandler(_eventSelectionColorChanged, value); }\n      remove { this.Events.RemoveHandler(_eventSelectionColorChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the SelectionMode property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler SelectionModeChanged\n    {\n      add { this.Events.AddHandler(_eventSelectionModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventSelectionModeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the SelectionRegion property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler SelectionRegionChanged\n    {\n      add { this.Events.AddHandler(_eventSelectionRegionChanged, value); }\n      remove { this.Events.RemoveHandler(_eventSelectionRegionChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the ShortcutsEnabled property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ShortcutsEnabledChanged\n    {\n      add { this.Events.AddHandler(_eventShortcutsEnabledChanged, value); }\n      remove { this.Events.RemoveHandler(_eventShortcutsEnabledChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the ShowPixelGrid property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ShowPixelGridChanged\n    {\n      add { this.Events.AddHandler(_eventShowPixelGridChanged, value); }\n      remove { this.Events.RemoveHandler(_eventShowPixelGridChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the SizeMode property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler SizeModeChanged\n    {\n      add { this.Events.AddHandler(_eventSizeModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventSizeModeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the SizeToFit property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler SizeToFitChanged\n    {\n      add { this.Events.AddHandler(_eventSizeToFitChanged, value); }\n      remove { this.Events.RemoveHandler(_eventSizeToFitChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the TextAlign property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler TextAlignChanged\n    {\n      add { this.Events.AddHandler(_eventTextAlignChanged, value); }\n      remove { this.Events.RemoveHandler(_eventTextAlignChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the TextBackColor property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler TextBackColorChanged\n    {\n      add { this.Events.AddHandler(_eventTextBackColorChanged, value); }\n      remove { this.Events.RemoveHandler(_eventTextBackColorChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the TextDisplayMode property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler TextDisplayModeChanged\n    {\n      add { this.Events.AddHandler(_eventTextDisplayModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventTextDisplayModeChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the TextPadding property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler TextPaddingChanged\n    {\n      add { this.Events.AddHandler(_eventTextPaddingChanged, value); }\n      remove { this.Events.RemoveHandler(_eventTextPaddingChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when virtual painting should occur\n    /// </summary>\n    [Category(\"Appearance\")]\n    public event PaintEventHandler VirtualDraw\n    {\n      add { this.Events.AddHandler(_eventVirtualDraw, value); }\n      remove { this.Events.RemoveHandler(_eventVirtualDraw, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the VirtualMode property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler VirtualModeChanged\n    {\n      add { this.Events.AddHandler(_eventVirtualModeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventVirtualModeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the VirtualSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler VirtualSizeChanged\n    {\n      add { this.Events.AddHandler(_eventVirtualSizeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventVirtualSizeChanged, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the Zoom property is changed.\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ZoomChanged\n    {\n      add { this.Events.AddHandler(_eventZoomChanged, value); }\n      remove { this.Events.RemoveHandler(_eventZoomChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when then a zoom action is performed.\n    /// </summary>\n    [Category(\"Action\")]\n    public event EventHandler<ImageBoxZoomEventArgs> Zoomed\n    {\n      add { this.Events.AddHandler(_eventZoomed, value); }\n      remove { this.Events.RemoveHandler(_eventZoomed, value); }\n    }\n\n    /// <summary>\n    ///   Occurs when the ZoomLevels property is changed\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ZoomLevelsChanged\n    {\n      add { this.Events.AddHandler(_eventZoomLevelsChanged, value); }\n      remove { this.Events.RemoveHandler(_eventZoomLevelsChanged, value); }\n    }\n\n    #endregion\n\n    #region Static Methods\n\n    /// <summary>\n    ///   Creates a bitmap image containing a 2x2 grid using the specified cell size and colors.\n    /// </summary>\n    /// <param name=\"cellSize\">Size of the cell.</param>\n    /// <param name=\"cellColor\">Cell color.</param>\n    /// <param name=\"alternateCellColor\">Alternate cell color.</param>\n    /// <returns></returns>\n    public static Bitmap CreateCheckerBoxTile(int cellSize, Color cellColor, Color alternateCellColor)\n    {\n      Bitmap result;\n      int width;\n      int height;\n\n      // draw the tile\n      width = cellSize * 2;\n      height = cellSize * 2;\n      result = new Bitmap(width, height);\n\n      using (Graphics g = Graphics.FromImage(result))\n      {\n        using (Brush brush = new SolidBrush(cellColor))\n        {\n          g.FillRectangle(brush, new Rectangle(cellSize, 0, cellSize, cellSize));\n          g.FillRectangle(brush, new Rectangle(0, cellSize, cellSize, cellSize));\n        }\n\n        using (Brush brush = new SolidBrush(alternateCellColor))\n        {\n          g.FillRectangle(brush, new Rectangle(0, 0, cellSize, cellSize));\n          g.FillRectangle(brush, new Rectangle(cellSize, cellSize, cellSize, cellSize));\n        }\n      }\n\n      return result;\n    }\n\n    /// <summary>\n    ///   Creates a checked tile texture using default values.\n    /// </summary>\n    /// <returns></returns>\n    public static Bitmap CreateCheckerBoxTile()\n    {\n      return CreateCheckerBoxTile(8, Color.Gainsboro, Color.WhiteSmoke);\n    }\n\n    private static Cursor GetPanAllCursor()\n    {\n      Type type;\n\n      type = typeof(ImageBox);\n\n      return new Cursor(type.Assembly.GetManifestResourceStream(type.Namespace + \".PanAll.cur\"));\n    }\n\n    private static Bitmap GetPanAllSymbol()\n    {\n      Type type;\n\n      type = typeof(ImageBox);\n\n      using (Stream stream = type.Assembly.GetManifestResourceStream(type.Namespace + \".PanAllSymbol.png\"))\n      {\n        return new Bitmap(stream);\n      }\n    }\n\n    private static void LoadPanResources()\n    {\n      if (_panAllCursor == null)\n      {\n        _panAllCursor = GetPanAllCursor();\n      }\n\n      if (_panAllSymbol == null)\n      {\n        _panAllSymbol = GetPanAllSymbol();\n      }\n    }\n\n    #endregion\n\n    #region Properties\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether clicking the control with the mouse will automatically zoom in or out.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if clicking the control allows zooming; otherwise, <c>false</c>.\n    /// </value>\n    [DefaultValue(false)]\n    [Category(\"Behavior\")]\n    public virtual bool AllowClickZoom\n    {\n      get { return _allowClickZoom; }\n      set\n      {\n        if (_allowClickZoom != value)\n        {\n          _allowClickZoom = value;\n          this.OnAllowClickZoomChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets a value indicating whether the DoubleClick event can be raised.\n    /// </summary>\n    /// <value><c>true</c> if the DoubleClick event can be raised; otherwise, <c>false</c>.</value>\n    [Category(\"Behavior\")]\n    [DefaultValue(false)]\n    public virtual bool AllowDoubleClick\n    {\n      get { return _allowDoubleClick; }\n      set\n      {\n        if (this.AllowDoubleClick != value)\n        {\n          _allowDoubleClick = value;\n\n          this.OnAllowDoubleClickChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets a value indicating whether free panning can be used\n    /// </summary>\n    /// <value>\n    /// <c>true</c> if free panning can be used, otherwise <c>false</c>.\n    /// </value>\n    [Category(\"Behavior\")]\n    [DefaultValue(true)]\n    public virtual bool AllowFreePan\n    {\n      get { return _allowFreePan; }\n      set\n      {\n        if (_allowFreePan != value)\n        {\n          _allowFreePan = value;\n\n          this.OnAllowFreePanChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets a value indicating whether the mouse wheel is processed event if the <see cref=\"ImageBox\"/> doesn't have focus.\n    /// </summary>\n    /// <value>\n    /// <c>true</c> if the mouse wheel is processed regardless of focus, otherwise <c>false</c> to only process the mouse wheel when the control has focus.\n    /// </value>\n    /// <remarks>Setting this problem to <c>true</c> could cause conflicting behavior with other controls that also make use of the mouse wheel.</remarks>\n    [Category(\"Behavior\")]\n    [DefaultValue(false)]\n    public virtual bool AllowUnfocusedMouseWheel\n    {\n      get { return _allowUnfocusedMouseWheel; }\n      set\n      {\n        if (this.AllowUnfocusedMouseWheel != value)\n        {\n          _allowUnfocusedMouseWheel = value;\n\n          this.OnAllowUnfocusedMouseWheelChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the user can change the zoom level.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the zoom level can be changed; otherwise, <c>false</c>.\n    /// </value>\n    [Category(\"Behavior\")]\n    [DefaultValue(true)]\n    public virtual bool AllowZoom\n    {\n      get { return _allowZoom; }\n      set\n      {\n        if (this.AllowZoom != value)\n        {\n          _allowZoom = value;\n\n          this.OnAllowZoomChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the image is centered where possible.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the image should be centered where possible; otherwise, <c>false</c>.\n    /// </value>\n    [DefaultValue(true)]\n    [Category(\"Appearance\")]\n    public virtual bool AutoCenter\n    {\n      get { return _autoCenter; }\n      set\n      {\n        if (_autoCenter != value)\n        {\n          _autoCenter = value;\n          this.OnAutoCenterChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets if the mouse can be used to pan the control.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the control can be auto panned; otherwise, <c>false</c>.\n    /// </value>\n    /// <remarks>If this property is set, the SizeToFit property cannot be used.</remarks>\n    [DefaultValue(true)]\n    [Category(\"Behavior\")]\n    [Obsolete(\"Use the PanMode property instead\", false)]\n    //[Browsable(false)]\n    public virtual bool AutoPan\n    {\n      get { return (_panMode & ImageBoxPanMode.Left) != 0; }\n      set\n      {\n        if (this.AutoPan != value)\n        {\n          this.PanMode = value ? _panMode & ImageBoxPanMode.Left : _panMode & ~ImageBoxPanMode.Left;\n\n          this.OnAutoPanChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the container enables the user to scroll to any content placed outside of its visible boundaries.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the container enables auto-scrolling; otherwise, <c>false</c>.\n    /// </value>\n    [DefaultValue(true)]\n    public override bool AutoScroll\n    {\n      get { return base.AutoScroll; }\n      set { base.AutoScroll = value; }\n    }\n\n    /// <summary>\n    ///   Gets or sets the minimum size of the auto-scroll.\n    /// </summary>\n    /// <value></value>\n    /// <returns>\n    ///   A <see cref=\"T:System.Drawing.Size\" /> that determines the minimum size of the virtual area through which the user can scroll.\n    /// </returns>\n    [Browsable(false)]\n    [EditorBrowsable(EditorBrowsableState.Never)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public new Size AutoScrollMinSize\n    {\n      get { return base.AutoScrollMinSize; }\n      set { base.AutoScrollMinSize = value; }\n    }\n\n    /// <summary>\n    ///   Specifies if the control should auto size to fit the image contents.\n    /// </summary>\n    /// <value></value>\n    /// <returns>\n    ///   <c>true</c> if enabled; otherwise, <c>false</c>\n    /// </returns>\n    [Browsable(true)]\n    [EditorBrowsable(EditorBrowsableState.Always)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)]\n    [DefaultValue(false)]\n    public override bool AutoSize\n    {\n      get { return base.AutoSize; }\n      set\n      {\n        if (base.AutoSize != value)\n        {\n          base.AutoSize = value;\n          this.AdjustLayout();\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the background color for the control.\n    /// </summary>\n    /// <value></value>\n    /// <returns>\n    ///   A <see cref=\"T:System.Drawing.Color\" /> that represents the background color of the control. The default is the value of the\n    ///   <see\n    ///     cref=\"P:System.Windows.Forms.Control.DefaultBackColor\" />\n    ///   property.\n    /// </returns>\n    [DefaultValue(typeof(Color), \"White\")]\n    public override Color BackColor\n    {\n      get { return base.BackColor; }\n      set { base.BackColor = value; }\n    }\n\n    /// <summary>\n    ///   Gets or sets the background image displayed in the control.\n    /// </summary>\n    /// <value></value>\n    /// <returns>\n    ///   An <see cref=\"T:System.Drawing.Image\" /> that represents the image to display in the background of the control.\n    /// </returns>\n    [Browsable(false)]\n    [EditorBrowsable(EditorBrowsableState.Never)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public override Image BackgroundImage\n    {\n      get { return base.BackgroundImage; }\n      set { base.BackgroundImage = value; }\n    }\n\n    /// <summary>\n    ///   Gets or sets the background image layout as defined in the <see cref=\"T:System.Windows.Forms.ImageLayout\" /> enumeration.\n    /// </summary>\n    /// <value>The background image layout.</value>\n    /// <returns>\n    ///   One of the values of <see cref=\"T:System.Windows.Forms.ImageLayout\" /> (\n    ///   <see\n    ///     cref=\"F:System.Windows.Forms.ImageLayout.Center\" />\n    ///   , <see cref=\"F:System.Windows.Forms.ImageLayout.None\" />,\n    ///   <see\n    ///     cref=\"F:System.Windows.Forms.ImageLayout.Stretch\" />\n    ///   , <see cref=\"F:System.Windows.Forms.ImageLayout.Tile\" />, or\n    ///   <see\n    ///     cref=\"F:System.Windows.Forms.ImageLayout.Zoom\" />\n    ///   ). <see cref=\"F:System.Windows.Forms.ImageLayout.Tile\" /> is the default value.\n    /// </returns>\n    [Browsable(false)]\n    [EditorBrowsable(EditorBrowsableState.Never)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public override ImageLayout BackgroundImageLayout\n    {\n      get { return base.BackgroundImageLayout; }\n      set { base.BackgroundImageLayout = value; }\n    }\n\n    /// <summary>\n    /// Gets the point at the center of the currently displayed image viewport.\n    /// </summary>\n    /// <value>The point at the center of the current image viewport.</value>\n    [Browsable(false)]\n    public Point CenterPoint\n    {\n      get\n      {\n        Rectangle viewport;\n\n        viewport = this.GetImageViewPort();\n\n        return new Point(viewport.Width / 2, viewport.Height / 2);\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the cursor that is displayed when the mouse pointer is over the control.\n    /// </summary>\n    /// <value>\n    /// A <see cref=\"T:System.Windows.Forms.Cursor\" /> that represents the cursor to display when the\n    /// mouse pointer is over the control.\n    /// </value>\n    /// <seealso cref=\"P:System.Windows.Forms.Control.Cursor\"/>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public override Cursor Cursor\n    {\n      get { return base.Cursor; }\n      set { base.Cursor = value; }\n    }\n\n    /// <summary>\n    ///   Gets or sets the size of the drop shadow.\n    /// </summary>\n    /// <value>The size of the drop shadow.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(3)]\n    public virtual int DropShadowSize\n    {\n      get { return _dropShadowSize; }\n      set\n      {\n        if (this.DropShadowSize != value)\n        {\n          _dropShadowSize = value;\n\n          this.OnDropShadowSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the size of the grid cells.\n    /// </summary>\n    /// <value>The size of the grid cells.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(8)]\n    public virtual int GridCellSize\n    {\n      get { return _gridCellSize; }\n      set\n      {\n        if (_gridCellSize != value)\n        {\n          _gridCellSize = value;\n          this.OnGridCellSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the color of primary cells in the grid.\n    /// </summary>\n    /// <value>The color of primary cells in the grid.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"Gainsboro\")]\n    public virtual Color GridColor\n    {\n      get { return _gridColor; }\n      set\n      {\n        if (_gridColor != value)\n        {\n          _gridColor = value;\n          this.OnGridColorChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the color of alternate cells in the grid.\n    /// </summary>\n    /// <value>The color of alternate cells in the grid.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"White\")]\n    public virtual Color GridColorAlternate\n    {\n      get { return _gridColorAlternate; }\n      set\n      {\n        if (_gridColorAlternate != value)\n        {\n          _gridColorAlternate = value;\n          this.OnGridColorAlternateChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the grid display mode.\n    /// </summary>\n    /// <value>The grid display mode.</value>\n    [DefaultValue(ImageBoxGridDisplayMode.Client)]\n    [Category(\"Appearance\")]\n    public virtual ImageBoxGridDisplayMode GridDisplayMode\n    {\n      get { return _gridDisplayMode; }\n      set\n      {\n        if (_gridDisplayMode != value)\n        {\n          _gridDisplayMode = value;\n          this.OnGridDisplayModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the grid scale.\n    /// </summary>\n    /// <value>The grid scale.</value>\n    [DefaultValue(typeof(ImageBoxGridScale), \"Small\")]\n    [Category(\"Appearance\")]\n    public virtual ImageBoxGridScale GridScale\n    {\n      get { return _gridScale; }\n      set\n      {\n        if (_gridScale != value)\n        {\n          _gridScale = value;\n          this.OnGridScaleChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the image.\n    /// </summary>\n    /// <value>The image.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(null)]\n    public virtual Image Image\n    {\n      get { return _image; }\n      set\n      {\n        if (_image != value)\n        {\n          // disable animations\n          if (this.IsAnimating)\n          {\n            ImageAnimator.StopAnimate(this.Image, this.OnFrameChangedHandler);\n          }\n\n          _image = value;\n          this.OnImageChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the color of the image border.\n    /// </summary>\n    /// <value>The color of the image border.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"ControlDark\")]\n    public virtual Color ImageBorderColor\n    {\n      get { return _imageBorderColor; }\n      set\n      {\n        if (this.ImageBorderColor != value)\n        {\n          _imageBorderColor = value;\n\n          this.OnImageBorderColorChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the image border style.\n    /// </summary>\n    /// <value>The image border style.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(ImageBoxBorderStyle), \"None\")]\n    public virtual ImageBoxBorderStyle ImageBorderStyle\n    {\n      get { return _imageBorderStyle; }\n      set\n      {\n        if (this.ImageBorderStyle != value)\n        {\n          _imageBorderStyle = value;\n\n          this.OnImageBorderStyleChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the interpolation mode.\n    /// </summary>\n    /// <value>The interpolation mode.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(InterpolationMode.NearestNeighbor)]\n    public virtual InterpolationMode InterpolationMode\n    {\n      get { return _interpolationMode; }\n      set\n      {\n        if (value == InterpolationMode.Invalid)\n        {\n          value = InterpolationMode.Default;\n        }\n\n        if (_interpolationMode != value)\n        {\n          _interpolationMode = value;\n          this.OnInterpolationModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the mouse should be inverted when panning the control.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the mouse should be inverted when panning the control; otherwise, <c>false</c>.\n    /// </value>\n    [DefaultValue(false)]\n    [Category(\"Behavior\")]\n    public virtual bool InvertMouse\n    {\n      get { return _invertMouse; }\n      set\n      {\n        if (_invertMouse != value)\n        {\n          _invertMouse = value;\n          this.OnInvertMouseChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets a value indicating whether the image is currently being displayed at 100% zoom\n    /// </summary>\n    /// <value><c>true</c> if the image is currently being displayed at 100% zoom; otherwise, <c>false</c>.</value>\n    [Browsable(false)]\n    public virtual bool IsActualSize\n    {\n      get { return this.Zoom == 100; }\n    }\n\n    /// <summary>\n    ///   Gets a value indicating whether this control is panning.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if this control is panning; otherwise, <c>false</c>.\n    /// </value>\n    [DefaultValue(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    [Browsable(false)]\n    public virtual bool IsPanning\n    {\n      get { return _panStyle != ImageBoxPanStyle.None; }\n      protected set { this.ProcessPanEvents(value ? ImageBoxPanStyle.Standard : ImageBoxPanStyle.None); }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether this a selection region is currently being drawn.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if a selection region is currently being drawn; otherwise, <c>false</c>.\n    /// </value>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public virtual bool IsSelecting\n    {\n      get\n      {\n        return _isSelecting;\n      }\n      protected set\n      {\n        _isSelecting = value;\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether selection regions should be limited to the image boundaries.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if selection regions should be limited to image boundaries; otherwise, <c>false</c>.\n    /// </value>\n    [Category(\"Behavior\")]\n    [DefaultValue(true)]\n    public virtual bool LimitSelectionToImage\n    {\n      get { return _limitSelectionToImage; }\n      set\n      {\n        if (this.LimitSelectionToImage != value)\n        {\n          _limitSelectionToImage = value;\n\n          this.OnLimitSelectionToImageChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the how the mouse wheel is handled\n    /// </summary>\n    /// <value>\n    /// The mouse wheel mode.\n    /// </value>\n    [Category(\"Behavior\")]\n    [DefaultValue(typeof(ImageBoxMouseWheelMode), \"Zoom\")]\n    public virtual ImageBoxMouseWheelMode MouseWheelMode\n    {\n      get { return _mouseWheelMode; }\n      set\n      {\n        if (_mouseWheelMode != value)\n        {\n          _mouseWheelMode = value;\n\n          this.OnMouseWheelModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the how panning is initiated using the mouse\n    /// </summary>\n    /// <value>\n    /// The pan mode.\n    /// </value>\n    [Category(\"Behavior\")]\n    [DefaultValue(typeof(ImageBoxPanMode), \"Both\")]\n    public virtual ImageBoxPanMode PanMode\n    {\n      get { return _panMode; }\n      set\n      {\n        if (_panMode != value)\n        {\n          _panMode = value;\n\n          this.OnPanModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the color of the pixel grid.\n    /// </summary>\n    /// <value>The color of the pixel grid.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"DimGray\")]\n    public virtual Color PixelGridColor\n    {\n      get { return _pixelGridColor; }\n      set\n      {\n        if (this.PixelGridColor != value)\n        {\n          _pixelGridColor = value;\n\n          this.OnPixelGridColorChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the minimum size of zoomed pixel's before the pixel grid will be drawn\n    /// </summary>\n    /// <value>The pixel grid threshold.</value>\n    [Category(\"Behavior\")]\n    [DefaultValue(5)]\n    public virtual int PixelGridThreshold\n    {\n      get { return _pixelGridThreshold; }\n      set\n      {\n        if (this.PixelGridThreshold != value)\n        {\n          _pixelGridThreshold = value;\n\n          this.OnPixelGridThresholdChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets a value indicating whether the font size of text is scaled according to the current zoom level.\n    /// </summary>\n    /// <value><c>true</c> if the size of text is scaled according to the current zoom level; otherwise, <c>false</c>.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(false)]\n    public virtual bool ScaleText\n    {\n      get { return _scaleText; }\n      set\n      {\n        if (this.ScaleText != value)\n        {\n          _scaleText = value;\n\n          this.OnScaleTextChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the color of selection regions.\n    /// </summary>\n    /// <value>\n    ///   The color of selection regions.\n    /// </value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"Highlight\")]\n    public virtual Color SelectionColor\n    {\n      get { return _selectionColor; }\n      set\n      {\n        if (this.SelectionColor != value)\n        {\n          _selectionColor = value;\n\n          this.OnSelectionColorChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the selection mode.\n    /// </summary>\n    /// <value>\n    ///   The selection mode.\n    /// </value>\n    [Category(\"Behavior\")]\n    [DefaultValue(typeof(ImageBoxSelectionMode), \"None\")]\n    public virtual ImageBoxSelectionMode SelectionMode\n    {\n      get { return _selectionMode; }\n      set\n      {\n        if (this.SelectionMode != value)\n        {\n          _selectionMode = value;\n\n          this.OnSelectionModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the selection region.\n    /// </summary>\n    /// <value>\n    ///   The selection region.\n    /// </value>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public virtual RectangleF SelectionRegion\n    {\n      get { return _selectionRegion; }\n      set\n      {\n        if (this.SelectionRegion != value)\n        {\n          _selectionRegion = value;\n\n          this.OnSelectionRegionChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the defined shortcuts are enabled.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> to enable the shortcuts; otherwise, <c>false</c>.\n    /// </value>\n    [Category(\"Behavior\")]\n    [DefaultValue(true)]\n    public virtual bool ShortcutsEnabled\n    {\n      get { return _shortcutsEnabled; }\n      set\n      {\n        if (this.ShortcutsEnabled != value)\n        {\n          _shortcutsEnabled = value;\n\n          this.OnShortcutsEnabledChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets a value indicating whether a pixel grid is displayed when the control is zoomed.\n    /// </summary>\n    /// <value><c>true</c> if a pixel grid is displayed when the control is zoomed; otherwise, <c>false</c>.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(false)]\n    public virtual bool ShowPixelGrid\n    {\n      get { return _showPixelGrid; }\n      set\n      {\n        if (this.ShowPixelGrid != value)\n        {\n          _showPixelGrid = value;\n\n          this.OnShowPixelGridChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the size mode of images hosted in the control.\n    /// </summary>\n    /// <value>The size mode.</value>\n    [Category(\"Behavior\")]\n    [DefaultValue(typeof(ImageBoxSizeMode), \"Normal\")]\n    public virtual ImageBoxSizeMode SizeMode\n    {\n      get { return _sizeMode; }\n      set\n      {\n        if (this.SizeMode != value)\n        {\n          _sizeMode = value;\n\n          this.OnSizeModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the control should automatically size to fit the image contents.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the control should size to fit the image contents; otherwise, <c>false</c>.\n    /// </value>\n    [DefaultValue(false)]\n    [Category(\"Appearance\")]\n    [Browsable(false)]\n    [EditorBrowsable(EditorBrowsableState.Never)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    [Obsolete(\"This property is deprecated and will be removed in a future version of the component. Implementors should use the SizeMode property instead.\")]\n    public virtual bool SizeToFit\n    {\n      get { return this.SizeMode == ImageBoxSizeMode.Fit; }\n      set\n      {\n        if (this.SizeMode == ImageBoxSizeMode.Fit != value)\n        {\n          this.SizeMode = value ? ImageBoxSizeMode.Fit : ImageBoxSizeMode.Normal;\n          this.OnSizeToFitChanged(EventArgs.Empty);\n\n          if (value)\n          {\n            this.AutoPan = false;\n          }\n          else\n          {\n            this.ActualSize();\n          }\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the alignment of the text on the control.\n    /// </summary>\n    /// <value>One of the <see cref=\"ContentAlignment\"/> values. The default is <c>MiddleCenter</c>.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(ContentAlignment), \"MiddleCenter\")]\n    public virtual ContentAlignment TextAlign\n    {\n      get { return _textAlign; }\n      set\n      {\n        if (this.TextAlign != value)\n        {\n          _textAlign = value;\n\n          this.OnTextAlignChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the color of the text background.\n    /// </summary>\n    /// <value>The color of the text background.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"Transparent\")]\n    public virtual Color TextBackColor\n    {\n      get { return _textBackColor; }\n      set\n      {\n        if (this.TextBackColor != value)\n        {\n          _textBackColor = value;\n\n          this.OnTextBackColorChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the text display mode.\n    /// </summary>\n    /// <value>The text display mode.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(ImageBoxGridDisplayMode), \"Client\")]\n    public virtual ImageBoxGridDisplayMode TextDisplayMode\n    {\n      get { return _textDisplayMode; }\n      set\n      {\n        if (this.TextDisplayMode != value)\n        {\n          _textDisplayMode = value;\n\n          this.OnTextDisplayModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the text padding.\n    /// </summary>\n    /// <value>\n    /// The text padding.\n    /// </value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Padding), \"0, 0, 0, 0\")]\n    public virtual Padding TextPadding\n    {\n      get { return _textPadding; }\n      set\n      {\n        if (this.TextPadding != value)\n        {\n          _textPadding = value;\n\n          this.OnTextPaddingChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the control acts as a virtual image box.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the control acts as a virtual image box; otherwise, <c>false</c>.\n    /// </value>\n    /// <remarks>\n    ///   When this property is set to <c>true</c>, the Image property is ignored in favor of the VirtualSize property. In addition, the VirtualDraw event is raised to allow custom painting of the image area.\n    /// </remarks>\n    [Category(\"Behavior\")]\n    [DefaultValue(false)]\n    public virtual bool VirtualMode\n    {\n      get { return _virtualMode; }\n      set\n      {\n        if (this.VirtualMode != value)\n        {\n          _virtualMode = value;\n\n          this.OnVirtualModeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the size of the virtual image.\n    /// </summary>\n    /// <value>The size of the virtual image.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Size), \"0, 0\")]\n    public virtual Size VirtualSize\n    {\n      get { return _virtualSize; }\n      set\n      {\n        if (this.VirtualSize != value)\n        {\n          _virtualSize = value;\n\n          this.OnVirtualSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the zoom.\n    /// </summary>\n    /// <value>The zoom.</value>\n    [DefaultValue(100)]\n    [Category(\"Appearance\")]\n    public virtual int Zoom\n    {\n      get { return _zoom; }\n      set { this.SetZoom(value, value > this.Zoom ? ImageBoxZoomActions.ZoomIn : ImageBoxZoomActions.ZoomOut, ImageBoxActionSources.Unknown); }\n    }\n\n    /// <summary>\n    ///   Gets the zoom factor.\n    /// </summary>\n    /// <value>The zoom factor.</value>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public virtual double ZoomFactor\n    {\n      get { return (double)this.Zoom / 100; }\n    }\n\n    /// <summary>\n    ///   Gets or sets the zoom levels.\n    /// </summary>\n    /// <value>The zoom levels.</value>\n    [Browsable(false) /*Category(\"Behavior\"), DefaultValue(typeof(ZoomLevelCollection), \"7, 10, 15, 20, 25, 30, 50, 70, 100, 150, 200, 300, 400, 500, 600, 700, 800, 1200, 1600\")*/]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public virtual ZoomLevelCollection ZoomLevels\n    {\n      get { return _zoomLevels; }\n      set\n      {\n        if (this.ZoomLevels != value)\n        {\n          _zoomLevels = value;\n\n          this.OnZoomLevelsChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets a value indicating whether painting of the control is allowed.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if painting of the control is allowed; otherwise, <c>false</c>.\n    /// </value>\n    protected virtual bool AllowPainting\n    {\n      get { return _updateCount == 0; }\n    }\n\n    /// <summary>\n    /// Gets or sets a value indicating whether the current image is animated.\n    /// </summary>\n    /// <value><c>true</c> if the current image is animated; otherwise, <c>false</c>.</value>\n    protected bool IsAnimating { get; set; }\n\n    /// <summary>\n    ///   Gets the height of the scaled image.\n    /// </summary>\n    /// <value>The height of the scaled image.</value>\n    protected virtual int ScaledImageHeight\n    {\n      get { return Convert.ToInt32(this.ViewSize.Height * this.ZoomFactor); }\n    }\n\n    /// <summary>\n    ///   Gets the width of the scaled image.\n    /// </summary>\n    /// <value>The width of the scaled image.</value>\n    protected virtual int ScaledImageWidth\n    {\n      get { return Convert.ToInt32(this.ViewSize.Width * this.ZoomFactor); }\n    }\n\n    /// <summary>\n    /// Gets the size of the view.\n    /// </summary>\n    /// <value>The size of the view.</value>\n    protected virtual Size ViewSize\n    {\n      get { return this.VirtualMode ? this.VirtualSize : this.GetImageSize(); }\n    }\n\n    /// <summary>\n    /// Gets or sets a value indicating whether a drag operation was cancelled.\n    /// </summary>\n    /// <value><c>true</c> if the drag operation was cancelled; otherwise, <c>false</c>.</value>\n    protected bool WasDragCancelled { get; set; }\n\n    #endregion\n\n    #region Methods\n\n    /// <summary>\n    ///   Resets the zoom to 100%.\n    /// </summary>\n    public virtual void ActualSize()\n    {\n      this.PerformActualSize(ImageBoxActionSources.Unknown);\n    }\n\n    /// <summary>\n    ///   Disables any redrawing of the image box\n    /// </summary>\n    public virtual void BeginUpdate()\n    {\n      _updateCount++;\n    }\n\n    /// <summary>\n    ///   Centers the given point in the image in the center of the control\n    /// </summary>\n    /// <param name=\"imageLocation\">The point of the image to attempt to center.</param>\n    public virtual void CenterAt(Point imageLocation)\n    {\n      this.ScrollTo(imageLocation, new Point(this.ClientSize.Width / 2, this.ClientSize.Height / 2));\n    }\n\n    /// <summary>\n    ///   Centers the given point in the image in the center of the control\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to center.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to center.</param>\n    public void CenterAt(int x, int y)\n    {\n      this.CenterAt(new Point(x, y));\n    }\n\n    /// <summary>\n    ///   Centers the given point in the image in the center of the control\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to center.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to center.</param>\n    public void CenterAt(float x, float y)\n    {\n      this.CenterAt(new Point((int)x, (int)y));\n    }\n\n    /// <summary>\n    /// Resets the viewport to show the center of the image.\n    /// </summary>\n    public virtual void CenterToImage()\n    {\n      this.AutoScrollPosition = new Point((this.AutoScrollMinSize.Width - this.ClientSize.Width) / 2, (this.AutoScrollMinSize.Height - this.ClientSize.Height) / 2);\n    }\n\n    /// <summary>\n    ///   Enables the redrawing of the image box\n    /// </summary>\n    public virtual void EndUpdate()\n    {\n      if (_updateCount > 0)\n      {\n        _updateCount--;\n      }\n\n      if (this.AllowPainting)\n      {\n        this.Invalidate();\n      }\n    }\n\n    /// <summary>\n    ///   Fits a given <see cref=\"T:System.Drawing.Rectangle\" /> to match image boundaries\n    /// </summary>\n    /// <param name=\"rectangle\">The rectangle.</param>\n    /// <returns>\n    ///   A <see cref=\"T:System.Drawing.Rectangle\" /> structure remapped to fit the image boundaries\n    /// </returns>\n    public Rectangle FitRectangle(Rectangle rectangle)\n    {\n      int x;\n      int y;\n      int w;\n      int h;\n\n      x = rectangle.X;\n      y = rectangle.Y;\n      w = rectangle.Width;\n      h = rectangle.Height;\n\n      if (x < 0)\n      {\n        x = 0;\n      }\n\n      if (y < 0)\n      {\n        y = 0;\n      }\n\n      if (x + w > this.ViewSize.Width)\n      {\n        w = this.ViewSize.Width - x;\n      }\n\n      if (y + h > this.ViewSize.Height)\n      {\n        h = this.ViewSize.Height - y;\n      }\n\n      return new Rectangle(x, y, w, h);\n    }\n\n    /// <summary>\n    ///   Fits a given <see cref=\"T:System.Drawing.RectangleF\" /> to match image boundaries\n    /// </summary>\n    /// <param name=\"rectangle\">The rectangle.</param>\n    /// <returns>\n    ///   A <see cref=\"T:System.Drawing.RectangleF\" /> structure remapped to fit the image boundaries\n    /// </returns>\n    public RectangleF FitRectangle(RectangleF rectangle)\n    {\n      float x;\n      float y;\n      float w;\n      float h;\n\n      x = rectangle.X;\n      y = rectangle.Y;\n      w = rectangle.Width;\n      h = rectangle.Height;\n\n      if (x < 0)\n      {\n        w -= -x;\n        x = 0;\n      }\n\n      if (y < 0)\n      {\n        h -= -y;\n        y = 0;\n      }\n\n      if (x + w > this.ViewSize.Width)\n      {\n        w = this.ViewSize.Width - x;\n      }\n\n      if (y + h > this.ViewSize.Height)\n      {\n        h = this.ViewSize.Height - y;\n      }\n\n      return new RectangleF(x, y, w, h);\n    }\n\n    /// <summary>\n    ///   Gets the image view port.\n    /// </summary>\n    /// <returns></returns>\n    public virtual Rectangle GetImageViewPort()\n    {\n      Rectangle viewPort;\n\n      if (!this.ViewSize.IsEmpty)\n      {\n        Rectangle innerRectangle;\n        Point offset;\n        int width;\n        int height;\n\n        innerRectangle = this.GetInsideViewPort(true);\n\n        if (!this.HScroll && !this.VScroll) // if no scrolling is present, tinker the view port so that the image and any applicable borders all fit inside\n        {\n          innerRectangle.Inflate(-this.GetImageBorderOffset(), -this.GetImageBorderOffset());\n        }\n\n        if (this.SizeMode != ImageBoxSizeMode.Stretch)\n        {\n          if (this.AutoCenter)\n          {\n            int x;\n            int y;\n\n            x = !this.HScroll ? (innerRectangle.Width - (this.ScaledImageWidth + this.Padding.Horizontal)) / 2 : 0;\n            y = !this.VScroll ? (innerRectangle.Height - (this.ScaledImageHeight + this.Padding.Vertical)) / 2 : 0;\n\n            offset = new Point(x, y);\n          }\n          else\n          {\n            offset = Point.Empty;\n          }\n\n          width = Math.Min(this.ScaledImageWidth - Math.Abs(this.AutoScrollPosition.X), innerRectangle.Width);\n          height = Math.Min(this.ScaledImageHeight - Math.Abs(this.AutoScrollPosition.Y), innerRectangle.Height);\n        }\n        else\n        {\n          offset = Point.Empty;\n          width = innerRectangle.Width;\n          height = innerRectangle.Height;\n        }\n\n        viewPort = new Rectangle(offset.X + innerRectangle.Left, offset.Y + innerRectangle.Top, width, height);\n      }\n      else\n      {\n        viewPort = Rectangle.Empty;\n      }\n\n      return viewPort;\n    }\n\n    /// <summary>\n    ///   Gets the inside view port, excluding any padding.\n    /// </summary>\n    /// <returns></returns>\n    public Rectangle GetInsideViewPort()\n    {\n      return this.GetInsideViewPort(false);\n    }\n\n    /// <summary>\n    ///   Gets the inside view port.\n    /// </summary>\n    /// <param name=\"includePadding\">\n    ///   if set to <c>true</c> [include padding].\n    /// </param>\n    /// <returns></returns>\n    public virtual Rectangle GetInsideViewPort(bool includePadding)\n    {\n      int left;\n      int top;\n      int width;\n      int height;\n\n      left = 0;\n      top = 0;\n      width = this.ClientSize.Width;\n      height = this.ClientSize.Height;\n\n      if (includePadding)\n      {\n        left += this.Padding.Left;\n        top += this.Padding.Top;\n        width -= this.Padding.Horizontal;\n        height -= this.Padding.Vertical;\n      }\n\n      return new Rectangle(left, top, width, height);\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.Point\" /> repositioned to include the current image offset and scaled by the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"Point\"/> to offset.</param>\n    /// <returns>A <see cref=\"Point\"/> which has been repositioned to match the current zoom level and image offset</returns>\n    public virtual Point GetOffsetPoint(Point source)\n    {\n      PointF offset;\n\n      offset = this.GetOffsetPoint(new PointF(source.X, source.Y));\n\n      return new Point((int)offset.X, (int)offset.Y);\n    }\n\n    /// <summary>\n    ///   Returns the source co-ordinates repositioned to include the current image offset and scaled by the current zoom level\n    /// </summary>\n    /// <param name=\"x\">The source X co-ordinate.</param>\n    /// <param name=\"y\">The source Y co-ordinate.</param>\n    /// <returns>A <see cref=\"Point\"/> which has been repositioned to match the current zoom level and image offset</returns>\n    public Point GetOffsetPoint(int x, int y)\n    {\n      return this.GetOffsetPoint(new Point(x, y));\n    }\n\n    /// <summary>\n    ///   Returns the source co-ordinates repositioned to include the current image offset and scaled by the current zoom level\n    /// </summary>\n    /// <param name=\"x\">The source X co-ordinate.</param>\n    /// <param name=\"y\">The source Y co-ordinate.</param>\n    /// <returns>A <see cref=\"Point\"/> which has been repositioned to match the current zoom level and image offset</returns>\n    public PointF GetOffsetPoint(float x, float y)\n    {\n      return this.GetOffsetPoint(new PointF(x, y));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.PointF\" /> repositioned to include the current image offset and scaled by the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"PointF\"/> to offset.</param>\n    /// <returns>A <see cref=\"PointF\"/> which has been repositioned to match the current zoom level and image offset</returns>\n    public virtual PointF GetOffsetPoint(PointF source)\n    {\n      Rectangle viewport;\n      PointF scaled;\n      int offsetX;\n      int offsetY;\n\n      viewport = this.GetImageViewPort();\n      scaled = this.GetScaledPoint(source);\n      offsetX = viewport.Left + this.Padding.Left + this.AutoScrollPosition.X;\n      offsetY = viewport.Top + this.Padding.Top + this.AutoScrollPosition.Y;\n\n      return new PointF(scaled.X + offsetX, scaled.Y + offsetY);\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.RectangleF\" /> scaled according to the current zoom level and repositioned to include the current image offset\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"RectangleF\"/> to offset.</param>\n    /// <returns>A <see cref=\"RectangleF\"/> which has been resized and repositioned to match the current zoom level and image offset</returns>\n    public virtual RectangleF GetOffsetRectangle(RectangleF source)\n    {\n      RectangleF viewport;\n      RectangleF scaled;\n      float offsetX;\n      float offsetY;\n\n      viewport = this.GetImageViewPort();\n      scaled = this.GetScaledRectangle(source);\n      offsetX = viewport.Left + this.Padding.Left + this.AutoScrollPosition.X;\n      offsetY = viewport.Top + this.Padding.Top + this.AutoScrollPosition.Y;\n\n      return new RectangleF(new PointF(scaled.Left + offsetX, scaled.Top + offsetY), scaled.Size);\n    }\n\n    /// <summary>\n    ///   Returns the source rectangle scaled according to the current zoom level and repositioned to include the current image offset\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the source rectangle.</param>\n    /// <param name=\"y\">The Y co-ordinate of the source rectangle.</param>\n    /// <param name=\"width\">The width of the rectangle.</param>\n    /// <param name=\"height\">The height of the rectangle.</param>\n    /// <returns>A <see cref=\"Rectangle\"/> which has been resized and repositioned to match the current zoom level and image offset</returns>\n    public Rectangle GetOffsetRectangle(int x, int y, int width, int height)\n    {\n      return this.GetOffsetRectangle(new Rectangle(x, y, width, height));\n    }\n\n    /// <summary>\n    ///   Returns the source rectangle scaled according to the current zoom level and repositioned to include the current image offset\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the source rectangle.</param>\n    /// <param name=\"y\">The Y co-ordinate of the source rectangle.</param>\n    /// <param name=\"width\">The width of the rectangle.</param>\n    /// <param name=\"height\">The height of the rectangle.</param>\n    /// <returns>A <see cref=\"RectangleF\"/> which has been resized and repositioned to match the current zoom level and image offset</returns>\n    public RectangleF GetOffsetRectangle(float x, float y, float width, float height)\n    {\n      return this.GetOffsetRectangle(new RectangleF(x, y, width, height));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.Rectangle\" /> scaled according to the current zoom level and repositioned to include the current image offset\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"Rectangle\"/> to offset.</param>\n    /// <returns>A <see cref=\"Rectangle\"/> which has been resized and repositioned to match the current zoom level and image offset</returns>\n    public virtual Rectangle GetOffsetRectangle(Rectangle source)\n    {\n      Rectangle viewport;\n      Rectangle scaled;\n      int offsetX;\n      int offsetY;\n\n      viewport = this.GetImageViewPort();\n      scaled = this.GetScaledRectangle(source);\n      offsetX = viewport.Left + this.Padding.Left + this.AutoScrollPosition.X;\n      offsetY = viewport.Top + this.Padding.Top + this.AutoScrollPosition.Y;\n\n      return new Rectangle(new Point(scaled.Left + offsetX, scaled.Top + offsetY), scaled.Size);\n    }\n\n    /// <summary>\n    ///   Retrieves the size of a rectangular area into which a control can be fitted.\n    /// </summary>\n    /// <param name=\"proposedSize\">The custom-sized area for a control.</param>\n    /// <returns>\n    ///   An ordered pair of type <see cref=\"T:System.Drawing.Size\" /> representing the width and height of a rectangle.\n    /// </returns>\n    public override Size GetPreferredSize(Size proposedSize)\n    {\n      Size size;\n\n      if (!this.ViewSize.IsEmpty)\n      {\n        int width;\n        int height;\n\n        // get the size of the image\n        width = this.ScaledImageWidth;\n        height = this.ScaledImageHeight;\n\n        // add an offset based on padding\n        width += this.Padding.Horizontal;\n        height += this.Padding.Vertical;\n\n        // add an offset based on the border style\n        width += this.GetImageBorderOffset();\n        height += this.GetImageBorderOffset();\n\n        size = new Size(width, height);\n      }\n      else\n      {\n        size = base.GetPreferredSize(proposedSize);\n      }\n\n      return size;\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.Point\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to scale.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to scale.</param>\n    /// <returns>A <see cref=\"Point\"/> which has been scaled to match the current zoom level</returns>\n    public Point GetScaledPoint(int x, int y)\n    {\n      return this.GetScaledPoint(new Point(x, y));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.Point\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to scale.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to scale.</param>\n    /// <returns>A <see cref=\"Point\"/> which has been scaled to match the current zoom level</returns>\n    public PointF GetScaledPoint(float x, float y)\n    {\n      return this.GetScaledPoint(new PointF(x, y));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.Point\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"Point\"/> to scale.</param>\n    /// <returns>A <see cref=\"Point\"/> which has been scaled to match the current zoom level</returns>\n    public virtual Point GetScaledPoint(Point source)\n    {\n      return new Point((int)(source.X * this.ZoomFactor), (int)(source.Y * this.ZoomFactor));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.PointF\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"PointF\"/> to scale.</param>\n    /// <returns>A <see cref=\"PointF\"/> which has been scaled to match the current zoom level</returns>\n    public virtual PointF GetScaledPoint(PointF source)\n    {\n      return new PointF((float)(source.X * this.ZoomFactor), (float)(source.Y * this.ZoomFactor));\n    }\n\n    /// <summary>\n    ///   Returns the source rectangle scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the source rectangle.</param>\n    /// <param name=\"y\">The Y co-ordinate of the source rectangle.</param>\n    /// <param name=\"width\">The width of the rectangle.</param>\n    /// <param name=\"height\">The height of the rectangle.</param>\n    /// <returns>A <see cref=\"Rectangle\"/> which has been scaled to match the current zoom level</returns>\n    public Rectangle GetScaledRectangle(int x, int y, int width, int height)\n    {\n      return this.GetScaledRectangle(new Rectangle(x, y, width, height));\n    }\n\n    /// <summary>\n    ///   Returns the source rectangle scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the source rectangle.</param>\n    /// <param name=\"y\">The Y co-ordinate of the source rectangle.</param>\n    /// <param name=\"width\">The width of the rectangle.</param>\n    /// <param name=\"height\">The height of the rectangle.</param>\n    /// <returns>A <see cref=\"RectangleF\"/> which has been scaled to match the current zoom level</returns>\n    public RectangleF GetScaledRectangle(float x, float y, float width, float height)\n    {\n      return this.GetScaledRectangle(new RectangleF(x, y, width, height));\n    }\n\n    /// <summary>\n    ///   Returns the source rectangle scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"location\">The location of the source rectangle.</param>\n    /// <param name=\"size\">The size of the source rectangle.</param>\n    /// <returns>A <see cref=\"Rectangle\"/> which has been scaled to match the current zoom level</returns>\n    public Rectangle GetScaledRectangle(Point location, Size size)\n    {\n      return this.GetScaledRectangle(new Rectangle(location, size));\n    }\n\n    /// <summary>\n    ///   Returns the source rectangle scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"location\">The location of the source rectangle.</param>\n    /// <param name=\"size\">The size of the source rectangle.</param>\n    /// <returns>A <see cref=\"Rectangle\"/> which has been scaled to match the current zoom level</returns>\n    public RectangleF GetScaledRectangle(PointF location, SizeF size)\n    {\n      return this.GetScaledRectangle(new RectangleF(location, size));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.Rectangle\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"Rectangle\"/> to scale.</param>\n    /// <returns>A <see cref=\"Rectangle\"/> which has been scaled to match the current zoom level</returns>\n    public virtual Rectangle GetScaledRectangle(Rectangle source)\n    {\n      return new Rectangle((int)(source.Left * this.ZoomFactor), (int)(source.Top * this.ZoomFactor), (int)(source.Width * this.ZoomFactor), (int)(source.Height * this.ZoomFactor));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.RectangleF\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"RectangleF\"/> to scale.</param>\n    /// <returns>A <see cref=\"RectangleF\"/> which has been scaled to match the current zoom level</returns>\n    public virtual RectangleF GetScaledRectangle(RectangleF source)\n    {\n      return new RectangleF((float)(source.Left * this.ZoomFactor), (float)(source.Top * this.ZoomFactor), (float)(source.Width * this.ZoomFactor), (float)(source.Height * this.ZoomFactor));\n    }\n\n    /// <summary>\n    ///   Returns the source size scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"width\">The width of the size to scale.</param>\n    /// <param name=\"height\">The height of the size to scale.</param>\n    /// <returns>A <see cref=\"SizeF\"/> which has been resized to match the current zoom level</returns>\n    public SizeF GetScaledSize(float width, float height)\n    {\n      return this.GetScaledSize(new SizeF(width, height));\n    }\n\n    /// <summary>\n    ///   Returns the source size scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"width\">The width of the size to scale.</param>\n    /// <param name=\"height\">The height of the size to scale.</param>\n    /// <returns>A <see cref=\"Size\"/> which has been resized to match the current zoom level</returns>\n    public Size GetScaledSize(int width, int height)\n    {\n      return this.GetScaledSize(new Size(width, height));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.SizeF\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"SizeF\"/> to scale.</param>\n    /// <returns>A <see cref=\"SizeF\"/> which has been resized to match the current zoom level</returns>\n    public virtual SizeF GetScaledSize(SizeF source)\n    {\n      return new SizeF((float)(source.Width * this.ZoomFactor), (float)(source.Height * this.ZoomFactor));\n    }\n\n    /// <summary>\n    ///   Returns the source <see cref=\"T:System.Drawing.Size\" /> scaled according to the current zoom level\n    /// </summary>\n    /// <param name=\"source\">The source <see cref=\"Size\"/> to scale.</param>\n    /// <returns>A <see cref=\"Size\"/> which has been resized to match the current zoom level</returns>\n    public virtual Size GetScaledSize(Size source)\n    {\n      return new Size((int)(source.Width * this.ZoomFactor), (int)(source.Height * this.ZoomFactor));\n    }\n\n    /// <summary>\n    ///   Creates an image based on the current selection region\n    /// </summary>\n    /// <returns>An image containing the selection contents if a selection if present, otherwise null</returns>\n    /// <remarks>The caller is responsible for disposing of the returned image</remarks>\n    public Image GetSelectedImage()\n    {\n      Image result;\n\n      result = null;\n\n      if (!this.SelectionRegion.IsEmpty)\n      {\n        Rectangle rect;\n\n        rect = this.FitRectangle(new Rectangle((int)this.SelectionRegion.X, (int)this.SelectionRegion.Y, (int)this.SelectionRegion.Width, (int)this.SelectionRegion.Height));\n\n        if (rect.Width > 0 && rect.Height > 0)\n        {\n          result = new Bitmap(rect.Width, rect.Height);\n\n          using (Graphics g = Graphics.FromImage(result))\n          {\n            g.DrawImage(this.Image, new Rectangle(Point.Empty, rect.Size), rect, GraphicsUnit.Pixel);\n          }\n        }\n      }\n\n      return result;\n    }\n\n    /// <summary>\n    ///   Gets the source image region.\n    /// </summary>\n    /// <returns></returns>\n    public virtual RectangleF GetSourceImageRegion()\n    {\n      RectangleF region;\n\n      if (!this.ViewSize.IsEmpty)\n      {\n        if (this.SizeMode != ImageBoxSizeMode.Stretch)\n        {\n          float sourceLeft;\n          float sourceTop;\n          float sourceWidth;\n          float sourceHeight;\n          Rectangle viewPort;\n\n          viewPort = this.GetImageViewPort();\n          sourceLeft = (float)(-this.AutoScrollPosition.X / this.ZoomFactor);\n          sourceTop = (float)(-this.AutoScrollPosition.Y / this.ZoomFactor);\n          sourceWidth = (float)(viewPort.Width / this.ZoomFactor);\n          sourceHeight = (float)(viewPort.Height / this.ZoomFactor);\n\n          region = new RectangleF(sourceLeft, sourceTop, sourceWidth, sourceHeight);\n        }\n        else\n        {\n          region = new RectangleF(PointF.Empty, this.ViewSize);\n        }\n      }\n      else\n      {\n        region = RectangleF.Empty;\n      }\n\n      return region;\n    }\n\n    /// <summary>\n    ///   Determines whether the specified point is located within the image view port\n    /// </summary>\n    /// <param name=\"point\">The point.</param>\n    /// <returns>\n    ///   <c>true</c> if the specified point is located within the image view port; otherwise, <c>false</c>.\n    /// </returns>\n    public virtual bool IsPointInImage(Point point)\n    {\n      return this.GetImageViewPort().\n                  Contains(point);\n    }\n\n    /// <summary>\n    ///   Determines whether the specified point is located within the image view port\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to check.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to check.</param>\n    /// <returns>\n    ///   <c>true</c> if the specified point is located within the image view port; otherwise, <c>false</c>.\n    /// </returns>\n    public bool IsPointInImage(int x, int y)\n    {\n      return this.IsPointInImage(new Point(x, y));\n    }\n\n    /// <summary>\n    ///   Determines whether the specified point is located within the image view port\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to check.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to check.</param>\n    /// <returns>\n    ///   <c>true</c> if the specified point is located within the image view port; otherwise, <c>false</c>.\n    /// </returns>\n    public bool IsPointInImage(float x, float y)\n    {\n      return this.IsPointInImage(new Point((int)x, (int)y));\n    }\n\n    /// <summary>\n    ///   Converts the given client size point to represent a coordinate on the source image.\n    /// </summary>\n    /// <param name=\"point\">The source point.</param>\n    /// <returns><c>Point.Empty</c> if the point could not be matched to the source image, otherwise the new translated point</returns>\n    public Point PointToImage(Point point)\n    {\n      return this.PointToImage(point, false);\n    }\n\n    /// <summary>\n    ///   Converts the given client size point to represent a coordinate on the source image.\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to convert.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to convert.</param>\n    /// <returns><c>Point.Empty</c> if the point could not be matched to the source image, otherwise the new translated point</returns>\n    public Point PointToImage(float x, float y)\n    {\n      return this.PointToImage(x, y, false);\n    }\n\n    /// <summary>\n    ///   Converts the given client size point to represent a coordinate on the source image.\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to convert.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to convert.</param>\n    /// <param name=\"fitToBounds\">\n    ///   if set to <c>true</c> and the point is outside the bounds of the source image, it will be mapped to the nearest edge.\n    /// </param>\n    /// <returns><c>Point.Empty</c> if the point could not be matched to the source image, otherwise the new translated point</returns>\n    public Point PointToImage(float x, float y, bool fitToBounds)\n    {\n      return this.PointToImage(new Point((int)x, (int)y), fitToBounds);\n    }\n\n    /// <summary>\n    ///   Converts the given client size point to represent a coordinate on the source image.\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to convert.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to convert.</param>\n    /// <returns><c>Point.Empty</c> if the point could not be matched to the source image, otherwise the new translated point</returns>\n    public Point PointToImage(int x, int y)\n    {\n      return this.PointToImage(x, y, false);\n    }\n\n    /// <summary>\n    ///   Converts the given client size point to represent a coordinate on the source image.\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to convert.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to convert.</param>\n    /// <param name=\"fitToBounds\">\n    ///   if set to <c>true</c> and the point is outside the bounds of the source image, it will be mapped to the nearest edge.\n    /// </param>\n    /// <returns><c>Point.Empty</c> if the point could not be matched to the source image, otherwise the new translated point</returns>\n    public Point PointToImage(int x, int y, bool fitToBounds)\n    {\n      return this.PointToImage(new Point(x, y), fitToBounds);\n    }\n\n    /// <summary>\n    ///   Converts the given client size point to represent a coordinate on the source image.\n    /// </summary>\n    /// <param name=\"point\">The source point.</param>\n    /// <param name=\"fitToBounds\">\n    ///   if set to <c>true</c> and the point is outside the bounds of the source image, it will be mapped to the nearest edge.\n    /// </param>\n    /// <returns><c>Point.Empty</c> if the point could not be matched to the source image, otherwise the new translated point</returns>\n    public virtual Point PointToImage(Point point, bool fitToBounds)\n    {\n      Rectangle viewport;\n      int x;\n      int y;\n\n      viewport = this.GetImageViewPort();\n\n      if (!fitToBounds || viewport.Contains(point))\n      {\n        if (this.AutoScrollPosition != Point.Empty)\n        {\n          point = new Point(point.X - this.AutoScrollPosition.X, point.Y - this.AutoScrollPosition.Y);\n        }\n\n        x = (int)((point.X - viewport.X) / this.ZoomFactor);\n        y = (int)((point.Y - viewport.Y) / this.ZoomFactor);\n\n        if (fitToBounds)\n        {\n          if (x < 0)\n          {\n            x = 0;\n          }\n          else if (x > this.ViewSize.Width)\n          {\n            x = this.ViewSize.Width;\n          }\n\n          if (y < 0)\n          {\n            y = 0;\n          }\n          else if (y > this.ViewSize.Height)\n          {\n            y = this.ViewSize.Height;\n          }\n        }\n      }\n      else\n      {\n        x = 0; // Return Point.Empty if we couldn't match\n        y = 0;\n      }\n\n      return new Point(x, y);\n    }\n\n    /// <summary>\n    ///   Scrolls the control to the given point in the image, offset at the specified display point\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to scroll to.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to scroll to.</param>\n    /// <param name=\"relativeX\">The X co-ordinate relative to the <c>x</c> parameter.</param>\n    /// <param name=\"relativeY\">The Y co-ordinate relative to the <c>y</c> parameter.</param>\n    public void ScrollTo(int x, int y, int relativeX, int relativeY)\n    {\n      this.ScrollTo(new Point(x, y), new Point(relativeX, relativeY));\n    }\n\n    /// <summary>\n    ///   Scrolls the control to the given point in the image, offset at the specified display point\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the point to scroll to.</param>\n    /// <param name=\"y\">The Y co-ordinate of the point to scroll to.</param>\n    /// <param name=\"relativeX\">The X co-ordinate relative to the <c>x</c> parameter.</param>\n    /// <param name=\"relativeY\">The Y co-ordinate relative to the <c>y</c> parameter.</param>\n    public void ScrollTo(float x, float y, float relativeX, float relativeY)\n    {\n      this.ScrollTo(new Point((int)x, (int)y), new Point((int)relativeX, (int)relativeY));\n    }\n\n    /// <summary>\n    ///   Scrolls the control to the given point in the image, offset at the specified display point\n    /// </summary>\n    /// <param name=\"imageLocation\">The point of the image to attempt to scroll to.</param>\n    /// <param name=\"relativeDisplayPoint\">The relative display point to offset scrolling by.</param>\n    public virtual void ScrollTo(Point imageLocation, Point relativeDisplayPoint)\n    {\n      int x;\n      int y;\n\n      x = (int)(imageLocation.X * this.ZoomFactor) - relativeDisplayPoint.X;\n      y = (int)(imageLocation.Y * this.ZoomFactor) - relativeDisplayPoint.Y;\n\n      this.AutoScrollPosition = new Point(x, y);\n    }\n\n    /// <summary>\n    ///   Creates a selection region which encompasses the entire image\n    /// </summary>\n    /// <exception cref=\"System.InvalidOperationException\">Thrown if no image is currently set</exception>\n    public virtual void SelectAll()\n    {\n      this.SelectionRegion = new RectangleF(PointF.Empty, this.ViewSize);\n    }\n\n    /// <summary>\n    ///   Clears any existing selection region\n    /// </summary>\n    public virtual void SelectNone()\n    {\n      this.SelectionRegion = RectangleF.Empty;\n    }\n\n    /// <summary>\n    ///   Zooms into the image\n    /// </summary>\n    public virtual void ZoomIn()\n    {\n      this.ZoomIn(true);\n    }\n\n    /// <summary>\n    ///   Zooms into the image\n    /// </summary>\n    /// <param name=\"preservePosition\"><c>true</c> if the current scrolling position should be preserved relative to the new zoom level, <c>false</c> to reset.</param>\n    public virtual void ZoomIn(bool preservePosition)\n    {\n      this.PerformZoomIn(ImageBoxActionSources.Unknown, preservePosition);\n    }\n\n    /// <summary>\n    ///   Zooms out of the image\n    /// </summary>\n    public virtual void ZoomOut()\n    {\n      this.ZoomOut(true);\n    }\n\n    /// <summary>\n    ///   Zooms out of the image\n    /// </summary>\n    /// <param name=\"preservePosition\"><c>true</c> if the current scrolling position should be preserved relative to the new zoom level, <c>false</c> to reset.</param>\n    public virtual void ZoomOut(bool preservePosition)\n    {\n      this.PerformZoomOut(ImageBoxActionSources.Unknown, preservePosition);\n    }\n\n    /// <summary>\n    ///   Zooms to the maximum size for displaying the entire image within the bounds of the control.\n    /// </summary>\n    public virtual void ZoomToFit()\n    {\n      if (!this.ViewSize.IsEmpty)\n      {\n        Rectangle innerRectangle;\n        double zoom;\n        double aspectRatio;\n\n        this.AutoScrollMinSize = Size.Empty;\n\n        innerRectangle = this.GetInsideViewPort(true);\n\n        if (this.ViewSize.Width > this.ViewSize.Height)\n        {\n          aspectRatio = (double)innerRectangle.Width / this.ViewSize.Width;\n          zoom = aspectRatio * 100.0;\n\n          if (innerRectangle.Height < this.ViewSize.Height * zoom / 100.0)\n          {\n            aspectRatio = (double)innerRectangle.Height / this.ViewSize.Height;\n            zoom = aspectRatio * 100.0;\n          }\n        }\n        else\n        {\n          aspectRatio = (double)innerRectangle.Height / this.ViewSize.Height;\n          zoom = aspectRatio * 100.0;\n\n          if (innerRectangle.Width < this.ViewSize.Width * zoom / 100.0)\n          {\n            aspectRatio = (double)innerRectangle.Width / this.ViewSize.Width;\n            zoom = aspectRatio * 100.0;\n          }\n        }\n\n        this.Zoom = (int)Math.Round(Math.Floor(zoom));\n      }\n    }\n\n    /// <summary>\n    ///   Adjusts the view port to fit the given region\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the selection region.</param>\n    /// <param name=\"y\">The Y co-ordinate of the selection region.</param>\n    /// <param name=\"width\">The width of the selection region.</param>\n    /// <param name=\"height\">The height of the selection region.</param>\n    public void ZoomToRegion(float x, float y, float width, float height)\n    {\n      this.ZoomToRegion(new RectangleF(x, y, width, height));\n    }\n\n    /// <summary>\n    ///   Adjusts the view port to fit the given region\n    /// </summary>\n    /// <param name=\"x\">The X co-ordinate of the selection region.</param>\n    /// <param name=\"y\">The Y co-ordinate of the selection region.</param>\n    /// <param name=\"width\">The width of the selection region.</param>\n    /// <param name=\"height\">The height of the selection region.</param>\n    public void ZoomToRegion(int x, int y, int width, int height)\n    {\n      this.ZoomToRegion(new RectangleF(x, y, width, height));\n    }\n\n    /// <summary>\n    ///   Adjusts the view port to fit the given region\n    /// </summary>\n    /// <param name=\"rectangle\">The rectangle to fit the view port to.</param>\n    public virtual void ZoomToRegion(RectangleF rectangle)\n    {\n      double ratioX;\n      double ratioY;\n      double zoomFactor;\n      int cx;\n      int cy;\n\n      ratioX = this.ClientSize.Width / rectangle.Width;\n      ratioY = this.ClientSize.Height / rectangle.Height;\n      zoomFactor = Math.Min(ratioX, ratioY);\n      cx = (int)(rectangle.X + rectangle.Width / 2);\n      cy = (int)(rectangle.Y + rectangle.Height / 2);\n\n      this.Zoom = (int)(zoomFactor * 100);\n      this.CenterAt(new Point(cx, cy));\n    }\n\n    /// <summary>\n    ///   Adjusts the layout.\n    /// </summary>\n    protected virtual void AdjustLayout()\n    {\n      if (this.AllowPainting)\n      {\n        if (this.AutoSize)\n        {\n          this.AdjustSize();\n        }\n        else if (this.SizeMode != ImageBoxSizeMode.Normal)\n        {\n          this.ZoomToFit();\n        }\n        else if (this.AutoScroll)\n        {\n          this.AdjustViewPort();\n        }\n\n        this.Invalidate();\n      }\n    }\n\n    /// <summary>\n    ///   Adjusts the scroll.\n    /// </summary>\n    /// <param name=\"x\">The x.</param>\n    /// <param name=\"y\">The y.</param>\n    protected virtual void AdjustScroll(int x, int y)\n    {\n      Point scrollPosition;\n\n      scrollPosition = new Point(this.HorizontalScroll.Value + x, this.VerticalScroll.Value + y);\n\n      this.UpdateScrollPosition(scrollPosition);\n    }\n\n    /// <summary>\n    ///   Adjusts the size.\n    /// </summary>\n    protected virtual void AdjustSize()\n    {\n      if (this.AutoSize && this.Dock == DockStyle.None)\n      {\n        this.Size = this.PreferredSize;\n      }\n    }\n\n    /// <summary>\n    ///   Adjusts the view port.\n    /// </summary>\n    protected virtual void AdjustViewPort()\n    {\n      if (this.AutoScroll && !this.ViewSize.IsEmpty)\n      {\n        this.AutoScrollMinSize = new Size(this.ScaledImageWidth + this.Padding.Horizontal, this.ScaledImageHeight + this.Padding.Vertical);\n      }\n    }\n\n    /// <summary>\n    ///   Creates the grid tile image.\n    /// </summary>\n    /// <param name=\"cellSize\">Size of the cell.</param>\n    /// <param name=\"firstColor\">The first color.</param>\n    /// <param name=\"secondColor\">Color of the second.</param>\n    /// <returns></returns>\n    protected virtual Bitmap CreateGridTileImage(int cellSize, Color firstColor, Color secondColor)\n    {\n      float scale;\n\n      // rescale the cell size\n      switch (this.GridScale)\n      {\n        case ImageBoxGridScale.Medium:\n          scale = 1.5F;\n          break;\n\n        case ImageBoxGridScale.Large:\n          scale = 2;\n          break;\n\n        case ImageBoxGridScale.Tiny:\n          scale = 0.5F;\n          break;\n\n        default:\n          scale = 1;\n          break;\n      }\n\n      cellSize = (int)(cellSize * scale);\n\n      return CreateCheckerBoxTile(cellSize, firstColor, secondColor);\n    }\n\n    /// <summary>\n    ///   Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing)\n      {\n        if (this.IsAnimating)\n        {\n          ImageAnimator.StopAnimate(this.Image, this.OnFrameChangedHandler);\n        }\n\n        if (_texture != null)\n        {\n          _texture.Dispose();\n          _texture = null;\n        }\n\n        if (_gridTile != null)\n        {\n          _gridTile.Dispose();\n          _gridTile = null;\n        }\n\n        this.KillTimer();\n      }\n\n      base.Dispose(disposing);\n    }\n\n    /// <summary>\n    /// Draws the background of the control.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"PaintEventArgs\"/> instance containing the event data.</param>\n    protected virtual void DrawBackground(PaintEventArgs e)\n    {\n      Rectangle innerRectangle;\n\n      innerRectangle = this.GetInsideViewPort();\n\n      using (SolidBrush brush = new SolidBrush(this.BackColor))\n      {\n        e.Graphics.FillRectangle(brush, innerRectangle);\n      }\n\n      if (_texture != null && this.GridDisplayMode != ImageBoxGridDisplayMode.None)\n      {\n        switch (this.GridDisplayMode)\n        {\n          case ImageBoxGridDisplayMode.Image:\n            Rectangle fillRectangle;\n\n            fillRectangle = this.GetImageViewPort();\n            e.Graphics.FillRectangle(_texture, fillRectangle);\n            break;\n\n          case ImageBoxGridDisplayMode.Client:\n            e.Graphics.FillRectangle(_texture, innerRectangle);\n            break;\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Draws a drop shadow.\n    /// </summary>\n    /// <param name=\"g\">The graphics. </param>\n    /// <param name=\"viewPort\"> The view port. </param>\n    protected virtual void DrawDropShadow(Graphics g, Rectangle viewPort)\n    {\n      Rectangle rightEdge;\n      Rectangle bottomEdge;\n\n      rightEdge = new Rectangle(viewPort.Right + 1, viewPort.Top + this.DropShadowSize, this.DropShadowSize, viewPort.Height);\n      bottomEdge = new Rectangle(viewPort.Left + this.DropShadowSize, viewPort.Bottom + 1, viewPort.Width + 1, this.DropShadowSize);\n\n      using (Brush brush = new SolidBrush(this.ImageBorderColor))\n      {\n        g.FillRectangles(brush, new[]\n                                {\n                                  rightEdge,\n                                  bottomEdge\n                                });\n      }\n    }\n\n    /// <summary>\n    ///   Draws a glow shadow.\n    /// </summary>\n    /// <param name=\"g\">The graphics.</param>\n    /// <param name=\"viewPort\">The view port.</param>\n    protected virtual void DrawGlowShadow(Graphics g, Rectangle viewPort)\n    {\n      // Glow code adapted from http://www.codeproject.com/Articles/372743/gGlowBox-Create-a-glow-effect-around-a-focused-con\n\n      g.SetClip(viewPort, CombineMode.Exclude); // make sure the inside glow doesn't appear\n\n      using (GraphicsPath path = new GraphicsPath())\n      {\n        int glowSize;\n        int feather;\n\n        path.AddRectangle(viewPort);\n        glowSize = this.DropShadowSize * 3;\n        feather = 50;\n\n        for (int i = 1; i <= glowSize; i += 2)\n        {\n          int alpha;\n\n          alpha = feather - feather / glowSize * i;\n\n          using (Pen pen = new Pen(Color.FromArgb(alpha, this.ImageBorderColor), i)\n          {\n            LineJoin = LineJoin.Round\n          })\n          {\n            g.DrawPath(pen, path);\n          }\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Draws the image.\n    /// </summary>\n    /// <param name=\"g\">The g.</param>\n    protected virtual void DrawImage(Graphics g)\n    {\n      InterpolationMode currentInterpolationMode;\n      PixelOffsetMode currentPixelOffsetMode;\n\n      currentInterpolationMode = g.InterpolationMode;\n      currentPixelOffsetMode = g.PixelOffsetMode;\n\n      g.InterpolationMode = this.GetInterpolationMode();\n\n      // disable pixel offsets. Thanks to Rotem for the info.\n      // http://stackoverflow.com/questions/14070311/why-is-graphics-drawimage-cropping-part-of-my-image/14070372#14070372\n      g.PixelOffsetMode = PixelOffsetMode.HighQuality;\n\n      try\n      {\n        // Animation. Thanks to teamalpha5441 for the contribution\n        if (this.IsAnimating && !this.DesignMode)\n        {\n          ImageAnimator.UpdateFrames(this.Image);\n        }\n\n        g.DrawImage(this.Image, this.GetImageViewPort(), this.GetSourceImageRegion(), GraphicsUnit.Pixel);\n      }\n      catch (Exception ex)\n      {\n        TextRenderer.DrawText(g, ex.Message, this.Font, this.ClientRectangle, this.ForeColor, this.BackColor, TextFormatFlags.VerticalCenter | TextFormatFlags.HorizontalCenter | TextFormatFlags.WordBreak | TextFormatFlags.NoPadding | TextFormatFlags.NoPrefix);\n      }\n\n      g.PixelOffsetMode = currentPixelOffsetMode;\n      g.InterpolationMode = currentInterpolationMode;\n    }\n\n    /// <summary>\n    ///   Draws a border around the image.\n    /// </summary>\n    /// <param name=\"graphics\"> The graphics. </param>\n    protected virtual void DrawImageBorder(Graphics graphics)\n    {\n      if (this.ImageBorderStyle != ImageBoxBorderStyle.None)\n      {\n        Rectangle viewPort;\n\n        graphics.SetClip(this.GetInsideViewPort()); // make sure the image border doesn't overwrite the control border\n\n        viewPort = this.GetImageViewPort();\n        viewPort = new Rectangle(viewPort.Left - 1, viewPort.Top - 1, viewPort.Width + 1, viewPort.Height + 1);\n\n        using (Pen borderPen = new Pen(this.ImageBorderColor))\n        {\n          graphics.DrawRectangle(borderPen, viewPort);\n        }\n\n        switch (this.ImageBorderStyle)\n        {\n          case ImageBoxBorderStyle.FixedSingleDropShadow:\n            this.DrawDropShadow(graphics, viewPort);\n            break;\n          case ImageBoxBorderStyle.FixedSingleGlowShadow:\n            this.DrawGlowShadow(graphics, viewPort);\n            break;\n        }\n\n        graphics.ResetClip();\n      }\n    }\n\n    /// <summary>\n    /// Draws the specified text within the specified bounds using the specified device context.\n    /// </summary>\n    /// <param name=\"graphics\">The device context in which to draw the text.</param>\n    /// <param name=\"text\">The text to draw.</param>\n    /// <param name=\"bounds\">The <see cref=\"Rectangle\"/> that represents the bounds of the text.</param>\n    protected void DrawLabel(Graphics graphics, string text, Rectangle bounds)\n    {\n      this.DrawLabel(graphics, text, this.Font, this.ForeColor, this.TextBackColor, this.TextAlign, bounds);\n    }\n\n    /// <summary>\n    /// Draws the specified text within the specified bounds using the specified device context and font.\n    /// </summary>\n    /// <param name=\"graphics\">The device context in which to draw the text.</param>\n    /// <param name=\"text\">The text to draw.</param>\n    /// <param name=\"font\">The <see cref=\"Font\"/> to apply to the drawn text.</param>\n    /// <param name=\"bounds\">The <see cref=\"Rectangle\"/> that represents the bounds of the text.</param>\n    protected void DrawLabel(Graphics graphics, string text, Font font, Rectangle bounds)\n    {\n      this.DrawLabel(graphics, text, font, this.ForeColor, this.TextBackColor, this.TextAlign, bounds);\n    }\n\n    /// <summary>\n    /// Draws the specified text within the specified bounds using the specified device context, font, and color.\n    /// </summary>\n    /// <param name=\"graphics\">The device context in which to draw the text.</param>\n    /// <param name=\"text\">The text to draw.</param>\n    /// <param name=\"font\">The <see cref=\"Font\"/> to apply to the drawn text.</param>\n    /// <param name=\"foreColor\">The <see cref=\"Color\"/> to apply to the text.</param>\n    /// <param name=\"bounds\">The <see cref=\"Rectangle\"/> that represents the bounds of the text.</param>\n    protected void DrawLabel(Graphics graphics, string text, Font font, Color foreColor, Rectangle bounds)\n    {\n      this.DrawLabel(graphics, text, font, foreColor, this.TextBackColor, this.TextAlign, bounds);\n    }\n\n    /// <summary>\n    /// Draws the specified text within the specified bounds using the specified device context, font, color, and back color.\n    /// </summary>\n    /// <param name=\"graphics\">The device context in which to draw the text.</param>\n    /// <param name=\"text\">The text to draw.</param>\n    /// <param name=\"font\">The <see cref=\"Font\"/> to apply to the drawn text.</param>\n    /// <param name=\"foreColor\">The <see cref=\"Color\"/> to apply to the text.</param>\n    /// <param name=\"backColor\">The <see cref=\"Color\"/> to apply to the area represented by <c>bounds</c>.</param>\n    /// <param name=\"bounds\">The <see cref=\"Rectangle\"/> that represents the bounds of the text.</param>\n    protected void DrawLabel(Graphics graphics, string text, Font font, Color foreColor, Color backColor, Rectangle bounds)\n    {\n      this.DrawLabel(graphics, text, font, foreColor, backColor, this.TextAlign, bounds);\n    }\n\n    /// <summary>\n    /// Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.\n    /// </summary>\n    /// <param name=\"graphics\">The device context in which to draw the text.</param>\n    /// <param name=\"text\">The text to draw.</param>\n    /// <param name=\"font\">The <see cref=\"Font\"/> to apply to the drawn text.</param>\n    /// <param name=\"foreColor\">The <see cref=\"Color\"/> to apply to the text.</param>\n    /// <param name=\"backColor\">The <see cref=\"Color\"/> to apply to the area represented by <c>bounds</c>.</param>\n    /// <param name=\"textAlign\">The <see cref=\"ContentAlignment\"/> to apply to the text.</param>\n    /// <param name=\"bounds\">The <see cref=\"Rectangle\"/> that represents the bounds of the text.</param>\n    protected void DrawLabel(Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds)\n    {\n      this.DrawLabel(graphics, text, font, foreColor, backColor, textAlign, bounds, this.ScaleText);\n    }\n\n    /// <summary>\n    /// Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.\n    /// </summary>\n    /// <param name=\"graphics\">The device context in which to draw the text.</param>\n    /// <param name=\"text\">The text to draw.</param>\n    /// <param name=\"font\">The <see cref=\"Font\"/> to apply to the drawn text.</param>\n    /// <param name=\"foreColor\">The <see cref=\"Color\"/> to apply to the text.</param>\n    /// <param name=\"backColor\">The <see cref=\"Color\"/> to apply to the area represented by <c>bounds</c>.</param>\n    /// <param name=\"textAlign\">The <see cref=\"ContentAlignment\"/> to apply to the text.</param>\n    /// <param name=\"bounds\">The <see cref=\"Rectangle\"/> that represents the bounds of the text.</param>\n    /// <param name=\"scaleText\">If set to <c>true</c> the font size is scaled according to the current zoom level.</param>\n    protected virtual void DrawLabel(Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds, bool scaleText)\n    {\n      this.DrawLabel(graphics, text, font, foreColor, backColor, textAlign, bounds, scaleText, Padding.Empty);\n    }\n\n    /// <summary>\n    /// Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.\n    /// </summary>\n    /// <param name=\"graphics\">The device context in which to draw the text.</param>\n    /// <param name=\"text\">The text to draw.</param>\n    /// <param name=\"font\">The <see cref=\"Font\"/> to apply to the drawn text.</param>\n    /// <param name=\"foreColor\">The <see cref=\"Color\"/> to apply to the text.</param>\n    /// <param name=\"backColor\">The <see cref=\"Color\"/> to apply to the area represented by <c>bounds</c>.</param>\n    /// <param name=\"textAlign\">The <see cref=\"ContentAlignment\"/> to apply to the text.</param>\n    /// <param name=\"bounds\">The <see cref=\"Rectangle\"/> that represents the bounds of the text.</param>\n    /// <param name=\"scaleText\">If set to <c>true</c> the font size is scaled according to the current zoom level.</param>\n    /// <param name=\"padding\">Padding to apply around the text</param>\n    protected virtual void DrawLabel(Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds, bool scaleText, Padding padding)\n    {\n      TextFormatFlags flags;\n\n      if (scaleText)\n      {\n        font = new Font(font.FontFamily, (float)(font.Size * this.ZoomFactor), font.Style);\n      }\n\n      flags = TextFormatFlags.NoPrefix | TextFormatFlags.WordEllipsis | TextFormatFlags.WordBreak | TextFormatFlags.NoPadding;\n\n      switch (textAlign)\n      {\n        case ContentAlignment.TopLeft:\n        case ContentAlignment.MiddleLeft:\n        case ContentAlignment.BottomLeft:\n          flags |= TextFormatFlags.Left;\n          break;\n        case ContentAlignment.TopRight:\n        case ContentAlignment.MiddleRight:\n        case ContentAlignment.BottomRight:\n          flags |= TextFormatFlags.Right;\n          break;\n        default:\n          flags |= TextFormatFlags.HorizontalCenter;\n          break;\n      }\n\n      switch (textAlign)\n      {\n        case ContentAlignment.TopCenter:\n        case ContentAlignment.TopLeft:\n        case ContentAlignment.TopRight:\n          flags |= TextFormatFlags.Top;\n          break;\n        case ContentAlignment.BottomCenter:\n        case ContentAlignment.BottomLeft:\n        case ContentAlignment.BottomRight:\n          flags |= TextFormatFlags.Bottom;\n          break;\n        default:\n          flags |= TextFormatFlags.VerticalCenter;\n          break;\n      }\n\n      if (padding.Horizontal != 0 || padding.Vertical != 0)\n      {\n        Size size;\n        int x;\n        int y;\n        int width;\n        int height;\n\n        size = TextRenderer.MeasureText(graphics, text, font, bounds.Size, flags);\n        width = size.Width;\n        height = size.Height;\n\n        switch (textAlign)\n        {\n          case ContentAlignment.TopLeft:\n            x = bounds.Left + padding.Left;\n            y = bounds.Top + padding.Top;\n            break;\n          case ContentAlignment.TopCenter:\n            x = bounds.Left + padding.Left + ((bounds.Width - width) / 2 - padding.Right);\n            y = bounds.Top + padding.Top;\n            break;\n          case ContentAlignment.TopRight:\n            x = bounds.Right - (padding.Right + width);\n            y = bounds.Top + padding.Top;\n            break;\n          case ContentAlignment.MiddleLeft:\n            x = bounds.Left + padding.Left;\n            y = bounds.Top + padding.Top + (bounds.Height - height) / 2;\n            break;\n          case ContentAlignment.MiddleCenter:\n            x = bounds.Left + padding.Left + ((bounds.Width - width) / 2 - padding.Right);\n            y = bounds.Top + padding.Top + (bounds.Height - height) / 2;\n            break;\n          case ContentAlignment.MiddleRight:\n            x = bounds.Right - (padding.Right + width);\n            y = bounds.Top + padding.Top + (bounds.Height - height) / 2;\n            break;\n          case ContentAlignment.BottomLeft:\n            x = bounds.Left + padding.Left;\n            y = bounds.Bottom - (padding.Bottom + height);\n            break;\n          case ContentAlignment.BottomCenter:\n            x = bounds.Left + padding.Left + ((bounds.Width - width) / 2 - padding.Right);\n            y = bounds.Bottom - (padding.Bottom + height);\n            break;\n          case ContentAlignment.BottomRight:\n            x = bounds.Right - (padding.Right + width);\n            y = bounds.Bottom - (padding.Bottom + height);\n            break;\n          default:\n            throw new ArgumentOutOfRangeException(nameof(textAlign));\n        }\n\n        if (backColor != Color.Empty && backColor.A > 0)\n        {\n          using (Brush brush = new SolidBrush(backColor))\n          {\n            graphics.FillRectangle(brush, x - padding.Left, y - padding.Top, width + padding.Horizontal, height + padding.Vertical);\n          }\n        }\n\n        bounds = new Rectangle(x, y, width, height);\n\n        //bounds = new Rectangle(bounds.Left + padding.Left, bounds.Top + padding.Top, bounds.Width - padding.Horizontal, bounds.Height - padding.Vertical);\n      }\n\n      TextRenderer.DrawText(graphics, text, font, bounds, foreColor, backColor, flags);\n\n      if (scaleText)\n      {\n        font.Dispose();\n      }\n    }\n\n    /// <summary>\n    ///   Draws a pixel grid.\n    /// </summary>\n    /// <param name=\"g\">The graphics to draw the grid to.</param>\n    protected virtual void DrawPixelGrid(Graphics g)\n    {\n      float pixelSize;\n\n      pixelSize = (float)this.ZoomFactor;\n\n      if (pixelSize > this.PixelGridThreshold)\n      {\n        Rectangle viewport;\n        float offsetX;\n        float offsetY;\n\n        viewport = this.GetImageViewPort();\n        offsetX = Math.Abs(this.AutoScrollPosition.X) % pixelSize;\n        offsetY = Math.Abs(this.AutoScrollPosition.Y) % pixelSize;\n\n        using (Pen pen = new Pen(this.PixelGridColor)\n        {\n          DashStyle = DashStyle.Dot\n        })\n        {\n          for (float x = viewport.Left + pixelSize - offsetX; x < viewport.Right; x += pixelSize)\n          {\n            g.DrawLine(pen, x, viewport.Top, x, viewport.Bottom);\n          }\n\n          for (float y = viewport.Top + pixelSize - offsetY; y < viewport.Bottom; y += pixelSize)\n          {\n            g.DrawLine(pen, viewport.Left, y, viewport.Right, y);\n          }\n\n          g.DrawRectangle(pen, viewport);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Draws the selection region.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.Windows.Forms.PaintEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void DrawSelection(PaintEventArgs e)\n    {\n      RectangleF rect;\n\n      e.Graphics.SetClip(this.GetInsideViewPort(true));\n\n      rect = this.GetOffsetRectangle(this.SelectionRegion);\n\n      using (Brush brush = new SolidBrush(Color.FromArgb(128, this.SelectionColor)))\n      {\n        e.Graphics.FillRectangle(brush, rect);\n      }\n\n      using (Pen pen = new Pen(this.SelectionColor))\n      {\n        e.Graphics.DrawRectangle(pen, rect.X, rect.Y, rect.Width, rect.Height);\n      }\n\n      e.Graphics.ResetClip();\n    }\n\n    /// <summary>\n    /// Draws the text.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"PaintEventArgs\"/> instance containing the event data.</param>\n    protected virtual void DrawText(PaintEventArgs e)\n    {\n      Rectangle bounds;\n\n      bounds = this.TextDisplayMode == ImageBoxGridDisplayMode.Client ? this.GetInsideViewPort() : this.GetImageViewPort();\n\n      this.DrawLabel(e.Graphics, this.Text, this.Font, this.ForeColor, this.TextBackColor, this.TextAlign, bounds, this.ScaleText, this.TextPadding);\n    }\n\n    /// <summary>\n    /// Completes an ongoing selection or drag operation.\n    /// </summary>\n    protected virtual void EndDrag()\n    {\n      this.IsSelecting = false;\n      this.OnSelected(EventArgs.Empty);\n    }\n\n    /// <summary>\n    /// Gets a cursor suitable for the current state of the control\n    /// </summary>\n    /// <param name=\"location\">The mouse cursor position in client co-ordinates.</param>\n    /// <returns>\n    /// A <see cref=\"Cursor\"/> object suitable for the current state of the control\n    /// </returns>\n    protected virtual Cursor GetCursor(Point location)\n    {\n      Cursor cursor;\n\n      switch (_panStyle)\n      {\n        case ImageBoxPanStyle.None:\n          cursor = Cursors.Default;\n          break;\n        case ImageBoxPanStyle.Standard:\n          cursor = Cursors.SizeAll;\n          break;\n        case ImageBoxPanStyle.Free:\n          switch (this.GetPanDirection(location))\n          {\n            case ImageBoxPanDirection.None:\n              cursor = _panAllCursor;\n              break;\n            case ImageBoxPanDirection.Up:\n              cursor = Cursors.PanNorth;\n              break;\n            case ImageBoxPanDirection.Down:\n              cursor = Cursors.PanSouth;\n              break;\n            case ImageBoxPanDirection.Left:\n              cursor = Cursors.PanWest;\n              break;\n            case ImageBoxPanDirection.Right:\n              cursor = Cursors.PanEast;\n              break;\n            default:\n              cursor = _panAllCursor;\n              break;\n          }\n          break;\n        default:\n          cursor = Cursors.Default;\n          break;\n      }\n\n      return cursor;\n    }\n\n    /// <summary>\n    ///   Gets an offset based on the current image border style.\n    /// </summary>\n    /// <returns></returns>\n    protected virtual int GetImageBorderOffset()\n    {\n      int offset;\n\n      switch (this.ImageBorderStyle)\n      {\n        case ImageBoxBorderStyle.FixedSingle:\n          offset = 1;\n          break;\n\n        case ImageBoxBorderStyle.FixedSingleDropShadow:\n          offset = this.DropShadowSize + 1;\n          break;\n        default:\n          offset = 0;\n          break;\n      }\n\n      return offset;\n    }\n\n    /// <summary>\n    /// Gets the interpolation mode used to render the image.\n    /// </summary>\n    /// <returns>\n    /// The interpolation mode.\n    /// </returns>\n    /// <remarks>Returns the value of the <see cref=\"InterpolationMode\"/> property, unless this is set to <code>InterpolationMode.Default</code>, in which case it will use <code>InterpolationMode.HighQualityBicubic</code> for zoomed images otherwise <code>InterpolationMode.NearestNeighbor</code>.</remarks>\n    protected virtual InterpolationMode GetInterpolationMode()\n    {\n      InterpolationMode mode;\n\n      mode = this.InterpolationMode;\n\n      if (mode == InterpolationMode.Default)\n      {\n        // ReSharper disable once ConvertIfStatementToConditionalTernaryExpression\n        if (this.Zoom < 100)\n        {\n          // TODO: Check to see if we should cherry pick other modes depending on how much the image is actually zoomed\n          mode = InterpolationMode.HighQualityBicubic;\n        }\n        else\n        {\n          mode = InterpolationMode.NearestNeighbor;\n        }\n      }\n\n      return mode;\n    }\n\n    /// <summary>\n    ///   Determines whether the specified key is a regular input key or a special key that requires preprocessing.\n    /// </summary>\n    /// <param name=\"keyData\">\n    ///   One of the <see cref=\"T:System.Windows.Forms.Keys\" /> values.\n    /// </param>\n    /// <returns>\n    ///   true if the specified key is a regular input key; otherwise, false.\n    /// </returns>\n    protected override bool IsInputKey(Keys keyData)\n    {\n      bool result;\n\n      if ((keyData & Keys.Right) == Keys.Right | (keyData & Keys.Left) == Keys.Left | (keyData & Keys.Up) == Keys.Up | (keyData & Keys.Down) == Keys.Down)\n      {\n        result = true;\n      }\n      else\n      {\n        result = base.IsInputKey(keyData);\n      }\n\n      return result;\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AllowClickZoomChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAllowClickZoomChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventAllowClickZoomChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AllowDoubleClickChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAllowDoubleClickChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.SetStyle(ControlStyles.StandardDoubleClick, this.AllowDoubleClick);\n\n      handler = (EventHandler)this.Events[_eventAllowDoubleClickChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"AllowFreePanChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnAllowFreePanChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventAllowFreePanChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"AllowUnfocusedMouseWheelChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnAllowUnfocusedMouseWheelChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      if (this.AllowUnfocusedMouseWheel)\n      {\n        // TODO: Not doing any reference counting so there's\n        // currently no way of disabling the message filter\n        // after the first time it has been enabled\n        ImageBoxMouseWheelMessageFilter.Active = true;\n      }\n\n      handler = (EventHandler)this.Events[_eventAllowUnfocusedMouseWheelChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AllowZoomChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAllowZoomChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventAllowZoomChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AutoCenterChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAutoCenterChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventAutoCenterChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AutoPanChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAutoPanChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventAutoPanChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.BackColorChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnBackColorChanged(EventArgs e)\n    {\n      base.OnBackColorChanged(e);\n\n      this.Invalidate();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ScrollControl.BorderStyleChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected override void OnBorderStyleChanged(EventArgs e)\n    {\n      base.OnBorderStyleChanged(e);\n\n      this.AdjustLayout();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.DockChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnDockChanged(EventArgs e)\n    {\n      base.OnDockChanged(e);\n\n      if (this.Dock != DockStyle.None)\n      {\n        this.AutoSize = false;\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"DropShadowSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnDropShadowSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventDropShadowSizeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"E:System.Windows.Forms.Control.FontChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">An <see cref=\"T:System.EventArgs\" /> that contains the event data.</param>\n    protected override void OnFontChanged(EventArgs e)\n    {\n      base.OnFontChanged(e);\n\n      this.Invalidate();\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"E:System.Windows.Forms.Control.ForeColorChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">An <see cref=\"T:System.EventArgs\" /> that contains the event data.</param>\n    protected override void OnForeColorChanged(EventArgs e)\n    {\n      base.OnForeColorChanged(e);\n\n      this.Invalidate();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"GridCellSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnGridCellSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.InitializeGridTile();\n\n      handler = (EventHandler)this.Events[_eventGridCellSizeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"GridColorAlternateChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnGridColorAlternateChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.InitializeGridTile();\n\n      handler = (EventHandler)this.Events[_eventGridColorAlternateChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"GridColorChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnGridColorChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.InitializeGridTile();\n\n      handler = (EventHandler)this.Events[_eventGridColorChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"GridDisplayModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnGridDisplayModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.InitializeGridTile();\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventGridDisplayModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"GridScaleChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnGridScaleChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.InitializeGridTile();\n\n      handler = (EventHandler)this.Events[_eventGridScaleChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ImageBorderColorChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnImageBorderColorChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventImageBorderColorChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ImageBorderStyleChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnImageBorderStyleChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventImageBorderStyleChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ImageChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnImageChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.IsAnimating = false;\n\n      if (this.Image != null)\n      {\n        try\n        {\n          this.IsAnimating = ImageAnimator.CanAnimate(this.Image);\n          if (this.IsAnimating)\n          {\n            ImageAnimator.Animate(this.Image, this.OnFrameChangedHandler);\n          }\n        }\n        catch (ArgumentException)\n        {\n          // probably a disposed image, ignore\n        }\n      }\n\n      this.AdjustLayout();\n\n      handler = (EventHandler)this.Events[_eventImageChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"InterpolationModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnInterpolationModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventInterpolationModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"InvertMouseChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnInvertMouseChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventInvertMouseChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.KeyDown\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.KeyEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnKeyDown(KeyEventArgs e)\n    {\n      base.OnKeyDown(e);\n\n      this.ProcessScrollingShortcuts(e);\n\n      if (this.ShortcutsEnabled && this.AllowZoom && this.SizeMode == ImageBoxSizeMode.Normal)\n      {\n        this.ProcessImageShortcuts(e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"LimitSelectionToImageChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnLimitSelectionToImageChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventLimitSelectionToImageChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseDown\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseDown(MouseEventArgs e)\n    {\n      base.OnMouseDown(e);\n\n      if (!this.Focused)\n      {\n        this.Focus();\n      }\n\n      if (e.Button != MouseButtons.None)\n      {\n        if (_panStyle == ImageBoxPanStyle.Free)\n        {\n          // already panning, abort\n          this.ProcessPanEvents(ImageBoxPanStyle.None);\n        }\n        else\n        {\n          _mouseDownStart = NativeMethods.GetTickCount();\n          if (AllowFreePan && e.Button is MouseButtons.Middle)\n          {\n            this.ProcessPanning(e);\n          }\n        }\n      }\n\n      this.SetCursor(e.Location);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseMove\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseMove(MouseEventArgs e)\n    {\n      base.OnMouseMove(e);\n\n      if (e.Button != MouseButtons.None)\n      {\n        this.ProcessPanning(e);\n        this.ProcessSelection(e);\n      }\n\n      this.SetCursor(e.Location);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseUp\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseUp(MouseEventArgs e)\n    {\n      bool doNotProcessClick;\n\n      base.OnMouseUp(e);\n\n      doNotProcessClick = _panStyle != ImageBoxPanStyle.None || this.IsSelecting;\n\n      if (_panStyle == ImageBoxPanStyle.Standard || _panStyle == ImageBoxPanStyle.Free && NativeMethods.GetTickCount() > (_mouseDownStart + SystemInformation.DoubleClickTime))\n      {\n        this.ProcessPanEvents(ImageBoxPanStyle.None);\n      }\n\n      if (this.IsSelecting)\n      {\n        this.EndDrag();\n      }\n      this.WasDragCancelled = false;\n\n      if (!doNotProcessClick && this.AllowZoom && this.AllowClickZoom && _panStyle == ImageBoxPanStyle.None && this.SizeMode == ImageBoxSizeMode.Normal)\n      {\n        if (e.Button == MouseButtons.Left && ModifierKeys == Keys.None)\n        {\n          this.ProcessMouseZoom(true, e.Location);\n        }\n        else if (e.Button == MouseButtons.Right || e.Button == MouseButtons.Left && ModifierKeys != Keys.None)\n        {\n          this.ProcessMouseZoom(false, e.Location);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseWheel\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseWheel(MouseEventArgs e)\n    {\n      base.OnMouseWheel(e);\n\n      if (MouseWheelMode == ImageBoxMouseWheelMode.Zoom)\n      {\n        DoMouseWheelZoom(e);\n      }\n      else if (MouseWheelMode == ImageBoxMouseWheelMode.ScrollAndZoom)\n      {\n        if (ModifierKeys == Keys.Control)\n        {\n          DoMouseWheelZoom(e);\n        }\n        else if (VScroll && ModifierKeys == Keys.None)\n        {\n          int scrollDelta = SystemInformation.MouseWheelScrollLines * VerticalScroll.SmallChange;\n          ScrollTo(HorizontalScroll.Value, VerticalScroll.Value + ((e.Delta > 0) ? -scrollDelta : scrollDelta));\n        }\n        else if (HScroll && ModifierKeys == Keys.Shift)\n        {\n          int scrollDelta = SystemInformation.MouseWheelScrollLines * HorizontalScroll.SmallChange;\n          ScrollTo(HorizontalScroll.Value + ((e.Delta > 0) ? -scrollDelta : scrollDelta), VerticalScroll.Value);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"MouseWheelModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnMouseWheelModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventMouseWheelModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.PaddingChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnPaddingChanged(EventArgs e)\n    {\n      base.OnPaddingChanged(e);\n      this.AdjustLayout();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.Paint\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.PaintEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnPaint(PaintEventArgs e)\n    {\n      if (this.AllowPainting)\n      {\n        // draw the background\n        this.DrawBackground(e);\n\n        // draw the image\n        if (!this.ViewSize.IsEmpty)\n        {\n          this.DrawImageBorder(e.Graphics);\n        }\n        if (this.VirtualMode)\n        {\n          this.OnVirtualDraw(e);\n        }\n        else if (this.Image != null)\n        {\n          this.DrawImage(e.Graphics);\n        }\n\n        // draw the grid\n        if (this.ShowPixelGrid && !this.VirtualMode)\n        {\n          this.DrawPixelGrid(e.Graphics);\n        }\n\n        // draw the selection\n        if (this.SelectionRegion != Rectangle.Empty)\n        {\n          this.DrawSelection(e);\n        }\n\n        // text\n        if (!string.IsNullOrEmpty(this.Text) && this.TextDisplayMode != ImageBoxGridDisplayMode.None)\n        {\n          this.DrawText(e);\n        }\n\n        if (_panStyle == ImageBoxPanStyle.Free)\n        {\n          this.DrawPanAllSymbol(e);\n        }\n\n        base.OnPaint(e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"PanEnd\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnPanEnd(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventPanEnd];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"PanModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnPanModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventPanModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"PanStart\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.ComponentModel.CancelEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnPanStart(CancelEventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventPanStart];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.ParentChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnParentChanged(EventArgs e)\n    {\n      base.OnParentChanged(e);\n      this.AdjustLayout();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"PixelGridColorChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnPixelGridColorChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventPixelGridColorChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"PixelGridThresholdChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnPixelGridThresholdChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventPixelGridThresholdChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.Resize\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnResize(EventArgs e)\n    {\n      this.AdjustLayout();\n\n      base.OnResize(e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"ScaleTextChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnScaleTextChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventScaleTextChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.ScrollableControl.Scroll\" /> event.\n    /// </summary>\n    /// <param name=\"se\">\n    ///   A <see cref=\"T:System.Windows.Forms.ScrollEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnScroll(ScrollEventArgs se)\n    {\n      this.Invalidate();\n\n      base.OnScroll(se);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"Selected\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnSelected(EventArgs e)\n    {\n      EventHandler<EventArgs> handler;\n\n      switch (this.SelectionMode)\n      {\n        case ImageBoxSelectionMode.Zoom:\n          if (this.SelectionRegion.Width > SelectionDeadZone && this.SelectionRegion.Height > SelectionDeadZone)\n          {\n            this.ZoomToRegion(this.SelectionRegion);\n            this.SelectNone();\n          }\n          break;\n      }\n\n      handler = (EventHandler<EventArgs>)this.Events[_eventSelected];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"Selecting\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnSelecting(ImageBoxCancelEventArgs e)\n    {\n      EventHandler<ImageBoxCancelEventArgs> handler;\n\n      handler = (EventHandler<ImageBoxCancelEventArgs>)this.Events[_eventSelecting];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"SelectionColorChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnSelectionColorChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventSelectionColorChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"SelectionModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnSelectionModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventSelectionModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"SelectionRegionChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnSelectionRegionChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventSelectionRegionChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ShortcutsEnabledChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnShortcutsEnabledChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventShortcutsEnabledChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ShowPixelGridChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnShowPixelGridChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventShowPixelGridChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"SizeModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnSizeModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.AdjustLayout();\n\n      handler = (EventHandler)this.Events[_eventSizeModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"SizeToFitChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnSizeToFitChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.AdjustLayout();\n\n      handler = (EventHandler)this.Events[_eventSizeToFitChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"TextAlignChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnTextAlignChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventTextAlignChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"TextBackColorChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnTextBackColorChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventTextBackColorChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"E:System.Windows.Forms.Control.TextChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">An <see cref=\"T:System.EventArgs\" /> that contains the event data.</param>\n    protected override void OnTextChanged(EventArgs e)\n    {\n      base.OnTextChanged(e);\n\n      this.Invalidate();\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"TextDisplayModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnTextDisplayModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventTextDisplayModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"TextPaddingChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnTextPaddingChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventTextPaddingChanged];\n\n      this.Invalidate();\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"VirtualDraw\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"PaintEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnVirtualDraw(PaintEventArgs e)\n    {\n      PaintEventHandler handler;\n\n      handler = (PaintEventHandler)this.Events[_eventVirtualDraw];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"VirtualModeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnVirtualModeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.AdjustLayout();\n\n      handler = (EventHandler)this.Events[_eventVirtualModeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"VirtualSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnVirtualSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.AdjustLayout();\n\n      handler = (EventHandler)this.Events[_eventVirtualSizeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ZoomChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnZoomChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.AdjustLayout();\n\n      handler = (EventHandler)this.Events[_eventZoomChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"Zoomed\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnZoomed(ImageBoxZoomEventArgs e)\n    {\n      EventHandler<ImageBoxZoomEventArgs> handler;\n\n      handler = (EventHandler<ImageBoxZoomEventArgs>)this.Events[_eventZoomed];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ZoomLevelsChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnZoomLevelsChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventZoomLevelsChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Processes shortcut keys for zooming and selection\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"KeyEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void ProcessImageShortcuts(KeyEventArgs e)\n    {\n      Point currentPixel;\n      int currentZoom;\n      Point relativePoint;\n\n      relativePoint = this.CenterPoint;\n      currentPixel = this.PointToImage(relativePoint);\n      currentZoom = this.Zoom;\n\n      switch (e.KeyCode)\n      {\n        case Keys.Home:\n          if (this.AllowZoom)\n          {\n            this.PerformActualSize(ImageBoxActionSources.User);\n          }\n          break;\n\n        case Keys.PageDown:\n        case Keys.Oemplus:\n          if (this.AllowZoom)\n          {\n            this.PerformZoomIn(ImageBoxActionSources.User, true);\n          }\n          break;\n\n        case Keys.PageUp:\n        case Keys.OemMinus:\n          if (this.AllowZoom)\n          {\n            this.PerformZoomOut(ImageBoxActionSources.User, true);\n          }\n          break;\n      }\n\n      if (this.Zoom != currentZoom)\n      {\n        this.ScrollTo(currentPixel, relativePoint);\n      }\n    }\n\n    /// <summary>\n    ///   Processes zooming with the mouse. Attempts to keep the pre-zoom image pixel under the mouse after the zoom has completed.\n    /// </summary>\n    /// <param name=\"isZoomIn\">\n    ///   if set to <c>true</c> zoom in, otherwise zoom out.\n    /// </param>\n    /// <param name=\"cursorPosition\">The cursor position.</param>\n    protected virtual void ProcessMouseZoom(bool isZoomIn, Point cursorPosition)\n    {\n      this.PerformZoom(isZoomIn ? ImageBoxZoomActions.ZoomIn : ImageBoxZoomActions.ZoomOut, ImageBoxActionSources.User, true, cursorPosition);\n    }\n\n    /// <summary>\n    ///   Performs mouse based panning\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"MouseEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void ProcessPanning(MouseEventArgs e)\n    {\n      if (this.CanPan(e.Button))\n      {\n        if (_panStyle == ImageBoxPanStyle.None && (this.HScroll || this.VScroll))\n        {\n          _startMousePosition = e.Location;\n\n          this.ProcessPanEvents(e.Button == MouseButtons.Middle && _allowFreePan ? ImageBoxPanStyle.Free : ImageBoxPanStyle.Standard);\n        }\n      }\n\n      if (_panStyle == ImageBoxPanStyle.Standard)\n      {\n        int x;\n        int y;\n        Point position;\n\n        if (!this.InvertMouse)\n        {\n          x = -_startScrollPosition.X + (_startMousePosition.X - e.Location.X);\n          y = -_startScrollPosition.Y + (_startMousePosition.Y - e.Location.Y);\n        }\n        else\n        {\n          x = -(_startScrollPosition.X + (_startMousePosition.X - e.Location.X));\n          y = -(_startScrollPosition.Y + (_startMousePosition.Y - e.Location.Y));\n        }\n\n        position = new Point(x, y);\n\n        this.UpdateScrollPosition(position);\n      }\n    }\n\n    /// <summary>\n    ///   Processes shortcut keys for scrolling\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"KeyEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void ProcessScrollingShortcuts(KeyEventArgs e)\n    {\n      switch (e.KeyCode)\n      {\n        case Keys.Left:\n          this.AdjustScroll(-(e.Modifiers == Keys.None ? this.HorizontalScroll.SmallChange : this.HorizontalScroll.LargeChange), 0);\n          break;\n\n        case Keys.Right:\n          this.AdjustScroll(e.Modifiers == Keys.None ? this.HorizontalScroll.SmallChange : this.HorizontalScroll.LargeChange, 0);\n          break;\n\n        case Keys.Up:\n          this.AdjustScroll(0, -(e.Modifiers == Keys.None ? this.VerticalScroll.SmallChange : this.VerticalScroll.LargeChange));\n          break;\n\n        case Keys.Down:\n          this.AdjustScroll(0, e.Modifiers == Keys.None ? this.VerticalScroll.SmallChange : this.VerticalScroll.LargeChange);\n          break;\n      }\n    }\n\n    /// <summary>\n    ///   Performs mouse based region selection\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"MouseEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void ProcessSelection(MouseEventArgs e)\n    {\n      if (this.SelectionMode != ImageBoxSelectionMode.None && e.Button == MouseButtons.Left && !this.WasDragCancelled)\n      {\n        if (!this.IsSelecting)\n        {\n          this.StartDrag(e);\n        }\n\n        if (this.IsSelecting)\n        {\n          float x;\n          float y;\n          float w;\n          float h;\n          Point imageOffset;\n          RectangleF selection;\n\n          imageOffset = this.GetImageViewPort().\n                             Location;\n\n          if (e.X < _startMousePosition.X)\n          {\n            x = e.X;\n            w = _startMousePosition.X - e.X;\n          }\n          else\n          {\n            x = _startMousePosition.X;\n            w = e.X - _startMousePosition.X;\n          }\n\n          if (e.Y < _startMousePosition.Y)\n          {\n            y = e.Y;\n            h = _startMousePosition.Y - e.Y;\n          }\n          else\n          {\n            y = _startMousePosition.Y;\n            h = e.Y - _startMousePosition.Y;\n          }\n\n          x = x - imageOffset.X - this.AutoScrollPosition.X;\n          y = y - imageOffset.Y - this.AutoScrollPosition.Y;\n\n          x = x / (float)this.ZoomFactor;\n          y = y / (float)this.ZoomFactor;\n          w = w / (float)this.ZoomFactor;\n          h = h / (float)this.ZoomFactor;\n\n          if (w != 0 && h != 0)\n          {\n            selection = new RectangleF(x, y, w, h);\n            if (this.LimitSelectionToImage)\n            {\n              selection = this.FitRectangle(selection);\n            }\n\n            this.SelectionRegion = selection;\n          }\n        }\n      }\n    }\n\n    /// <summary>\n    /// Resets the <see cref=\"SizeMode\"/> property whilsts retaining the original <see cref=\"Zoom\"/>.\n    /// </summary>\n    protected void RestoreSizeMode()\n    {\n      if (this.SizeMode != ImageBoxSizeMode.Normal)\n      {\n        int previousZoom;\n\n        previousZoom = this.Zoom;\n        this.SizeMode = ImageBoxSizeMode.Normal;\n        this.Zoom = previousZoom; // Stop the zoom getting reset to 100% before calculating the new zoom\n      }\n    }\n\n    /// <summary>\n    /// Initializes a selection or drag operation.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"MouseEventArgs\"/> instance containing the event data.</param>\n    protected virtual void StartDrag(MouseEventArgs e)\n    {\n      ImageBoxCancelEventArgs args;\n\n      args = new ImageBoxCancelEventArgs(e.Location);\n\n      this.OnSelecting(args);\n\n      this.WasDragCancelled = args.Cancel;\n      this.IsSelecting = !args.Cancel;\n      if (this.IsSelecting)\n      {\n        this.SelectNone();\n\n        _startMousePosition = e.Location;\n      }\n    }\n\n    /// <summary>\n    ///   Updates the scroll position.\n    /// </summary>\n    /// <param name=\"position\">The position.</param>\n    protected virtual void UpdateScrollPosition(Point position)\n    {\n      this.AutoScrollPosition = position;\n      this.Invalidate();\n      this.OnScroll(new ScrollEventArgs(ScrollEventType.EndScroll, 0));\n    }\n\n    private bool CanPan(MouseButtons button)\n    {\n      return (this.HScroll || this.VScroll) && (_panMode & (ImageBoxPanMode)button) != 0 && !this.ViewSize.IsEmpty && (_selectionMode == ImageBoxSelectionMode.None || button != MouseButtons.Left);\n    }\n\n    private void CreateTimer()\n    {\n      _freePanTimer = new Timer\n      {\n        Enabled = true,\n        Interval = _freePanTimerInterval\n      };\n\n      _freePanTimer.Tick += this.FreePanTimerTickHandler;\n\n      _freePanTimer.Start();\n    }\n\n    private void DoMouseWheelZoom(MouseEventArgs e)\n    {\n      if (this.AllowZoom && this.SizeMode == ImageBoxSizeMode.Normal)\n      {\n        // The MouseWheel event can contain multiple \"spins\" of the wheel so we need to adjust accordingly\n        int spins = Math.Abs(e.Delta / SystemInformation.MouseWheelScrollDelta);\n\n        // TODO: Really should update the source method to handle multiple increments rather than calling it multiple times\n        for (int i = 0; i < spins; i++)\n        {\n          this.ProcessMouseZoom(e.Delta > 0, e.Location);\n        }\n      }\n    }\n\n    private void DrawPanAllSymbol(PaintEventArgs e)\n    {\n      Graphics g;\n      int x;\n      int y;\n\n      g = e.Graphics;\n\n      x = _startMousePosition.X - (_panAllSymbol.Width >> 1);\n      y = _startMousePosition.Y - (_panAllSymbol.Height >> 1);\n\n      g.DrawImage(_panAllSymbol, x, y);\n    }\n\n    private void FreePanTimerTickHandler(object sender, EventArgs e)\n    {\n      Point location;\n      ImageBoxPanDirection direction;\n      int distance;\n      int ox;\n      int oy;\n\n      location = this.PointToClient(MousePosition);\n      direction = this.GetPanDirection(location);\n      distance = this.GetDistance(_startMousePosition.X, _startMousePosition.Y, location.X, location.Y);\n\n      ox = 0;\n      oy = 0;\n\n      switch (direction)\n      {\n        case ImageBoxPanDirection.Up:\n          oy = -distance;\n          break;\n        case ImageBoxPanDirection.Down:\n          oy = +distance;\n          break;\n        case ImageBoxPanDirection.Left:\n          ox = -distance;\n          break;\n        case ImageBoxPanDirection.Right:\n          ox = +distance;\n          break;\n      }\n\n      if (ox != 0 || oy != 0)\n      {\n        this.AdjustScroll(ox, oy);\n      }\n    }\n\n    /// <summary>\n    /// Gets the distance between two points.\n    /// </summary>\n    /// <param name=\"x1\">The first x value.</param>\n    /// <param name=\"y1\">The first y value.</param>\n    /// <param name=\"x2\">The second x value.</param>\n    /// <param name=\"y2\">The second y value.</param>\n    /// <returns>\n    /// The distance.\n    /// </returns>\n    private int GetDistance(int x1, int y1, int x2, int y2)\n    {\n      int dx;\n      int dy;\n      double distance;\n\n      dx = x2 - x1;\n      dy = y2 - y1;\n      distance = Math.Sqrt(dx * dx + dy * dy);\n\n      return Convert.ToInt32(distance);\n    }\n\n    /// <summary>\n    /// Gets the distance between two values.\n    /// </summary>\n    /// <param name=\"x1\">The first value.</param>\n    /// <param name=\"x2\">The second value.</param>\n    /// <returns>\n    /// The distance.\n    /// </returns>\n    private int GetDistance(int x1, int x2)\n    {\n      int dx;\n      double distance;\n\n      dx = x2 - x1;\n      distance = Math.Sqrt(dx * dx);\n\n      return Convert.ToInt32(distance);\n    }\n\n    /// <summary>\n    /// Gets the size of the image.\n    /// </summary>\n    /// <remarks>If an error occurs, for example due to the image being disposed, an empty size is returned</remarks>\n    /// <returns>Size.</returns>\n    private Size GetImageSize()\n    {\n      Size result;\n\n      // HACK: This whole thing stinks. Hey MS, how about an IsDisposed property for images?\n\n      if (this.Image != null)\n      {\n        try\n        {\n          result = this.Image.Size;\n        }\n        catch\n        {\n          result = Size.Empty;\n        }\n      }\n      else\n      {\n        result = Size.Empty;\n      }\n\n      return result;\n    }\n\n    private ImageBoxPanDirection GetPanDirection(Point location)\n    {\n      ImageBoxPanDirection result;\n      int x;\n      int y;\n\n      x = location.X - _startMousePosition.X;\n      y = location.Y - _startMousePosition.Y;\n\n      if (x >= -_panAllDeadSize && x <= _panAllDeadSize && y >= -_panAllDeadSize && y <= _panAllDeadSize)\n      {\n        result = ImageBoxPanDirection.None;\n      }\n      else\n      {\n        int distanceX;\n\n        distanceX = location.X - _startMousePosition.X;\n\n        if (-y > Math.Abs(distanceX))\n        {\n          result = ImageBoxPanDirection.Up;\n        }\n        else if (y > Math.Abs(distanceX))\n        {\n          result = ImageBoxPanDirection.Down;\n        }\n        else\n        {\n          result = distanceX < 0 ? ImageBoxPanDirection.Left : ImageBoxPanDirection.Right;\n        }\n      }\n\n      return result;\n    }\n\n    /// <summary>\n    /// Returns an appropriate zoom level based on the specified action, relative to the current zoom level.\n    /// </summary>\n    /// <param name=\"action\">The action to determine the zoom level.</param>\n    /// <exception cref=\"System.ArgumentOutOfRangeException\">Thrown if an unsupported action is specified.</exception>\n    private int GetZoomLevel(ImageBoxZoomActions action)\n    {\n      int result;\n\n      switch (action)\n      {\n        case ImageBoxZoomActions.None:\n          result = this.Zoom;\n          break;\n        case ImageBoxZoomActions.ZoomIn:\n          result = this.ZoomLevels.NextZoom(this.Zoom);\n          break;\n        case ImageBoxZoomActions.ZoomOut:\n          result = this.ZoomLevels.PreviousZoom(this.Zoom);\n          break;\n        case ImageBoxZoomActions.ActualSize:\n          result = 100;\n          break;\n        default:\n          throw new ArgumentOutOfRangeException(nameof(action));\n      }\n\n      return result;\n    }\n\n    /// <summary>\n    ///   Initializes the grid tile.\n    /// </summary>\n    private void InitializeGridTile()\n    {\n      _texture?.Dispose();\n      _gridTile?.Dispose();\n\n      if (this.GridDisplayMode != ImageBoxGridDisplayMode.None && this.GridCellSize != 0)\n      {\n        if (this.GridScale != ImageBoxGridScale.None)\n        {\n          _gridTile = this.CreateGridTileImage(this.GridCellSize, this.GridColor, this.GridColorAlternate);\n          _texture = new TextureBrush(_gridTile);\n        }\n        else\n        {\n          _texture = new SolidBrush(this.GridColor);\n        }\n      }\n\n      this.Invalidate();\n    }\n\n    private void KillTimer()\n    {\n      if (_freePanTimer != null)\n      {\n        _freePanTimer.Stop();\n        _freePanTimer.Tick -= this.FreePanTimerTickHandler;\n        _freePanTimer.Dispose();\n        _freePanTimer = null;\n      }\n    }\n\n    /// <summary>\n    /// Called when the animation frame changes.\n    /// </summary>\n    /// <param name=\"sender\">The source of the event.</param>\n    /// <param name=\"eventArgs\">The <see cref=\"EventArgs\"/> instance containing the event data.</param>\n    private void OnFrameChangedHandler(object sender, EventArgs eventArgs)\n    {\n      this.Invalidate();\n    }\n\n    /// <summary>\n    /// Resets the zoom to 100%.\n    /// </summary>\n    /// <param name=\"source\">The source that initiated the action.</param>\n    private void PerformActualSize(ImageBoxActionSources source)\n    {\n      this.SizeMode = ImageBoxSizeMode.Normal;\n      this.SetZoom(100, ImageBoxZoomActions.ActualSize | (this.Zoom < 100 ? ImageBoxZoomActions.ZoomIn : ImageBoxZoomActions.ZoomOut), source);\n    }\n\n    /// <summary>\n    /// Performs a zoom action.\n    /// </summary>\n    /// <param name=\"action\">The action to perform.</param>\n    /// <param name=\"source\">The source that initiated the action.</param>\n    /// <param name=\"preservePosition\"><c>true</c> if the current scrolling position should be preserved relative to the new zoom level, <c>false</c> to reset.</param>\n    private void PerformZoom(ImageBoxZoomActions action, ImageBoxActionSources source, bool preservePosition)\n    {\n      this.PerformZoom(action, source, preservePosition, this.CenterPoint);\n    }\n\n    /// <summary>\n    /// Performs a zoom action.\n    /// </summary>\n    /// <param name=\"action\">The action to perform.</param>\n    /// <param name=\"source\">The source that initiated the action.</param>\n    /// <param name=\"preservePosition\"><c>true</c> if the current scrolling position should be preserved relative to the new zoom level, <c>false</c> to reset.</param>\n    /// <param name=\"relativePoint\">A <see cref=\"Point\"/> describing the current center of the control.</param>\n    private void PerformZoom(ImageBoxZoomActions action, ImageBoxActionSources source, bool preservePosition, Point relativePoint)\n    {\n      Point currentPixel;\n      int currentZoom;\n      int newZoom;\n\n      currentPixel = this.PointToImage(relativePoint);\n      currentZoom = this.Zoom;\n      newZoom = this.GetZoomLevel(action);\n\n      this.RestoreSizeMode();\n      this.SetZoom(newZoom, action, source);\n\n      if (preservePosition && this.Zoom != currentZoom)\n      {\n        this.ScrollTo(currentPixel, relativePoint);\n      }\n    }\n\n    /// <summary>\n    /// Zooms into the image\n    /// </summary>\n    /// <param name=\"source\">The source that initiated the action.</param>\n    /// <param name=\"preservePosition\"><c>true</c> if the current scrolling position should be preserved relative to the new zoom level, <c>false</c> to reset.</param>\n    private void PerformZoomIn(ImageBoxActionSources source, bool preservePosition)\n    {\n      this.PerformZoom(ImageBoxZoomActions.ZoomIn, source, preservePosition);\n    }\n\n    /// <summary>\n    /// Zooms out of the image\n    /// </summary>\n    /// <param name=\"source\">The source that initiated the action.</param>\n    /// <param name=\"preservePosition\"><c>true</c> if the current scrolling position should be preserved relative to the new zoom level, <c>false</c> to reset.</param>\n    private void PerformZoomOut(ImageBoxActionSources source, bool preservePosition)\n    {\n      this.PerformZoom(ImageBoxZoomActions.ZoomOut, source, preservePosition);\n    }\n\n    /// <summary>\n    /// Raises either the PanStart or PanEnd events\n    /// </summary>\n    /// <param name=\"panStyle\">The new pan style.</param>\n    private void ProcessPanEvents(ImageBoxPanStyle panStyle)\n    {\n      if (_panStyle != panStyle)\n      {\n        this.KillTimer();\n\n        if (panStyle == ImageBoxPanStyle.None)\n        {\n          _panStyle = ImageBoxPanStyle.None;\n          this.Invalidate();\n          this.OnPanEnd(EventArgs.Empty);\n        }\n        else\n        {\n          CancelEventArgs args;\n\n          args = new CancelEventArgs();\n\n          this.OnPanStart(args);\n\n          if (!args.Cancel)\n          {\n            _panStyle = panStyle;\n\n            if (panStyle == ImageBoxPanStyle.Free)\n            {\n              ImageBox.LoadPanResources();\n\n              this.CreateTimer();\n            }\n\n            _startScrollPosition = this.AutoScrollPosition;\n          }\n\n          this.Invalidate();\n        }\n      }\n    }\n\n    /// <summary>\n    /// Sets the mouse cursor based on the current control state\n    /// </summary>\n    /// <param name=\"location\">The location of the mouse in client co-ordinates.</param>\n    private void SetCursor(Point location)\n    {\n      Cursor cursor;\n\n      cursor = this.GetCursor(location);\n\n      if (_currentCursor != cursor)\n      {\n        _currentCursor = cursor;\n\n        // have to use this.Cursor and not Cursor.Current\n        // otherwise the cursor gets reset back to Default\n        // after clicking to initiate Free Pan\n        // As a result, the Cursor property has been hidden\n        // to discourage users setting it manually\n        this.Cursor = cursor;\n      }\n    }\n\n    /// <summary>\n    /// Updates the current zoom.\n    /// </summary>\n    /// <param name=\"value\">The new zoom value.</param>\n    /// <param name=\"actions\">The zoom actions that caused the value to be updated.</param>\n    /// <param name=\"source\">The source of the zoom operation.</param>\n    private void SetZoom(int value, ImageBoxZoomActions actions, ImageBoxActionSources source)\n    {\n      int previousZoom;\n\n      previousZoom = this.Zoom;\n\n      if (value < MinZoom)\n      {\n        value = MinZoom;\n      }\n      else if (value > MaxZoom)\n      {\n        value = MaxZoom;\n      }\n\n      if (_zoom != value)\n      {\n        _zoom = value;\n\n        this.OnZoomChanged(EventArgs.Empty);\n\n        this.OnZoomed(new ImageBoxZoomEventArgs(actions, source, previousZoom, this.Zoom));\n      }\n    }\n\n    #endregion\n\n    #region Other\n\n    private static Cursor _panAllCursor;\n\n    private static Bitmap _panAllSymbol;\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxActionSources.cs",
    "content": "﻿using System;\n\nnamespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  /// Specifies the source of an action being performed.\n  /// </summary>\n  [Flags]\n  public enum ImageBoxActionSources\n  {\n    /// <summary>\n    /// Unknown source.\n    /// </summary>\n    Unknown = 0,\n\n    /// <summary>\n    /// A user initialized the action.\n    /// </summary>\n    User = 1\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxBorderStyle.cs",
    "content": "﻿namespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  ///   Specifies the border styles of an image\n  /// </summary>\n  public enum ImageBoxBorderStyle\n  {\n    /// <summary>\n    ///   No border.\n    /// </summary>\n    None,\n\n    /// <summary>\n    ///   A fixed, single-line border.\n    /// </summary>\n    FixedSingle,\n\n    /// <summary>\n    ///   A fixed, single-line border with a solid drop shadow.\n    /// </summary>\n    FixedSingleDropShadow,\n\n    /// <summary>\n    ///   A fixed, single-line border with a soft outer glow.\n    /// </summary>\n    FixedSingleGlowShadow\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxCancelEventArgs.cs",
    "content": "﻿using System.ComponentModel;\nusing System.Drawing;\n\nnamespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  /// Provides data for a cancelable event.\n  /// </summary>\n  public class ImageBoxCancelEventArgs : CancelEventArgs\n  {\n    #region Public Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"ImageBoxCancelEventArgs\"/> class.\n    /// </summary>\n    /// <param name=\"location\">The location of the action being performed.</param>\n    public ImageBoxCancelEventArgs(Point location)\n      : this()\n    {\n      this.Location = location;\n    }\n\n    #endregion\n\n    #region Protected Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"ImageBoxCancelEventArgs\"/> class.\n    /// </summary>\n    protected ImageBoxCancelEventArgs()\n    { }\n\n    #endregion\n\n    #region Public Properties\n\n    /// <summary>\n    /// Gets or sets the location of the action being performed.\n    /// </summary>\n    /// <value>The location of the action being performed.</value>\n    public Point Location { get; protected set; }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxGridDisplayMode.cs",
    "content": "﻿namespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  ///   Specifies the display styles for the background texture grid\n  /// </summary>\n  public enum ImageBoxGridDisplayMode\n  {\n    /// <summary>\n    ///   No background.\n    /// </summary>\n    None,\n\n    /// <summary>\n    ///   Background is displayed in the control's client area.\n    /// </summary>\n    Client,\n\n    /// <summary>\n    ///   Background is displayed only in the image region.\n    /// </summary>\n    Image\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxGridScale.cs",
    "content": "﻿namespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  ///   Specifies the size of the background texture grid.\n  /// </summary>\n  public enum ImageBoxGridScale\n  {\n    /// <summary>\n    ///   Displays a solid color\n    /// </summary>\n    None,\n\n    /// <summary>\n    ///   Half of the default size.\n    /// </summary>\n    Tiny,\n\n    /// <summary>\n    ///   Default size.\n    /// </summary>\n    Small,\n\n    /// <summary>\n    ///   50% increase of default size.\n    /// </summary>\n    Medium,\n\n    /// <summary>\n    ///   100% increase of default size.\n    /// </summary>\n    Large\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxMouseWheelMessageFilter.cs",
    "content": "﻿using System;\nusing System.Drawing;\nusing System.Windows.Forms;\n#if USEWIN32PINVOKELIB\nusing Cyotek.Win32;\n#endif\n\n// Cyotek ImageBox\n// Copyright (c) 2010-2015 Cyotek Ltd.\n// http://cyotek.com\n// http://cyotek.com/blog/tag/imagebox\n\n// Licensed under the MIT License. See license.txt for the full text.\n\n// If you use this control in your applications, attribution, donations or contributions are welcome.\n\n// This code is derived from http://stackoverflow.com/a/13292894/148962 and http://stackoverflow.com/a/11034674/148962\n\nnamespace Cyotek.Windows.Forms\n{\n  /// <summary>\n  /// A message filter for WM_MOUSEWHEEL and WM_MOUSEHWHEEL. This class cannot be inherited.\n  /// </summary>\n  /// <seealso cref=\"T:System.Windows.Forms.IMessageFilter\"/>\n  internal sealed class ImageBoxMouseWheelMessageFilter : IMessageFilter\n  {\n    #region Member Declarations\n\n    private static ImageBoxMouseWheelMessageFilter _instance;\n\n    private static bool _active;\n\n    #endregion\n\n    #region Constructors\n\n    /// <summary>\n    /// Constructor that prevents a default instance of this class from being created.\n    /// </summary>\n    private ImageBoxMouseWheelMessageFilter()\n    { }\n\n    #endregion\n\n    #region Static Properties\n\n    /// <summary>\n    /// Gets or sets a value indicating whether the filter is active\n    /// </summary>\n    /// <value>\n    /// <c>true</c> if the message filter is active, <c>false</c> if not.\n    /// </value>\n    public static bool Active\n    {\n      get { return _active; }\n      set\n      {\n        if (_active != value)\n        {\n          _active = value;\n\n          if (_active)\n          {\n            if (_instance == null)\n            {\n              _instance = new ImageBoxMouseWheelMessageFilter();\n            }\n            Application.AddMessageFilter(_instance);\n          }\n          else\n          {\n            if (_instance != null)\n            {\n              Application.RemoveMessageFilter(_instance);\n            }\n          }\n        }\n      }\n    }\n\n    #endregion\n\n    #region IMessageFilter Interface\n\n    /// <summary>\n    /// Filters out a message before it is dispatched.\n    /// </summary>\n    /// <param name=\"m\">  [in,out] The message to be dispatched. You cannot modify this message. </param>\n    /// <returns>\n    /// <c>true</c> to filter the message and stop it from being dispatched; <c>false</c> to allow the message to\n    /// continue to the next filter or control.\n    /// </returns>\n    /// <seealso cref=\"M:System.Windows.Forms.IMessageFilter.PreFilterMessage(Message@)\"/>\n    bool IMessageFilter.PreFilterMessage(ref Message m)\n    {\n      bool result;\n\n      switch (m.Msg)\n      {\n        case NativeMethods.WM_MOUSEWHEEL: // 0x020A\n        case NativeMethods.WM_MOUSEHWHEEL: // 0x020E\n          IntPtr hControlUnderMouse;\n\n          hControlUnderMouse = NativeMethods.WindowFromPoint(new Point((int)m.LParam));\n          if (hControlUnderMouse == m.HWnd)\n          {\n            // already headed for the right control\n            result = false;\n          }\n          else\n          {\n            ImageBox control;\n\n            control = Control.FromHandle(hControlUnderMouse) as ImageBox;\n\n            if (control == null || !control.AllowUnfocusedMouseWheel)\n            {\n              // window under the mouse either isn't managed, isn't an imagebox,\n              // or it is an imagebox but the unfocused whell option is disabled.\n              // whatever the case, do not try and handle the message\n              result = false;\n            }\n            else\n            {\n              // redirect the message to the control under the mouse\n              NativeMethods.SendMessage(hControlUnderMouse, m.Msg, m.WParam, m.LParam);\n\n              // eat the message (otherwise it's possible two controls will scroll\n              // at the same time, which looks awful... and is probably confusing!)\n              result = true;\n            }\n          }\n          break;\n        default:\n          // not a message we can process, don't try and block it\n          result = false;\n          break;\n      }\n\n      return result;\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxMouseWheelMode.cs",
    "content": "namespace Cyotek.Windows.Forms\n{\n  /// <summary>\n  /// Specifies the way the mouse wheel is handled for the <see cref=\"ImageBox\"/> control.\n  /// </summary>\n  public enum ImageBoxMouseWheelMode\n  {\n    /// <summary>\n    /// Mouse wheel not handled\n    /// </summary>\n    None,\n\n    /// <summary>\n    /// Mouse wheel zooms\n    /// </summary>\n    Zoom,\n\n    /// <summary>\n    /// Mouse wheel scrolls vertically, Shift + mouse wheel scrolls horizontally and Ctrl + mouse wheel zooms\n    /// </summary>\n    ScrollAndZoom = 3\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxNativeMethods.cs",
    "content": "// Cyotek ImageBox\n// http://cyotek.com/blog/tag/imagebox\n\n// Copyright (c) 2010-2021 Cyotek Ltd.\n\n// This work is licensed under the MIT License.\n// See LICENSE.TXT for the full text\n\n// Found this code useful?\n// https://www.cyotek.com/contribute\n\nusing System;\nusing System.Drawing;\nusing System.Runtime.InteropServices;\n\n// ReSharper disable NotAccessedField.Global\n// ReSharper disable InconsistentNaming\n// ReSharper disable FieldCanBeMadeReadOnly.Global\n\nnamespace Cyotek.Windows.Forms\n{\n  // ReSharper disable ClassNeverInstantiated.Global\n  // ReSharper disable PartialTypeWithSinglePart\n  internal partial class NativeMethods // partial for when linking this file into other assemblies\n  // ReSharper restore PartialTypeWithSinglePart\n  // ReSharper restore ClassNeverInstantiated.Global\n  {\n    #region Enums\n\n    [Flags]\n    public enum SIF\n    {\n      SIF_RANGE = 0x0001,\n\n      SIF_PAGE = 0x0002,\n\n      SIF_POS = 0x0004,\n\n      SIF_DISABLENOSCROLL = 0x0008,\n\n      SIF_TRACKPOS = 0x0010,\n\n      SIF_ALL = SIF_PAGE | SIF_POS | SIF_RANGE | SIF_TRACKPOS\n    }\n\n    #endregion\n\n    #region Constants\n\n    public const int GWL_STYLE = (-16);\n\n    public const int SB_BOTH = 3;\n\n    public const int SB_BOTTOM = 7;\n\n    public const int SB_CTL = 2;\n\n    public const int SB_ENDSCROLL = 8;\n\n    public const int SB_HORZ = 0;\n\n    public const int SB_LEFT = 6;\n\n    public const int SB_LINEDOWN = 1;\n\n    public const int SB_LINELEFT = 0;\n\n    public const int SB_LINERIGHT = 1;\n\n    public const int SB_LINEUP = 0;\n\n    public const int SB_PAGEDOWN = 3;\n\n    public const int SB_PAGELEFT = 2;\n\n    public const int SB_PAGERIGHT = 3;\n\n    public const int SB_PAGEUP = 2;\n\n    public const int SB_RIGHT = 7;\n\n    public const int SB_THUMBPOSITION = 4;\n\n    public const int SB_THUMBTRACK = 5;\n\n    public const int SB_TOP = 6;\n\n    public const int SB_VERT = 1;\n\n    public const int WM_HSCROLL = 0x00000114;\n\n    public const int WM_VSCROLL = 0x00000115;\n\n    public const int WS_BORDER = 0x00800000;\n\n    public const int WS_EX_CLIENTEDGE = 0x200;\n\n    public const int WS_HSCROLL = 0x00100000;\n\n    public const int WS_VSCROLL = 0x00200000;\n\n    public const int WM_MOUSEWHEEL = 0x20a;\n\n    public const int WM_MOUSEHWHEEL = 0x20e;\n\n    #endregion\n\n    #region Private Constructors\n\n    private NativeMethods()\n    { }\n\n    #endregion\n\n    #region Class Members\n\n    [DllImport(\"user32.dll\", SetLastError = true)]\n    public static extern int GetScrollInfo(IntPtr hwnd, int bar, [MarshalAs(UnmanagedType.LPStruct)] SCROLLINFO scrollInfo);\n\n    [DllImport(\"kernel32.dll\")]\n    public static extern uint GetTickCount();\n\n    [DllImport(\"user32.dll\", SetLastError = true)]\n    public static extern uint GetWindowLong(IntPtr hwnd, int index);\n\n    [DllImport(\"user32.dll\")]\n    public static extern int SetScrollInfo(IntPtr hwnd, int bar, [MarshalAs(UnmanagedType.LPStruct)] SCROLLINFO scrollInfo, bool redraw);\n\n    [DllImport(\"user32.dll\")]\n    public static extern int SetWindowLong(IntPtr hwnd, int index, UInt32 newLong);\n\n    [DllImport(\"user32.dll\")]\n    public static extern IntPtr WindowFromPoint(Point point);\n\n    [DllImport(\"user32.dll\", SetLastError = false)]\n    public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);\n\n    #endregion\n\n    #region Nested Types\n\n    [StructLayout(LayoutKind.Sequential, Pack = 1)]\n    public class SCROLLINFO\n    {\n      public int cbSize;\n\n      public SIF fMask;\n\n      public int nMin;\n\n      public int nMax;\n\n      public int nPage;\n\n      public int nPos;\n\n      public int nTrackPos;\n\n      public SCROLLINFO()\n      {\n        cbSize = Marshal.SizeOf(this);\n        nPage = 0;\n        nMin = 0;\n        nMax = 0;\n        nPos = 0;\n        nTrackPos = 0;\n        fMask = 0;\n      }\n    }\n\n    #endregion\n  }\n\n  // ReSharper restore NotAccessedField.Global\n  // ReSharper restore FieldCanBeMadeReadOnly.Global\n  // ReSharper restore InconsistentNaming\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxPanDirection.cs",
    "content": "﻿namespace Cyotek.Windows.Forms\n{\n  internal enum ImageBoxPanDirection\n  {\n    None,\n\n    Up,\n\n    Down,\n\n    Left,\n\n    Right\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxPanMode.cs",
    "content": "﻿using System;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms\n{\n  /// <summary>\n  /// Specifies constants that define which mouse buttons can be used to pan an <see cref=\"ImageBox\"/> control.\n  /// </summary>\n  [Flags]\n  public enum ImageBoxPanMode\n  {\n    /// <summary>\n    /// No mouse buttons can be used to pan the control.\n    /// </summary>\n    None = 0,\n\n    /// <summary>\n    /// The left mouse button can be used to pan the control.\n    /// </summary>\n    Left = MouseButtons.Left,\n\n    /// <summary>\n    /// The middle mouse button can be used to pan the control.\n    /// </summary>\n    Middle = MouseButtons.Middle,\n\n    /// <summary>\n    /// Both the left and left mouse buttons can be used to pan the control.\n    /// </summary>\n    Both = Left | Middle\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxPanStyle.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Cyotek.Windows.Forms\n{\n  internal enum ImageBoxPanStyle\n  {\n    None,\n    Standard,\n    Free\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxSelectionMode.cs",
    "content": "﻿namespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  ///   Specifies the selection mode.\n  /// </summary>\n  public enum ImageBoxSelectionMode\n  {\n    /// <summary>\n    ///   No selection.\n    /// </summary>\n    None,\n\n    /// <summary>\n    ///   Rectangle selection.\n    /// </summary>\n    Rectangle,\n\n    /// <summary>\n    ///   Zoom selection.\n    /// </summary>\n    Zoom\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxSizeMode.cs",
    "content": "﻿namespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  /// Determines the sizing mode of an image hosted in an <see cref=\"ImageBox\" /> control.\n  /// </summary>\n  public enum ImageBoxSizeMode\n  {\n    /// <summary>\n    /// The image is disiplayed according to current zoom and scroll properties.\n    /// </summary>\n    Normal,\n\n    /// <summary>\n    /// The image is stretched to fill the client area of the control.\n    /// </summary>\n    Stretch,\n\n    /// <summary>\n    /// The image is stretched to fill as much of the client area of the control as possible, whilst retaining the same aspect ratio for the width and height.\n    /// </summary>\n    Fit\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxZoomActions.cs",
    "content": "﻿using System;\n\nnamespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  /// Describes the zoom action occuring\n  /// </summary>\n  [Flags]\n  public enum ImageBoxZoomActions\n  {\n    /// <summary>\n    /// No action.\n    /// </summary>\n    None = 0,\n\n    /// <summary>\n    /// The control is increasing the zoom.\n    /// </summary>\n    ZoomIn = 1,\n\n    /// <summary>\n    /// The control is decreasing the zoom.\n    /// </summary>\n    ZoomOut = 2,\n\n    /// <summary>\n    /// The control zoom was reset.\n    /// </summary>\n    ActualSize = 4\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ImageBoxZoomEventArgs.cs",
    "content": "﻿using System;\n\nnamespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  /// Contains event data for the <see cref=\"ImageBox.ZoomChanged\"/> event.\n  /// </summary>\n  public class ImageBoxZoomEventArgs : EventArgs\n  {\n    #region Public Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"ImageBoxZoomEventArgs\"/> class.\n    /// </summary>\n    /// <param name=\"actions\">The zoom operation being performed.</param>\n    /// <param name=\"source\">The source of the operation.</param>\n    /// <param name=\"oldZoom\">The old zoom level.</param>\n    /// <param name=\"newZoom\">The new zoom level.</param>\n    public ImageBoxZoomEventArgs(ImageBoxZoomActions actions, ImageBoxActionSources source, int oldZoom, int newZoom)\n      : this()\n    {\n      this.Actions = actions;\n      this.Source = source;\n      this.OldZoom = oldZoom;\n      this.NewZoom = newZoom;\n    }\n\n    #endregion\n\n    #region Protected Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"ImageBoxZoomEventArgs\"/> class.\n    /// </summary>\n    protected ImageBoxZoomEventArgs()\n    { }\n\n    #endregion\n\n    #region Public Properties\n\n    /// <summary>\n    /// Gets or sets the actions that occured.\n    /// </summary>\n    /// <value>The zoom operation.</value>\n    public ImageBoxZoomActions Actions { get; protected set; }\n\n    /// <summary>\n    /// Gets or sets the new zoom level.\n    /// </summary>\n    /// <value>The new zoom level.</value>\n    public int NewZoom { get; protected set; }\n\n    /// <summary>\n    /// Gets or sets the old zoom level.\n    /// </summary>\n    /// <value>The old zoom level.</value>\n    public int OldZoom { get; protected set; }\n\n    /// <summary>\n    /// Gets or sets the source of the operation..\n    /// </summary>\n    /// <value>The source.</value>\n    public ImageBoxActionSources Source { get; protected set; }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/Properties/AssemblyInfo.cs",
    "content": "using System;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\n\n// TODO: Next major version reset AssemblyVersion to ensure no strong name versioning nonsense\n\n[assembly: AssemblyTitle(\"Cyotek ImageBox Control\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"Cyotek Ltd\")]\n[assembly: AssemblyProduct(\"Cyotek ImageBox Control\")]\n[assembly: AssemblyCopyright(\"Copyright © 2010-2022 Cyotek Ltd.\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n[assembly: ComVisible(false)]\n[assembly: Guid(\"d812a438-008c-47f9-926f-8415490cdda1\")]\n[assembly: CLSCompliant(true)]\n[assembly: AssemblyVersion(\"1.2.0.0\")]\n[assembly: AssemblyFileVersion(\"1.4.0.0\")]\n[assembly: AssemblyInformationalVersion(\"1.4.0\")]\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ScrollControl.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Windows.Forms;\n#if USEWIN32PINVOKELIB\nusing Cyotek.Win32;\n\n#endif\n\n// Original ScrollControl code by Scott Crawford (http://sukiware.com/)\n\nnamespace Cyotek.Windows.Forms\n{\n  /// <summary>\n  /// Defines a base class for controls that support scrolling behavior.\n  /// </summary>\n  [ToolboxItem(false)]\n  public partial class ScrollControl : Control\n  {\n    #region Instance Fields\n\n    private bool _alwaysShowHScroll;\n\n    private bool _alwaysShowVScroll;\n\n    private BorderStyle _borderStyle;\n\n    private Size _pageSize;\n\n    private Size _scrollSize;\n\n    private Size _stepSize;\n\n    #endregion\n\n    #region Public Constructors\n\n    /// <summary>\n    ///   Initializes a new instance of the <see cref=\"ScrollControl\" /> class.\n    /// </summary>\n    public ScrollControl()\n    {\n      // ReSharper disable DoNotCallOverridableMethodsInConstructor\n      this.BorderStyle = BorderStyle.Fixed3D;\n      this.ScrollSize = Size.Empty;\n      this.PageSize = Size.Empty;\n      this.StepSize = new Size(10, 10);\n      this.HorizontalScroll = new HScrollProperties(this);\n      this.VerticalScroll = new VScrollProperties(this);\n      // ReSharper restore DoNotCallOverridableMethodsInConstructor\n    }\n\n    #endregion\n\n    #region Events\n\n    /// <summary>\n    ///   Occurs when the BorderStyle property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler BorderStyleChanged;\n\n    /// <summary>\n    /// Occurs when the mouse wheel moves while the control has focus.\n    /// </summary>\n    [Browsable(true)]\n    [EditorBrowsable(EditorBrowsableState.Always)]\n    [Category(\"Mouse\")]\n    public new event MouseEventHandler MouseWheel;\n\n    /// <summary>\n    ///   Occurs when the PageSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler PageSizeChanged;\n\n    /// <summary>\n    ///   Occurs when the user or code scrolls through the client area.\n    /// </summary>\n    [Category(\"Action\")]\n    public event ScrollEventHandler Scroll;\n\n    /// <summary>\n    ///   Occurs when the ScrollSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler ScrollSizeChanged;\n\n    /// <summary>\n    ///   Occurs when the StepSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler StepSizeChanged;\n\n    #endregion\n\n    #region Overridden Properties\n\n    /// <summary>\n    ///   Gets the required creation parameters when the control handle is created.\n    /// </summary>\n    /// <value>The create params.</value>\n    /// <returns>\n    ///   A <see cref=\"T:System.Windows.Forms.CreateParams\" /> that contains the required creation parameters when the handle to the control is created.\n    /// </returns>\n    protected override CreateParams CreateParams\n    {\n      get\n      {\n        CreateParams createParams;\n\n        createParams = base.CreateParams;\n\n        switch (_borderStyle)\n        {\n          case BorderStyle.FixedSingle:\n            createParams.Style |= NativeMethods.WS_BORDER;\n            break;\n\n          case BorderStyle.Fixed3D:\n            createParams.ExStyle |= NativeMethods.WS_EX_CLIENTEDGE;\n            break;\n        }\n\n        return createParams;\n      }\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.EnabledChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnEnabledChanged(EventArgs e)\n    {\n      base.OnEnabledChanged(e);\n\n      this.UpdateScrollbars();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseDown\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseDown(MouseEventArgs e)\n    {\n      base.OnMouseDown(e);\n\n      if (!this.Focused)\n      {\n        this.Focus();\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseWheel\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseWheel(MouseEventArgs e)\n    {\n      MouseEventHandler handler;\n\n      if (this.WheelScrollsControl)\n      {\n        int x;\n        int y;\n        int delta;\n\n        x = this.HorizontalScroll.Value;\n        y = this.VerticalScroll.Value;\n\n        // TODO: Find if we are hovering over a horizontal scrollbar and scroll that instead of the default vertical.\n        if (this.VerticalScroll.Visible && this.VerticalScroll.Enabled)\n        {\n          if (ModifierKeys == Keys.Control)\n          {\n            delta = this.VerticalScroll.LargeChange;\n          }\n          else\n          {\n            delta = SystemInformation.MouseWheelScrollLines * this.VerticalScroll.SmallChange;\n          }\n\n          y += (e.Delta > 0) ? -delta : delta;\n        }\n        else if (this.HorizontalScroll.Visible && this.HorizontalScroll.Enabled)\n        {\n          if (ModifierKeys == Keys.Control)\n          {\n            delta = this.HorizontalScroll.LargeChange;\n          }\n          else\n          {\n            delta = SystemInformation.MouseWheelScrollLines * this.HorizontalScroll.SmallChange;\n          }\n\n          x += (e.Delta > 0) ? -delta : delta;\n        }\n\n        this.ScrollTo(x, y);\n      }\n\n      handler = this.MouseWheel;\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n\n      base.OnMouseWheel(e);\n    }\n\n    /// <summary>\n    ///   Processes Windows messages.\n    /// </summary>\n    /// <param name=\"msg\">\n    ///   The Windows <see cref=\"T:System.Windows.Forms.Message\" /> to process.\n    /// </param>\n    [DebuggerStepThrough]\n    protected override void WndProc(ref Message msg)\n    {\n      switch (msg.Msg)\n      {\n        case NativeMethods.WM_HSCROLL:\n        case NativeMethods.WM_VSCROLL:\n          this.WmScroll(ref msg);\n          break;\n        default:\n          base.WndProc(ref msg);\n          break;\n      }\n    }\n\n    #endregion\n\n    #region Public Properties\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the horizontal scrollbar should always be displayed, even when not required.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the horizontal scrollbar should always be displayed; otherwise, <c>false</c>.\n    /// </value>\n    [Category(\"Layout\")]\n    [DefaultValue(false)]\n    public bool AlwaysShowHScroll\n    {\n      get { return _alwaysShowHScroll; }\n      set\n      {\n        if (_alwaysShowHScroll != value)\n        {\n          _alwaysShowHScroll = value;\n\n          if (value)\n          {\n            NativeMethods.SCROLLINFO scrollInfo;\n\n            scrollInfo = new NativeMethods.SCROLLINFO();\n            scrollInfo.fMask = NativeMethods.SIF.SIF_RANGE | NativeMethods.SIF.SIF_DISABLENOSCROLL;\n            scrollInfo.nMin = 0;\n            scrollInfo.nMax = 0;\n            scrollInfo.nPage = 1;\n            this.SetScrollInfo(ScrollOrientation.HorizontalScroll, scrollInfo, false);\n\n            this.Invalidate();\n          }\n          else\n          {\n            this.UpdateHorizontalScrollbar();\n          }\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the vertical scrollbar should always be displayed, even when not required.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the vertical scrollbar should always be displayed; otherwise, <c>false</c>.\n    /// </value>\n    [Category(\"Layout\")]\n    [DefaultValue(false)]\n    public bool AlwaysShowVScroll\n    {\n      get { return _alwaysShowVScroll; }\n      set\n      {\n        bool shown = VScroll;\n\n        _alwaysShowVScroll = value;\n        if (_alwaysShowVScroll != shown)\n        {\n          if (_alwaysShowVScroll)\n          {\n            NativeMethods.SCROLLINFO scrollInfo;\n\n            scrollInfo = new NativeMethods.SCROLLINFO();\n\n            scrollInfo.fMask = NativeMethods.SIF.SIF_RANGE | NativeMethods.SIF.SIF_DISABLENOSCROLL;\n            scrollInfo.nMin = 0;\n            scrollInfo.nMax = 0;\n            scrollInfo.nPage = 1;\n            this.SetScrollInfo(ScrollOrientation.VerticalScroll, scrollInfo, false);\n\n            this.Invalidate();\n          }\n          else\n          {\n            this.UpdateVerticalScrollbar();\n          }\n        }\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the border style.\n    /// </summary>\n    /// <value>The border style.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(BorderStyle), \"Fixed3D\")]\n    public virtual BorderStyle BorderStyle\n    {\n      get { return _borderStyle; }\n      set\n      {\n        if (this.BorderStyle != value)\n        {\n          _borderStyle = value;\n\n          this.OnBorderStyleChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets the horizontal scrollbar properties.\n    /// </summary>\n    /// <value>The horizontal scrollbar properties.</value>\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    [Browsable(false)]\n    public HScrollProperties HorizontalScroll { get; protected set; }\n\n    /// <summary>\n    ///   Gets or sets the size of the scroll pages.\n    /// </summary>\n    /// <value>The size of the page.</value>\n    /// <exception cref=\"System.ArgumentOutOfRangeException\"></exception>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public virtual Size PageSize\n    {\n      get { return _pageSize; }\n      set\n      {\n        if (value.Width < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Width must be a positive integer.\");\n        }\n\n        if (value.Height < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Height must be a positive integer.\");\n        }\n\n        if (this.PageSize != value)\n        {\n          _pageSize = value;\n\n          this.OnPageSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the size of the scroll area.\n    /// </summary>\n    /// <value>The size of the scroll.</value>\n    /// <exception cref=\"System.ArgumentOutOfRangeException\"></exception>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public virtual Size ScrollSize\n    {\n      get { return _scrollSize; }\n      set\n      {\n        if (value.Width < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Width must be a positive integer.\");\n        }\n\n        if (value.Height < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Height must be a positive integer.\");\n        }\n\n        if (this.ScrollSize != value)\n        {\n          _scrollSize = value;\n\n          this.OnScrollSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the size of scrollbar stepping.\n    /// </summary>\n    /// <value>The size of the step.</value>\n    /// <exception cref=\"System.ArgumentOutOfRangeException\"></exception>\n    [Category(\"Layout\")]\n    [DefaultValue(typeof(Size), \"10, 10\")]\n    public virtual Size StepSize\n    {\n      get { return _stepSize; }\n      set\n      {\n        if (value.Width < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Width must be a positive integer.\");\n        }\n\n        if (value.Height < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Height must be a positive integer.\");\n        }\n\n        if (this.StepSize != value)\n        {\n          _stepSize = value;\n\n          this.OnStepSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets the vertical scrollbar properties.\n    /// </summary>\n    /// <value>The vertical scrollbar properties.</value>\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    [Browsable(false)]\n    public VScrollProperties VerticalScroll { get; protected set; }\n\n    #endregion\n\n    #region Protected Properties\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the horizontal scrollbar is displayed\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the horizontal scrollbar is displayed; otherwise, <c>false</c>.\n    /// </value>\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    [Browsable(false)]\n    protected bool HScroll\n    {\n      get { return (NativeMethods.GetWindowLong(this.Handle, NativeMethods.GWL_STYLE) & NativeMethods.WS_HSCROLL) == NativeMethods.WS_HSCROLL; }\n      set\n      {\n        uint longValue = NativeMethods.GetWindowLong(this.Handle, NativeMethods.GWL_STYLE);\n\n        if (value)\n        {\n          longValue |= NativeMethods.WS_HSCROLL;\n        }\n        else\n        {\n          unchecked\n          {\n            longValue &= (uint)~NativeMethods.WS_HSCROLL;\n          }\n        }\n        NativeMethods.SetWindowLong(this.Handle, NativeMethods.GWL_STYLE, longValue);\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the vertical scrollbar is displayed\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the vertical scrollbar is displayed; otherwise, <c>false</c>.\n    /// </value>\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    [Browsable(false)]\n    protected bool VScroll\n    {\n      get { return (NativeMethods.GetWindowLong(this.Handle, NativeMethods.GWL_STYLE) & NativeMethods.WS_VSCROLL) == NativeMethods.WS_VSCROLL; }\n      set\n      {\n        uint longValue = NativeMethods.GetWindowLong(this.Handle, NativeMethods.GWL_STYLE);\n\n        if (value)\n        {\n          longValue |= NativeMethods.WS_VSCROLL;\n        }\n        else\n        {\n          unchecked\n          {\n            longValue &= (uint)~NativeMethods.WS_VSCROLL;\n          }\n        }\n        NativeMethods.SetWindowLong(this.Handle, NativeMethods.GWL_STYLE, longValue);\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the control is scrolled when the mouse wheel is spun\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the mouse wheel scrolls the control; otherwise, <c>false</c>.\n    /// </value>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    protected bool WheelScrollsControl { get; set; }\n\n    #endregion\n\n    #region Public Members\n\n    /// <summary>\n    ///   Scrolls both scrollbars to the given values\n    /// </summary>\n    /// <param name=\"x\">The x.</param>\n    /// <param name=\"y\">The y.</param>\n    public void ScrollTo(int x, int y)\n    {\n      this.ScrollTo(ScrollOrientation.HorizontalScroll, x);\n      this.ScrollTo(ScrollOrientation.VerticalScroll, y);\n    }\n\n    #endregion\n\n    #region Protected Members\n\n    /// <summary>\n    ///   Gets the type of scrollbar event.\n    /// </summary>\n    /// <param name=\"wParam\">The wparam value from a window proc.</param>\n    /// <returns></returns>\n    /// <exception cref=\"System.ArgumentException\"></exception>\n    protected ScrollEventType GetEventType(IntPtr wParam)\n    {\n      switch (wParam.ToInt32() & 0xFFFF)\n      {\n        case NativeMethods.SB_BOTTOM:\n          return ScrollEventType.Last;\n        case NativeMethods.SB_ENDSCROLL:\n          return ScrollEventType.EndScroll;\n        case NativeMethods.SB_LINEDOWN:\n          return ScrollEventType.SmallIncrement;\n        case NativeMethods.SB_LINEUP:\n          return ScrollEventType.SmallDecrement;\n        case NativeMethods.SB_PAGEDOWN:\n          return ScrollEventType.LargeIncrement;\n        case NativeMethods.SB_PAGEUP:\n          return ScrollEventType.LargeDecrement;\n        case NativeMethods.SB_THUMBPOSITION:\n          return ScrollEventType.ThumbPosition;\n        case NativeMethods.SB_THUMBTRACK:\n          return ScrollEventType.ThumbTrack;\n        case NativeMethods.SB_TOP:\n          return ScrollEventType.First;\n        default:\n          throw new ArgumentException(string.Format(\"{0} isn't a valid scroll event type.\", wParam), \"wparam\");\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"BorderStyleChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnBorderStyleChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      base.UpdateStyles();\n\n      handler = this.BorderStyleChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"PageSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnPageSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.UpdateScrollbars();\n\n      handler = this.PageSizeChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"Scroll\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"ScrollEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnScroll(ScrollEventArgs e)\n    {\n      ScrollEventHandler handler;\n\n      this.UpdateHorizontalScroll();\n      this.UpdateVerticalScroll();\n\n      handler = this.Scroll;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ScrollSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnScrollSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.UpdateScrollbars();\n\n      handler = this.ScrollSizeChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"StepSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnStepSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = this.StepSizeChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Set the given scrollbar's tracking position to the specified value\n    /// </summary>\n    /// <param name=\"scrollbar\">The scrollbar.</param>\n    /// <param name=\"value\">The value.</param>\n    protected virtual void ScrollTo(ScrollOrientation scrollbar, int value)\n    {\n      NativeMethods.SCROLLINFO oldInfo;\n\n      oldInfo = this.GetScrollInfo(scrollbar);\n\n      if (value > ((oldInfo.nMax - oldInfo.nMin) + 1) - oldInfo.nPage)\n      {\n        value = ((oldInfo.nMax - oldInfo.nMin) + 1) - oldInfo.nPage;\n      }\n      if (value < oldInfo.nMin)\n      {\n        value = oldInfo.nMin;\n      }\n\n      if (oldInfo.nPos != value)\n      {\n        NativeMethods.SCROLLINFO scrollInfo;\n\n        scrollInfo = new NativeMethods.SCROLLINFO();\n        scrollInfo.fMask = NativeMethods.SIF.SIF_POS;\n        scrollInfo.nPos = value;\n        this.SetScrollInfo(scrollbar, scrollInfo, true);\n\n        this.OnScroll(new ScrollEventArgs(ScrollEventType.ThumbPosition, oldInfo.nPos, value, scrollbar));\n      }\n    }\n\n    /// <summary>\n    ///   Updates the properties of the horizontal scrollbar.\n    /// </summary>\n    protected virtual void UpdateHorizontalScroll()\n    {\n      NativeMethods.SCROLLINFO scrollInfo;\n\n      scrollInfo = this.GetScrollInfo(ScrollOrientation.HorizontalScroll);\n\n      this.HorizontalScroll.Enabled = this.Enabled;\n      this.HorizontalScroll.LargeChange = scrollInfo.nPage;\n      this.HorizontalScroll.Maximum = scrollInfo.nMax;\n      this.HorizontalScroll.Minimum = scrollInfo.nMin;\n      this.HorizontalScroll.SmallChange = this.StepSize.Width;\n      this.HorizontalScroll.Value = scrollInfo.nPos;\n      this.HorizontalScroll.Visible = true;\n    }\n\n    /// <summary>\n    /// Updates the horizontal scrollbar.\n    /// </summary>\n    protected virtual void UpdateHorizontalScrollbar()\n    {\n      NativeMethods.SCROLLINFO scrollInfo;\n      int scrollWidth;\n      int pageWidth;\n\n      scrollWidth = this.ScrollSize.Width - 1;\n      pageWidth = this.PageSize.Width;\n\n      if (scrollWidth < 1)\n      {\n        scrollWidth = 0;\n        pageWidth = 1;\n      }\n\n      scrollInfo = new NativeMethods.SCROLLINFO();\n      scrollInfo.fMask = NativeMethods.SIF.SIF_PAGE | NativeMethods.SIF.SIF_RANGE;\n      if (this.AlwaysShowHScroll || !this.Enabled)\n      {\n        scrollInfo.fMask |= NativeMethods.SIF.SIF_DISABLENOSCROLL;\n      }\n      scrollInfo.nMin = 0;\n      scrollInfo.nMax = scrollWidth;\n      scrollInfo.nPage = pageWidth;\n\n      this.SetScrollInfo(ScrollOrientation.HorizontalScroll, scrollInfo, true);\n    }\n\n    /// <summary>\n    ///   Updates the scrollbars.\n    /// </summary>\n    protected void UpdateScrollbars()\n    {\n      this.UpdateHorizontalScrollbar();\n      this.UpdateVerticalScrollbar();\n    }\n\n    /// <summary>\n    ///   Updates the properties of the vertical scrollbar.\n    /// </summary>\n    protected virtual void UpdateVerticalScroll()\n    {\n      NativeMethods.SCROLLINFO scrollInfo;\n\n      scrollInfo = this.GetScrollInfo(ScrollOrientation.VerticalScroll);\n\n      this.VerticalScroll.Enabled = this.Enabled;\n      this.VerticalScroll.LargeChange = scrollInfo.nPage;\n      this.VerticalScroll.Maximum = scrollInfo.nMax;\n      this.VerticalScroll.Minimum = scrollInfo.nMin;\n      this.VerticalScroll.SmallChange = this.StepSize.Height;\n      this.VerticalScroll.Value = scrollInfo.nPos;\n      this.VerticalScroll.Visible = true;\n    }\n\n    /// <summary>\n    /// Updates the vertical scrollbar.\n    /// </summary>\n    protected virtual void UpdateVerticalScrollbar()\n    {\n      NativeMethods.SCROLLINFO scrollInfo;\n      int scrollHeight;\n      int pageHeight;\n\n      scrollHeight = this.ScrollSize.Height - 1;\n      pageHeight = this.PageSize.Height;\n\n      if (scrollHeight < 1)\n      {\n        scrollHeight = 0;\n        pageHeight = 1;\n      }\n\n      scrollInfo = new NativeMethods.SCROLLINFO();\n      scrollInfo.fMask = NativeMethods.SIF.SIF_PAGE | NativeMethods.SIF.SIF_RANGE;\n      if (AlwaysShowVScroll)\n      {\n        scrollInfo.fMask |= NativeMethods.SIF.SIF_DISABLENOSCROLL;\n      }\n      scrollInfo.nMin = 0;\n      scrollInfo.nMax = scrollHeight;\n      scrollInfo.nPage = pageHeight;\n\n      this.SetScrollInfo(ScrollOrientation.VerticalScroll, scrollInfo, true);\n    }\n\n    /// <summary>\n    ///   Processes the WM_HSCROLL and WM_VSCROLL Windows messages.\n    /// </summary>\n    /// <param name=\"msg\">\n    ///   The Windows <see cref=\"T:System.Windows.Forms.Message\" /> to process.\n    /// </param>\n    protected virtual void WmScroll(ref Message msg)\n    {\n      ScrollOrientation scrollbar;\n      int oldValue;\n      int newValue;\n      ScrollEventType eventType;\n\n      eventType = this.GetEventType(msg.WParam);\n      scrollbar = msg.Msg == NativeMethods.WM_HSCROLL ? ScrollOrientation.HorizontalScroll : ScrollOrientation.VerticalScroll;\n\n      if (eventType != ScrollEventType.EndScroll)\n      {\n        int step;\n        NativeMethods.SCROLLINFO scrollInfo;\n\n        step = scrollbar == ScrollOrientation.HorizontalScroll ? this.StepSize.Width : this.StepSize.Height;\n\n        scrollInfo = this.GetScrollInfo(scrollbar);\n        scrollInfo.fMask = NativeMethods.SIF.SIF_POS;\n        oldValue = scrollInfo.nPos;\n\n        switch (eventType)\n        {\n          case ScrollEventType.ThumbPosition:\n          case ScrollEventType.ThumbTrack:\n            scrollInfo.nPos = scrollInfo.nTrackPos;\n            break;\n\n          case ScrollEventType.SmallDecrement:\n            scrollInfo.nPos = oldValue - step;\n            break;\n\n          case ScrollEventType.SmallIncrement:\n            scrollInfo.nPos = oldValue + step;\n            break;\n\n          case ScrollEventType.LargeDecrement:\n            scrollInfo.nPos = oldValue - scrollInfo.nPage;\n            break;\n\n          case ScrollEventType.LargeIncrement:\n            scrollInfo.nPos = oldValue + scrollInfo.nPage;\n            break;\n\n          case ScrollEventType.First:\n            scrollInfo.nPos = scrollInfo.nMin;\n            break;\n\n          case ScrollEventType.Last:\n            scrollInfo.nPos = scrollInfo.nMax;\n            break;\n          default:\n            Debug.Assert(false, string.Format(\"Unknown scroll event type {0}\", eventType));\n            break;\n        }\n\n        if (scrollInfo.nPos > ((scrollInfo.nMax - scrollInfo.nMin) + 1) - scrollInfo.nPage)\n        {\n          scrollInfo.nPos = ((scrollInfo.nMax - scrollInfo.nMin) + 1) - scrollInfo.nPage;\n        }\n\n        if (scrollInfo.nPos < scrollInfo.nMin)\n        {\n          scrollInfo.nPos = scrollInfo.nMin;\n        }\n\n        newValue = scrollInfo.nPos;\n        this.SetScrollInfo(scrollbar, scrollInfo, true);\n      }\n      else\n      {\n        oldValue = 0;\n        newValue = 0;\n      }\n\n      this.OnScroll(new ScrollEventArgs(eventType, oldValue, newValue, scrollbar));\n    }\n\n    #endregion\n\n    #region Private Members\n\n    /// <summary>\n    ///   Gets scrollbar properties\n    /// </summary>\n    /// <param name=\"scrollbar\">The bar.</param>\n    /// <returns></returns>\n    private NativeMethods.SCROLLINFO GetScrollInfo(ScrollOrientation scrollbar)\n    {\n      NativeMethods.SCROLLINFO info;\n\n      info = new NativeMethods.SCROLLINFO();\n      info.fMask = NativeMethods.SIF.SIF_ALL;\n\n      NativeMethods.GetScrollInfo(this.Handle, (int)scrollbar, info);\n\n      return info;\n    }\n\n    /// <summary>\n    ///   Sets scrollbar properties.\n    /// </summary>\n    /// <param name=\"scrollbar\">The scrollbar.</param>\n    /// <param name=\"scrollInfo\">The scrollbar properties.</param>\n    /// <param name=\"refresh\">\n    ///   if set to <c>true</c> the scrollbar will be repainted.\n    /// </param>\n    /// <returns></returns>\n    // ReSharper disable UnusedMethodReturnValue.Local\n    private int SetScrollInfo(ScrollOrientation scrollbar, NativeMethods.SCROLLINFO scrollInfo, bool refresh) // ReSharper restore UnusedMethodReturnValue.Local\n    {\n      return NativeMethods.SetScrollInfo(this.Handle, (int)scrollbar, scrollInfo, refresh);\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ScrollProperties.cs",
    "content": "﻿using System.ComponentModel;\n\n// Original ScrollControl code by Scott Crawford (http://sukiware.com/)\n\nnamespace Cyotek.Windows.Forms\n{\n  partial class ScrollControl\n  {\n    #region Nested Types\n\n    /// <summary>\n    /// Provides basic properties for the horizontal scroll bar in a <see cref=\"ScrollControl\"/>.\n    /// </summary>\n    public class HScrollProperties : ScrollProperties\n    {\n      #region Public Constructors\n\n      /// <summary>\n      /// Initializes a new instance of the <see cref=\"ScrollProperties\" /> class.\n      /// </summary>\n      /// <param name=\"container\">The <see cref=\"ScrollControl\" /> whose scrolling properties this object describes.</param>\n      public HScrollProperties(ScrollControl container)\n        : base(container)\n      { }\n\n      #endregion\n    }\n\n    /// <summary>\n    /// Encapsulates properties related to scrolling.\n    /// </summary>\n    public abstract class ScrollProperties\n    {\n      #region Instance Fields\n\n      private readonly ScrollControl _container;\n\n      #endregion\n\n      #region Protected Constructors\n\n      /// <summary>\n      /// Initializes a new instance of the <see cref=\"ScrollProperties\"/> class.\n      /// </summary>\n      /// <param name=\"container\">The <see cref=\"ScrollControl\"/> whose scrolling properties this object describes.</param>\n      protected ScrollProperties(ScrollControl container)\n      {\n        //System.Windows.Forms.ScrollProperties\n        _container = container;\n      }\n\n      #endregion\n\n      #region Public Properties\n\n      /// <summary>\n      /// Gets or sets whether the scroll bar can be used on the container.\n      /// </summary>\n      /// <value><c>true</c> if the scroll bar can be used; otherwise, <c>false</c>.</value>\n      [DefaultValue(true)]\n      public bool Enabled { get; set; }\n\n      /// <summary>\n      /// Gets or sets the distance to move a scroll bar in response to a large scroll command.\n      /// </summary>\n      /// <value>An <see cref=\"int\"/> describing how far, in pixels, to move the scroll bar in response to a large change.</value>\n      [DefaultValue(10)]\n      public int LargeChange { get; set; }\n\n      /// <summary>\n      /// Gets or sets the upper limit of the scrollable range.\n      /// </summary>\n      /// <value>An <see cref=\"int\"/> representing the maximum range of the scroll bar.</value>\n      [DefaultValue(100)]\n      public int Maximum { get; set; }\n\n      /// <summary>\n      /// Gets or sets the lower limit of the scrollable range.\n      /// </summary>\n      /// <value>An <see cref=\"int\"/> representing the lower range of the scroll bar.</value>\n      [DefaultValue(0)]\n      public int Minimum { get; set; }\n\n      /// <summary>\n      /// Gets the control to which this scroll information applies.\n      /// </summary>\n      /// <value>A <see cref=\"ScrollControl\"/>.</value>\n      public ScrollControl ParentControl\n      {\n        get { return _container; }\n      }\n\n      /// <summary>\n      /// Gets or sets the distance to move a scroll bar in response to a small scroll command.\n      /// </summary>\n      /// <value>An <see cref=\"int\"/> representing how far, in pixels, to move the scroll bar.</value>\n      [DefaultValue(1)]\n      public int SmallChange { get; set; }\n\n      /// <summary>\n      /// Gets or sets a numeric value that represents the current position of the scroll bar box.\n      /// </summary>\n      /// <value>An <see cref=\"int\"/> representing the position of the scroll bar box, in pixels. </value>\n      [Bindable(true)]\n      [DefaultValue(0)]\n      public int Value { get; set; }\n\n      /// <summary>\n      /// Gets or sets whether the scroll bar can be seen by the user.\n      /// </summary>\n      /// <value><c>true</c> if it can be seen; otherwise, <c>false</c>.</value>\n      [DefaultValue(false)]\n      public bool Visible { get; set; }\n\n      #endregion\n    }\n\n    /// <summary>\n    /// Provides basic properties for the vertical scroll bar in a <see cref=\"ScrollControl\"/>.\n    /// </summary>\n    public class VScrollProperties : ScrollProperties\n    {\n      #region Public Constructors\n\n      /// <summary>\n      /// Initializes a new instance of the <see cref=\"ScrollProperties\" /> class.\n      /// </summary>\n      /// <param name=\"container\">The <see cref=\"ScrollControl\" /> whose scrolling properties this object describes.</param>\n      public VScrollProperties(ScrollControl container)\n        : base(container)\n      { }\n\n      #endregion\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/VirtualScrollableControl.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Windows.Forms;\n\n// Original VirtualScrollableControl code by Scott Crawford (http://sukiware.com/)\n\nnamespace Cyotek.Windows.Forms\n{\n  /// <summary>\n  /// Defines a base class for controls that support auto-scrolling behavior.\n  /// </summary>\n  [ToolboxItem(false)]\n  public class VirtualScrollableControl : ScrollControl\n  {\n    #region Instance Fields\n\n    private bool _autoScroll;\n\n    private Size _autoScrollMargin;\n\n    private Size _autoScrollMinSize;\n\n    private Point _autoScrollPosition;\n\n    #endregion\n\n    #region Public Constructors\n\n    /// <summary>\n    ///   Initializes a new instance of the <see cref=\"VirtualScrollableControl\" /> class.\n    /// </summary>\n    public VirtualScrollableControl()\n    {\n      this.AutoScrollMargin = Size.Empty;\n      this.AutoScrollMinSize = Size.Empty;\n      this.AutoScrollPosition = Point.Empty;\n      this.AutoScroll = true;\n\n      base.SetStyle(ControlStyles.ContainerControl, true);\n    }\n\n    #endregion\n\n    #region Events\n\n    /// <summary>\n    ///   Occurs when the AutoScroll property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AutoScrollChanged;\n\n    /// <summary>\n    ///   Occurs when the AutoScrollMargin property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AutoScrollMarginChanged;\n\n    /// <summary>\n    ///   Occurs when the AutoScrollMinSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AutoScrollMinSizeChanged;\n\n    /// <summary>\n    ///   Occurs when the AutoScrollPosition property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler AutoScrollPositionChanged;\n\n    #endregion\n\n    #region Overridden Methods\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.Resize\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnResize(EventArgs e)\n    {\n      base.OnResize(e);\n\n      this.AdjustScrollbars();\n\n      if (this.AutoScroll && !this.AutoScrollPosition.IsEmpty)\n      {\n        int xOffset;\n        int yOffset;\n        Rectangle scrollArea;\n\n        scrollArea = this.ScrollArea;\n        xOffset = scrollArea.Right - this.DisplayRectangle.Right;\n        yOffset = scrollArea.Bottom - this.DisplayRectangle.Bottom;\n\n        if (this.AutoScrollPosition.Y < 0 && yOffset < 0)\n        {\n          yOffset = Math.Max(yOffset, this.AutoScrollPosition.Y);\n        }\n        else\n        {\n          yOffset = 0;\n        }\n\n        if (this.AutoScrollPosition.X < 0 && xOffset < 0)\n        {\n          xOffset = Math.Max(xOffset, this.AutoScrollPosition.X);\n        }\n        else\n        {\n          xOffset = 0;\n        }\n\n        this.ScrollByOffset(new Size(xOffset, yOffset));\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ScrollControl.Scroll\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"ScrollEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected override void OnScroll(ScrollEventArgs e)\n    {\n      if (e.Type != ScrollEventType.EndScroll)\n      {\n        switch (e.ScrollOrientation)\n        {\n          case ScrollOrientation.HorizontalScroll:\n            this.ScrollByOffset(new Size(e.NewValue + this.AutoScrollPosition.X, 0));\n            break;\n          case ScrollOrientation.VerticalScroll:\n            this.ScrollByOffset(new Size(0, e.NewValue + this.AutoScrollPosition.Y));\n            break;\n        }\n      }\n\n      base.OnScroll(e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.VisibleChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnVisibleChanged(EventArgs e)\n    {\n      if (base.Visible)\n      {\n        base.PerformLayout();\n      }\n\n      base.OnVisibleChanged(e);\n    }\n\n    #endregion\n\n    #region Public Properties\n\n    /// <summary>\n    ///   Gets or sets a value indicating whether the container enables the user to scroll to any controls placed outside of its visible boundaries.\n    /// </summary>\n    /// <value>\n    ///   <c>true</c> if the container enables auto-scrolling; otherwise, <c>false</c>.\n    /// </value>\n    [Category(\"Layout\")]\n    [DefaultValue(true)]\n    public virtual bool AutoScroll\n    {\n      get { return _autoScroll; }\n      set\n      {\n        if (this.AutoScroll != value)\n        {\n          _autoScroll = value;\n\n          this.OnAutoScrollChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the size of the auto-scroll margin.\n    /// </summary>\n    /// <value>\n    ///   A <see cref=\"T:System.Drawing.Size\" /> that represents the height and width of the auto-scroll margin in pixels.\n    /// </value>\n    /// <exception cref=\"System.ArgumentOutOfRangeException\"></exception>\n    [Category(\"Layout\")]\n    [DefaultValue(typeof(Size), \"0, 0\")]\n    public virtual Size AutoScrollMargin\n    {\n      get { return _autoScrollMargin; }\n      set\n      {\n        if (value.Width < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Width must be a positive integer.\");\n        }\n        else if (value.Height < 0)\n        {\n          throw new ArgumentOutOfRangeException(nameof(value), \"Height must be a positive integer.\");\n        }\n\n        if (this.AutoScrollMargin != value)\n        {\n          _autoScrollMargin = value;\n\n          this.OnAutoScrollMarginChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the minimum size of the auto-scroll.\n    /// </summary>\n    /// <value>\n    ///   A <see cref=\"T:System.Drawing.Size\" /> that determines the minimum size of the virtual area through which the user can scroll.\n    /// </value>\n    [Category(\"Layout\")]\n    [DefaultValue(typeof(Size), \"0, 0\")]\n    public virtual Size AutoScrollMinSize\n    {\n      get { return _autoScrollMinSize; }\n      set\n      {\n        if (this.AutoScrollMinSize != value)\n        {\n          _autoScrollMinSize = value;\n\n          this.OnAutoScrollMinSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Gets or sets the location of the auto-scroll position.\n    /// </summary>\n    /// <value>\n    ///   A <see cref=\"T:System.Drawing.Point\" /> that represents the auto-scroll position in pixels.\n    /// </value>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public virtual Point AutoScrollPosition\n    {\n      get { return _autoScrollPosition; }\n      set\n      {\n        Point translated;\n\n        translated = this.AdjustPositionToSize(new Point(-value.X, -value.Y));\n\n        if (this.AutoScrollPosition != translated)\n        {\n          this.ScrollByOffset(new Size(_autoScrollPosition.X - translated.X, _autoScrollPosition.Y - translated.Y));\n          _autoScrollPosition = translated;\n\n          this.OnAutoScrollPositionChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    #endregion\n\n    #region Protected Properties\n\n    /// <summary>\n    ///   Total area of all visible controls which are scrolled with this container\n    /// </summary>\n    protected Rectangle ScrollArea\n    {\n      get\n      {\n        Rectangle area;\n\n        area = Rectangle.Empty;\n\n        foreach (Control child in Controls)\n        {\n          if (child.Visible)\n          {\n            area = Rectangle.Union(child.Bounds, area);\n          }\n        }\n\n        return Rectangle.Union(area, new Rectangle(_autoScrollPosition, _autoScrollMinSize));\n      }\n    }\n\n    /// <summary>\n    ///   Gets the view port rectangle.\n    /// </summary>\n    /// <value>The view port rectangle.</value>\n    protected Rectangle ViewPortRectangle\n    {\n      get { return new Rectangle(-_autoScrollPosition.X, -_autoScrollPosition.Y, this.DisplayRectangle.Width, this.DisplayRectangle.Height); }\n    }\n\n    #endregion\n\n    #region Public Members\n\n    /// <summary>\n    ///   Scrolls the specified child control into view on an auto-scroll enabled control.\n    /// </summary>\n    /// <param name=\"activeControl\">The child control to scroll into view.</param>\n    public void ScrollControlIntoView(Control activeControl)\n    {\n      if (activeControl.Visible && AutoScroll && (HorizontalScroll.Visible || VerticalScroll.Visible))\n      {\n        Point position;\n\n        position = this.AdjustPositionToSize(new Point(this.AutoScrollPosition.X + activeControl.Left, this.AutoScrollPosition.Y + activeControl.Top));\n\n        if (position.X != this.AutoScrollPosition.X || position.Y != this.AutoScrollPosition.Y)\n        {\n          this.ScrollByOffset(new Size(this.AutoScrollPosition.X - position.X, this.AutoScrollPosition.Y - position.Y));\n        }\n      }\n    }\n\n    #endregion\n\n    #region Protected Members\n\n    /// <summary>\n    ///   Adjusts the given Point according to the scroll size\n    /// </summary>\n    /// <param name=\"position\">The position.</param>\n    /// <returns></returns>\n    protected Point AdjustPositionToSize(Point position)\n    {\n      int x;\n      int y;\n\n      x = position.X;\n      y = position.Y;\n\n      if (x < -(this.AutoScrollMinSize.Width - this.ClientRectangle.Width))\n      {\n        x = -(this.AutoScrollMinSize.Width - this.ClientRectangle.Width);\n      }\n      if (y < -(this.AutoScrollMinSize.Height - this.ClientRectangle.Height))\n      {\n        y = -(this.AutoScrollMinSize.Height - base.ClientRectangle.Height);\n      }\n      if (x > 0)\n      {\n        x = 0;\n      }\n      if (y > 0)\n      {\n        y = 0;\n      }\n\n      return new Point(x, y);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AutoScrollChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAutoScrollChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = this.AutoScrollChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AutoScrollMarginChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAutoScrollMarginChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = this.AutoScrollMarginChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AutoScrollMinSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAutoScrollMinSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.AutoScrollPosition = this.AdjustPositionToSize(this.AutoScrollPosition);\n      this.AdjustScrollbars();\n\n      handler = this.AutoScrollMinSizeChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"AutoScrollPositionChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected virtual void OnAutoScrollPositionChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = this.AutoScrollPositionChanged;\n\n      if (handler != null)\n      {\n        handler(this, e);\n      }\n    }\n\n    #endregion\n\n    #region Private Members\n\n    /// <summary>\n    ///   Adjusts the scrollbars.\n    /// </summary>\n    private void AdjustScrollbars()\n    {\n      Rectangle clientRectangle;\n\n      clientRectangle = this.ClientRectangle;\n\n      if (clientRectangle.Width > 1 && clientRectangle.Height > 1)\n      {\n        Size scrollSize;\n        Size pageSize;\n        bool horizontalScrollVisible;\n        bool verticalScrollVisible;\n\n        scrollSize = Size.Empty;\n        pageSize = Size.Empty;\n\n        horizontalScrollVisible = this.AutoScroll && this.AutoScrollMinSize.Width > clientRectangle.Width;\n        verticalScrollVisible = this.AutoScroll && this.AutoScrollMinSize.Height > clientRectangle.Height;\n\n        if (verticalScrollVisible)\n        {\n          scrollSize.Height = this.AutoScrollMinSize.Height;\n          pageSize.Height = clientRectangle.Height - 1;\n        }\n\n        if (horizontalScrollVisible)\n        {\n          scrollSize.Width = this.AutoScrollMinSize.Width;\n          pageSize.Width = clientRectangle.Width - 1;\n        }\n\n        this.ScrollSize = scrollSize;\n        this.PageSize = pageSize;\n      }\n    }\n\n    /// <summary>\n    ///   Scrolls child controls by the given offset\n    /// </summary>\n    /// <param name=\"offset\">The offset.</param>\n    private void ScrollByOffset(Size offset)\n    {\n      if (!offset.IsEmpty)\n      {\n        this.SuspendLayout();\n        foreach (Control child in Controls)\n        {\n          child.Location -= offset;\n        }\n\n        _autoScrollPosition = new Point(_autoScrollPosition.X - offset.Width, _autoScrollPosition.Y - offset.Height);\n        this.ScrollTo(-_autoScrollPosition.X, -_autoScrollPosition.Y);\n\n        this.ResumeLayout();\n\n        this.Invalidate();\n      }\n    }\n\n    #endregion\n  };\n} ;\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ZoomLevelCollection.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Collections.Generic;\n\nnamespace Cyotek.Windows.Forms\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  /// <summary>\n  /// Represents available levels of zoom in an <see cref=\"ImageBox\"/> control\n  /// </summary>\n  public class ZoomLevelCollection : IList<int>\n  {\n    #region Public Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"ZoomLevelCollection\"/> class.\n    /// </summary>\n    public ZoomLevelCollection()\n    {\n      this.List = new SortedList<int, int>();\n    }\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"ZoomLevelCollection\"/> class.\n    /// </summary>\n    /// <param name=\"collection\">The default values to populate the collection with.</param>\n    /// <exception cref=\"System.ArgumentNullException\">Thrown if the <c>collection</c> parameter is null</exception>\n    public ZoomLevelCollection(IEnumerable<int> collection)\n      : this()\n    {\n      if (collection == null)\n      {\n        throw new ArgumentNullException(nameof(collection));\n      }\n\n      this.AddRange(collection);\n    }\n\n    #endregion\n\n    #region Public Class Properties\n\n    /// <summary>\n    /// Returns the default zoom levels\n    /// </summary>\n    public static ZoomLevelCollection Default\n    {\n      get\n      {\n        return new ZoomLevelCollection(new[]\n                                       {\n                                         7, 10, 15, 20, 25, 30, 50, 70, 100, 150, 200, 300, 400, 500, 600, 700, 800, 1200, 1600\n                                       });\n      }\n    }\n\n    #endregion\n\n    #region Public Properties\n\n    /// <summary>\n    /// Gets the number of elements contained in the <see cref=\"ZoomLevelCollection\" />.\n    /// </summary>\n    /// <returns>\n    /// The number of elements contained in the <see cref=\"ZoomLevelCollection\" />.\n    /// </returns>\n    public int Count\n    {\n      get { return this.List.Count; }\n    }\n\n    /// <summary>\n    /// Gets a value indicating whether the <see cref=\"T:System.Collections.Generic.ICollection`1\" /> is read-only.\n    /// </summary>\n    /// <value><c>true</c> if this instance is read only; otherwise, <c>false</c>.</value>\n    /// <returns>true if the <see cref=\"T:System.Collections.Generic.ICollection`1\" /> is read-only; otherwise, false.\n    /// </returns>\n    public bool IsReadOnly\n    {\n      get { return false; }\n    }\n\n    /// <summary>\n    /// Gets or sets the zoom level at the specified index.\n    /// </summary>\n    /// <param name=\"index\">The index.</param>\n    public int this[int index]\n    {\n      get { return this.List.Values[index]; }\n      set\n      {\n        this.List.RemoveAt(index);\n        this.Add(value);\n      }\n    }\n\n    #endregion\n\n    #region Protected Properties\n\n    /// <summary>\n    /// Gets or sets the backing list.\n    /// </summary>\n    protected SortedList<int, int> List { get; set; }\n\n    #endregion\n\n    #region Public Members\n\n    /// <summary>\n    /// Adds an item to the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.\n    /// </summary>\n    /// <param name=\"item\">The object to add to the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.</param>\n    public void Add(int item)\n    {\n      this.List.Add(item, item);\n    }\n\n    /// <summary>\n    /// Adds a range of items to the <see cref=\"ZoomLevelCollection\"/>.\n    /// </summary>\n    /// <param name=\"collection\">The items to add to the collection.</param>\n    /// <exception cref=\"System.ArgumentNullException\">Thrown if the <c>collection</c> parameter is null.</exception>\n    public void AddRange(IEnumerable<int> collection)\n    {\n      if (collection == null)\n      {\n        throw new ArgumentNullException(nameof(collection));\n      }\n\n      foreach (int value in collection)\n      {\n        this.Add(value);\n      }\n    }\n\n    /// <summary>\n    /// Removes all items from the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.\n    /// </summary>\n    public void Clear()\n    {\n      this.List.Clear();\n    }\n\n    /// <summary>\n    /// Determines whether the <see cref=\"T:System.Collections.Generic.ICollection`1\" /> contains a specific value.\n    /// </summary>\n    /// <param name=\"item\">The object to locate in the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.</param>\n    /// <returns>true if <paramref name=\"item\" /> is found in the <see cref=\"T:System.Collections.Generic.ICollection`1\" />; otherwise, false.</returns>\n    public bool Contains(int item)\n    {\n      return this.List.ContainsKey(item);\n    }\n\n    /// <summary>\n    /// Copies a range of elements this collection into a destination <see cref=\"Array\"/>.\n    /// </summary>\n    /// <param name=\"array\">The <see cref=\"Array\"/> that receives the data.</param>\n    /// <param name=\"arrayIndex\">A 64-bit integer that represents the index in the <see cref=\"Array\"/> at which storing begins.</param>\n    public void CopyTo(int[] array, int arrayIndex)\n    {\n      for (int i = 0; i < this.Count; i++)\n      {\n        array[arrayIndex + i] = this.List.Values[i];\n      }\n    }\n\n    /// <summary>\n    /// Finds the index of a zoom level matching or nearest to the specified value.\n    /// </summary>\n    /// <param name=\"zoomLevel\">The zoom level.</param>\n    public int FindNearest(int zoomLevel)\n    {\n      int nearestValue = this.List.Values[0];\n      int nearestDifference = Math.Abs(nearestValue - zoomLevel);\n      for (int i = 1; i < this.Count; i++)\n      {\n        int value = this.List.Values[i];\n        int difference = Math.Abs(value - zoomLevel);\n        if (difference < nearestDifference)\n        {\n          nearestValue = value;\n          nearestDifference = difference;\n        }\n      }\n      return nearestValue;\n    }\n\n    /// <summary>\n    /// Returns an enumerator that iterates through the collection.\n    /// </summary>\n    /// <returns>A <see cref=\"T:System.Collections.Generic.IEnumerator`1\" /> that can be used to iterate through the collection.</returns>\n    public IEnumerator<int> GetEnumerator()\n    {\n      return this.List.Values.GetEnumerator();\n    }\n\n    /// <summary>\n    /// Determines the index of a specific item in the <see cref=\"T:System.Collections.Generic.IList`1\" />.\n    /// </summary>\n    /// <param name=\"item\">The object to locate in the <see cref=\"T:System.Collections.Generic.IList`1\" />.</param>\n    /// <returns>The index of <paramref name=\"item\" /> if found in the list; otherwise, -1.</returns>\n    public int IndexOf(int item)\n    {\n      return this.List.IndexOfKey(item);\n    }\n\n    /// <summary>\n    /// Not implemented.\n    /// </summary>\n    /// <param name=\"index\">The index.</param>\n    /// <param name=\"item\">The item.</param>\n    /// <exception cref=\"System.NotImplementedException\">Not implemented</exception>\n    public void Insert(int index, int item)\n    {\n      throw new NotImplementedException();\n    }\n\n    /// <summary>\n    /// Returns the next increased zoom level for the given current zoom.\n    /// </summary>\n    /// <param name=\"zoomLevel\">The current zoom level.</param>\n    /// <returns>The next matching increased zoom level for the given current zoom if applicable, otherwise the nearest zoom.</returns>\n    public int NextZoom(int zoomLevel)\n    {\n      int index;\n\n      index = this.IndexOf(this.FindNearest(zoomLevel));\n      if (index < this.Count - 1)\n      {\n        index++;\n      }\n\n      return this[index];\n    }\n\n    /// <summary>\n    /// Returns the next decreased zoom level for the given current zoom.\n    /// </summary>\n    /// <param name=\"zoomLevel\">The current zoom level.</param>\n    /// <returns>The next matching decreased zoom level for the given current zoom if applicable, otherwise the nearest zoom.</returns>\n    public int PreviousZoom(int zoomLevel)\n    {\n      int index;\n\n      index = this.IndexOf(this.FindNearest(zoomLevel));\n      if (index > 0)\n      {\n        index--;\n      }\n\n      return this[index];\n    }\n\n    /// <summary>\n    /// Removes the first occurrence of a specific object from the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.\n    /// </summary>\n    /// <param name=\"item\">The object to remove from the <see cref=\"T:System.Collections.Generic.ICollection`1\" />.</param>\n    /// <returns>true if <paramref name=\"item\" /> was successfully removed from the <see cref=\"T:System.Collections.Generic.ICollection`1\" />; otherwise, false. This method also returns false if <paramref name=\"item\" /> is not found in the original <see cref=\"T:System.Collections.Generic.ICollection`1\" />.</returns>\n    public bool Remove(int item)\n    {\n      return this.List.Remove(item);\n    }\n\n    /// <summary>\n    /// Removes the element at the specified index of the <see cref=\"ZoomLevelCollection\"/>.\n    /// </summary>\n    /// <param name=\"index\">The zero-based index of the element to remove.</param>\n    public void RemoveAt(int index)\n    {\n      this.List.RemoveAt(index);\n    }\n\n    /// <summary>\n    /// Copies the elements of the <see cref=\"ZoomLevelCollection\"/> to a new array.\n    /// </summary>\n    /// <returns>An array containing copies of the elements of the <see cref=\"ZoomLevelCollection\"/>.</returns>\n    public int[] ToArray()\n    {\n      int[] results;\n\n      results = new int[this.Count];\n      this.CopyTo(results, 0);\n\n      return results;\n    }\n\n    #endregion\n\n    #region IList<int> Members\n\n    /// <summary>\n    /// Returns an enumerator that iterates through a collection.\n    /// </summary>\n    /// <returns>An <see cref=\"ZoomLevelCollection\" /> object that can be used to iterate through the collection.</returns>\n    IEnumerator IEnumerable.GetEnumerator()\n    {\n      return this.GetEnumerator();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox/ZoomLevelCollectionConverter.cs",
    "content": "﻿using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.ComponentModel.Design.Serialization;\nusing System.Globalization;\nusing System.Linq;\nusing System.Reflection;\nusing System.Text;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms\n{\n  public class ZoomLevelCollectionConverter\n    : TypeConverter\n  {\n    public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)\n    {\n      return sourceType == typeof(string) || base.CanConvertFrom(context, sourceType);\n    }\n\n    public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)\n    {\n      return destinationType == typeof(InstanceDescriptor) || base.CanConvertTo(context, destinationType);\n    }\n\n    public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)\n    {\n      string data;\n      ZoomLevelCollection result;\n\n      data = value as string;\n      if (!string.IsNullOrEmpty(data))\n      {\n        char separator;\n        string[] items;\n        TypeConverter converter;\n\n        if (culture == null)\n          culture = CultureInfo.CurrentCulture;\n\n        result = new ZoomLevelCollection();\n        separator = culture.TextInfo.ListSeparator[0];\n        items = data.Split(separator);\n        converter = TypeDescriptor.GetConverter(typeof(int));\n\n        foreach (string item in items)\n          result.Add((int)converter.ConvertFromString(context, culture, item));\n      }\n      else\n        result = null;\n\n      return result;\n    }\n\n    public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)\n    {\n      object result;\n\n      if (destinationType == null)\n        throw new ArgumentNullException(\"destinationType\");\n\n      if (value is ZoomLevelCollection)\n      {\n        if (destinationType == typeof(string))\n        {\n          ZoomLevelCollection collection;\n          StringBuilder data;\n          string separator;\n          TypeConverter converter;\n\n          collection = (ZoomLevelCollection)value;\n          if (culture == null)\n            culture = CultureInfo.CurrentCulture;\n          separator = culture.TextInfo.ListSeparator + \" \";\n          converter = TypeDescriptor.GetConverter(typeof(int));\n          data = new StringBuilder();\n\n          foreach (int item in collection)\n          {\n            if (data.Length != 0)\n              data.Append(separator);\n\n            data.Append(converter.ConvertToString(context, culture, item));\n          }\n\n          result = data.ToString();\n        }\n        else if (destinationType == typeof(InstanceDescriptor))\n        {\n          ZoomLevelCollection collection;\n          ConstructorInfo constructor;\n\n          collection = (ZoomLevelCollection)value;\n          constructor = typeof(ZoomLevelCollection).GetConstructor(new Type[] { typeof(IList<int>) });\n\n          result = new InstanceDescriptor(constructor, new object[] { collection.ToArray() });\n        }\n        else\n          result = null;\n      }\n      else\n        result = null;\n\n      if (result == null)\n        result = base.ConvertTo(context, culture, value, destinationType);\n\n      return result;\n    }\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/AboutDialog.cs",
    "content": "using System;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.IO;\nusing System.Reflection;\nusing System.Windows.Forms;\nusing CommonMark;\nusing Cyotek.Windows.Forms.Demo.Properties;\nusing TheArtOfDev.HtmlRenderer.WinForms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class AboutDialog : BaseForm\n  {\n    #region Constructors\n\n    public AboutDialog()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Static Methods\n\n    internal static void ShowAboutDialog()\n    {\n      using (Form dialog = new AboutDialog())\n      {\n        dialog.ShowDialog();\n      }\n    }\n\n    #endregion\n\n    #region Properties\n\n    protected TabControl TabControl\n    {\n      get { return docsTabControl; }\n    }\n\n    #endregion\n\n    #region Methods\n\n    protected override void OnFontChanged(EventArgs e)\n    {\n      base.OnFontChanged(e);\n\n      this.PositionTabControl();\n    }\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      if (!this.DesignMode)\n      {\n        FileVersionInfo info;\n        Assembly assembly;\n        string title;\n\n        assembly = typeof(ImageBox).Assembly;\n        info = FileVersionInfo.GetVersionInfo(assembly.Location);\n        title = info.ProductName;\n\n        this.Text = string.Format(\"About {0}\", title);\n        nameLabel.Text = title;\n        versionLabel.Text = string.Format(\"Version {0}\", info.FileVersion);\n        copyrightLabel.Text = info.LegalCopyright;\n\n        this.AddReadme(\"CHANGELOG.md\");\n        this.AddReadme(\"README.md\");\n        this.AddReadme(\"ACKNOWLEDGEMENTS.md\");\n        this.AddReadme(\"LICENSE.txt\");\n\n        this.LoadDocumentForTab(docsTabControl.SelectedTab);\n      }\n    }\n\n    protected override void OnResize(EventArgs e)\n    {\n      base.OnResize(e);\n\n      this.PositionTabControl();\n    }\n\n    private void AddReadme(string fileName)\n    {\n      docsTabControl.TabPages.Add(new TabPage\n                                  {\n                                    UseVisualStyleBackColor = true,\n                                    Padding = new Padding(9),\n                                    ToolTipText = this.GetFullReadmePath(fileName),\n                                    Text = fileName,\n                                    Tag = fileName\n                                  });\n    }\n\n    private void closeButton_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void docsTabControl_Selecting(object sender, TabControlCancelEventArgs e)\n    {\n      this.LoadDocumentForTab(e.TabPage);\n    }\n\n    private void footerGroupBox_Paint(object sender, PaintEventArgs e)\n    {\n      e.Graphics.DrawLine(SystemPens.ControlDark, 0, 0, footerGroupBox.Width, 0);\n      e.Graphics.DrawLine(SystemPens.ControlLightLight, 0, 1, footerGroupBox.Width, 1);\n    }\n\n    private string GetFullReadmePath(string fileName)\n    {\n      return Path.GetFullPath(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @\"..\\..\\..\\\"), fileName));\n    }\n\n    private void LoadDocumentForTab(TabPage page)\n    {\n      if (page != null && page.Controls.Count == 0 && page.Tag != null)\n      {\n        Control documentView;\n        string fullPath;\n        string text;\n\n        Cursor.Current = Cursors.WaitCursor;\n\n        Debug.Print(\"Loading readme: {0}\", page.Tag);\n\n        fullPath = this.GetFullReadmePath(page.Tag.ToString());\n        text = File.Exists(fullPath) ? File.ReadAllText(fullPath) : string.Format(\"Cannot find file '{0}'\", fullPath);\n\n        if (text.IndexOf('\\n') != -1 && text.IndexOf('\\r') == -1)\n        {\n          text = text.Replace(\"\\n\", \"\\r\\n\");\n        }\n\n        switch (Path.GetExtension(fullPath))\n        {\n          case \".md\":\n            documentView = new HtmlPanel\n                           {\n                             Dock = DockStyle.Fill,\n                             BaseStylesheet = Resources.CSS,\n                             Text = string.Concat(\"<html><body>\", CommonMarkConverter.Convert(text), \"</body></html>\") // HACK: HTML panel screws up rendering if a <body> tag isn't present\n                           };\n            break;\n          default:\n            documentView = new TextBox\n                           {\n                             ReadOnly = true,\n                             Multiline = true,\n                             WordWrap = true,\n                             ScrollBars = ScrollBars.Vertical,\n                             Dock = DockStyle.Fill,\n                             Text = text\n                           };\n            break;\n        }\n\n        page.Controls.Add(documentView);\n\n        Cursor.Current = Cursors.Default;\n      }\n    }\n\n    private void PositionTabControl()\n    {\n      docsTabControl?.SetBounds(docsTabControl.Left, docsTabControl.Top, this.ClientSize.Width - docsTabControl.Left * 2, this.ClientSize.Height - (docsTabControl.Top + footerGroupBox.Height + docsTabControl.Left));\n    }\n\n    private void webLinkLabel_Click(object sender, EventArgs e)\n    {\n      try\n      {\n        Process.Start(((Control)sender).Text);\n      }\n      catch (Exception ex)\n      {\n        MessageBox.Show(string.Format(\"Unable to start the specified URI.\\n\\n{0}\", ex.Message), this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);\n      }\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/AboutDialog.designer.cs",
    "content": "namespace Cyotek.Windows.Forms.Demo\n{\n  partial class AboutDialog\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.components = new System.ComponentModel.Container();\n      this.closeButton = new System.Windows.Forms.Button();\n      this.nameLabel = new System.Windows.Forms.Label();\n      this.versionLabel = new System.Windows.Forms.Label();\n      this.copyrightLabel = new System.Windows.Forms.Label();\n      this.iconPictureBox = new System.Windows.Forms.PictureBox();\n      this.footerGroupBox = new System.Windows.Forms.Panel();\n      this.webLinkLabel = new System.Windows.Forms.LinkLabel();\n      this.docsTabControl = new System.Windows.Forms.TabControl();\n      this.toolTip = new System.Windows.Forms.ToolTip(this.components);\n      ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).BeginInit();\n      this.footerGroupBox.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // closeButton\n      // \n      this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n      this.closeButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;\n      this.closeButton.Location = new System.Drawing.Point(453, 10);\n      this.closeButton.Name = \"closeButton\";\n      this.closeButton.Size = new System.Drawing.Size(64, 20);\n      this.closeButton.TabIndex = 1;\n      this.closeButton.Text = \"Close\";\n      this.closeButton.UseVisualStyleBackColor = true;\n      this.closeButton.Click += new System.EventHandler(this.closeButton_Click);\n      // \n      // nameLabel\n      // \n      this.nameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.nameLabel.AutoSize = true;\n      this.nameLabel.Font = new System.Drawing.Font(\"Segoe UI\", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n      this.nameLabel.Location = new System.Drawing.Point(43, 10);\n      this.nameLabel.Name = \"nameLabel\";\n      this.nameLabel.Size = new System.Drawing.Size(38, 13);\n      this.nameLabel.TabIndex = 0;\n      this.nameLabel.Text = \"Name\";\n      // \n      // versionLabel\n      // \n      this.versionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.versionLabel.AutoSize = true;\n      this.versionLabel.Font = new System.Drawing.Font(\"Segoe UI\", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\n      this.versionLabel.Location = new System.Drawing.Point(43, 22);\n      this.versionLabel.Name = \"versionLabel\";\n      this.versionLabel.Size = new System.Drawing.Size(45, 13);\n      this.versionLabel.TabIndex = 1;\n      this.versionLabel.Text = \"Version\";\n      // \n      // copyrightLabel\n      // \n      this.copyrightLabel.AutoSize = true;\n      this.copyrightLabel.Location = new System.Drawing.Point(45, 41);\n      this.copyrightLabel.Name = \"copyrightLabel\";\n      this.copyrightLabel.Size = new System.Drawing.Size(50, 13);\n      this.copyrightLabel.TabIndex = 2;\n      this.copyrightLabel.Text = \"copyright\";\n      // \n      // iconPictureBox\n      // \n      this.iconPictureBox.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Icon;\n      this.iconPictureBox.Location = new System.Drawing.Point(10, 10);\n      this.iconPictureBox.Name = \"iconPictureBox\";\n      this.iconPictureBox.Size = new System.Drawing.Size(32, 32);\n      this.iconPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;\n      this.iconPictureBox.TabIndex = 4;\n      this.iconPictureBox.TabStop = false;\n      // \n      // footerGroupBox\n      // \n      this.footerGroupBox.BackColor = System.Drawing.SystemColors.Control;\n      this.footerGroupBox.Controls.Add(this.webLinkLabel);\n      this.footerGroupBox.Controls.Add(this.closeButton);\n      this.footerGroupBox.Dock = System.Windows.Forms.DockStyle.Bottom;\n      this.footerGroupBox.Location = new System.Drawing.Point(0, 388);\n      this.footerGroupBox.Name = \"footerGroupBox\";\n      this.footerGroupBox.Size = new System.Drawing.Size(527, 41);\n      this.footerGroupBox.TabIndex = 4;\n      this.footerGroupBox.Paint += new System.Windows.Forms.PaintEventHandler(this.footerGroupBox_Paint);\n      // \n      // webLinkLabel\n      // \n      this.webLinkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));\n      this.webLinkLabel.AutoSize = true;\n      this.webLinkLabel.ForeColor = System.Drawing.SystemColors.HotTrack;\n      this.webLinkLabel.Location = new System.Drawing.Point(10, 14);\n      this.webLinkLabel.Name = \"webLinkLabel\";\n      this.webLinkLabel.Size = new System.Drawing.Size(89, 13);\n      this.webLinkLabel.TabIndex = 0;\n      this.webLinkLabel.TabStop = true;\n      this.webLinkLabel.Tag = \"www.cyotek.com\";\n      this.webLinkLabel.Text = \"www.cyotek.com\";\n      this.toolTip.SetToolTip(this.webLinkLabel, \"Visit the Cyotek website for development topics and code\");\n      this.webLinkLabel.Click += new System.EventHandler(this.webLinkLabel_Click);\n      // \n      // docsTabControl\n      // \n      this.docsTabControl.Location = new System.Drawing.Point(10, 67);\n      this.docsTabControl.Name = \"docsTabControl\";\n      this.docsTabControl.SelectedIndex = 0;\n      this.docsTabControl.Size = new System.Drawing.Size(505, 315);\n      this.docsTabControl.TabIndex = 3;\n      this.docsTabControl.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.docsTabControl_Selecting);\n      // \n      // AboutDialog\n      // \n      this.AcceptButton = this.closeButton;\n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.BackColor = System.Drawing.SystemColors.Window;\n      this.CancelButton = this.closeButton;\n      this.ClientSize = new System.Drawing.Size(527, 429);\n      this.Controls.Add(this.docsTabControl);\n      this.Controls.Add(this.footerGroupBox);\n      this.Controls.Add(this.iconPictureBox);\n      this.Controls.Add(this.copyrightLabel);\n      this.Controls.Add(this.versionLabel);\n      this.Controls.Add(this.nameLabel);\n      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;\n      this.MaximizeBox = false;\n      this.Name = \"AboutDialog\";\n      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n      this.Text = \"About\";\n      ((System.ComponentModel.ISupportInitialize)(this.iconPictureBox)).EndInit();\n      this.footerGroupBox.ResumeLayout(false);\n      this.footerGroupBox.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.Button closeButton;\n    private System.Windows.Forms.Label nameLabel;\n    private System.Windows.Forms.Label versionLabel;\n    private System.Windows.Forms.Label copyrightLabel;\n    private System.Windows.Forms.PictureBox iconPictureBox;\n    private System.Windows.Forms.Panel footerGroupBox;\n    private System.Windows.Forms.LinkLabel webLinkLabel;\n    private System.Windows.Forms.TabControl docsTabControl;\n    private System.Windows.Forms.ToolTip toolTip;\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/AboutDialog.resx",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"toolTip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>17, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/AnimatedGifDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class AnimatedGifDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.propertyGrid = new Cyotek.Windows.Forms.Demo.PropertyGrid();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // splitContainer\n      // \n      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;\n      this.splitContainer.Location = new System.Drawing.Point(0, 24);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.propertyGrid);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.imageBox);\n      this.splitContainer.Size = new System.Drawing.Size(848, 490);\n      this.splitContainer.SplitterDistance = 300;\n      this.splitContainer.SplitterWidth = 3;\n      this.splitContainer.TabIndex = 0;\n      // \n      // propertyGrid\n      // \n      this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.propertyGrid.Location = new System.Drawing.Point(0, 0);\n      this.propertyGrid.Name = \"propertyGrid\";\n      this.propertyGrid.SelectedObject = this.imageBox;\n      this.propertyGrid.Size = new System.Drawing.Size(300, 490);\n      this.propertyGrid.TabIndex = 0;\n      // \n      // imageBox\n      // \n      this.imageBox.BackColor = System.Drawing.SystemColors.GradientActiveCaption;\n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.GridDisplayMode = Cyotek.Windows.Forms.ImageBoxGridDisplayMode.Image;\n      this.imageBox.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.AnimationDemo;\n      this.imageBox.ImageBorderStyle = Cyotek.Windows.Forms.ImageBoxBorderStyle.FixedSingleGlowShadow;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.ShowPixelGrid = true;\n      this.imageBox.Size = new System.Drawing.Size(545, 490);\n      this.imageBox.TabIndex = 0;\n      // \n      // statusStrip\n      // \n      this.statusStrip.Location = new System.Drawing.Point(0, 514);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0);\n      this.statusStrip.Size = new System.Drawing.Size(848, 22);\n      this.statusStrip.TabIndex = 6;\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);\n      this.menuStrip.Size = new System.Drawing.Size(848, 24);\n      this.menuStrip.TabIndex = 5;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // AnimatedGifDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(848, 536);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.statusStrip);\n      this.Controls.Add(this.menuStrip);\n      this.Name = \"AnimatedGifDemoForm\";\n      this.Text = \"Animations\";\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private PropertyGrid propertyGrid;\n    private ImageBox imageBox;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/AnimatedGifDemoForm.cs",
    "content": "﻿using System;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class AnimatedGifDemoForm : BaseForm\n  {\n    #region Public Constructors\n\n    public AnimatedGifDemoForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/AnimatedGifDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>248, 17</value>\n  </metadata>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>364, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/BaseForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class BaseForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.SuspendLayout();\n      // \n      // BaseForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(726, 323);\n      this.MinimizeBox = false;\n      this.Name = \"BaseForm\";\n      this.ShowIcon = false;\n      this.ShowInTaskbar = false;\n      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;\n      this.Text = \"BaseForm\";\n      this.ResumeLayout(false);\n\n    }\n\n    #endregion\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/BaseForm.cs",
    "content": "﻿using System;\nusing System.Drawing;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class BaseForm : Form\n  {\n    #region Public Constructors\n\n    public BaseForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      if (!this.DesignMode)\n      {\n        this.Font = SystemFonts.MessageBoxFont;\n      }\n\n      base.OnLoad(e);\n    }\n\n    protected override void OnShown(EventArgs e)\n    {\n      base.OnShown(e);\n\n      Cursor.Current = Cursors.Default;\n    }\n\n    #endregion\n\n    #region Protected Members\n\n    protected string FormatPoint(Point point)\n    {\n      return string.Format(\"X:{0}, Y:{1}\", point.X, point.Y);\n    }\n\n    protected string FormatRectangle(RectangleF rect)\n    {\n      return string.Format(\"X:{0}, Y:{1}, W:{2}, H:{3}\", (int)rect.X, (int)rect.Y, (int)rect.Width, (int)rect.Height);\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/BaseForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/Cyotek.Windows.Forms.ImageBox.Demo.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{86D47D73-B3E7-4ED3-86EA-7BFC0C978A7B}</ProjectGuid>\n    <OutputType>WinExe</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Cyotek.Windows.Forms.Demo</RootNamespace>\n    <AssemblyName>imgbxdmo</AssemblyName>\n    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n    <TargetFrameworkProfile>\n    </TargetFrameworkProfile>\n    <SolutionDir Condition=\"$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'\">..\\</SolutionDir>\n    <RestorePackages>true</RestorePackages>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n    <AllowUnsafeBlocks>false</AllowUnsafeBlocks>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <PlatformTarget>AnyCPU</PlatformTarget>\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup>\n    <SignAssembly>false</SignAssembly>\n  </PropertyGroup>\n  <PropertyGroup>\n    <AssemblyOriginatorKeyFile>cyopublic.snk</AssemblyOriginatorKeyFile>\n  </PropertyGroup>\n  <PropertyGroup>\n    <ApplicationIcon>..\\res\\icon.ico</ApplicationIcon>\n  </PropertyGroup>\n  <PropertyGroup>\n    <ApplicationManifest>app.manifest</ApplicationManifest>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"CommonMark, Version=0.1.0.0, Culture=neutral, PublicKeyToken=001ef8810438905d, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\packages\\CommonMark.NET.0.9.0\\lib\\net35-client\\CommonMark.dll</HintPath>\n    </Reference>\n    <Reference Include=\"HtmlRenderer, Version=1.5.0.5, Culture=neutral, processorArchitecture=MSIL\">\n      <SpecificVersion>False</SpecificVersion>\n      <HintPath>..\\packages\\HtmlRenderer.Core.1.5.0.5\\lib\\net35-client\\HtmlRenderer.dll</HintPath>\n    </Reference>\n    <Reference Include=\"HtmlRenderer.WinForms\">\n      <HintPath>..\\packages\\HtmlRenderer.WinForms.1.5.0.6\\lib\\net35-client\\HtmlRenderer.WinForms.dll</HintPath>\n    </Reference>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Drawing\" />\n    <Reference Include=\"System.Windows.Forms\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"BaseForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"BaseForm.Designer.cs\">\n      <DependentUpon>BaseForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"AnimatedGifDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"AnimatedGifDemoForm.Designer.cs\">\n      <DependentUpon>AnimatedGifDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"DisposedImageDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"DisposedImageDemoForm.Designer.cs\">\n      <DependentUpon>DisposedImageDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"DragHandle.cs\" />\n    <Compile Include=\"DragHandleAnchor.cs\" />\n    <Compile Include=\"DragHandleCollection.cs\" />\n    <Compile Include=\"EventsListBox.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"FilteredPropertyGrid.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"ImageBoxEx.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"MiniMapDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"MiniMapDemoForm.designer.cs\">\n      <DependentUpon>MiniMapDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"OpenUrlDialog.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"OpenUrlDialog.Designer.cs\">\n      <DependentUpon>OpenUrlDialog.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"ResizableSelectionDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"ResizableSelectionDemoForm.Designer.cs\">\n      <DependentUpon>ResizableSelectionDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"PanStylesDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"PanStylesDemoForm.Designer.cs\">\n      <DependentUpon>PanStylesDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"TextDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"TextDemoForm.Designer.cs\">\n      <DependentUpon>TextDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"DragTestForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"DragTestForm.Designer.cs\">\n      <DependentUpon>DragTestForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"GroupBox.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"GeneralDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"GeneralDemoForm.Designer.cs\">\n      <DependentUpon>GeneralDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"MainMenuForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"MainMenuForm.designer.cs\">\n      <DependentUpon>MainMenuForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"PixelGridForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"PixelGridForm.Designer.cs\">\n      <DependentUpon>PixelGridForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"Program.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n    <Compile Include=\"Properties\\Resources.Designer.cs\">\n      <AutoGen>True</AutoGen>\n      <DesignTime>True</DesignTime>\n      <DependentUpon>Resources.resx</DependentUpon>\n    </Compile>\n    <Compile Include=\"PropertyGrid.cs\">\n      <SubType>Component</SubType>\n    </Compile>\n    <Compile Include=\"AboutDialog.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"AboutDialog.designer.cs\">\n      <DependentUpon>AboutDialog.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"ScaledAdornmentsDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"ScaledAdornmentsDemoForm.Designer.cs\">\n      <DependentUpon>ScaledAdornmentsDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"SizeModeDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"SizeModeDemoForm.Designer.cs\">\n      <DependentUpon>SizeModeDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"SwitchImageDuringZoomDemoForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"SwitchImageDuringZoomDemoForm.Designer.cs\">\n      <DependentUpon>SwitchImageDuringZoomDemoForm.cs</DependentUpon>\n    </Compile>\n    <Compile Include=\"VirtualModeDemonstrationForm.cs\">\n      <SubType>Form</SubType>\n    </Compile>\n    <Compile Include=\"VirtualModeDemonstrationForm.Designer.cs\">\n      <DependentUpon>VirtualModeDemonstrationForm.cs</DependentUpon>\n    </Compile>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"app.manifest\" />\n    <None Include=\"packages.config\" />\n    <None Include=\"Resources\\map.png\" />\n    <Content Include=\"..\\res\\icon.ico\">\n      <Link>icon.ico</Link>\n    </Content>\n    <Content Include=\"Resources\\MapMarker.png\" />\n    <Content Include=\"Resources\\cursor.png\" />\n    <None Include=\"Resources\\icon-32.png\" />\n    <None Include=\"Resources\\grid-dot.png\" />\n    <None Include=\"Resources\\icon-32a.png\" />\n    <Content Include=\"Resources\\image-crop.png\" />\n    <Content Include=\"Resources\\image-resize-actual.png\" />\n    <Content Include=\"Resources\\magnifier-zoom-in.png\" />\n    <Content Include=\"Resources\\magnifier-zoom-out.png\" />\n    <Content Include=\"Resources\\magnifier-zoom.png\" />\n    <None Include=\"Resources\\monitor-sidebar.png\" />\n    <Content Include=\"Resources\\markdownpad-github.css\" />\n    <Content Include=\"Resources\\Newtons_cradle_animation_book_2.gif\" />\n    <Content Include=\"Resources\\Object Position.ico\" />\n    <Content Include=\"Resources\\Object Size.ico\" />\n    <None Include=\"Resources\\Open.png\" />\n    <Content Include=\"Resources\\sample.jpg\" />\n    <None Include=\"Resources\\samplecrop.png\" />\n    <Content Include=\"Resources\\selection-select.png\" />\n    <Content Include=\"Resources\\selection.png\" />\n    <Content Include=\"Resources\\The_Legendary_Treasure_Map_by_Bogbrush.png\" />\n    <Content Include=\"Resources\\zone.png\" />\n  </ItemGroup>\n  <ItemGroup>\n    <EmbeddedResource Include=\"BaseForm.resx\">\n      <DependentUpon>BaseForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"AnimatedGifDemoForm.resx\">\n      <DependentUpon>AnimatedGifDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"DisposedImageDemoForm.resx\">\n      <DependentUpon>DisposedImageDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"MiniMapDemoForm.resx\">\n      <DependentUpon>MiniMapDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"OpenUrlDialog.resx\">\n      <DependentUpon>OpenUrlDialog.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"ResizableSelectionDemoForm.resx\">\n      <DependentUpon>ResizableSelectionDemoForm.cs</DependentUpon>\n      <SubType>Designer</SubType>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"PanStylesDemoForm.resx\">\n      <DependentUpon>PanStylesDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"TextDemoForm.resx\">\n      <DependentUpon>TextDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"DragTestForm.resx\">\n      <DependentUpon>DragTestForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"GeneralDemoForm.resx\">\n      <DependentUpon>GeneralDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"MainMenuForm.resx\">\n      <DependentUpon>MainMenuForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"PixelGridForm.resx\">\n      <DependentUpon>PixelGridForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"Properties\\Resources.resx\">\n      <Generator>ResXFileCodeGenerator</Generator>\n      <SubType>Designer</SubType>\n      <LastGenOutput>Resources.Designer.cs</LastGenOutput>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"AboutDialog.resx\">\n      <DependentUpon>AboutDialog.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"ScaledAdornmentsDemoForm.resx\">\n      <DependentUpon>ScaledAdornmentsDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"SizeModeDemoForm.resx\">\n      <DependentUpon>SizeModeDemoForm.cs</DependentUpon>\n      <SubType>Designer</SubType>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"SwitchImageDuringZoomDemoForm.resx\">\n      <DependentUpon>SwitchImageDuringZoomDemoForm.cs</DependentUpon>\n    </EmbeddedResource>\n    <EmbeddedResource Include=\"VirtualModeDemonstrationForm.resx\">\n      <DependentUpon>VirtualModeDemonstrationForm.cs</DependentUpon>\n    </EmbeddedResource>\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Cyotek.Windows.Forms.ImageBox\\Cyotek.Windows.Forms.ImageBox.csproj\">\n      <Project>{4159c8d3-c18d-4bed-8be6-9bad1b0ca4f6}</Project>\n      <Name>Cyotek.Windows.Forms.ImageBox</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <ItemGroup>\n    <None Include=\"cyopublic.snk\" />\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <PropertyGroup>\n    <PostBuildEvent>\n    </PostBuildEvent>\n  </PropertyGroup>\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DisposedImageDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class DisposedImageDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.menuStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Size = new System.Drawing.Size(722, 24);\n      this.menuStrip.TabIndex = 3;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Location = new System.Drawing.Point(0, 393);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Size = new System.Drawing.Size(722, 22);\n      this.statusStrip.TabIndex = 4;\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));\n      this.imageBox.Location = new System.Drawing.Point(0, 24);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.ScaleText = true;\n      this.imageBox.ShowPixelGrid = true;\n      this.imageBox.Size = new System.Drawing.Size(722, 369);\n      this.imageBox.TabIndex = 5;\n      this.imageBox.Text = \"This is a demonstration of the ImageBox text functionality\";\n      this.imageBox.TextBackColor = System.Drawing.Color.Teal;\n      this.imageBox.TextDisplayMode = Cyotek.Windows.Forms.ImageBoxGridDisplayMode.Image;\n      // \n      // DisposedImageDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(722, 415);\n      this.Controls.Add(this.imageBox);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.statusStrip);\n      this.Name = \"DisposedImageDemoForm\";\n      this.Text = \"Disposed Image Demonstration\";\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private ImageBox imageBox;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DisposedImageDemoForm.cs",
    "content": "﻿using System;\nusing System.Drawing;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class DisposedImageDemoForm : BaseForm\n  {\n    #region Instance Fields\n\n    private Image _image;\n\n    #endregion\n\n    #region Public Constructors\n\n    public DisposedImageDemoForm()\n    {\n      InitializeComponent();\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      _image = new Bitmap(100, 100);\n      _image.Dispose();\n\n      imageBox.Image = _image;\n\n      base.OnLoad(e);\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DisposedImageDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>703, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>811, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DragHandle.cs",
    "content": "﻿using System.Drawing;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal class DragHandle\n  {\n    #region Public Constructors\n\n    public DragHandle(DragHandleAnchor anchor)\n      : this()\n    {\n      this.Anchor = anchor;\n    }\n\n    #endregion\n\n    #region Protected Constructors\n\n    protected DragHandle()\n    {\n      this.Enabled = true;\n      this.Visible = true;\n    }\n\n    #endregion\n\n    #region Public Properties\n\n    public DragHandleAnchor Anchor { get; protected set; }\n\n    public Rectangle Bounds { get; set; }\n\n    public bool Enabled { get; set; }\n\n    public bool Visible { get; set; }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DragHandleAnchor.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal enum DragHandleAnchor\n  {\n    None,\n\n    TopLeft,\n\n    TopCenter,\n\n    TopRight,\n\n    MiddleLeft,\n\n    MiddleRight,\n\n    BottomLeft,\n\n    BottomCenter,\n\n    BottomRight\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DragHandleCollection.cs",
    "content": "﻿using System.Collections;\nusing System.Collections.Generic;\nusing System.Drawing;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal class DragHandleCollection : IEnumerable<DragHandle>\n  {\n    #region Instance Fields\n\n    private readonly IDictionary<DragHandleAnchor, DragHandle> _items;\n\n    #endregion\n\n    #region Public Constructors\n\n    public DragHandleCollection()\n    {\n      _items = new Dictionary<DragHandleAnchor, DragHandle>();\n      _items.Add(DragHandleAnchor.TopLeft, new DragHandle(DragHandleAnchor.TopLeft));\n      _items.Add(DragHandleAnchor.TopCenter, new DragHandle(DragHandleAnchor.TopCenter));\n      _items.Add(DragHandleAnchor.TopRight, new DragHandle(DragHandleAnchor.TopRight));\n      _items.Add(DragHandleAnchor.MiddleLeft, new DragHandle(DragHandleAnchor.MiddleLeft));\n      _items.Add(DragHandleAnchor.MiddleRight, new DragHandle(DragHandleAnchor.MiddleRight));\n      _items.Add(DragHandleAnchor.BottomLeft, new DragHandle(DragHandleAnchor.BottomLeft));\n      _items.Add(DragHandleAnchor.BottomCenter, new DragHandle(DragHandleAnchor.BottomCenter));\n      _items.Add(DragHandleAnchor.BottomRight, new DragHandle(DragHandleAnchor.BottomRight));\n    }\n\n    #endregion\n\n    #region Public Properties\n\n    public int Count\n    {\n      get { return _items.Count; }\n    }\n\n    public DragHandle this[DragHandleAnchor index]\n    {\n      get { return _items[index]; }\n    }\n\n    #endregion\n\n    #region Public Members\n\n    /// <summary>\n    /// Returns an enumerator that iterates through the collection.\n    /// </summary>\n    /// <returns>\n    /// A <see cref=\"T:System.Collections.Generic.IEnumerator`1\"/> that can be used to iterate through the collection.\n    /// </returns>\n    public IEnumerator<DragHandle> GetEnumerator()\n    {\n      return _items.Values.GetEnumerator();\n    }\n\n    public DragHandleAnchor HitTest(Point point)\n    {\n      DragHandleAnchor result;\n\n      result = DragHandleAnchor.None;\n\n      foreach (DragHandle handle in this)\n      {\n        if (handle.Visible && handle.Bounds.Contains(point))\n        {\n          result = handle.Anchor;\n          break;\n        }\n      }\n\n      return result;\n    }\n\n    #endregion\n\n    #region IEnumerable<DragHandle> Members\n\n    /// <summary>\n    /// Returns an enumerator that iterates through a collection.\n    /// </summary>\n    /// <returns>\n    /// An <see cref=\"T:System.Collections.IEnumerator\"/> object that can be used to iterate through the collection.\n    /// </returns>\n    IEnumerator IEnumerable.GetEnumerator()\n    {\n      return this.GetEnumerator();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DragTestForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class DragTestForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DragTestForm));\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.demoLabel = new System.Windows.Forms.Label();\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.SelectionMode = Cyotek.Windows.Forms.ImageBoxSelectionMode.Rectangle;\n      this.imageBox.Size = new System.Drawing.Size(342, 278);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.VirtualMode = true;\n      this.imageBox.VirtualSize = new System.Drawing.Size(256, 256);\n      this.imageBox.Selecting += new System.EventHandler<Cyotek.Windows.Forms.ImageBoxCancelEventArgs>(this.imageBox_Selecting);\n      this.imageBox.SelectionRegionChanged += new System.EventHandler(this.imageBox_SelectionRegionChanged);\n      this.imageBox.VirtualDraw += new System.Windows.Forms.PaintEventHandler(this.imageBox_VirtualDraw);\n      this.imageBox.MouseDown += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseDown);\n      this.imageBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseMove);\n      this.imageBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseUp);\n      // \n      // demoLabel\n      // \n      this.demoLabel.AutoEllipsis = true;\n      this.demoLabel.BackColor = System.Drawing.SystemColors.Info;\n      this.demoLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n      this.demoLabel.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.demoLabel.ForeColor = System.Drawing.SystemColors.InfoText;\n      this.demoLabel.Location = new System.Drawing.Point(0, 0);\n      this.demoLabel.Name = \"demoLabel\";\n      this.demoLabel.Padding = new System.Windows.Forms.Padding(8, 8, 8, 8);\n      this.demoLabel.Size = new System.Drawing.Size(360, 278);\n      this.demoLabel.TabIndex = 1;\n      this.demoLabel.Text = resources.GetString(\"demoLabel.Text\");\n      // \n      // splitContainer\n      // \n      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.splitContainer.Location = new System.Drawing.Point(10, 23);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.imageBox);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.demoLabel);\n      this.splitContainer.Size = new System.Drawing.Size(705, 278);\n      this.splitContainer.SplitterDistance = 342;\n      this.splitContainer.SplitterWidth = 3;\n      this.splitContainer.TabIndex = 2;\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);\n      this.menuStrip.Size = new System.Drawing.Size(726, 24);\n      this.menuStrip.TabIndex = 3;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Location = new System.Drawing.Point(0, 301);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0);\n      this.statusStrip.Size = new System.Drawing.Size(726, 22);\n      this.statusStrip.TabIndex = 4;\n      // \n      // DragTestForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(726, 323);\n      this.Controls.Add(this.statusStrip);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.menuStrip);\n      this.MainMenuStrip = this.menuStrip;\n      this.Name = \"DragTestForm\";\n      this.Text = \"Drag Test\";\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private ImageBox imageBox;\n    private System.Windows.Forms.Label demoLabel;\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DragTestForm.cs",
    "content": "﻿using System;\nusing System.Drawing;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class DragTestForm : BaseForm\n  {\n    #region Instance Fields\n\n    private RectangleF _dragItem;\n\n    private Point _dragOffset;\n\n    private bool _isDragging;\n\n    #endregion\n\n    #region Public Constructors\n\n    public DragTestForm()\n    {\n      InitializeComponent();\n\n      _dragItem = new RectangleF(32, 32, 64, 32);\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void imageBox_MouseDown(object sender, MouseEventArgs e)\n    {\n      Point imagePoint;\n\n      imagePoint = imageBox.PointToImage(e.Location);\n      if (_dragItem.Contains(imagePoint) && e.Button == MouseButtons.Left)\n      {\n        _isDragging = true;\n        _dragOffset = new Point(imagePoint.X - (int)_dragItem.Location.X, imagePoint.Y - (int)_dragItem.Location.Y);\n      }\n    }\n\n    private void imageBox_MouseMove(object sender, MouseEventArgs e)\n    {\n      Point imagePoint;\n\n      imagePoint = imageBox.PointToImage(e.Location, true);\n\n      // set the cursor\n      imageBox.Cursor = _dragItem.Contains(imagePoint) ? Cursors.SizeAll : Cursors.Default;\n\n      // drag!\n      if (_isDragging)\n      {\n        int x;\n        int y;\n\n        x = Math.Max(0, imagePoint.X - _dragOffset.X);\n        y = Math.Max(0, imagePoint.Y - _dragOffset.Y);\n\n        if (x + _dragItem.Width >= imageBox.VirtualSize.Width)\n        {\n          x = imageBox.VirtualSize.Width - (int)_dragItem.Width;\n        }\n        if (y + _dragItem.Height >= imageBox.VirtualSize.Height)\n        {\n          y = imageBox.VirtualSize.Height - (int)_dragItem.Height;\n        }\n\n        _dragItem.Location = new PointF(x, y);\n        imageBox.Invalidate();\n      }\n    }\n\n    private void imageBox_MouseUp(object sender, MouseEventArgs e)\n    {\n      _isDragging = false;\n    }\n\n    private void imageBox_Selecting(object sender, ImageBoxCancelEventArgs e)\n    {\n      if (_dragItem.Contains(imageBox.PointToImage(e.Location)))\n      {\n        e.Cancel = true;\n      }\n    }\n\n    private void imageBox_SelectionRegionChanged(object sender, EventArgs e)\n    {\n      if (!imageBox.SelectionRegion.IsEmpty)\n      {\n        _dragItem = imageBox.SelectionRegion;\n        imageBox.SelectionRegion = RectangleF.Empty;\n      }\n    }\n\n    private void imageBox_VirtualDraw(object sender, PaintEventArgs e)\n    {\n      RectangleF bounds;\n\n      // draw the virtual area\n      bounds = imageBox.GetOffsetRectangle(new RectangleF(PointF.Empty, imageBox.VirtualSize));\n\n      using (Brush brush = new SolidBrush(Color.FromArgb(128, Color.Goldenrod)))\n      {\n        e.Graphics.FillRectangle(brush, bounds);\n      }\n\n      e.Graphics.DrawRectangle(Pens.DarkGoldenrod, bounds.X, bounds.Y, bounds.Width, bounds.Height);\n\n      // draw the \"drag\" item\n      bounds = imageBox.GetOffsetRectangle(_dragItem);\n\n      using (Brush brush = new SolidBrush(Color.FromArgb(128, Color.CornflowerBlue)))\n      {\n        e.Graphics.FillRectangle(brush, bounds);\n      }\n\n      e.Graphics.DrawRectangle(Pens.Blue, bounds.X, bounds.Y, bounds.Width, bounds.Height);\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/DragTestForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"demoLabel.Text\" xml:space=\"preserve\">\n    <value>In this demo, a virtual mode ImageBox is being used to define a drag region, and then move it around.\n\nWhen the Selecting event is raised, a check is made to see if the current cursor (adjusted for zoom of course!) is within the drag area. If it is, the event is cancelled. If it is not, a new selection region is allowed to be created.\n\nThe MouseDown, MouseMove and MouseUp events are used to allow the drag region to be moved around, within the confines of the virtual area.\n\nSee the \"Resizable Selection\" demo for an improved version of this code, which also supports cancelation and resizing support.\n</value>\n  </data>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>17, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>132, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/EventsListBox.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal class EventsListBox : ListBox\n  {\n    #region Public Members\n\n    public void AddEvent(Control sender, string eventName)\n    {\n      this.AddEvent(sender, eventName, null);\n    }\n\n    public void AddEvent(Control sender, string eventName, IDictionary<string, object> values)\n    {\n      StringBuilder eventData;\n\n      eventData = new StringBuilder();\n\n      eventData.Append(DateTime.Now.ToLongTimeString());\n      eventData.Append(\"\\t\");\n      eventData.Append(sender.Name);\n      eventData.Append(\".\");\n      eventData.Append(eventName);\n      eventData.Append(\"(\");\n\n      if (values != null)\n      {\n        int index;\n\n        index = 0;\n\n        foreach (KeyValuePair<string, object> value in values)\n        {\n          eventData.AppendFormat(\"{0} = {1}\", value.Key, value.Value);\n\n          if (index < values.Count - 1)\n          {\n            eventData.Append(\", \");\n          }\n\n          index++;\n        }\n      }\n      eventData.Append(\")\");\n\n      this.Items.Add(eventData.ToString());\n      this.TopIndex = this.Items.Count - (this.ClientSize.Height / this.ItemHeight);\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/FilteredPropertyGrid.cs",
    "content": "using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\n\n// Derived from https://www.codeproject.com/articles/13342/filtering-properties-in-a-propertygrid\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  /// <summary>\n  /// This class overrides the standard PropertyGrid provided by Microsoft.\n  /// It also allows to hide (or filter) the properties of the SelectedObject displayed by the PropertyGrid.\n  /// </summary>\n  internal class FilteredPropertyGrid : PropertyGrid\n  {\n    #region Private Fields\n\n    private AttributeCollection _browsableAttributes;\n\n    private string[] _browsableProperties;\n\n    private AttributeCollection _hiddenAttributes;\n\n    private string[] _hiddenProperties;\n\n    private List<PropertyDescriptor> _propertyDescriptors;\n\n    private ObjectWrapper _wrapper;\n\n    #endregion Private Fields\n\n    #region Public Constructors\n\n    /// <summary>Public constructor.</summary>\n    public FilteredPropertyGrid()\n    {\n      _propertyDescriptors = new List<PropertyDescriptor>();\n    }\n\n    #endregion Public Constructors\n\n    #region Public Properties\n\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public new AttributeCollection BrowsableAttributes\n    {\n      get { return _browsableAttributes; }\n      set\n      {\n        if (_browsableAttributes != value)\n        {\n          _hiddenAttributes = null;\n          _browsableAttributes = value;\n          this.RefreshProperties();\n        }\n      }\n    }\n\n    /// <summary>Get or set the properties to show.</summary>\n    /// <exception cref=\"ArgumentException\">if one or several properties don't exist.</exception>\n    [DefaultValue(typeof(string[]), null)]\n    public string[] BrowsableProperties\n    {\n      get { return _browsableProperties; }\n      set\n      {\n        if (value != _browsableProperties)\n        {\n          _browsableProperties = value;\n          //m_HiddenProperties = null;\n          this.RefreshProperties();\n        }\n      }\n    }\n\n    /// <summary>Get or set the categories to hide.</summary>\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public AttributeCollection HiddenAttributes\n    {\n      get { return _hiddenAttributes; }\n      set\n      {\n        if (value != _hiddenAttributes)\n        {\n          _hiddenAttributes = value;\n          _browsableAttributes = null;\n          this.RefreshProperties();\n        }\n      }\n    }\n\n    /// <summary>Get or set the properties to hide.</summary>\n    [DefaultValue(typeof(string[]), null)]\n    public string[] HiddenProperties\n    {\n      get { return _hiddenProperties; }\n      set\n      {\n        if (value != _hiddenProperties)\n        {\n          //m_BrowsableProperties = null;\n          _hiddenProperties = value;\n          this.RefreshProperties();\n        }\n      }\n    }\n\n    /// <summary>Overwrite the PropertyGrid.SelectedObject property.</summary>\n    /// <remarks>The object passed to the base PropertyGrid is the wrapper.</remarks>\n    public new object SelectedObject\n    {\n      get { return _wrapper != null ? ((ObjectWrapper)base.SelectedObject).SelectedObject : null; }\n      set\n      {\n        // Set the new object to the wrapper and create one if necessary.\n        if (_wrapper == null)\n        {\n          _wrapper = new ObjectWrapper(value);\n          this.RefreshProperties();\n        }\n        else if (_wrapper.SelectedObject != value)\n        {\n          bool needrefresh = value.GetType() != _wrapper.SelectedObject.GetType();\n          _wrapper.SelectedObject = value;\n          if (needrefresh) this.RefreshProperties();\n        }\n\n        // Set the list of properties to the wrapper.\n        _wrapper.PropertyDescriptors = _propertyDescriptors;\n\n        // Link the wrapper to the parent PropertyGrid.\n        base.SelectedObject = _wrapper;\n      }\n    }\n\n    #endregion Public Properties\n\n    #region Private Methods\n\n    /// <summary>Allows to hide a set of properties to the parent PropertyGrid.</summary>\n    /// <param name=\"propertyname\">A set of attributes that filter the original collection of properties.</param>\n    /// <remarks>For better performance, include the BrowsableAttribute with true value.</remarks>\n    private void HideAttribute(Attribute attribute)\n    {\n      PropertyDescriptorCollection filteredoriginalpropertydescriptors;\n\n      filteredoriginalpropertydescriptors = TypeDescriptor.GetProperties(_wrapper.SelectedObject, new Attribute[] { attribute });\n\n      if (filteredoriginalpropertydescriptors == null || filteredoriginalpropertydescriptors.Count == 0)\n      {\n        throw new ArgumentException(\"Attribute not found\", attribute.ToString());\n      }\n\n      foreach (PropertyDescriptor propertydescriptor in filteredoriginalpropertydescriptors)\n      {\n        this.HideProperty(propertydescriptor);\n      }\n    }\n\n    /// <summary>Allows to hide a property to the parent PropertyGrid.</summary>\n    /// <param name=\"propertyname\">The name of the property to be hidden.</param>\n    private void HideProperty(PropertyDescriptor property)\n    {\n      if (_propertyDescriptors.Contains(property))\n      {\n        _propertyDescriptors.Remove(property);\n      }\n    }\n\n    /// <summary>Build the list of the properties to be displayed in the PropertyGrid, following the filters defined the Browsable and Hidden properties.</summary>\n    private void RefreshProperties()\n    {\n      if (_wrapper != null)\n      {\n        PropertyDescriptorCollection allproperties;\n\n        // Clear the list of properties to be displayed.\n        _propertyDescriptors.Clear();\n\n        // Check whether the list is filtered\n        if (_browsableAttributes != null && _browsableAttributes.Count > 0)\n        {\n          // Add to the list the attributes that need to be displayed.\n          foreach (Attribute attribute in _browsableAttributes)\n          {\n            this.ShowAttribute(attribute);\n          }\n        }\n        else\n        {\n          // Fill the collection with all the properties.\n          //   PropertyDescriptorCollection originalpropertydescriptors = TypeDescriptor.GetProperties(m_Wrapper.SelectedObject);\n          //  foreach (PropertyDescriptor propertydescriptor in originalpropertydescriptors) m_PropertyDescriptors.Add(propertydescriptor);\n          // Remove from the list the attributes that mustn't be displayed.\n          if (_hiddenAttributes != null)\n          {\n            foreach (Attribute attribute in _hiddenAttributes)\n            {\n              this.HideAttribute(attribute);\n            }\n          }\n        }\n\n        // Get all the properties of the SelectedObject\n        allproperties = TypeDescriptor.GetProperties(_wrapper.SelectedObject);\n\n        // Hide if necessary, some properties\n        if (_hiddenProperties != null && _hiddenProperties.Length > 0)\n        {\n          // Remove from the list the properties that mustn't be displayed.\n          foreach (string propertyname in _hiddenProperties)\n          {\n            // Remove from the list the property\n            this.HideProperty(allproperties[propertyname]);\n          }\n        }\n        // Display if necessary, some properties\n        if (_browsableProperties != null && _browsableProperties.Length > 0)\n        {\n          foreach (string propertyname in _browsableProperties)\n          {\n            this.ShowProperty(allproperties[propertyname]);\n          }\n        }\n      }\n    }\n\n    /// <summary>Add all the properties that match an attribute to the list of properties to be displayed in the PropertyGrid.</summary>\n    /// <param name=\"property\">The attribute to be added.</param>\n    private void ShowAttribute(Attribute attribute)\n    {\n      PropertyDescriptorCollection filteredoriginalpropertydescriptors;\n\n      filteredoriginalpropertydescriptors = TypeDescriptor.GetProperties(_wrapper.SelectedObject, new Attribute[] { attribute });\n\n      if (filteredoriginalpropertydescriptors == null || filteredoriginalpropertydescriptors.Count == 0)\n      {\n        throw new ArgumentException(\"Attribute not found\", attribute.ToString());\n      }\n\n      foreach (PropertyDescriptor propertydescriptor in filteredoriginalpropertydescriptors)\n      {\n        this.ShowProperty(propertydescriptor);\n      }\n    }\n\n    /// <summary>Add a property to the list of properties to be displayed in the PropertyGrid.</summary>\n    /// <param name=\"property\">The property to be added.</param>\n    private void ShowProperty(PropertyDescriptor property)\n    {\n      if (!_propertyDescriptors.Contains(property))\n      {\n        _propertyDescriptors.Add(property);\n      }\n    }\n\n    #endregion Private Methods\n\n    #region Private Classes\n\n    /// <summary>This class is a wrapper. It contains the object the propertyGrid has to display.</summary>\n    private sealed class ObjectWrapper : ICustomTypeDescriptor\n    {\n      #region Private Fields\n\n      private List<PropertyDescriptor> _propertyDescriptors;\n\n      private object _selectedObject;\n\n      #endregion Private Fields\n\n      #region Internal Constructors\n\n      /// <summary>Simple constructor.</summary>\n      /// <param name=\"obj\">A reference to the selected object that will linked to the parent PropertyGrid.</param>\n      internal ObjectWrapper(object obj)\n      {\n        _propertyDescriptors = new List<PropertyDescriptor>();\n        _selectedObject = obj;\n      }\n\n      #endregion Internal Constructors\n\n      #region Public Properties\n\n      /// <summary>Get or set a reference to the collection of properties to show in the parent PropertyGrid.</summary>\n      public List<PropertyDescriptor> PropertyDescriptors\n      {\n        get { return _propertyDescriptors; }\n        set { _propertyDescriptors = value; }\n      }\n\n      /// <summary>Get or set a reference to the selected objet that will linked to the parent PropertyGrid.</summary>\n      public object SelectedObject\n      {\n        get { return _selectedObject; }\n        set\n        {\n          if (_selectedObject != value)\n          {\n            _selectedObject = value;\n          }\n        }\n      }\n\n      #endregion Public Properties\n\n      #region Public Methods\n\n      /// <summary>GetAttributes.</summary>\n      /// <returns>AttributeCollection</returns>\n      public AttributeCollection GetAttributes()\n      {\n        return TypeDescriptor.GetAttributes(_selectedObject, true);\n      }\n\n      /// <summary>Get Class Name.</summary>\n      /// <returns>String</returns>\n      public string GetClassName()\n      {\n        return TypeDescriptor.GetClassName(_selectedObject, true);\n      }\n\n      /// <summary>GetComponentName.</summary>\n      /// <returns>String</returns>\n      public string GetComponentName()\n      {\n        return TypeDescriptor.GetComponentName(_selectedObject, true);\n      }\n\n      /// <summary>GetConverter.</summary>\n      /// <returns>TypeConverter</returns>\n      public TypeConverter GetConverter()\n      {\n        return TypeDescriptor.GetConverter(_selectedObject, true);\n      }\n\n      /// <summary>GetDefaultEvent.</summary>\n      /// <returns>EventDescriptor</returns>\n      public EventDescriptor GetDefaultEvent()\n      {\n        return TypeDescriptor.GetDefaultEvent(_selectedObject, true);\n      }\n\n      /// <summary>GetDefaultProperty.</summary>\n      /// <returns>PropertyDescriptor</returns>\n      public PropertyDescriptor GetDefaultProperty()\n      {\n        return TypeDescriptor.GetDefaultProperty(_selectedObject, true);\n      }\n\n      /// <summary>GetEditor.</summary>\n      /// <param name=\"editorBaseType\">editorBaseType</param>\n      /// <returns>object</returns>\n      public object GetEditor(Type editorBaseType)\n      {\n        return TypeDescriptor.GetEditor(this, editorBaseType, true);\n      }\n\n      public EventDescriptorCollection GetEvents(Attribute[] attributes)\n      {\n        return TypeDescriptor.GetEvents(_selectedObject, attributes, true);\n      }\n\n      public EventDescriptorCollection GetEvents()\n      {\n        return TypeDescriptor.GetEvents(_selectedObject, true);\n      }\n\n      public PropertyDescriptorCollection GetProperties(Attribute[] attributes)\n      {\n        return this.GetProperties();\n      }\n\n      public PropertyDescriptorCollection GetProperties()\n      {\n        return new PropertyDescriptorCollection(_propertyDescriptors.ToArray(), true);\n      }\n\n      public object GetPropertyOwner(PropertyDescriptor pd)\n      {\n        return _selectedObject;\n      }\n\n      #endregion Public Methods\n    }\n\n    #endregion Private Classes\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/GeneralDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class GeneralDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing)\n      {\n        if (_previewImage != null)\n          _previewImage.Dispose();\n\n        if (components != null)\n          components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GeneralDemoForm));\n      this.viewSplitContainer = new System.Windows.Forms.SplitContainer();\n      this.selectionSplitContainer = new System.Windows.Forms.SplitContainer();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.previewImageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.propertyGrid = new Cyotek.Windows.Forms.Demo.PropertyGrid();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.cursorToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();\n      this.autoScrollPositionToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.imageSizeToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.zoomToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.selectionToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.toolStrip = new System.Windows.Forms.ToolStrip();\n      this.openFromFileToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.toolStripSeparator8 = new System.Windows.Forms.ToolStripSeparator();\n      this.showImageRegionToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.showSourceImageRegionToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();\n      this.actualSizeToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.zoomInToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.zoomOutToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();\n      this.selectAllToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.selectNoneToolStripButton = new System.Windows.Forms.ToolStripButton();\n      this.zoomLevelsToolStripComboBox = new System.Windows.Forms.ToolStripComboBox();\n      this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.openFromFileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.fromURLToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();\n      this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.toolStripSeparator6 = new System.Windows.Forms.ToolStripSeparator();\n      this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.selectNoneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.fitCursorLocationToBoundsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.viewSplitContainer.Panel1.SuspendLayout();\n      this.viewSplitContainer.Panel2.SuspendLayout();\n      this.viewSplitContainer.SuspendLayout();\n      this.selectionSplitContainer.Panel1.SuspendLayout();\n      this.selectionSplitContainer.Panel2.SuspendLayout();\n      this.selectionSplitContainer.SuspendLayout();\n      this.statusStrip.SuspendLayout();\n      this.toolStrip.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.SuspendLayout();\n      //\n      // viewSplitContainer\n      //\n      this.viewSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.viewSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;\n      this.viewSplitContainer.Location = new System.Drawing.Point(0, 49);\n      this.viewSplitContainer.Name = \"viewSplitContainer\";\n      //\n      // viewSplitContainer.Panel1\n      //\n      this.viewSplitContainer.Panel1.Controls.Add(this.selectionSplitContainer);\n      //\n      // viewSplitContainer.Panel2\n      //\n      this.viewSplitContainer.Panel2.Controls.Add(this.propertyGrid);\n      this.viewSplitContainer.Size = new System.Drawing.Size(909, 455);\n      this.viewSplitContainer.SplitterDistance = 597;\n      this.viewSplitContainer.TabIndex = 0;\n      //\n      // selectionSplitContainer\n      //\n      this.selectionSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.selectionSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;\n      this.selectionSplitContainer.Location = new System.Drawing.Point(0, 0);\n      this.selectionSplitContainer.Name = \"selectionSplitContainer\";\n      this.selectionSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;\n      //\n      // selectionSplitContainer.Panel1\n      //\n      this.selectionSplitContainer.Panel1.Controls.Add(this.imageBox);\n      //\n      // selectionSplitContainer.Panel2\n      //\n      this.selectionSplitContainer.Panel2.Controls.Add(this.previewImageBox);\n      this.selectionSplitContainer.Size = new System.Drawing.Size(597, 455);\n      this.selectionSplitContainer.SplitterDistance = 293;\n      this.selectionSplitContainer.TabIndex = 1;\n      //\n      // imageBox\n      //\n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.Size = new System.Drawing.Size(597, 293);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.Selected += new System.EventHandler<System.EventArgs>(this.imageBox_Selected);\n      this.imageBox.SelectionRegionChanged += new System.EventHandler(this.imageBox_SelectionRegionChanged);\n      this.imageBox.ZoomChanged += new System.EventHandler(this.imageBox_ZoomChanged);\n      this.imageBox.ZoomLevelsChanged += new System.EventHandler(this.imageBox_ZoomLevelsChanged);\n      this.imageBox.Scroll += new System.Windows.Forms.ScrollEventHandler(this.imageBox_Scroll);\n      this.imageBox.Paint += new System.Windows.Forms.PaintEventHandler(this.imageBox_Paint);\n      this.imageBox.MouseLeave += new System.EventHandler(this.imageBox_MouseLeave);\n      this.imageBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseMove);\n      this.imageBox.Resize += new System.EventHandler(this.imageBox_Resize);\n      //\n      // previewImageBox\n      //\n      this.previewImageBox.AllowZoom = false;\n      this.previewImageBox.PanMode = ImageBoxPanMode.Middle;\n      this.previewImageBox.BackColor = System.Drawing.SystemColors.Control;\n      this.previewImageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.previewImageBox.GridDisplayMode = Cyotek.Windows.Forms.ImageBoxGridDisplayMode.Image;\n      this.previewImageBox.ImageBorderStyle = Cyotek.Windows.Forms.ImageBoxBorderStyle.FixedSingle;\n      this.previewImageBox.Location = new System.Drawing.Point(0, 0);\n      this.previewImageBox.Name = \"previewImageBox\";\n      this.previewImageBox.Size = new System.Drawing.Size(597, 158);\n      this.previewImageBox.TabIndex = 0;\n      //\n      // propertyGrid\n      //\n      this.propertyGrid.CommandsVisibleIfAvailable = false;\n      this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.propertyGrid.HelpVisible = false;\n      this.propertyGrid.Location = new System.Drawing.Point(0, 0);\n      this.propertyGrid.Name = \"propertyGrid\";\n      this.propertyGrid.SelectedObject = this.imageBox;\n      this.propertyGrid.Size = new System.Drawing.Size(308, 455);\n      this.propertyGrid.TabIndex = 0;\n      //\n      // statusStrip\n      //\n      this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.cursorToolStripStatusLabel,\n            this.toolStripStatusLabel1,\n            this.autoScrollPositionToolStripStatusLabel,\n            this.imageSizeToolStripStatusLabel,\n            this.zoomToolStripStatusLabel,\n            this.selectionToolStripStatusLabel});\n      this.statusStrip.Location = new System.Drawing.Point(0, 504);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.ShowItemToolTips = true;\n      this.statusStrip.Size = new System.Drawing.Size(909, 22);\n      this.statusStrip.TabIndex = 1;\n      //\n      // cursorToolStripStatusLabel\n      //\n      this.cursorToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Cursor;\n      this.cursorToolStripStatusLabel.Name = \"cursorToolStripStatusLabel\";\n      this.cursorToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.cursorToolStripStatusLabel.ToolTipText = \"Current Cursor Position\";\n      //\n      // toolStripStatusLabel1\n      //\n      this.toolStripStatusLabel1.Name = \"toolStripStatusLabel1\";\n      this.toolStripStatusLabel1.Size = new System.Drawing.Size(814, 17);\n      this.toolStripStatusLabel1.Spring = true;\n      //\n      // autoScrollPositionToolStripStatusLabel\n      //\n      this.autoScrollPositionToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Position;\n      this.autoScrollPositionToolStripStatusLabel.Name = \"autoScrollPositionToolStripStatusLabel\";\n      this.autoScrollPositionToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.autoScrollPositionToolStripStatusLabel.ToolTipText = \"Auto Scroll Position\";\n      //\n      // imageSizeToolStripStatusLabel\n      //\n      this.imageSizeToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Size;\n      this.imageSizeToolStripStatusLabel.Name = \"imageSizeToolStripStatusLabel\";\n      this.imageSizeToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.imageSizeToolStripStatusLabel.ToolTipText = \"Image Size\";\n      //\n      // zoomToolStripStatusLabel\n      //\n      this.zoomToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Zoom;\n      this.zoomToolStripStatusLabel.Name = \"zoomToolStripStatusLabel\";\n      this.zoomToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.zoomToolStripStatusLabel.ToolTipText = \"Zoom\";\n      //\n      // selectionToolStripStatusLabel\n      //\n      this.selectionToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.SelectAll;\n      this.selectionToolStripStatusLabel.Name = \"selectionToolStripStatusLabel\";\n      this.selectionToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      //\n      // toolStrip\n      //\n      this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.openFromFileToolStripButton,\n            this.toolStripSeparator8,\n            this.showImageRegionToolStripButton,\n            this.showSourceImageRegionToolStripButton,\n            this.toolStripSeparator1,\n            this.actualSizeToolStripButton,\n            this.zoomInToolStripButton,\n            this.zoomOutToolStripButton,\n            this.toolStripSeparator2,\n            this.selectAllToolStripButton,\n            this.selectNoneToolStripButton,\n            this.zoomLevelsToolStripComboBox,\n            this.toolStripSeparator4});\n      this.toolStrip.Location = new System.Drawing.Point(0, 24);\n      this.toolStrip.Name = \"toolStrip\";\n      this.toolStrip.Size = new System.Drawing.Size(909, 25);\n      this.toolStrip.TabIndex = 2;\n      //\n      // openFromFileToolStripButton\n      //\n      this.openFromFileToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.openFromFileToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Open;\n      this.openFromFileToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.openFromFileToolStripButton.Name = \"openFromFileToolStripButton\";\n      this.openFromFileToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.openFromFileToolStripButton.Text = \"&Open\";\n      this.openFromFileToolStripButton.Click += new System.EventHandler(this.openFromFileToolStripMenuItem_Click);\n      //\n      // toolStripSeparator8\n      //\n      this.toolStripSeparator8.Name = \"toolStripSeparator8\";\n      this.toolStripSeparator8.Size = new System.Drawing.Size(6, 25);\n      //\n      // showImageRegionToolStripButton\n      //\n      this.showImageRegionToolStripButton.CheckOnClick = true;\n      this.showImageRegionToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.showImageRegionToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Zone;\n      this.showImageRegionToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.showImageRegionToolStripButton.Name = \"showImageRegionToolStripButton\";\n      this.showImageRegionToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.showImageRegionToolStripButton.Text = \"Show Image Region\";\n      this.showImageRegionToolStripButton.Click += new System.EventHandler(this.showImageRegionToolStripButton_Click);\n      //\n      // showSourceImageRegionToolStripButton\n      //\n      this.showSourceImageRegionToolStripButton.CheckOnClick = true;\n      this.showSourceImageRegionToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.showSourceImageRegionToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Zone;\n      this.showSourceImageRegionToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.showSourceImageRegionToolStripButton.Name = \"showSourceImageRegionToolStripButton\";\n      this.showSourceImageRegionToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.showSourceImageRegionToolStripButton.Text = \"Show Source Image Region\";\n      this.showSourceImageRegionToolStripButton.Click += new System.EventHandler(this.showImageRegionToolStripButton_Click);\n      //\n      // toolStripSeparator1\n      //\n      this.toolStripSeparator1.Name = \"toolStripSeparator1\";\n      this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);\n      //\n      // actualSizeToolStripButton\n      //\n      this.actualSizeToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.actualSizeToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.ActualSize;\n      this.actualSizeToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.actualSizeToolStripButton.Name = \"actualSizeToolStripButton\";\n      this.actualSizeToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.actualSizeToolStripButton.Text = \"Actual Size\";\n      this.actualSizeToolStripButton.Click += new System.EventHandler(this.actualSizeToolStripButton_Click);\n      //\n      // zoomInToolStripButton\n      //\n      this.zoomInToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.zoomInToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.ZoomIn;\n      this.zoomInToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.zoomInToolStripButton.Name = \"zoomInToolStripButton\";\n      this.zoomInToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.zoomInToolStripButton.Text = \"Zoom In\";\n      this.zoomInToolStripButton.Click += new System.EventHandler(this.zoomInToolStripButton_Click);\n      //\n      // zoomOutToolStripButton\n      //\n      this.zoomOutToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.zoomOutToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.ZoomOut;\n      this.zoomOutToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.zoomOutToolStripButton.Name = \"zoomOutToolStripButton\";\n      this.zoomOutToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.zoomOutToolStripButton.Text = \"Zoom Out\";\n      this.zoomOutToolStripButton.Click += new System.EventHandler(this.zoomOutToolStripButton_Click);\n      //\n      // toolStripSeparator2\n      //\n      this.toolStripSeparator2.Name = \"toolStripSeparator2\";\n      this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);\n      //\n      // selectAllToolStripButton\n      //\n      this.selectAllToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.selectAllToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.SelectAll;\n      this.selectAllToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.selectAllToolStripButton.Name = \"selectAllToolStripButton\";\n      this.selectAllToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.selectAllToolStripButton.Text = \"Select All\";\n      this.selectAllToolStripButton.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);\n      //\n      // selectNoneToolStripButton\n      //\n      this.selectNoneToolStripButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;\n      this.selectNoneToolStripButton.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.SelectNone;\n      this.selectNoneToolStripButton.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.selectNoneToolStripButton.Name = \"selectNoneToolStripButton\";\n      this.selectNoneToolStripButton.Size = new System.Drawing.Size(23, 22);\n      this.selectNoneToolStripButton.Text = \"Select None\";\n      this.selectNoneToolStripButton.Click += new System.EventHandler(this.selectNoneToolStripMenuItem_Click);\n      //\n      // zoomLevelsToolStripComboBox\n      //\n      this.zoomLevelsToolStripComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;\n      this.zoomLevelsToolStripComboBox.Name = \"zoomLevelsToolStripComboBox\";\n      this.zoomLevelsToolStripComboBox.Size = new System.Drawing.Size(121, 25);\n      this.zoomLevelsToolStripComboBox.SelectedIndexChanged += new System.EventHandler(this.zoomLevelsToolStripComboBox_SelectedIndexChanged);\n      //\n      // toolStripSeparator4\n      //\n      this.toolStripSeparator4.Name = \"toolStripSeparator4\";\n      this.toolStripSeparator4.Size = new System.Drawing.Size(6, 25);\n      //\n      // menuStrip\n      //\n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.editToolStripMenuItem,\n            this.viewToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Size = new System.Drawing.Size(909, 24);\n      this.menuStrip.TabIndex = 3;\n      //\n      // fileToolStripMenuItem\n      //\n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.openToolStripMenuItem,\n            this.toolStripSeparator3,\n            this.exitToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      //\n      // openToolStripMenuItem\n      //\n      this.openToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.openFromFileToolStripMenuItem,\n            this.fromURLToolStripMenuItem});\n      this.openToolStripMenuItem.Name = \"openToolStripMenuItem\";\n      this.openToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.openToolStripMenuItem.Text = \"&Open\";\n      //\n      // openFromFileToolStripMenuItem\n      //\n      this.openFromFileToolStripMenuItem.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Open;\n      this.openFromFileToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.openFromFileToolStripMenuItem.Name = \"openFromFileToolStripMenuItem\";\n      this.openFromFileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));\n      this.openFromFileToolStripMenuItem.Size = new System.Drawing.Size(175, 22);\n      this.openFromFileToolStripMenuItem.Text = \"From &File...\";\n      this.openFromFileToolStripMenuItem.Click += new System.EventHandler(this.openFromFileToolStripMenuItem_Click);\n      //\n      // fromURLToolStripMenuItem\n      //\n      this.fromURLToolStripMenuItem.Name = \"fromURLToolStripMenuItem\";\n      this.fromURLToolStripMenuItem.Size = new System.Drawing.Size(175, 22);\n      this.fromURLToolStripMenuItem.Text = \"From &URL...\";\n      this.fromURLToolStripMenuItem.Click += new System.EventHandler(this.fromURLToolStripMenuItem_Click);\n      //\n      // toolStripSeparator3\n      //\n      this.toolStripSeparator3.Name = \"toolStripSeparator3\";\n      this.toolStripSeparator3.Size = new System.Drawing.Size(145, 6);\n      //\n      // exitToolStripMenuItem\n      //\n      this.exitToolStripMenuItem.Name = \"exitToolStripMenuItem\";\n      this.exitToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.exitToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.exitToolStripMenuItem.Text = \"&Close\";\n      this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);\n      //\n      // editToolStripMenuItem\n      //\n      this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.copyToolStripMenuItem,\n            this.toolStripSeparator6,\n            this.selectAllToolStripMenuItem,\n            this.selectNoneToolStripMenuItem});\n      this.editToolStripMenuItem.Name = \"editToolStripMenuItem\";\n      this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);\n      this.editToolStripMenuItem.Text = \"&Edit\";\n      //\n      // copyToolStripMenuItem\n      //\n      this.copyToolStripMenuItem.Image = ((System.Drawing.Image)(resources.GetObject(\"copyToolStripMenuItem.Image\")));\n      this.copyToolStripMenuItem.ImageTransparentColor = System.Drawing.Color.Magenta;\n      this.copyToolStripMenuItem.Name = \"copyToolStripMenuItem\";\n      this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));\n      this.copyToolStripMenuItem.Size = new System.Drawing.Size(179, 22);\n      this.copyToolStripMenuItem.Text = \"&Copy\";\n      this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);\n      //\n      // toolStripSeparator6\n      //\n      this.toolStripSeparator6.Name = \"toolStripSeparator6\";\n      this.toolStripSeparator6.Size = new System.Drawing.Size(176, 6);\n      //\n      // selectAllToolStripMenuItem\n      //\n      this.selectAllToolStripMenuItem.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.SelectAll;\n      this.selectAllToolStripMenuItem.Name = \"selectAllToolStripMenuItem\";\n      this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));\n      this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(179, 22);\n      this.selectAllToolStripMenuItem.Text = \"Select &All\";\n      this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);\n      //\n      // selectNoneToolStripMenuItem\n      //\n      this.selectNoneToolStripMenuItem.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.SelectNone;\n      this.selectNoneToolStripMenuItem.Name = \"selectNoneToolStripMenuItem\";\n      this.selectNoneToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.D)));\n      this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(179, 22);\n      this.selectNoneToolStripMenuItem.Text = \"Select &None\";\n      this.selectNoneToolStripMenuItem.Click += new System.EventHandler(this.selectNoneToolStripMenuItem_Click);\n      //\n      // viewToolStripMenuItem\n      //\n      this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fitCursorLocationToBoundsToolStripMenuItem});\n      this.viewToolStripMenuItem.Name = \"viewToolStripMenuItem\";\n      this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.viewToolStripMenuItem.Text = \"&View\";\n      //\n      // fitCursorLocationToBoundsToolStripMenuItem\n      //\n      this.fitCursorLocationToBoundsToolStripMenuItem.Checked = true;\n      this.fitCursorLocationToBoundsToolStripMenuItem.CheckOnClick = true;\n      this.fitCursorLocationToBoundsToolStripMenuItem.CheckState = System.Windows.Forms.CheckState.Checked;\n      this.fitCursorLocationToBoundsToolStripMenuItem.Name = \"fitCursorLocationToBoundsToolStripMenuItem\";\n      this.fitCursorLocationToBoundsToolStripMenuItem.Size = new System.Drawing.Size(233, 22);\n      this.fitCursorLocationToBoundsToolStripMenuItem.Text = \"Fit Cursor Location To &Bounds\";\n      //\n      // helpToolStripMenuItem\n      //\n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      //\n      // aboutToolStripMenuItem\n      //\n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      //\n      // GeneralDemoForm\n      //\n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(909, 526);\n      this.Controls.Add(this.viewSplitContainer);\n      this.Controls.Add(this.statusStrip);\n      this.Controls.Add(this.toolStrip);\n      this.Controls.Add(this.menuStrip);\n      this.MainMenuStrip = this.menuStrip;\n      this.Name = \"GeneralDemoForm\";\n      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;\n      this.Text = \"General Demonstration\";\n      this.viewSplitContainer.Panel1.ResumeLayout(false);\n      this.viewSplitContainer.Panel2.ResumeLayout(false);\n      this.viewSplitContainer.ResumeLayout(false);\n      this.selectionSplitContainer.Panel1.ResumeLayout(false);\n      this.selectionSplitContainer.Panel2.ResumeLayout(false);\n      this.selectionSplitContainer.ResumeLayout(false);\n      this.statusStrip.ResumeLayout(false);\n      this.statusStrip.PerformLayout();\n      this.toolStrip.ResumeLayout(false);\n      this.toolStrip.PerformLayout();\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.SplitContainer viewSplitContainer;\n    private Cyotek.Windows.Forms.ImageBox imageBox;\n    private PropertyGrid propertyGrid;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.ToolStripStatusLabel autoScrollPositionToolStripStatusLabel;\n    private System.Windows.Forms.ToolStrip toolStrip;\n    private System.Windows.Forms.ToolStripButton showImageRegionToolStripButton;\n    private System.Windows.Forms.ToolStripButton showSourceImageRegionToolStripButton;\n    private System.Windows.Forms.ToolStripStatusLabel imageSizeToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel zoomToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;\n    private System.Windows.Forms.ToolStripButton actualSizeToolStripButton;\n    private System.Windows.Forms.ToolStripButton zoomInToolStripButton;\n    private System.Windows.Forms.ToolStripButton zoomOutToolStripButton;\n    private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;\n    private System.Windows.Forms.ToolStripStatusLabel cursorToolStripStatusLabel;\n    private System.Windows.Forms.SplitContainer selectionSplitContainer;\n    private Cyotek.Windows.Forms.ImageBox previewImageBox;\n    private System.Windows.Forms.ToolStripStatusLabel selectionToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;\n    private System.Windows.Forms.ToolStripButton selectAllToolStripButton;\n    private System.Windows.Forms.ToolStripButton selectNoneToolStripButton;\n    private System.Windows.Forms.ToolStripButton openFromFileToolStripButton;\n    private System.Windows.Forms.ToolStripSeparator toolStripSeparator8;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;\n    private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem;\n    private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;\n    private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.ToolStripComboBox zoomLevelsToolStripComboBox;\n    private System.Windows.Forms.ToolStripMenuItem selectNoneToolStripMenuItem;\n    private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;\n    private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem fitCursorLocationToBoundsToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem openFromFileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem fromURLToolStripMenuItem;\n  }\n}\n\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/GeneralDemoForm.cs",
    "content": "using System;\nusing System.Drawing;\nusing System.Drawing.Drawing2D;\nusing System.IO;\nusing System.Net;\nusing System.Windows.Forms;\nusing Cyotek.Windows.Forms.Demo.Properties;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2017 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class GeneralDemoForm : BaseForm\n  {\n    #region Fields\n\n    private Image _previewImage;\n\n    #endregion\n\n    #region Constructors\n\n    public GeneralDemoForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      this.FillZoomLevels();\n      this.OpenImage(Resources.Sample);\n\n      imageBox.SelectionMode = ImageBoxSelectionMode.Zoom;\n      imageBox.AllowClickZoom = true;\n    }\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void actualSizeToolStripButton_Click(object sender, EventArgs e)\n    {\n      imageBox.ActualSize();\n    }\n\n    private void copyToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      try\n      {\n        Clipboard.Clear();\n        Clipboard.SetImage(imageBox.GetSelectedImage() ?? imageBox.Image);\n      }\n      catch (Exception ex)\n      {\n        MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);\n      }\n    }\n\n    private void DrawBox(Graphics graphics, Color color, RectangleF rectangle, double scale)\n    {\n      float penWidth;\n\n      penWidth = 2 * (float)scale;\n\n      using (SolidBrush brush = new SolidBrush(Color.FromArgb(64, color)))\n      {\n        graphics.FillRectangle(brush, rectangle);\n      }\n\n      using (Pen pen = new Pen(color, penWidth)\n                       {\n                         DashStyle = DashStyle.Dot,\n                         DashCap = DashCap.Round\n                       })\n      {\n        graphics.DrawRectangle(pen, rectangle.X, rectangle.Y, rectangle.Width, rectangle.Height);\n      }\n    }\n\n    private void exitToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void FillZoomLevels()\n    {\n      zoomLevelsToolStripComboBox.Items.Clear();\n\n      foreach (int zoom in imageBox.ZoomLevels)\n      {\n        zoomLevelsToolStripComboBox.Items.Add(string.Format(\"{0}%\", zoom));\n      }\n    }\n\n    private void fromURLToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      using (OpenUrlDialog dialog = new OpenUrlDialog())\n      {\n        if (dialog.ShowDialog(this) == DialogResult.OK)\n        {\n          this.OpenImageFromUrl(dialog.Url);\n        }\n      }\n    }\n\n    private void imageBox_MouseLeave(object sender, EventArgs e)\n    {\n      cursorToolStripStatusLabel.Text = string.Empty;\n    }\n\n    private void imageBox_MouseMove(object sender, MouseEventArgs e)\n    {\n      this.UpdateCursorPosition(e.Location);\n    }\n\n    private void imageBox_Paint(object sender, PaintEventArgs e)\n    {\n      // highlight the image\n      if (showImageRegionToolStripButton.Checked)\n      {\n        this.DrawBox(e.Graphics, Color.CornflowerBlue, imageBox.GetImageViewPort(), 1);\n      }\n\n      // show the region that will be drawn from the source image\n      if (showSourceImageRegionToolStripButton.Checked)\n      {\n        this.DrawBox(e.Graphics, Color.Firebrick, new RectangleF(imageBox.GetImageViewPort().Location, imageBox.GetSourceImageRegion().Size), 1);\n      }\n    }\n\n    private void imageBox_Resize(object sender, EventArgs e)\n    {\n      this.UpdateStatusBar();\n    }\n\n    private void imageBox_Scroll(object sender, ScrollEventArgs e)\n    {\n      this.UpdateStatusBar();\n    }\n\n    private void imageBox_Selected(object sender, EventArgs e)\n    {\n      this.UpdatePreviewImage();\n    }\n\n    private void imageBox_SelectionRegionChanged(object sender, EventArgs e)\n    {\n      selectionToolStripStatusLabel.Text = this.FormatRectangle(imageBox.SelectionRegion);\n    }\n\n    private void imageBox_ZoomChanged(object sender, EventArgs e)\n    {\n      this.UpdateStatusBar();\n    }\n\n    private void imageBox_ZoomLevelsChanged(object sender, EventArgs e)\n    {\n      this.FillZoomLevels();\n    }\n\n    private void openFromFileToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      using (FileDialog dialog = new OpenFileDialog())\n      {\n        dialog.Filter = \"All Supported Images (*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png;*.tif;*.tiff)|*.bmp;*.dib;*.rle;*.gif;*.jpg;*.png;*.tif;*.tiff|Bitmaps (*.bmp;*.dib;*.rle)|*.bmp;*.dib;*.rle|Graphics Interchange Format (*.gif)|*.gif|Joint Photographic Experts (*.jpg)|*.jpg|Portable Network Graphics (*.png)|*.png|Tagged Image File Format (*.tif;*.tiff)|*.tif;*.tiff|All Files (*.*)|*.*\";\n        dialog.DefaultExt = \"png\";\n\n        if (dialog.ShowDialog(this) == DialogResult.OK)\n        {\n          try\n          {\n            this.OpenImage(Image.FromFile(dialog.FileName));\n          }\n          catch (Exception ex)\n          {\n            MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);\n          }\n        }\n      }\n    }\n\n    private void OpenImage(Image image)\n    {\n      imageBox.Image = image;\n      imageBox.ZoomToFit();\n\n      this.UpdateStatusBar();\n      this.UpdatePreviewImage();\n    }\n\n    private void OpenImageFromUrl(string url)\n    {\n      try\n      {\n        using (WebClient client = new WebClient())\n        {\n          byte[] data;\n\n          data = client.DownloadData(url);\n\n          using (Stream stream = new MemoryStream(data))\n          {\n            this.OpenImage(Image.FromStream(stream));\n          }\n        }\n      }\n      catch (Exception ex)\n      {\n        MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);\n      }\n    }\n\n    private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      imageBox.SelectAll();\n    }\n\n    private void selectNoneToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      imageBox.SelectNone();\n    }\n\n    private void showImageRegionToolStripButton_Click(object sender, EventArgs e)\n    {\n      imageBox.Invalidate();\n    }\n\n    private void UpdateCursorPosition(Point location)\n    {\n      if (!fitCursorLocationToBoundsToolStripMenuItem.Checked || imageBox.IsPointInImage(location))\n      {\n        Point point;\n\n        point = imageBox.PointToImage(location);\n\n        cursorToolStripStatusLabel.Text = this.FormatPoint(point);\n      }\n      else\n      {\n        cursorToolStripStatusLabel.Text = string.Empty;\n      }\n    }\n\n    private void UpdatePreviewImage()\n    {\n      if (_previewImage != null)\n      {\n        _previewImage.Dispose();\n      }\n\n      _previewImage = imageBox.GetSelectedImage();\n\n      previewImageBox.Image = _previewImage;\n    }\n\n    private void UpdateStatusBar()\n    {\n      zoomLevelsToolStripComboBox.Text = string.Format(\"{0}%\", imageBox.Zoom);\n      autoScrollPositionToolStripStatusLabel.Text = this.FormatPoint(imageBox.AutoScrollPosition);\n      imageSizeToolStripStatusLabel.Text = this.FormatRectangle(imageBox.GetImageViewPort());\n      zoomToolStripStatusLabel.Text = string.Format(\"{0}%\", imageBox.Zoom);\n    }\n\n    private void zoomInToolStripButton_Click(object sender, EventArgs e)\n    {\n      imageBox.ZoomIn();\n    }\n\n    private void zoomLevelsToolStripComboBox_SelectedIndexChanged(object sender, EventArgs e)\n    {\n      int zoom;\n\n      zoom = Convert.ToInt32(zoomLevelsToolStripComboBox.Text.Substring(0, zoomLevelsToolStripComboBox.Text.Length - 1));\n\n      imageBox.Zoom = zoom;\n    }\n\n    private void zoomOutToolStripButton_Click(object sender, EventArgs e)\n    {\n      imageBox.ZoomOut();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/GeneralDemoForm.resx",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>17, 17</value>\n  </metadata>\n  <metadata name=\"toolStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>126, 17</value>\n  </metadata>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>231, 17</value>\n  </metadata>\n  <assembly alias=\"System.Drawing\" name=\"System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" />\n  <data name=\"copyToolStripMenuItem.Image\" type=\"System.Drawing.Bitmap, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n    <value>\n        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8\n        YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHkSURBVDhPvZHfS1NhHIf3p5QypLr2D4goMwoMCi/qIugH\n        Xe1Cr7qKDIMkZixwNhfWLGWbnuki0kXKzLU023KubBNPJrbRdOzocm6e2dPOO21mMS+CHvjcvOf9PF++\n        79H9M+7RT2iRRsIi9sEAXe43yAvf2LpSHq28G9uAnytNT4jMLewtcQ2Ht2pF8ps/aOt+gccX5lxD694S\n        +1BQFD1RkN5DSFa4Z3uONKbgHE3h8KZ4OJTC1J8UiSzmfhd2uf1CoJHbyKOsZokl0kKwm+aeJaov+wjO\n        rpQkVqdXfOz0bWAcVLghfaXxkUz3y2VxvpMGSwL3uMKh+gHezSSLEnNhX23vtYzKUirDfGyFj/Iy1mdx\n        UWqR8iKhwtQLxjgH659y4EwvVXWPiwJt3/Ws+muywRrlqvkDdx3zQrCN8l1ldnEd3/QqFmkS/akHJYGS\n        zjLzOUEwEsMf+sLI2zmaOou/93pPGoM5zvk7UU7fnBKxSBPoT7SXBNW1F/9Io2lKCNTCeomUyrS8xnBA\n        wfUqyf1eP5U1ptJD/o1LzeNCsHPydtqdr6k4aiwvOHvNSya3ibU/QIdrEkvfhJislc32MfYfuV1eUGPw\n        FF7bIVJVZ0N/soPK421UHGstlFvYd/hWecF/Qqf7CR0A5wwgSQA2AAAAAElFTkSuQmCC\n</value>\n  </data>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/GroupBox.cs",
    "content": "using System;\nusing System.ComponentModel;\nusing System.ComponentModel.Design;\nusing System.Drawing;\nusing System.Drawing.Drawing2D;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms\n{\n  // Cyotek GroupBox Component\n  // www.cyotek.com\n\n  /// <summary>\n  /// Represents a Windows control that displays a frame at the top of a group of controls with an optional caption and icon.\n  /// </summary>\n  [ToolboxItem(true)]\n  [DefaultEvent(\"Click\")]\n  [DefaultProperty(\"Text\")]\n  [Designer(\"System.Windows.Forms.Design.GroupBoxDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\")]\n  [Designer(\"System.Windows.Forms.Design.DocumentDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\", typeof(IRootDesigner))]\n  internal class GroupBox : System.Windows.Forms.GroupBox\n  {\n    #region Instance Fields\n\n    private Border3DSide _borders = Border3DSide.Top;\n\n    private Pen _bottomPen;\n\n    private Color _headerForeColor;\n\n    private Size _iconMargin;\n\n    private Image _image;\n\n    private Color _lineColorBottom;\n\n    private Color _lineColorTop;\n\n    private bool _showBorders;\n\n    private Pen _topPen;\n\n    #endregion\n\n    #region Public Constructors\n\n    /// <summary>\n    /// Initializes a new instance of the <see cref=\"GroupBox\"/> class.\n    /// </summary>\n    public GroupBox()\n    {\n      _showBorders = true;\n      _iconMargin = new Size(0, 6);\n      _lineColorBottom = SystemColors.ButtonHighlight;\n      _lineColorTop = SystemColors.ButtonShadow;\n      _headerForeColor = SystemColors.HotTrack;\n\n      this.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.ResizeRedraw | ControlStyles.UserPaint | ControlStyles.SupportsTransparentBackColor, true);\n\n      this.CreateResources();\n    }\n\n    #endregion\n\n    #region Overridden Properties\n\n    /// <summary>\n    /// Gets a rectangle that represents the dimensions of the <see cref=\"T:System.Windows.Forms.GroupBox\"/>.\n    /// </summary>\n    /// <value></value>\n    /// <returns>\n    /// A <see cref=\"T:System.Drawing.Rectangle\"/> with the dimensions of the <see cref=\"T:System.Windows.Forms.GroupBox\"/>.\n    /// </returns>\n    public override Rectangle DisplayRectangle\n    {\n      get\n      {\n        Size clientSize;\n        int fontHeight;\n        int imageSize;\n\n        clientSize = base.ClientSize;\n        fontHeight = this.Font.Height;\n\n        if (_image != null)\n        {\n          imageSize = _iconMargin.Width + _image.Width + 3;\n        }\n        else\n        {\n          imageSize = 0;\n        }\n\n        return new Rectangle(3 + imageSize, fontHeight + 3, Math.Max(clientSize.Width - (imageSize + 6), 0), Math.Max((clientSize.Height - fontHeight) - 6, 0));\n      }\n    }\n\n    /// <summary>\n    /// Returns or sets the text displayed in this control.\n    /// </summary>\n    /// <value></value>\n    /// <returns>\n    /// The text associated with this control.\n    /// </returns>\n    [Browsable(true)]\n    [DefaultValue(\"\")]\n    public override string Text\n    {\n      get { return base.Text; }\n      set\n      {\n        base.Text = value;\n        this.Invalidate();\n      }\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    /// <summary> \n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing)\n      {\n        this.CleanUpResources();\n      }\n\n      base.Dispose(disposing);\n    }\n\n    /// <summary>\n    /// Occurs when the control is to be painted.\n    /// </summary>\n    /// <param name=\"e\">A <see cref=\"T:System.Windows.Forms.PaintEventArgs\"/> that contains the event data.</param>\n    protected override void OnPaint(PaintEventArgs e)\n    {\n      SizeF size;\n      int y;\n      TextFormatFlags flags;\n      Rectangle textBounds;\n\n      flags = TextFormatFlags.WordEllipsis | TextFormatFlags.NoPrefix | TextFormatFlags.Left | TextFormatFlags.SingleLine;\n\n      size = TextRenderer.MeasureText(e.Graphics, this.Text, this.Font, this.ClientSize, flags);\n      y = (int)(size.Height + 3) / 2;\n      textBounds = new Rectangle(1, 1, (int)size.Width, (int)size.Height);\n\n      if (this.ShowBorders)\n      {\n        if ((_borders & Border3DSide.All) == Border3DSide.All)\n        {\n          e.Graphics.DrawRectangle(_bottomPen, 1, y + 1, this.Width - 2, this.Height - (y + 2));\n          e.Graphics.DrawRectangle(_topPen, 0, y, this.Width - 2, this.Height - (y + 2));\n        }\n        else\n        {\n          if ((_borders & Border3DSide.Top) == Border3DSide.Top)\n          {\n            e.Graphics.DrawLine(_topPen, size.Width + 3, y, this.Width - 5, y);\n            e.Graphics.DrawLine(_bottomPen, size.Width + 3, y + 1, this.Width - 5, y + 1);\n          }\n\n          if ((_borders & Border3DSide.Left) == Border3DSide.Left)\n          {\n            e.Graphics.DrawLine(_topPen, 0, y, 0, this.Height - 1);\n            e.Graphics.DrawLine(_bottomPen, 1, y, 1, this.Height - 1);\n          }\n\n          if ((_borders & Border3DSide.Right) == Border3DSide.Right)\n          {\n            e.Graphics.DrawLine(_bottomPen, this.Width - 1, y, this.Width - 1, this.Height - 1);\n            e.Graphics.DrawLine(_topPen, this.Width - 2, y, this.Width - 2, this.Height - 1);\n          }\n\n          if ((_borders & Border3DSide.Bottom) == Border3DSide.Bottom)\n          {\n            e.Graphics.DrawLine(_topPen, 0, this.Height - 2, this.Width, this.Height - 2);\n            e.Graphics.DrawLine(_bottomPen, 0, this.Height - 1, this.Width, this.Height - 1);\n          }\n        }\n      }\n\n      // header text\n      TextRenderer.DrawText(e.Graphics, this.Text, this.Font, textBounds, this.HeaderForeColor, flags);\n\n      // draw the image\n      if ((_image != null))\n      {\n        e.Graphics.DrawImage(_image, this.Padding.Left + _iconMargin.Width, this.Padding.Top + (int)size.Height + _iconMargin.Height, _image.Width, _image.Height);\n      }\n\n      //draw a designtime outline\n      if (this.DesignMode && (_borders & Border3DSide.All) != Border3DSide.All)\n      {\n        using (Pen pen = new Pen(SystemColors.ButtonShadow))\n        {\n          pen.DashStyle = DashStyle.Dot;\n          e.Graphics.DrawRectangle(pen, 0, 0, Width - 1, Height - 1);\n        }\n      }\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"System.Windows.Forms.Control.SystemColorsChanged\"/> event.\n    /// </summary>\n    /// <param name=\"e\">An <see cref=\"T:System.EventArgs\"/> that contains the event data.</param>\n    protected override void OnSystemColorsChanged(EventArgs e)\n    {\n      base.OnSystemColorsChanged(e);\n\n      this.CreateResources();\n      this.Invalidate();\n    }\n\n    #endregion\n\n    #region Public Properties\n\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Border3DSide), \"Top\")]\n    public Border3DSide Borders\n    {\n      get { return _borders; }\n      set\n      {\n        _borders = value;\n        this.Invalidate();\n      }\n    }\n\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"HotTrack\")]\n    public Color HeaderForeColor\n    {\n      get { return _headerForeColor; }\n      set\n      {\n        _headerForeColor = value;\n        this.CreateResources();\n        this.Invalidate();\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the icon margin.\n    /// </summary>\n    /// <value>The icon margin.</value>\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Size), \"0, 6\")]\n    public Size IconMargin\n    {\n      get { return _iconMargin; }\n      set\n      {\n        _iconMargin = value;\n        this.Invalidate();\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the image to display.\n    /// </summary>\n    /// <value>The image to display.</value>\n    [Browsable(true)]\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Image), \"\")]\n    public Image Image\n    {\n      get { return _image; }\n      set\n      {\n        _image = value;\n        this.Invalidate();\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the line color bottom.\n    /// </summary>\n    /// <value>The line color bottom.</value>\n    [Browsable(true)]\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"ButtonHighlight\")]\n    public Color LineColorBottom\n    {\n      get { return _lineColorBottom; }\n      set\n      {\n        _lineColorBottom = value;\n        this.CreateResources();\n        this.Invalidate();\n      }\n    }\n\n    /// <summary>\n    /// Gets or sets the line color top.\n    /// </summary>\n    /// <value>The line color top.</value>\n    [Browsable(true)]\n    [Category(\"Appearance\")]\n    [DefaultValue(typeof(Color), \"ButtonShadow\")]\n    public Color LineColorTop\n    {\n      get { return _lineColorTop; }\n      set\n      {\n        _lineColorTop = value;\n        this.CreateResources();\n        this.Invalidate();\n      }\n    }\n\n    [DefaultValue(true)]\n    [Category(\"Appearance\")]\n    public bool ShowBorders\n    {\n      get { return _showBorders; }\n      set\n      {\n        _showBorders = value;\n        this.Invalidate();\n      }\n    }\n\n    #endregion\n\n    #region Private Members\n\n    /// <summary>\n    /// Cleans up GDI resources.\n    /// </summary>\n    private void CleanUpResources()\n    {\n      if (_topPen != null)\n      {\n        _topPen.Dispose();\n      }\n\n      if (_bottomPen != null)\n      {\n        _bottomPen.Dispose();\n      }\n    }\n\n    /// <summary>\n    /// Creates GDI resources.\n    /// </summary>\n    private void CreateResources()\n    {\n      this.CleanUpResources();\n\n      _topPen = new Pen(_lineColorTop);\n      _bottomPen = new Pen(_lineColorBottom);\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/ImageBoxEx.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal class ImageBoxEx : ImageBox\n  {\n    #region Constants\n\n    private readonly DragHandleCollection _dragHandles;\n\n    private static readonly object _eventDragHandleSizeChanged = new object();\n\n    private static readonly object _eventMaximumSelectionSizeChanged = new object();\n\n    private static readonly object _eventMinimumSelectionSizeChanged = new object();\n\n    private static readonly object _eventSelectionMoved = new object();\n\n    private static readonly object _eventSelectionMoving = new object();\n\n    private static readonly object _eventSelectionResized = new object();\n\n    private static readonly object _eventSelectionResizing = new object();\n\n    #endregion\n\n    #region Fields\n\n    private int _dragHandleSize;\n\n    private Point _dragOrigin;\n\n    private Point _dragOriginOffset;\n\n    private bool _isMoving;\n\n    private bool _isResizing;\n\n    private Size _maximumSelectionSize;\n\n    private Size _minimumSelectionSize;\n\n    private RectangleF _previousSelectionRegion;\n\n    private DragHandleAnchor _resizeAnchor;\n\n    #endregion\n\n    #region Constructors\n\n    public ImageBoxEx()\n    {\n      _dragHandles = new DragHandleCollection();\n      _dragHandleSize = 8;\n      _maximumSelectionSize = Size.Empty;\n      this.PositionDragHandles();\n    }\n\n    #endregion\n\n    #region Events\n\n    /// <summary>\n    /// Occurs when the DragHandleSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler DragHandleSizeChanged\n    {\n      add { this.Events.AddHandler(_eventDragHandleSizeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventDragHandleSizeChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the MaximumSelectionSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler MaximumSelectionSizeChanged\n    {\n      add { this.Events.AddHandler(_eventMaximumSelectionSizeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventMaximumSelectionSizeChanged, value); }\n    }\n\n    /// <summary>\n    /// Occurs when the MinimumSelectionSize property value changes\n    /// </summary>\n    [Category(\"Property Changed\")]\n    public event EventHandler MinimumSelectionSizeChanged\n    {\n      add { this.Events.AddHandler(_eventMinimumSelectionSizeChanged, value); }\n      remove { this.Events.RemoveHandler(_eventMinimumSelectionSizeChanged, value); }\n    }\n\n    [Category(\"Action\")]\n    public event EventHandler SelectionMoved\n    {\n      add { this.Events.AddHandler(_eventSelectionMoved, value); }\n      remove { this.Events.RemoveHandler(_eventSelectionMoved, value); }\n    }\n\n    [Category(\"Action\")]\n    public event CancelEventHandler SelectionMoving\n    {\n      add { this.Events.AddHandler(_eventSelectionMoving, value); }\n      remove { this.Events.RemoveHandler(_eventSelectionMoving, value); }\n    }\n\n    [Category(\"Action\")]\n    public event EventHandler SelectionResized\n    {\n      add { this.Events.AddHandler(_eventSelectionResized, value); }\n      remove { this.Events.RemoveHandler(_eventSelectionResized, value); }\n    }\n\n    [Category(\"Action\")]\n    public event CancelEventHandler SelectionResizing\n    {\n      add { this.Events.AddHandler(_eventSelectionResizing, value); }\n      remove { this.Events.RemoveHandler(_eventSelectionResizing, value); }\n    }\n\n    #endregion\n\n    #region Properties\n\n    [Browsable(false)]\n    public DragHandleCollection DragHandles\n    {\n      get { return _dragHandles; }\n    }\n\n    [Category(\"Appearance\")]\n    [DefaultValue(8)]\n    public virtual int DragHandleSize\n    {\n      get { return _dragHandleSize; }\n      set\n      {\n        if (_dragHandleSize != value)\n        {\n          _dragHandleSize = value;\n\n          this.OnDragHandleSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public bool IsMoving\n    {\n      get { return _isMoving; }\n      protected set { _isMoving = value; }\n    }\n\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public bool IsResizing\n    {\n      get { return _isResizing; }\n      protected set { _isResizing = value; }\n    }\n\n    [Category(\"Behavior\")]\n    [DefaultValue(typeof(Size), \"0, 0\")]\n    public virtual Size MaximumSelectionSize\n    {\n      get { return _maximumSelectionSize; }\n      set\n      {\n        if (this.MaximumSelectionSize != value)\n        {\n          _maximumSelectionSize = value;\n\n          this.OnMaximumSelectionSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    [Category(\"Behavior\")]\n    [DefaultValue(typeof(Size), \"0, 0\")]\n    public virtual Size MinimumSelectionSize\n    {\n      get { return _minimumSelectionSize; }\n      set\n      {\n        if (this.MinimumSelectionSize != value)\n        {\n          _minimumSelectionSize = value;\n\n          this.OnMinimumSelectionSizeChanged(EventArgs.Empty);\n        }\n      }\n    }\n\n    [Browsable(false)]\n    public RectangleF PreviousSelectionRegion\n    {\n      get { return _previousSelectionRegion; }\n      protected set { _previousSelectionRegion = value; }\n    }\n\n    protected Point DragOrigin\n    {\n      get { return _dragOrigin; }\n      set { _dragOrigin = value; }\n    }\n\n    protected Point DragOriginOffset\n    {\n      get { return _dragOriginOffset; }\n      set { _dragOriginOffset = value; }\n    }\n\n    protected DragHandleAnchor ResizeAnchor\n    {\n      get { return _resizeAnchor; }\n      set { _resizeAnchor = value; }\n    }\n\n    #endregion\n\n    #region Methods\n\n    public void CancelResize()\n    {\n      this.SelectionRegion = _previousSelectionRegion;\n      this.CompleteResize();\n    }\n\n    public void StartMove()\n    {\n      CancelEventArgs e;\n\n      if (_isMoving || _isResizing)\n      {\n        throw new InvalidOperationException(\"A move or resize action is currently being performed.\");\n      }\n\n      e = new CancelEventArgs();\n\n      this.OnSelectionMoving(e);\n\n      if (!e.Cancel)\n      {\n        _previousSelectionRegion = this.SelectionRegion;\n        _isMoving = true;\n      }\n    }\n\n    protected virtual void DrawDragHandle(Graphics graphics, DragHandle handle)\n    {\n      int left;\n      int top;\n      int width;\n      int height;\n      Pen outerPen;\n      Brush innerBrush;\n\n      left = handle.Bounds.Left;\n      top = handle.Bounds.Top;\n      width = handle.Bounds.Width;\n      height = handle.Bounds.Height;\n\n      if (handle.Enabled)\n      {\n        outerPen = SystemPens.WindowFrame;\n        innerBrush = SystemBrushes.Window;\n      }\n      else\n      {\n        outerPen = SystemPens.ControlDark;\n        innerBrush = SystemBrushes.Control;\n      }\n\n      graphics.FillRectangle(innerBrush, left + 1, top + 1, width - 2, height - 2);\n      graphics.DrawLine(outerPen, left + 1, top, left + width - 2, top);\n      graphics.DrawLine(outerPen, left, top + 1, left, top + height - 2);\n      graphics.DrawLine(outerPen, left + 1, top + height - 1, left + width - 2, top + height - 1);\n      graphics.DrawLine(outerPen, left + width - 1, top + 1, left + width - 1, top + height - 2);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"DragHandleSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnDragHandleSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      this.PositionDragHandles();\n      this.Invalidate();\n\n      handler = (EventHandler)this.Events[_eventDragHandleSizeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"MaximumSelectionSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnMaximumSelectionSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventMaximumSelectionSizeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"MinimumSelectionSizeChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnMinimumSelectionSizeChanged(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventMinimumSelectionSizeChanged];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseDown\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseDown(MouseEventArgs e)\n    {\n      Point imagePoint;\n      RectangleF selectionRegion;\n\n      imagePoint = this.PointToImage(e.Location);\n      selectionRegion = this.SelectionRegion;\n\n      if (e.Button == MouseButtons.Left && (selectionRegion.Contains(imagePoint) || this.HitTest(e.Location) != DragHandleAnchor.None))\n      {\n        _dragOrigin = e.Location;\n        _dragOriginOffset = new Point(imagePoint.X - (int)selectionRegion.X, imagePoint.Y - (int)selectionRegion.Y);\n      }\n      else\n      {\n        _dragOriginOffset = Point.Empty;\n        _dragOrigin = Point.Empty;\n      }\n\n      base.OnMouseDown(e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseMove\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseMove(MouseEventArgs e)\n    {\n      // start either a move or a resize operation\n      if (!this.IsSelecting && !_isMoving && !_isResizing && e.Button == MouseButtons.Left && !_dragOrigin.IsEmpty && this.IsOutsideDragZone(e.Location))\n      {\n        DragHandleAnchor anchor;\n\n        anchor = this.HitTest(_dragOrigin);\n\n        if (anchor == DragHandleAnchor.None)\n        {\n          // move\n          this.StartMove();\n        }\n        else if (_dragHandles[anchor].\n                   Enabled && _dragHandles[anchor].\n                   Visible)\n        {\n          // resize\n          this.StartResize(anchor);\n        }\n      }\n\n      // set the cursor\n      this.SetCursor(e.Location);\n\n      // perform operations\n      this.ProcessSelectionMove(e.Location);\n      this.ProcessSelectionResize(e.Location);\n\n      base.OnMouseMove(e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.MouseUp\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.MouseEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnMouseUp(MouseEventArgs e)\n    {\n      if (_isMoving)\n      {\n        this.CompleteMove();\n      }\n      else if (_isResizing)\n      {\n        this.CompleteResize();\n      }\n\n      base.OnMouseUp(e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.Paint\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   A <see cref=\"T:System.Windows.Forms.PaintEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnPaint(PaintEventArgs e)\n    {\n      base.OnPaint(e);\n\n      if (this.AllowPainting && !this.SelectionRegion.IsEmpty)\n      {\n        foreach (DragHandle handle in _dragHandles)\n        {\n          if (handle.Visible)\n          {\n            this.DrawDragHandle(e.Graphics, handle);\n          }\n        }\n      }\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ImageBox.PanStart\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.ComponentModel.CancelEventArgs\" /> instance containing the event data.\n    /// </param>\n    protected override void OnPanStart(CancelEventArgs e)\n    {\n      if (_isMoving || _isResizing || !_dragOrigin.IsEmpty)\n      {\n        e.Cancel = true;\n      }\n\n      base.OnPanStart(e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.Control.Resize\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   An <see cref=\"T:System.EventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnResize(EventArgs e)\n    {\n      base.OnResize(e);\n\n      this.PositionDragHandles();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"System.Windows.Forms.ScrollableControl.Scroll\" /> event.\n    /// </summary>\n    /// <param name=\"se\">\n    ///   A <see cref=\"T:System.Windows.Forms.ScrollEventArgs\" /> that contains the event data.\n    /// </param>\n    protected override void OnScroll(ScrollEventArgs se)\n    {\n      base.OnScroll(se);\n\n      this.PositionDragHandles();\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ImageBox.Selecting\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected override void OnSelecting(ImageBoxCancelEventArgs e)\n    {\n      e.Cancel = _isMoving || _isResizing || this.SelectionRegion.Contains(this.PointToImage(e.Location)) || this.HitTest(e.Location) != DragHandleAnchor.None;\n\n      base.OnSelecting(e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"SelectionMoved\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnSelectionMoved(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventSelectionMoved];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"SelectionMoving\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"CancelEventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnSelectionMoving(CancelEventArgs e)\n    {\n      CancelEventHandler handler;\n\n      handler = (CancelEventHandler)this.Events[_eventSelectionMoving];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ImageBox.SelectionRegionChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected override void OnSelectionRegionChanged(EventArgs e)\n    {\n      base.OnSelectionRegionChanged(e);\n\n      this.PositionDragHandles();\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"SelectionResized\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnSelectionResized(EventArgs e)\n    {\n      EventHandler handler;\n\n      handler = (EventHandler)this.Events[_eventSelectionResized];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"SelectionResizing\" /> event.\n    /// </summary>\n    /// <param name=\"e\">The <see cref=\"CancelEventArgs\" /> instance containing the event data.</param>\n    protected virtual void OnSelectionResizing(CancelEventArgs e)\n    {\n      CancelEventHandler handler;\n\n      handler = (CancelEventHandler)this.Events[_eventSelectionResizing];\n\n      handler?.Invoke(this, e);\n    }\n\n    /// <summary>\n    ///   Raises the <see cref=\"ImageBox.ZoomChanged\" /> event.\n    /// </summary>\n    /// <param name=\"e\">\n    ///   The <see cref=\"System.EventArgs\" /> instance containing the event data.\n    /// </param>\n    protected override void OnZoomChanged(EventArgs e)\n    {\n      base.OnZoomChanged(e);\n\n      this.PositionDragHandles();\n    }\n\n    /// <summary>\n    /// Processes a dialog key.\n    /// </summary>\n    /// <returns>\n    /// true if the key was processed by the control; otherwise, false.\n    /// </returns>\n    /// <param name=\"keyData\">One of the <see cref=\"T:System.Windows.Forms.Keys\"/> values that represents the key to process. </param>\n    protected override bool ProcessDialogKey(Keys keyData)\n    {\n      bool result;\n\n      if (keyData == Keys.Escape && (_isResizing || _isMoving))\n      {\n        if (_isResizing)\n        {\n          this.CancelResize();\n        }\n        else\n        {\n          this.CancelMove();\n        }\n\n        result = true;\n      }\n      else\n      {\n        result = base.ProcessDialogKey(keyData);\n      }\n\n      return result;\n    }\n\n    protected virtual void SetCursor(Point point)\n    {\n      // http://forums.cyotek.com/imagebox/cursor-issue-in-imageboxex/msg92/#msg92\n\n      if (!this.IsPanning)\n      {\n        Cursor cursor;\n\n        if (this.IsSelecting)\n        {\n          cursor = Cursors.Default;\n        }\n        else\n        {\n          DragHandleAnchor handleAnchor;\n\n          handleAnchor = _isResizing ? _resizeAnchor : this.HitTest(point);\n          if (handleAnchor != DragHandleAnchor.None && _dragHandles[handleAnchor].\n                Enabled)\n          {\n            switch (handleAnchor)\n            {\n              case DragHandleAnchor.TopLeft:\n              case DragHandleAnchor.BottomRight:\n                cursor = Cursors.SizeNWSE;\n                break;\n              case DragHandleAnchor.TopCenter:\n              case DragHandleAnchor.BottomCenter:\n                cursor = Cursors.SizeNS;\n                break;\n              case DragHandleAnchor.TopRight:\n              case DragHandleAnchor.BottomLeft:\n                cursor = Cursors.SizeNESW;\n                break;\n              case DragHandleAnchor.MiddleLeft:\n              case DragHandleAnchor.MiddleRight:\n                cursor = Cursors.SizeWE;\n                break;\n              default:\n                throw new ArgumentOutOfRangeException();\n            }\n          }\n          else if (_isMoving || this.SelectionRegion.Contains(this.PointToImage(point)))\n          {\n            cursor = Cursors.SizeAll;\n          }\n          else\n          {\n            cursor = Cursors.Default;\n          }\n        }\n\n        this.Cursor = cursor;\n      }\n    }\n\n    private void CancelMove()\n    {\n      this.SelectionRegion = _previousSelectionRegion;\n      this.CompleteMove();\n    }\n\n    private void CompleteMove()\n    {\n      this.ResetDrag();\n      this.OnSelectionMoved(EventArgs.Empty);\n    }\n\n    private void CompleteResize()\n    {\n      this.ResetDrag();\n      this.OnSelectionResized(EventArgs.Empty);\n    }\n\n    private DragHandleAnchor HitTest(Point cursorPosition)\n    {\n      return _dragHandles.HitTest(cursorPosition);\n    }\n\n    private bool IsOutsideDragZone(Point location)\n    {\n      Rectangle dragZone;\n      int dragWidth;\n      int dragHeight;\n\n      dragWidth = SystemInformation.DragSize.Width;\n      dragHeight = SystemInformation.DragSize.Height;\n      dragZone = new Rectangle(_dragOrigin.X - (dragWidth / 2), _dragOrigin.Y - (dragHeight / 2), dragWidth, dragHeight);\n\n      return !dragZone.Contains(location);\n    }\n\n    private void PositionDragHandles()\n    {\n      if (_dragHandles != null && _dragHandleSize > 0)\n      {\n        RectangleF selectionRegion;\n\n        selectionRegion = this.SelectionRegion;\n\n        if (selectionRegion.IsEmpty)\n        {\n          foreach (DragHandle handle in _dragHandles)\n          {\n            handle.Bounds = Rectangle.Empty;\n          }\n        }\n        else\n        {\n          int left;\n          int top;\n          int right;\n          int bottom;\n          int halfWidth;\n          int halfHeight;\n          int halfDragHandleSize;\n          Rectangle viewport;\n          int offsetX;\n          int offsetY;\n\n          viewport = this.GetImageViewPort();\n          offsetX = viewport.Left + this.Padding.Left + this.AutoScrollPosition.X;\n          offsetY = viewport.Top + this.Padding.Top + this.AutoScrollPosition.Y;\n          halfDragHandleSize = _dragHandleSize / 2;\n          left = Convert.ToInt32((selectionRegion.Left * this.ZoomFactor) + offsetX);\n          top = Convert.ToInt32((selectionRegion.Top * this.ZoomFactor) + offsetY);\n          right = left + Convert.ToInt32(selectionRegion.Width * this.ZoomFactor);\n          bottom = top + Convert.ToInt32(selectionRegion.Height * this.ZoomFactor);\n          halfWidth = Convert.ToInt32(selectionRegion.Width * this.ZoomFactor) / 2;\n          halfHeight = Convert.ToInt32(selectionRegion.Height * this.ZoomFactor) / 2;\n\n          _dragHandles[DragHandleAnchor.TopLeft].\n            Bounds = new Rectangle(left - _dragHandleSize, top - _dragHandleSize, _dragHandleSize, _dragHandleSize);\n          _dragHandles[DragHandleAnchor.TopCenter].\n            Bounds = new Rectangle(left + halfWidth - halfDragHandleSize, top - _dragHandleSize, _dragHandleSize, _dragHandleSize);\n          _dragHandles[DragHandleAnchor.TopRight].\n            Bounds = new Rectangle(right, top - _dragHandleSize, _dragHandleSize, _dragHandleSize);\n          _dragHandles[DragHandleAnchor.MiddleLeft].\n            Bounds = new Rectangle(left - _dragHandleSize, top + halfHeight - halfDragHandleSize, _dragHandleSize, _dragHandleSize);\n          _dragHandles[DragHandleAnchor.MiddleRight].\n            Bounds = new Rectangle(right, top + halfHeight - halfDragHandleSize, _dragHandleSize, _dragHandleSize);\n          _dragHandles[DragHandleAnchor.BottomLeft].\n            Bounds = new Rectangle(left - _dragHandleSize, bottom, _dragHandleSize, _dragHandleSize);\n          _dragHandles[DragHandleAnchor.BottomCenter].\n            Bounds = new Rectangle(left + halfWidth - halfDragHandleSize, bottom, _dragHandleSize, _dragHandleSize);\n          _dragHandles[DragHandleAnchor.BottomRight].\n            Bounds = new Rectangle(right, bottom, _dragHandleSize, _dragHandleSize);\n        }\n      }\n    }\n\n    private void ProcessSelectionMove(Point cursorPosition)\n    {\n      if (_isMoving)\n      {\n        int x;\n        int y;\n        Point imagePoint;\n        Size viewSize;\n        RectangleF selectionRegion;\n\n        imagePoint = this.PointToImage(cursorPosition, false);\n        viewSize = this.ViewSize;\n        selectionRegion = this.SelectionRegion;\n\n        x = Math.Max(0, imagePoint.X - _dragOriginOffset.X);\n        if (x + selectionRegion.Width >= viewSize.Width)\n        {\n          x = viewSize.Width - (int)selectionRegion.Width;\n        }\n\n        y = Math.Max(0, imagePoint.Y - _dragOriginOffset.Y);\n        if (y + selectionRegion.Height >= viewSize.Height)\n        {\n          y = viewSize.Height - (int)selectionRegion.Height;\n        }\n\n        this.SelectionRegion = new RectangleF(x, y, selectionRegion.Width, selectionRegion.Height);\n      }\n    }\n\n    private void ProcessSelectionResize(Point cursorPosition)\n    {\n      if (_isResizing)\n      {\n        Point imagePosition;\n        float left;\n        float top;\n        float right;\n        float bottom;\n        bool resizingTopEdge;\n        bool resizingBottomEdge;\n        bool resizingLeftEdge;\n        bool resizingRightEdge;\n        RectangleF selectionRegion;\n        Size viewSize;\n\n        imagePosition = this.PointToImage(cursorPosition);\n        viewSize = this.ViewSize;\n\n        // get the current selection\n        selectionRegion = this.SelectionRegion;\n        left = selectionRegion.Left;\n        top = selectionRegion.Top;\n        right = selectionRegion.Right;\n        bottom = selectionRegion.Bottom;\n\n        // decide which edges we're resizing\n        resizingTopEdge = _resizeAnchor >= DragHandleAnchor.TopLeft && _resizeAnchor <= DragHandleAnchor.TopRight;\n        resizingBottomEdge = _resizeAnchor >= DragHandleAnchor.BottomLeft && _resizeAnchor <= DragHandleAnchor.BottomRight;\n        resizingLeftEdge = _resizeAnchor == DragHandleAnchor.TopLeft || _resizeAnchor == DragHandleAnchor.MiddleLeft || _resizeAnchor == DragHandleAnchor.BottomLeft;\n        resizingRightEdge = _resizeAnchor == DragHandleAnchor.TopRight || _resizeAnchor == DragHandleAnchor.MiddleRight || _resizeAnchor == DragHandleAnchor.BottomRight;\n\n        // and resize!\n        if (resizingTopEdge)\n        {\n          top = imagePosition.Y > 0 ? imagePosition.Y : 0;\n\n          if (bottom - top < this.MinimumSelectionSize.Height)\n          {\n            top = bottom - this.MinimumSelectionSize.Height;\n          }\n          else if (this.MaximumSelectionSize.Height > 0 && bottom - top > this.MaximumSelectionSize.Height)\n          {\n            top = bottom - this.MaximumSelectionSize.Height;\n          }\n        }\n        else if (resizingBottomEdge)\n        {\n          bottom = imagePosition.Y < viewSize.Height ? imagePosition.Y : viewSize.Height;\n\n          if (bottom - top < this.MinimumSelectionSize.Height)\n          {\n            bottom = top + this.MinimumSelectionSize.Height;\n          }\n          else if (this.MaximumSelectionSize.Height > 0 && bottom - top > this.MaximumSelectionSize.Height)\n          {\n            bottom = top + this.MaximumSelectionSize.Height;\n          }\n        }\n\n        if (resizingLeftEdge)\n        {\n          left = imagePosition.X > 0 ? imagePosition.X : 0;\n\n          if (right - left < this.MinimumSelectionSize.Width)\n          {\n            left = right - this.MinimumSelectionSize.Width;\n          }\n          else if (this.MaximumSelectionSize.Width > 0 && right - left > this.MaximumSelectionSize.Width)\n          {\n            left = right - this.MaximumSelectionSize.Width;\n          }\n        }\n        else if (resizingRightEdge)\n        {\n          right = imagePosition.X < viewSize.Width ? imagePosition.X : viewSize.Width;\n\n          if (right - left < this.MinimumSelectionSize.Width)\n          {\n            right = left + this.MinimumSelectionSize.Width;\n          }\n          else if (this.MaximumSelectionSize.Width > 0 && right - left > this.MaximumSelectionSize.Width)\n          {\n            right = left + this.MaximumSelectionSize.Width;\n          }\n        }\n\n        this.SelectionRegion = new RectangleF(left, top, right - left, bottom - top);\n      }\n    }\n\n    private void ResetDrag()\n    {\n      _isResizing = false;\n      _isMoving = false;\n      _dragOrigin = Point.Empty;\n      _dragOriginOffset = Point.Empty;\n    }\n\n    private void StartResize(DragHandleAnchor anchor)\n    {\n      CancelEventArgs e;\n\n      if (_isMoving || _isResizing)\n      {\n        throw new InvalidOperationException(\"A move or resize action is currently being performed.\");\n      }\n\n      e = new CancelEventArgs();\n\n      this.OnSelectionResizing(e);\n\n      if (!e.Cancel)\n      {\n        _resizeAnchor = anchor;\n        _previousSelectionRegion = this.SelectionRegion;\n        _isResizing = true;\n      }\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/MainMenuForm.cs",
    "content": "// Cyotek ImageBox\n// http://cyotek.com/blog/tag/imagebox\n\n// Copyright (c) 2010-2021 Cyotek Ltd.\n\n// This work is licensed under the MIT License.\n// See LICENSE.TXT for the full text\n\n// Found this code useful?\n// https://www.cyotek.com/contribute\n\nusing System;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  internal partial class MainMenuForm : AboutDialog\n  {\n    #region Constructors\n\n    public MainMenuForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      TabPage demoPage;\n\n      base.OnLoad(e);\n\n      demoPage = new TabPage\n                 {\n                   UseVisualStyleBackColor = true,\n                   Padding = new Padding(9),\n                   Text = \"Demonstrations\"\n                 };\n\n      demoGroupBox.Dock = DockStyle.Fill;\n      demoPage.Controls.Add(demoGroupBox);\n\n      this.TabControl.TabPages.Insert(0, demoPage);\n      this.TabControl.SelectedTab = demoPage;\n\n      this.Text = \"Cyotek ImageBox Control for Windows Forms\";\n    }\n\n    /// <summary>\n    /// Raises the <see cref=\"E:System.Windows.Forms.Form.Shown\"/> event.\n    /// </summary>\n    /// <param name=\"e\">A <see cref=\"T:System.EventArgs\"/> that contains the event data. </param>\n    protected override void OnShown(EventArgs e)\n    {\n      base.OnShown(e);\n\n      imageBoxDemoButton.Focus();\n    }\n\n    private void animatedGifDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<AnimatedGifDemoForm>();\n    }\n\n    private void dragTestDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<DragTestForm>();\n    }\n\n    private void imageBoxDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<GeneralDemoForm>();\n    }\n\n    private void minimapDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<MiniMapDemoForm>();\n    }\n\n    private void panDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<PanStylesDemoForm>();\n    }\n\n    private void pixelGridDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<PixelGridForm>();\n    }\n\n    private void resizableSelectionDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<ResizableSelectionDemoForm>();\n    }\n\n    private void scaledAdornmentsDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<ScaledAdornmentsDemoForm>();\n    }\n\n    private void ShowDemo<T>()\n      where T : Form, new()\n    {\n      Cursor.Current = Cursors.WaitCursor;\n\n      using (Form form = new T())\n      {\n        form.ShowDialog(this);\n      }\n    }\n\n    private void sizeModeDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<SizeModeDemoForm>();\n    }\n\n    private void switchImageDuringZoomDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<SwitchImageDuringZoomDemoForm>();\n    }\n\n    private void textDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<TextDemoForm>();\n    }\n\n    private void virtualModeDemoButton_Click(object sender, EventArgs e)\n    {\n      this.ShowDemo<VirtualModeDemonstrationForm>();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/MainMenuForm.designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class MainMenuForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainMenuForm));\n      this.imageBoxDemoButton = new System.Windows.Forms.Button();\n      this.pixelGridDemoButton = new System.Windows.Forms.Button();\n      this.virtualModeDemoButton = new System.Windows.Forms.Button();\n      this.demoGroupBox = new Cyotek.Windows.Forms.GroupBox();\n      this.panDemoButton = new System.Windows.Forms.Button();\n      this.minimapDemoButton = new System.Windows.Forms.Button();\n      this.resizableSelectionDemoButton = new System.Windows.Forms.Button();\n      this.textDemoButton = new System.Windows.Forms.Button();\n      this.animatedGifDemoButton = new System.Windows.Forms.Button();\n      this.switchImageDuringZoomDemoButton = new System.Windows.Forms.Button();\n      this.sizeModeDemoButton = new System.Windows.Forms.Button();\n      this.scaledAdornmentsDemoButton = new System.Windows.Forms.Button();\n      this.dragTestDemoButton = new System.Windows.Forms.Button();\n      this.demoGroupBox.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // imageBoxDemoButton\n      // \n      this.imageBoxDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.imageBoxDemoButton.Location = new System.Drawing.Point(5, 19);\n      this.imageBoxDemoButton.Name = \"imageBoxDemoButton\";\n      this.imageBoxDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.imageBoxDemoButton.TabIndex = 0;\n      this.imageBoxDemoButton.Text = \"&General Demonstration\";\n      this.imageBoxDemoButton.UseVisualStyleBackColor = true;\n      this.imageBoxDemoButton.Click += new System.EventHandler(this.imageBoxDemoButton_Click);\n      // \n      // pixelGridDemoButton\n      // \n      this.pixelGridDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.pixelGridDemoButton.Location = new System.Drawing.Point(5, 48);\n      this.pixelGridDemoButton.Name = \"pixelGridDemoButton\";\n      this.pixelGridDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.pixelGridDemoButton.TabIndex = 1;\n      this.pixelGridDemoButton.Text = \"Pi&xel Grid Demonstration\";\n      this.pixelGridDemoButton.UseVisualStyleBackColor = true;\n      this.pixelGridDemoButton.Click += new System.EventHandler(this.pixelGridDemoButton_Click);\n      // \n      // virtualModeDemoButton\n      // \n      this.virtualModeDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.virtualModeDemoButton.Location = new System.Drawing.Point(5, 77);\n      this.virtualModeDemoButton.Name = \"virtualModeDemoButton\";\n      this.virtualModeDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.virtualModeDemoButton.TabIndex = 2;\n      this.virtualModeDemoButton.Text = \"&Virtual Mode Demonstration\";\n      this.virtualModeDemoButton.UseVisualStyleBackColor = true;\n      this.virtualModeDemoButton.Click += new System.EventHandler(this.virtualModeDemoButton_Click);\n      // \n      // demoGroupBox\n      // \n      this.demoGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.demoGroupBox.Controls.Add(this.panDemoButton);\n      this.demoGroupBox.Controls.Add(this.minimapDemoButton);\n      this.demoGroupBox.Controls.Add(this.resizableSelectionDemoButton);\n      this.demoGroupBox.Controls.Add(this.textDemoButton);\n      this.demoGroupBox.Controls.Add(this.animatedGifDemoButton);\n      this.demoGroupBox.Controls.Add(this.switchImageDuringZoomDemoButton);\n      this.demoGroupBox.Controls.Add(this.sizeModeDemoButton);\n      this.demoGroupBox.Controls.Add(this.scaledAdornmentsDemoButton);\n      this.demoGroupBox.Controls.Add(this.dragTestDemoButton);\n      this.demoGroupBox.Controls.Add(this.imageBoxDemoButton);\n      this.demoGroupBox.Controls.Add(this.virtualModeDemoButton);\n      this.demoGroupBox.Controls.Add(this.pixelGridDemoButton);\n      this.demoGroupBox.Location = new System.Drawing.Point(27, 56);\n      this.demoGroupBox.Name = \"demoGroupBox\";\n      this.demoGroupBox.Size = new System.Drawing.Size(417, 418);\n      this.demoGroupBox.TabIndex = 0;\n      this.demoGroupBox.TabStop = false;\n      this.demoGroupBox.Text = \"Available Demonstrations\";\n      // \n      // panDemoButton\n      // \n      this.panDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.panDemoButton.Location = new System.Drawing.Point(5, 338);\n      this.panDemoButton.Name = \"panDemoButton\";\n      this.panDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.panDemoButton.TabIndex = 12;\n      this.panDemoButton.Text = \"&Pan Demonstration\";\n      this.panDemoButton.UseVisualStyleBackColor = true;\n      this.panDemoButton.Click += new System.EventHandler(this.panDemoButton_Click);\n      // \n      // minimapDemoButton\n      // \n      this.minimapDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.minimapDemoButton.Location = new System.Drawing.Point(5, 309);\n      this.minimapDemoButton.Name = \"minimapDemoButton\";\n      this.minimapDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.minimapDemoButton.TabIndex = 11;\n      this.minimapDemoButton.Text = \"M&inimap Demonstration\";\n      this.minimapDemoButton.UseVisualStyleBackColor = true;\n      this.minimapDemoButton.Click += new System.EventHandler(this.minimapDemoButton_Click);\n      // \n      // resizableSelectionDemoButton\n      // \n      this.resizableSelectionDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.resizableSelectionDemoButton.Location = new System.Drawing.Point(5, 280);\n      this.resizableSelectionDemoButton.Name = \"resizableSelectionDemoButton\";\n      this.resizableSelectionDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.resizableSelectionDemoButton.TabIndex = 10;\n      this.resizableSelectionDemoButton.Text = \"&Resizable Selection Demonstration\";\n      this.resizableSelectionDemoButton.UseVisualStyleBackColor = true;\n      this.resizableSelectionDemoButton.Click += new System.EventHandler(this.resizableSelectionDemoButton_Click);\n      // \n      // textDemoButton\n      // \n      this.textDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.textDemoButton.Location = new System.Drawing.Point(5, 251);\n      this.textDemoButton.Name = \"textDemoButton\";\n      this.textDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.textDemoButton.TabIndex = 9;\n      this.textDemoButton.Text = \"&Text Demonstration\";\n      this.textDemoButton.UseVisualStyleBackColor = true;\n      this.textDemoButton.Click += new System.EventHandler(this.textDemoButton_Click);\n      // \n      // animatedGifDemoButton\n      // \n      this.animatedGifDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.animatedGifDemoButton.Location = new System.Drawing.Point(5, 222);\n      this.animatedGifDemoButton.Name = \"animatedGifDemoButton\";\n      this.animatedGifDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.animatedGifDemoButton.TabIndex = 8;\n      this.animatedGifDemoButton.Text = \"&Animated GIF Demonstration\";\n      this.animatedGifDemoButton.UseVisualStyleBackColor = true;\n      this.animatedGifDemoButton.Click += new System.EventHandler(this.animatedGifDemoButton_Click);\n      // \n      // switchImageDuringZoomDemoButton\n      // \n      this.switchImageDuringZoomDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.switchImageDuringZoomDemoButton.Location = new System.Drawing.Point(5, 193);\n      this.switchImageDuringZoomDemoButton.Name = \"switchImageDuringZoomDemoButton\";\n      this.switchImageDuringZoomDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.switchImageDuringZoomDemoButton.TabIndex = 7;\n      this.switchImageDuringZoomDemoButton.Text = \"Switch Image During &Zoom Demonstration\";\n      this.switchImageDuringZoomDemoButton.UseVisualStyleBackColor = true;\n      this.switchImageDuringZoomDemoButton.Click += new System.EventHandler(this.switchImageDuringZoomDemoButton_Click);\n      // \n      // sizeModeDemoButton\n      // \n      this.sizeModeDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.sizeModeDemoButton.Location = new System.Drawing.Point(5, 164);\n      this.sizeModeDemoButton.Name = \"sizeModeDemoButton\";\n      this.sizeModeDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.sizeModeDemoButton.TabIndex = 6;\n      this.sizeModeDemoButton.Text = \"Size &Mode Demonstration\";\n      this.sizeModeDemoButton.UseVisualStyleBackColor = true;\n      this.sizeModeDemoButton.Click += new System.EventHandler(this.sizeModeDemoButton_Click);\n      // \n      // scaledAdornmentsDemoButton\n      // \n      this.scaledAdornmentsDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.scaledAdornmentsDemoButton.Location = new System.Drawing.Point(5, 135);\n      this.scaledAdornmentsDemoButton.Name = \"scaledAdornmentsDemoButton\";\n      this.scaledAdornmentsDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.scaledAdornmentsDemoButton.TabIndex = 4;\n      this.scaledAdornmentsDemoButton.Text = \"&Scaled Adornments Demonstration\";\n      this.scaledAdornmentsDemoButton.UseVisualStyleBackColor = true;\n      this.scaledAdornmentsDemoButton.Click += new System.EventHandler(this.scaledAdornmentsDemoButton_Click);\n      // \n      // dragTestDemoButton\n      // \n      this.dragTestDemoButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.dragTestDemoButton.Location = new System.Drawing.Point(5, 106);\n      this.dragTestDemoButton.Name = \"dragTestDemoButton\";\n      this.dragTestDemoButton.Size = new System.Drawing.Size(406, 23);\n      this.dragTestDemoButton.TabIndex = 3;\n      this.dragTestDemoButton.Text = \"&Drag Test Demonstration\";\n      this.dragTestDemoButton.UseVisualStyleBackColor = true;\n      this.dragTestDemoButton.Click += new System.EventHandler(this.dragTestDemoButton_Click);\n      // \n      // MainMenuForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(527, 535);\n      this.Controls.Add(this.demoGroupBox);\n      this.Icon = ((System.Drawing.Icon)(resources.GetObject(\"$this.Icon\")));\n      this.Name = \"MainMenuForm\";\n      this.ShowIcon = true;\n      this.ShowInTaskbar = true;\n      this.Text = \"Cyotek ImageBox Control for Windows Forms\";\n      this.Controls.SetChildIndex(this.demoGroupBox, 0);\n      this.demoGroupBox.ResumeLayout(false);\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.Button imageBoxDemoButton;\n    private System.Windows.Forms.Button pixelGridDemoButton;\n    private System.Windows.Forms.Button virtualModeDemoButton;\n    private GroupBox demoGroupBox;\n    private System.Windows.Forms.Button dragTestDemoButton;\n    private System.Windows.Forms.Button scaledAdornmentsDemoButton;\n    private System.Windows.Forms.Button sizeModeDemoButton;\n    private System.Windows.Forms.Button switchImageDuringZoomDemoButton;\n    private System.Windows.Forms.Button animatedGifDemoButton;\n    private System.Windows.Forms.Button textDemoButton;\n    private System.Windows.Forms.Button resizableSelectionDemoButton;\n    private System.Windows.Forms.Button minimapDemoButton;\n    private System.Windows.Forms.Button panDemoButton;\n  }\n}\n\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/MainMenuForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <assembly alias=\"System.Drawing\" name=\"System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" />\n  <data name=\"$this.Icon\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n    <value>\n        AAABAAIAICAAAAEAIACoEAAAJgAAABAQAAABACAAaAQAAM4QAAAoAAAAIAAAAEAAAAABACAAAAAAAIAQ\n        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsKCQ/7CgkP+vn4//r5+P/66ejv+tnY3/rZ2N/6yc\n        jP+snIz/q5uL/6ubi/+qmor/qpqK/6mZif+pmYn/qJiI/6iYiP+nl4f/p5eH/6aWhv+llYX/pZWF/6SU\n        hP+klIT/o5OD/6OTg/+ikoL/opKC/6GRgf+hkYH/AAAAAAAAAACxoZH/7eXg/+3k3//s493/6+Lc/+vh\n        2//q4Nr/6d/Z/+ne2P/o3df/59zW/+fb1P/m2tP/5tnS/+XY0f/k19D/5NbP/+PVzv/i1Mz/4tPL/+HS\n        yv+hkYH//////+HSyv/h0sr/4dLK/+HSyv/h0sr/4dLK/6GRgf8AAAAAAAAAALGhkf/u5uH/C3kX/wh0\n        Ev8Gbg3/A2kI/wFjAv8AYAD/AGAA/wBgAP8AYAD/AGAA/wBgAP8AYAD/AGEB/wBgAP8AYAD/AGAA/wBg\n        AP8AYAD/4tPL/6KSgv//////8uvo//Do5P/t5eD/6+Ld/+ne2f/h0sr/opKC/wAAAAAAAAAAsqKS/+/n\n        4v8Ofxz/C3kX/wh0Ev8Gbg3/A2kI/wFjAv8AYAD/AGAA/wBgAP8AYAD/AGAA/wBgAP8AYAD/AGEB/wBg\n        AP8AYAD/AGAA/wBgAP/i1Mz/opKC///////07uz/8uvo/0w3KP/t5eD/6+Ld/+HSyv+ikoL/AAAAAAAA\n        AACyopL/7+fj/xCFIf8Ofxz/C3kX/wh0Ev8Gbg3/A2kI/wFjAv8AYAD/AGAA/wBgAP8AYAD/AGAA/wBg\n        AP8AYAD/AGEB/wBgAP8AYAD/AGAA/+PVzv+jk4P///////by8P9YPSv/Ujoq/0w3KP/t5eD/4dLK/6OT\n        g/8AAAAAAAAAALOjk//w6OT/E4on/xCFIf8Ofxz/C3kX/wh0Ev8Gbg3/A2kI/wFjAv8AYAD/AGAA/wBg\n        AP8AYAD/AGAA/wBgAP8AYAD/AGEB/wBgAP8AYAD/5NbP/6OTg///////+PXz//by8P/07uz/8uvo//Do\n        5P/h0sr/o5OD/wAAAAAAAAAAs6OT//Dp5f8WkCz/E4on/xCFIf8Ofxz/C3kX/wh0Ev8Gbg3/A2kI/wFj\n        Av8AYAD/AGAA/wBgAP8AYAD/AGAA/wBgAP8AYAD/AGEB/wNmBv/k19D/pJSE///////6+Pf/+PXz//by\n        8P/07uz/8uvo/+HSyv+klIT/AAAAAAAAAAC0pJT/8ern/xiWMf8WkSz/E4sn/xGGIv8OgB3/C3sY/wl1\n        E/8Gbw3/A2kI/wFkA/8AYAD/AGAA/wBgAP8AYAD/AGAA/wBhAf8Gbw7/B3AO/+XY0f+klIT/////////\n        /////////////////////////////6SUhP8AAAAAAAAAALSklP/y6+j/Gps2/xiWMf8WkSz/E4sn/xGG\n        Iv8OgB3/DHsY/wl1FP8Hbw7/BGoJ/wJlBP8AYAD/AGAA/wBgAP8AYAD/Bm8O/w5/Hf8LeRf/5tnS/6WV\n        hf+llYX/pZWF/6WVhf+llYX/pZWF/6WVhf+llYX/pZWF/wAAAAAAAAAAtaWV//Ls6f8doDv/Gps2/xiW\n        Mf8WkS3/E4sn/xGGIv8OgB3/DHsY/wl1E/8HcA//BGsK/wFkBP8AYAD/AGAA/wJlBf8SiSb/Eokl/w+C\n        H//m2tP/pZWF/+vh3P/r4dz/6+Hc/+vh3P/r4dz/6+Hc/+vh3P+llYX/AAAAAAAAAAC1pZX/8+3q/yGn\n        Qv8eoj3/G504/xmXM/8WkS3/FIwo/xGGI/8OgB3/DHsY/wl1FP8HcA//BGsK/wJlBP8AYgL/EoYj/xqY\n        NP8WkS3/Eoom/+fb1P+mlob/7OLd/+zi3f/s4t3/7OLd/+zi3f/s4t3/7OLd/6aWhv8AAAAAAAAAALam\n        lv/07uv/IqpE/yCnQv8eoj3/G504/xmXM/8Xki7/FI0p/xGHJP8Pgh//DHwa/wp2FP8HcA//BGgH/whn\n        Bv8cnDf/HqE8/xuaNf8TiCX/59zW/6eXh//t5N//7eTf/+3k3//t5N//7eTf/+3k3//t5N//p5eH/wAA\n        AAAAAAAAtqaW//Tv7P8alTH/I6xG/yCnQv8eoj3/G5w4/xmXM/8Xki7/FI0p/xKHJP8Pgh//DXwa/wh0\n        Ev8fbQz/ZIEd/xqKJ/8hp0H/G5g0/yZ3Ev/o3df/p5eH/+7l4f/u5eH/7uXh/+7l4f/u5eH/7uXh/+7l\n        4f+nl4f/AAAAAAAAAAC3p5f/9fDt/ziGLv8gpkD/I65I/yGoQ/8eoz3/G504/xmXM/8Xki7/FI0p/xKH\n        JP8PgR7/DWwL/5OQL//pq0X/TH8c/xqSLv8lfxv/DWwL/+ne2P+omIj/7+fi/+/n4v/v5+L/7+fi/+/n\n        4v/v5+L/7+fi/6iYiP8AAAAAAAAAALiomP/28e//ybd9/zeIL/8cnTj/I61H/yGpQ/8epD7/HJ45/xmZ\n        NP8Xky7/FIwp/wt3Ff9wiCr/7a9S//exUP/TpEH/iZEs/w1sC//2qTj/6d/Z/6iYiP/w6OT/8Ojk//Do\n        5P/w6OT/8Ojk//Do5P/w6OT/qJiI/wAAAAAAAAAAuKiY//by8P/3x5f/x7Z8/0eMN/8ZkC3/IqpE/yGp\n        Q/8fpD7/HJ45/xmYM/8UhiP/P3sf/+awWv/4tFv/+LNW//ixUP/3r0r/965E//isPv/q4Nr/qZmJ//Hq\n        5v/x6ub/8erm//Hq5v/x6ub/8erm//Hq5v+pmYn/AAAAAAAAAAC5qZn/9/Px//jImP/4yJj/37+K/26T\n        R/8UgSD/HaA7/yGpQ/8epD7/F5Et/zJ8H//Lqln/+Lhm//i2Yf/4tFv/+LNW//ixUP/4r0r/+K5E/+vh\n        2/+pmYn/8evn//Hr5//x6+f/8evn//Hr5//x6+f/8evn/6mZif8AAAAAAAAAALmpmf/39PL/+MiY//jI\n        mP/4yJj/+MiY/8S0ef9Vizn/GoYl/xeOKv9AgCf/zK5l//i8dP/4u27/+Llp//i3Y//4tFz/+LNX//ix\n        Uf/4r0v/6+Lc/6qaiv/y7On/8uzp//Ls6f/y7On/8uzp//Ls6f/y7On/qpqK/wAAAAAAAAAAuqqa//j1\n        8//4yJj/+MiY//jImP/4yJj/98iX/+jBjf+Dm0//g5tP/9u3dv/2v3//+L56//i8dP/4u27/+Llp//e2\n        Y//psmj/1a5y/9OscP/s493/qpqK//Pu6//z7uv/8+7r//Pu6//z7uv/8+7r//Pu6/+qmor/AAAAAAAA\n        AAC6qpr/+fb0//jImP/4yJj/+MiY//jImP/4yJj/+MiX//jHlv/4xZH/+MOL//jBhf/4wH//+L55//i8\n        dP/0unH/t66W/2ehzf9Gm+b/QZrp/+3k3/+rm4v/9O/s//Tv7P/07+z/9O/s//Tv7P/07+z/9O/s/6ub\n        i/8AAAAAAAAAALurm//59/X/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jHl//4xpL/+MSM//jC\n        hv/4wID/9r57/7Gxov84pO//KqT3/y2c+P8wmPj/7eXg/6ubi//18e7/9fHu//Xx7v/18e7/9fHu//Xx\n        7v/18e7/q5uL/wAAAAAAAAAAu6ub//r49//4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jH\n        l//4xpL/+MSN//jCh//ivY7/Warc/yK49/8lr/j/KaX4/y2c+P/u5uH/rJyM/6ycjP+snIz/rJyM/6yc\n        jP+snIz/rJyM/6ycjP+snIz/AAAAAAAAAAC8rJz/+/n4//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jI\n        mP/4yJj/+MiY//jHl//4xpL/+MSM/8S5pP8us/H/HMT4/yC6+P8lsPj/Kab4/+/n4v+snIz//////+HS\n        yv/h0sr/4dLK/+HSyv/h0sr/4dLK/6ycjP8AAAAAAAAAALysnP/7+vn/+MiY//jImP/4yJj/+MiY//jI\n        mP/4yJj/+MiY//jImP/4yJj/+MiY//jHl//4xpL/urit/yW99P8X0Pj/G8b4/yC9+P8ks/j/7+fj/62d\n        jf//////8uvo//Do5P/t5eD/6+Ld/+ne2f/h0sr/rZ2N/wAAAAAAAAAAva2d//z7+v/4yJj/+MiY//jI\n        mP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jIl//XwaX/QbTq/xLY+P8X0Pj/G8f4/x++\n        +P/w6OT/rZ2N///////07uz/8uvo//Do5P/t5eD/6+Ld/+HSyv+tnY3/AAAAAAAAAAC9rZ3//fz7//jI\n        mP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//HGmv+HtMz/Hcv2/xPY\n        9/8X0Pj/G8f4//Dp5f+uno7///////by8P9YPSv/Ujoq/0w3KP/t5eD/4dLK/66ejv8AAAAAAAAAAL6u\n        nv/9/fz/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY/+XE\n        oP9xs9X/Lbzx/xzJ9v8dxff/8ern/6+fj///////+PXz//by8P9YPSv/8uvo//Do5P/h0sr/r5+P/wAA\n        AAAAAAAAvq6e//7+/f/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jImP/4yJj/+MiY//jI\n        mP/4yJj/+MiY//PGmf/Dvq7/lrLC/5Cvwv/y6+j/r5+P///////6+Pf/+PXz//by8P/07uz/8uvo/+HS\n        yv+vn4//AAAAAAAAAAC/r5////////7+/f/9/fz//fz7//z7+v/7+vn/+/n4//r49//59/X/+fb0//j1\n        8//39PL/9/Px//by8P/28e//9fDt//Tv7P/07uv/8+3q//Ls6f+woJD/////////////////////////\n        /////////////7CgkP8AAAAAAAAAAMCwoP+/r5//vq6e/76unv+9rZ3/va2d/7ysnP+8rJz/u6ub/7ur\n        m/+6qpr/uqqa/7mpmf+5qZn/uKiY/7iomP+3p5f/tqaW/7amlv+1pZX/taWV/7SklP+0pJT/s6OT/7Oj\n        k/+yopL/sqKS/7Ghkf+xoZH/sKCQ/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////+AAAABgAAAAYAAAAGAAAABgAAAAYAA\n        AAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAA\n        AAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAH/////KAAAABAAAAAgAAAAAQAgAAAA\n        AABABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAsaGR/7CgkP+uno7/rZ2N/6ycjP+rm4v/qpqK/6mZ\n        if+omIj/ppaG/6WVhf+klIT/o5OD/6KSgv8AAAAAAAAAALKikv/u5uH/7eTf/+vh3P/q39n/6N3X/+fb\n        1P/l2NH/5NbP/6OTg//28e//8ern/+3j3/+jk4P/AAAAAAAAAACzo5P/8Ojk/xOQK/8QhyT/DHwb/whz\n        E/8FaQz/AmAG/+XY0f+klIT/+vj3/2lHMf/x6uf/pJSE/wAAAAAAAAAAtKSU//Hq5/8YnDX/FJMu/xCI\n        Jf8Mfh3/CXQV/wVoDf/n29T/pZWF///////6+Pf/9vHv/6WVhf8AAAAAAAAAALWllf/z7en/G5o1/xid\n        Nv8Uki3/EIgl/w1/Hf8FZgz/6N3X/6aWhv+mlob/ppaG/6aWhv+mlob/AAAAAAAAAAC2ppb/9O/s/zeI\n        L/8bmzb/GJ01/xSTLv8NgB7/AloD/+rf2f+omIj/7+fj/+/n4//v5+P/qJiI/wAAAAAAAAAAuKiY//bx\n        7//buID/N4gv/zeIL/8XmjT/E2gR/xljDP/r4dz/qZmJ//Hq5//x6uf/8ern/6mZif8AAAAAAAAAALmp\n        mf/38/H/98KP//fCj/+2qWv/NIUs/ylrFv+wm0//7eTf/6qaiv/z7er/8+3q//Pt6v+qmor/AAAAAAAA\n        AAC6qpr/+fb0//fCj//3wo//9cGO/7apa//htXj/87l3/+7m4f+rm4v/9fDt//Xw7f/18O3/q5uL/wAA\n        AAAAAAAAu6ub//r49//3wo//98KP//fCj//3wY7/98CM//e+hP/w6OT/rJyM/6ycjP+snIz/rJyM/6yc\n        jP8AAAAAAAAAALysnP/8+vn/98KP//fCj//3wo//98KP//fBjv/3wY3/8ern/62djf/28e//8ern/+3j\n        3/+tnY3/AAAAAAAAAAC9rZ3//fz8//fCj//3wo//98KP//fCj//3wo//98KP//Pt6f+uno7/+vj3/2lH\n        Mf/x6uf/rp6O/wAAAAAAAAAAvq6e///////9/Pz//Pr5//r49//59vT/9/Px//bx7//07+z/sKCQ////\n        ///6+Pf/9vHv/7CgkP8AAAAAAAAAAMCwoP++rp7/va2d/7ysnP+7q5v/uqqa/7mpmf+4qJj/tqaW/7Wl\n        lf+0pJT/s6OT/7Kikv+xoZH/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//wAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIAB\n        AACAAQAAgAEAAIABAACAAQAAgAEAAIABAAD//wAA\n</value>\n  </data>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/MiniMapDemoForm.cs",
    "content": "﻿// Cyotek ImageBox\n// Copyright (c) 2010-2017 Cyotek Ltd.\n// http://cyotek.com\n// http://cyotek.com/blog/tag/imagebox\n\n// Licensed under the MIT License. See license.txt for the full text.\n\n// If you use this control in your applications, attribution, donations or contributions are welcome.\n\nusing System;\nusing System.Drawing;\nusing System.Windows.Forms;\nusing Cyotek.Windows.Forms.Demo.Properties;\n\n// demonstration was derived based on the following forum post\n// https://forums.cyotek.com/imagebox/problem-when-trying-to-create-a-minimap-using-imagebox/\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  internal partial class MiniMapDemoForm : BaseForm\n  {\n    #region Fields\n\n    private Rectangle _minimap;\n\n    private Bitmap _thumbnailBitmap;\n\n    #endregion\n\n    #region Constructors\n\n    public MiniMapDemoForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      zoomImageBox.Image = Resources.Sample;\n\n      this.UpdateMiniMap();\n    }\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void miniMapImageBox_Paint(object sender, PaintEventArgs e)\n    {\n      if (_thumbnailBitmap != null)\n      {\n        using (Pen pen = new Pen(Color.Aquamarine, 3))\n        {\n          e.Graphics.DrawImage(_thumbnailBitmap, miniMapImageBox.GetImageViewPort().\n                                                                 Location);\n          e.Graphics.DrawRectangle(pen, _minimap.X, _minimap.Y, _minimap.Width, _minimap.Height);\n        }\n      }\n    }\n\n    private void RefreshMiniMap()\n    {\n      Image image;\n\n      image = zoomImageBox.Image;\n\n      if (image != null)\n      {\n        Bitmap minimap;\n        Size minimapSize;\n\n        // https://github.com/cyotek/Cyotek.Windows.Forms.ImageBox/issues/27\n        // I found that ImageBox can cause performance issues if you instruct it\n        // to paint a large image that is zoomed out repeatly. As the image for\n        // our minimap doesn't actually change or allow zooming, lets create\n        // a tiny version up front. To make it easy, the \"mini map\" ImageBox\n        // has its VirtualMode property set to True, and the SizeMode set to\n        // Fit. I then set the VirtualSize to be the size if the original\n        // image and it will then calculate the size I need for the thumbnail\n        // which saves me some manual work. However, it does mean that I need\n        // to manually paint the thumbnail\n\n        miniMapImageBox.VirtualSize = image.Size;\n        minimapSize = miniMapImageBox.GetImageViewPort().\n                                      Size;\n        minimap = new Bitmap(minimapSize.Width, minimapSize.Height);\n\n        // generate the thumbnail\n        using (Graphics g = Graphics.FromImage(minimap))\n        {\n          g.DrawImage(image, new Rectangle(Point.Empty, minimap.Size), new Rectangle(Point.Empty, image.Size), GraphicsUnit.Pixel);\n        }\n\n        // always clean up\n        if (_thumbnailBitmap != null)\n        {\n          _thumbnailBitmap.Dispose();\n          _thumbnailBitmap = null;\n        }\n        _thumbnailBitmap = minimap;\n\n        // force a paint of the minimap\n        this.UpdateMiniMap();\n      }\n    }\n\n    private void splitContainer_SplitterMoved(object sender, SplitterEventArgs e)\n    {\n      this.RefreshMiniMap();\n    }\n\n    private void UpdateMiniMap()\n    {\n      Rectangle proposedView;\n      Size viewSize;\n      Point location;\n      double x;\n      double y;\n      double w;\n      double h;\n\n      // define the initial size. We'll take the current\n      // size from the source imagebox's image viewport\n      viewSize = zoomImageBox.GetImageViewPort().\n                              Size;\n      w = viewSize.Width;\n      h = viewSize.Height;\n\n      // next we need to scale the size to match the zoomfactor of the source imagebox\n      w /= zoomImageBox.ZoomFactor;\n      h /= zoomImageBox.ZoomFactor;\n\n      // next we scale the size again - this time by the zoomfactor the destination imagebox\n      w *= miniMapImageBox.ZoomFactor;\n      h *= miniMapImageBox.ZoomFactor;\n\n      // with the size define, we can now turn out attention to the origin\n      // first, we get the current auto scroll offsets, and reverse them\n      // to give us our origin\n      x = -zoomImageBox.AutoScrollPosition.X;\n      y = -zoomImageBox.AutoScrollPosition.Y;\n\n      // next, we need to scale that to account for the source imagebox zoom\n      x /= zoomImageBox.ZoomFactor;\n      y /= zoomImageBox.ZoomFactor;\n\n      // as with the size, we need to scale again to account for the destination imagebox\n      x *= miniMapImageBox.ZoomFactor;\n      y *= miniMapImageBox.ZoomFactor;\n\n      // and for our final action, we need to offset the origin to account\n      // for where the destination imagebox is painting the output image\n      location = miniMapImageBox.GetImageViewPort().\n                                 Location;\n      x += location.X;\n      y += location.Y;\n\n      // all done, create the final rectangle for painting\n      proposedView = new Rectangle(Convert.ToInt32(x), Convert.ToInt32(y), Convert.ToInt32(w), Convert.ToInt32(h));\n\n      // see if the final rectangle is different to the one already being used\n      // to avoid painting if we don't need to\n      if (proposedView != _minimap)\n      {\n        _minimap = proposedView;\n\n        // force the destination to repaint to show the new rectangle\n        // this has performance issues\n        // https://github.com/cyotek/Cyotek.Windows.Forms.ImageBox/issues/27\n        miniMapImageBox.Invalidate();\n\n        imageViewPortToolStripStatusLabel.Text = \"Image Viewport: \" + zoomImageBox.GetImageViewPort().\n                                                                                   ToString();\n        calculatedRectangleToolStripStatusLabel.Text = \"Rectangle: \" + _minimap.ToString();\n      }\n    }\n\n    private void zoomImageBox_ImageChanged(object sender, EventArgs e)\n    {\n      this.RefreshMiniMap();\n    }\n\n    private void zoomImageBox_Resize(object sender, EventArgs e)\n    {\n      this.RefreshMiniMap();\n    }\n\n    private void zoomImageBox_Scroll(object sender, ScrollEventArgs e)\n    {\n      this.UpdateMiniMap();\n    }\n\n    private void zoomImageBox_Zoomed(object sender, ImageBoxZoomEventArgs e)\n    {\n      this.UpdateMiniMap();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/MiniMapDemoForm.designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class MiniMapDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.zoomImageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.miniMapImageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.statusStrip1 = new System.Windows.Forms.StatusStrip();\n      this.imageViewPortToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.calculatedRectangleToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.statusStrip1.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.SuspendLayout();\n      //\n      // zoomImageBox\n      //\n      this.zoomImageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.zoomImageBox.Location = new System.Drawing.Point(0, 0);\n      this.zoomImageBox.Name = \"zoomImageBox\";\n      this.zoomImageBox.Size = new System.Drawing.Size(680, 483);\n      this.zoomImageBox.TabIndex = 0;\n      this.zoomImageBox.TabStop = false;\n      this.zoomImageBox.ImageChanged += new System.EventHandler(this.zoomImageBox_ImageChanged);\n      this.zoomImageBox.Zoomed += new System.EventHandler<Cyotek.Windows.Forms.ImageBoxZoomEventArgs>(this.zoomImageBox_Zoomed);\n      this.zoomImageBox.Scroll += new System.Windows.Forms.ScrollEventHandler(this.zoomImageBox_Scroll);\n      this.zoomImageBox.Resize += new System.EventHandler(this.zoomImageBox_Resize);\n      //\n      // miniMapImageBox\n      //\n      this.miniMapImageBox.AllowZoom = false;\n      this.miniMapImageBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)\n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.miniMapImageBox.PanMode = ImageBoxPanMode.None;\n      this.miniMapImageBox.Location = new System.Drawing.Point(3, 3);\n      this.miniMapImageBox.Name = \"miniMapImageBox\";\n      this.miniMapImageBox.Size = new System.Drawing.Size(291, 155);\n      this.miniMapImageBox.SizeMode = Cyotek.Windows.Forms.ImageBoxSizeMode.Fit;\n      this.miniMapImageBox.TabIndex = 0;\n      this.miniMapImageBox.TabStop = false;\n      this.miniMapImageBox.VirtualMode = true;\n      this.miniMapImageBox.Paint += new System.Windows.Forms.PaintEventHandler(this.miniMapImageBox_Paint);\n      //\n      // statusStrip1\n      //\n      this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.imageViewPortToolStripStatusLabel,\n            this.calculatedRectangleToolStripStatusLabel});\n      this.statusStrip1.Location = new System.Drawing.Point(0, 507);\n      this.statusStrip1.Name = \"statusStrip1\";\n      this.statusStrip1.Size = new System.Drawing.Size(980, 22);\n      this.statusStrip1.TabIndex = 2;\n      this.statusStrip1.Text = \"statusStrip1\";\n      //\n      // imageViewPortToolStripStatusLabel\n      //\n      this.imageViewPortToolStripStatusLabel.Name = \"imageViewPortToolStripStatusLabel\";\n      this.imageViewPortToolStripStatusLabel.Size = new System.Drawing.Size(0, 17);\n      //\n      // calculatedRectangleToolStripStatusLabel\n      //\n      this.calculatedRectangleToolStripStatusLabel.Name = \"calculatedRectangleToolStripStatusLabel\";\n      this.calculatedRectangleToolStripStatusLabel.Size = new System.Drawing.Size(0, 17);\n      //\n      // menuStrip\n      //\n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);\n      this.menuStrip.Size = new System.Drawing.Size(980, 24);\n      this.menuStrip.TabIndex = 0;\n      //\n      // fileToolStripMenuItem\n      //\n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      //\n      // closeToolStripMenuItem\n      //\n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(152, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      //\n      // helpToolStripMenuItem\n      //\n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      //\n      // aboutToolStripMenuItem\n      //\n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      //\n      // splitContainer\n      //\n      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;\n      this.splitContainer.Location = new System.Drawing.Point(0, 24);\n      this.splitContainer.Name = \"splitContainer\";\n      //\n      // splitContainer.Panel1\n      //\n      this.splitContainer.Panel1.Controls.Add(this.zoomImageBox);\n      //\n      // splitContainer.Panel2\n      //\n      this.splitContainer.Panel2.Controls.Add(this.miniMapImageBox);\n      this.splitContainer.Size = new System.Drawing.Size(980, 483);\n      this.splitContainer.SplitterDistance = 680;\n      this.splitContainer.SplitterWidth = 3;\n      this.splitContainer.TabIndex = 1;\n      this.splitContainer.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer_SplitterMoved);\n      //\n      // MiniMapDemoForm\n      //\n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(980, 529);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.statusStrip1);\n      this.Name = \"MiniMapDemoForm\";\n      this.Text = \"Minimap Overlay Demonstration\";\n      this.statusStrip1.ResumeLayout(false);\n      this.statusStrip1.PerformLayout();\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private Cyotek.Windows.Forms.ImageBox zoomImageBox;\n    private Cyotek.Windows.Forms.ImageBox miniMapImageBox;\n    private System.Windows.Forms.StatusStrip statusStrip1;\n    private System.Windows.Forms.ToolStripStatusLabel imageViewPortToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel calculatedRectangleToolStripStatusLabel;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.SplitContainer splitContainer;\n  }\n}\n\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/MiniMapDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"statusStrip1.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>17, 17</value>\n  </metadata>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>477, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/OpenUrlDialog.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class OpenUrlDialog\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.label1 = new System.Windows.Forms.Label();\n      this.label2 = new System.Windows.Forms.Label();\n      this.urlTextBox = new System.Windows.Forms.TextBox();\n      this.okButton = new System.Windows.Forms.Button();\n      this.cancelButton = new System.Windows.Forms.Button();\n      this.SuspendLayout();\n      // \n      // label1\n      // \n      this.label1.AutoSize = true;\n      this.label1.Location = new System.Drawing.Point(10, 8);\n      this.label1.Name = \"label1\";\n      this.label1.Size = new System.Drawing.Size(275, 13);\n      this.label1.TabIndex = 0;\n      this.label1.Text = \"Type the Internet address of an image document to open\";\n      // \n      // label2\n      // \n      this.label2.AutoSize = true;\n      this.label2.Location = new System.Drawing.Point(10, 34);\n      this.label2.Name = \"label2\";\n      this.label2.Size = new System.Drawing.Size(36, 13);\n      this.label2.TabIndex = 1;\n      this.label2.Text = \"&Open:\";\n      // \n      // urlTextBox\n      // \n      this.urlTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.urlTextBox.Location = new System.Drawing.Point(49, 31);\n      this.urlTextBox.Margin = new System.Windows.Forms.Padding(3, 10, 3, 3);\n      this.urlTextBox.Name = \"urlTextBox\";\n      this.urlTextBox.Size = new System.Drawing.Size(265, 20);\n      this.urlTextBox.TabIndex = 2;\n      this.urlTextBox.Text = \"https://www.cyotek.com/files/articleimages/aeg1e.png\";\n      // \n      // okButton\n      // \n      this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n      this.okButton.Location = new System.Drawing.Point(180, 72);\n      this.okButton.Name = \"okButton\";\n      this.okButton.Size = new System.Drawing.Size(64, 20);\n      this.okButton.TabIndex = 3;\n      this.okButton.Text = \"OK\";\n      this.okButton.UseVisualStyleBackColor = true;\n      this.okButton.Click += new System.EventHandler(this.okButton_Click);\n      // \n      // cancelButton\n      // \n      this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));\n      this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;\n      this.cancelButton.Location = new System.Drawing.Point(249, 72);\n      this.cancelButton.Name = \"cancelButton\";\n      this.cancelButton.Size = new System.Drawing.Size(64, 20);\n      this.cancelButton.TabIndex = 4;\n      this.cancelButton.Text = \"Cancel\";\n      this.cancelButton.UseVisualStyleBackColor = true;\n      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);\n      // \n      // OpenUrlDialog\n      // \n      this.AcceptButton = this.okButton;\n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.CancelButton = this.cancelButton;\n      this.ClientSize = new System.Drawing.Size(324, 102);\n      this.Controls.Add(this.cancelButton);\n      this.Controls.Add(this.okButton);\n      this.Controls.Add(this.urlTextBox);\n      this.Controls.Add(this.label2);\n      this.Controls.Add(this.label1);\n      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;\n      this.MaximizeBox = false;\n      this.Name = \"OpenUrlDialog\";\n      this.Text = \"Open\";\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.Label label1;\n    private System.Windows.Forms.Label label2;\n    private System.Windows.Forms.TextBox urlTextBox;\n    private System.Windows.Forms.Button okButton;\n    private System.Windows.Forms.Button cancelButton;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/OpenUrlDialog.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.Windows.Forms;\n\n// Cyotek ImageBox\n// Copyright (c) 2010-2017 Cyotek Ltd.\n// http://cyotek.com\n// http://cyotek.com/blog/tag/imagebox\n\n// Licensed under the MIT License. See license.txt for the full text.\n\n// If you use this control in your applications, attribution, donations or contributions are welcome.\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  internal sealed partial class OpenUrlDialog : BaseForm\n  {\n    #region Constructors\n\n    public OpenUrlDialog()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Properties\n\n    [Browsable(false)]\n    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]\n    public string Url { get; set; }\n\n    #endregion\n\n    #region Methods\n\n    private void cancelButton_Click(object sender, EventArgs e)\n    {\n      this.DialogResult = DialogResult.Cancel;\n      this.Close();\n    }\n\n    private void okButton_Click(object sender, EventArgs e)\n    {\n      string url;\n\n      url = urlTextBox.Text;\n\n      if (this.ValidateUrl(url))\n      {\n        this.DialogResult = DialogResult.OK;\n        this.Url = url;\n        this.Close();\n      }\n      else\n      {\n        this.DialogResult = DialogResult.None;\n      }\n    }\n\n    private bool ValidateUrl(string url)\n    {\n      Uri uri;\n      bool result;\n\n      result = !string.IsNullOrEmpty(url) && Uri.TryCreate(url, UriKind.Absolute, out uri) && (uri.Scheme == Uri.UriSchemeHttp || uri.Scheme == Uri.UriSchemeHttps);\n\n      return result;\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/OpenUrlDialog.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/PanStylesDemoForm.Designer.cs",
    "content": "namespace Cyotek.Windows.Forms.Demo\n{\n  partial class PanStylesDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PanStylesDemoForm));\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.propertyGrid = new Cyotek.Windows.Forms.Demo.FilteredPropertyGrid();\n      this.demoLabel = new System.Windows.Forms.Label();\n      this.eventsListBox = new Cyotek.Windows.Forms.Demo.EventsListBox();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();\n      this.positionToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.statusStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // splitContainer\n      // \n      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;\n      this.splitContainer.Location = new System.Drawing.Point(10, 23);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.imageBox);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.propertyGrid);\n      this.splitContainer.Panel2.Controls.Add(this.demoLabel);\n      this.splitContainer.Panel2.Controls.Add(this.eventsListBox);\n      this.splitContainer.Size = new System.Drawing.Size(764, 556);\n      this.splitContainer.SplitterDistance = 497;\n      this.splitContainer.TabIndex = 1;\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Sample;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.Size = new System.Drawing.Size(497, 556);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.PanEnd += new System.EventHandler(this.imageBox_PanEnd);\n      this.imageBox.PanStart += new System.EventHandler(this.imageBox_PanStart);\n      // \n      // propertyGrid\n      // \n      this.propertyGrid.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.propertyGrid.CommandsVisibleIfAvailable = false;\n      this.propertyGrid.HelpVisible = false;\n      this.propertyGrid.Location = new System.Drawing.Point(3, 352);\n      this.propertyGrid.Name = \"propertyGrid\";\n      this.propertyGrid.Size = new System.Drawing.Size(260, 90);\n      this.propertyGrid.TabIndex = 1;\n      this.propertyGrid.ToolbarVisible = false;\n      // \n      // demoLabel\n      // \n      this.demoLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.demoLabel.AutoEllipsis = true;\n      this.demoLabel.BackColor = System.Drawing.SystemColors.Info;\n      this.demoLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n      this.demoLabel.ForeColor = System.Drawing.SystemColors.InfoText;\n      this.demoLabel.Location = new System.Drawing.Point(0, 1);\n      this.demoLabel.Name = \"demoLabel\";\n      this.demoLabel.Padding = new System.Windows.Forms.Padding(9);\n      this.demoLabel.Size = new System.Drawing.Size(263, 348);\n      this.demoLabel.TabIndex = 0;\n      this.demoLabel.Text = resources.GetString(\"demoLabel.Text\");\n      // \n      // eventsListBox\n      // \n      this.eventsListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.eventsListBox.FormattingEnabled = true;\n      this.eventsListBox.Location = new System.Drawing.Point(3, 448);\n      this.eventsListBox.Name = \"eventsListBox\";\n      this.eventsListBox.Size = new System.Drawing.Size(260, 108);\n      this.eventsListBox.TabIndex = 2;\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Size = new System.Drawing.Size(784, 24);\n      this.menuStrip.TabIndex = 0;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.toolStripStatusLabel1,\n            this.positionToolStripStatusLabel});\n      this.statusStrip.Location = new System.Drawing.Point(0, 579);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Size = new System.Drawing.Size(784, 22);\n      this.statusStrip.TabIndex = 2;\n      // \n      // toolStripStatusLabel1\n      // \n      this.toolStripStatusLabel1.Name = \"toolStripStatusLabel1\";\n      this.toolStripStatusLabel1.Size = new System.Drawing.Size(769, 17);\n      this.toolStripStatusLabel1.Spring = true;\n      // \n      // positionToolStripStatusLabel\n      // \n      this.positionToolStripStatusLabel.Name = \"positionToolStripStatusLabel\";\n      this.positionToolStripStatusLabel.Size = new System.Drawing.Size(0, 17);\n      // \n      // PanStylesDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(784, 601);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.statusStrip);\n      this.Name = \"PanStylesDemoForm\";\n      this.Text = \"Panning\";\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.statusStrip.ResumeLayout(false);\n      this.statusStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private ImageBox imageBox;\n    private System.Windows.Forms.Label demoLabel;\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;\n    private System.Windows.Forms.ToolStripStatusLabel positionToolStripStatusLabel;\n    private EventsListBox eventsListBox;\n    private FilteredPropertyGrid propertyGrid;\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/PanStylesDemoForm.cs",
    "content": "// Cyotek ImageBox\n// http://cyotek.com/blog/tag/imagebox\n\n// Copyright (c) 2021 Cyotek Ltd.\n\n// This work is licensed under the MIT License.\n// See LICENSE.TXT for the full text\n\n// Found this code useful?\n// https://www.cyotek.com/contribute\n\nusing System;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  internal partial class PanStylesDemoForm : BaseForm\n  {\n    #region Public Constructors\n\n    public PanStylesDemoForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion Public Constructors\n\n    #region Protected Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      propertyGrid.BrowsableProperties = new[]\n      {\n        nameof(ImageBox.AllowFreePan),\n        nameof(ImageBox.InvertMouse),\n        nameof(ImageBox.PanMode)\n      };\n\n      propertyGrid.SelectedObject = imageBox;\n    }\n\n    #endregion Protected Methods\n\n    #region Private Methods\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void imageBox_PanEnd(object sender, EventArgs e)\n    {\n      eventsListBox.AddEvent((Control)sender, nameof(ImageBox.PanEnd));\n    }\n\n    private void imageBox_PanStart(object sender, EventArgs e)\n    {\n      eventsListBox.AddEvent((Control)sender, nameof(ImageBox.PanStart));\n    }\n\n    #endregion Private Methods\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/PanStylesDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"demoLabel.Text\" xml:space=\"preserve\">\n    <value>Panning allows you to scroll the ImageBox via the mouse. The ImageBox supports two pan modes, standard and free.\n\nIn standard mode, you click with the left or middle mouse buttons and drag - this will cause the control to scroll. The PanMode property can be used to set which mouse buttons can be used to initiate the pan. You can also use the InvertMouse property to reverse the scroll orientation. Note that if the SelectionMode property is set to a value other than None, you cannot pan with the left mouse button.\n\nIf the AllowFreePan property is set, clicking with the middle mouse button enables an automatic pan. In this mode, the further away the mouse is from the click origin, the faster the control will scroll. The automatic pan will continue untile the control is clicked again. Alternatively, if you hold down the middle button, the automatic pan will end once the button is released.</value>\n  </data>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>17, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>140, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/PixelGridForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class PixelGridForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.propertyGrid = new Cyotek.Windows.Forms.Demo.PropertyGrid();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // splitContainer\n      // \n      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;\n      this.splitContainer.Location = new System.Drawing.Point(0, 24);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.propertyGrid);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.imageBox);\n      this.splitContainer.Size = new System.Drawing.Size(848, 490);\n      this.splitContainer.SplitterDistance = 300;\n      this.splitContainer.SplitterWidth = 3;\n      this.splitContainer.TabIndex = 0;\n      // \n      // propertyGrid\n      // \n      this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.propertyGrid.Location = new System.Drawing.Point(0, 0);\n      this.propertyGrid.Name = \"propertyGrid\";\n      this.propertyGrid.SelectedObject = this.imageBox;\n      this.propertyGrid.Size = new System.Drawing.Size(300, 490);\n      this.propertyGrid.TabIndex = 0;\n      // \n      // imageBox\n      // \n      this.imageBox.BackColor = System.Drawing.SystemColors.GradientActiveCaption;\n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.GridDisplayMode = Cyotek.Windows.Forms.ImageBoxGridDisplayMode.Image;\n      this.imageBox.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Monitor;\n      this.imageBox.ImageBorderStyle = Cyotek.Windows.Forms.ImageBoxBorderStyle.FixedSingleGlowShadow;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.ShowPixelGrid = true;\n      this.imageBox.Size = new System.Drawing.Size(545, 490);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.Zoom = 1600;\n      // \n      // statusStrip\n      // \n      this.statusStrip.Location = new System.Drawing.Point(0, 514);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0);\n      this.statusStrip.Size = new System.Drawing.Size(848, 22);\n      this.statusStrip.TabIndex = 6;\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);\n      this.menuStrip.Size = new System.Drawing.Size(848, 24);\n      this.menuStrip.TabIndex = 5;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // PixelGridForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(848, 536);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.statusStrip);\n      this.Controls.Add(this.menuStrip);\n      this.Name = \"PixelGridForm\";\n      this.Text = \"Pixel Grid\";\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private PropertyGrid propertyGrid;\n    private ImageBox imageBox;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/PixelGridForm.cs",
    "content": "﻿using System;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class PixelGridForm : BaseForm\n  {\n    #region Public Constructors\n\n    public PixelGridForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      propertyGrid.SelectItem(\"ShowPixelGrid\");\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/PixelGridForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>248, 17</value>\n  </metadata>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>364, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/Program.cs",
    "content": "﻿using System;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal static class Program\n  {\n    #region Class Members\n\n    /// <summary>\n    ///   The main entry point for the application.\n    /// </summary>\n    [STAThread]\n    private static void Main()\n    {\n      Application.EnableVisualStyles();\n      Application.SetCompatibleTextRenderingDefault(false);\n      Application.Run(new MainMenuForm());\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/Properties/AssemblyInfo.cs",
    "content": "﻿using System;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\n\n[assembly: AssemblyTitle(\"Cyotek ImageBox Demonstration\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"Cyotek Ltd\")]\n[assembly: AssemblyProduct(\"Cyotek ImageBox Control\")]\n[assembly: AssemblyCopyright(\"Copyright © 2010-2017 Cyotek Ltd.\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n[assembly: ComVisible(false)]\n[assembly: Guid(\"e01e91cb-0059-4d88-880a-ed43e130f7f4\")]\n[assembly: CLSCompliant(true)]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.2.0.0\")]\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/Properties/Resources.Designer.cs",
    "content": "﻿//------------------------------------------------------------------------------\n// <auto-generated>\n//     This code was generated by a tool.\n//     Runtime Version:4.0.30319.42000\n//\n//     Changes to this file may cause incorrect behavior and will be lost if\n//     the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace Cyotek.Windows.Forms.Demo.Properties {\n    using System;\n    \n    \n    /// <summary>\n    ///   A strongly-typed resource class, for looking up localized strings, etc.\n    /// </summary>\n    // This class was auto-generated by the StronglyTypedResourceBuilder\n    // class via a tool like ResGen or Visual Studio.\n    // To add or remove a member, edit your .ResX file then rerun ResGen\n    // with the /str option, or rebuild your VS project.\n    [global::System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Resources.Tools.StronglyTypedResourceBuilder\", \"4.0.0.0\")]\n    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\n    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]\n    internal class Resources {\n        \n        private static global::System.Resources.ResourceManager resourceMan;\n        \n        private static global::System.Globalization.CultureInfo resourceCulture;\n        \n        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute(\"Microsoft.Performance\", \"CA1811:AvoidUncalledPrivateCode\")]\n        internal Resources() {\n        }\n        \n        /// <summary>\n        ///   Returns the cached ResourceManager instance used by this class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Resources.ResourceManager ResourceManager {\n            get {\n                if (object.ReferenceEquals(resourceMan, null)) {\n                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(\"Cyotek.Windows.Forms.Demo.Properties.Resources\", typeof(Resources).Assembly);\n                    resourceMan = temp;\n                }\n                return resourceMan;\n            }\n        }\n        \n        /// <summary>\n        ///   Overrides the current thread's CurrentUICulture property for all\n        ///   resource lookups using this strongly typed resource class.\n        /// </summary>\n        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]\n        internal static global::System.Globalization.CultureInfo Culture {\n            get {\n                return resourceCulture;\n            }\n            set {\n                resourceCulture = value;\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap ActualSize {\n            get {\n                object obj = ResourceManager.GetObject(\"ActualSize\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap AnimationDemo {\n            get {\n                object obj = ResourceManager.GetObject(\"AnimationDemo\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized string similar to /* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */\n        ////* Author: Nicolas Hery - http://nicolashery.com */\n        ////* Version: 29d1c5bc36da364ad5aa86946d420b7bbc54a253 */\n        ////* Source: https://github.com/nicolahery/markdownpad-github */\n        ///\n        ////* RESET\n        ///=============================================================================*/\n        ///\n        ///html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, s [rest of string was truncated]&quot;;.\n        /// </summary>\n        internal static string CSS {\n            get {\n                return ResourceManager.GetString(\"CSS\", resourceCulture);\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Cursor {\n            get {\n                object obj = ResourceManager.GetObject(\"Cursor\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Grid {\n            get {\n                object obj = ResourceManager.GetObject(\"Grid\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Icon {\n            get {\n                object obj = ResourceManager.GetObject(\"Icon\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap IconA {\n            get {\n                object obj = ResourceManager.GetObject(\"IconA\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Map {\n            get {\n                object obj = ResourceManager.GetObject(\"Map\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap MapMarker {\n            get {\n                object obj = ResourceManager.GetObject(\"MapMarker\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Monitor {\n            get {\n                object obj = ResourceManager.GetObject(\"Monitor\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Open {\n            get {\n                object obj = ResourceManager.GetObject(\"Open\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Position {\n            get {\n                object obj = ResourceManager.GetObject(\"Position\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Sample {\n            get {\n                object obj = ResourceManager.GetObject(\"Sample\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap samplecrop {\n            get {\n                object obj = ResourceManager.GetObject(\"samplecrop\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap SelectAll {\n            get {\n                object obj = ResourceManager.GetObject(\"SelectAll\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap SelectNone {\n            get {\n                object obj = ResourceManager.GetObject(\"SelectNone\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Size {\n            get {\n                object obj = ResourceManager.GetObject(\"Size\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap SmallMap {\n            get {\n                object obj = ResourceManager.GetObject(\"SmallMap\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap VirtualMode {\n            get {\n                object obj = ResourceManager.GetObject(\"VirtualMode\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Zone {\n            get {\n                object obj = ResourceManager.GetObject(\"Zone\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap Zoom {\n            get {\n                object obj = ResourceManager.GetObject(\"Zoom\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap ZoomIn {\n            get {\n                object obj = ResourceManager.GetObject(\"ZoomIn\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n        \n        /// <summary>\n        ///   Looks up a localized resource of type System.Drawing.Bitmap.\n        /// </summary>\n        internal static System.Drawing.Bitmap ZoomOut {\n            get {\n                object obj = ResourceManager.GetObject(\"ZoomOut\", resourceCulture);\n                return ((System.Drawing.Bitmap)(obj));\n            }\n        }\n    }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/Properties/Resources.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <assembly alias=\"System.Windows.Forms\" name=\"System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" />\n  <data name=\"ActualSize\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\image-resize-actual.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Map\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\The_Legendary_Treasure_Map_by_Bogbrush.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"SelectNone\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\selection.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"IconA\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\icon-32a.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Sample\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\sample.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Icon\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\icon-32.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Zone\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\zone.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"VirtualMode\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\image-crop.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"SmallMap\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\map.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"SelectAll\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\selection-select.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Position\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\Object Position.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Size\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\Object Size.ico;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"CSS\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\markdownpad-github.css;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>\n  </data>\n  <data name=\"Monitor\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\monitor-sidebar.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"MapMarker\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\MapMarker.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"AnimationDemo\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\Newtons_cradle_animation_book_2.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"ZoomIn\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\magnifier-zoom-in.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Grid\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\grid-dot.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Cursor\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\cursor.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"samplecrop\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\samplecrop.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"Zoom\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\magnifier-zoom.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <data name=\"ZoomOut\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\magnifier-zoom-out.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n  <assembly alias=\"System.Windows.Forms\" name=\"System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" />\n  <data name=\"Open\" type=\"System.Resources.ResXFileRef, System.Windows.Forms\">\n    <value>..\\Resources\\Open.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>\n  </data>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/PropertyGrid.cs",
    "content": "﻿using System.Collections.Generic;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal class PropertyGrid : System.Windows.Forms.PropertyGrid\n  {\n    #region Public Members\n\n    public GridItem FindItem(string itemLabel)\n    {\n      // http://www.vb-helper.com/howto_net_select_propertygrid_item.html\n\n      GridItem rootItem;\n      GridItem matchingItem;\n      Queue<GridItem> searchItems;\n\n      matchingItem = null;\n\n      // Find the GridItem root.\n      rootItem = this.SelectedGridItem;\n      while (rootItem.Parent != null)\n      {\n        rootItem = rootItem.Parent;\n      }\n      \n      // Search the tree.\n      searchItems = new Queue<GridItem>();\n      \n      searchItems.Enqueue(rootItem);\n\n      while (searchItems.Count != 0 && matchingItem == null)\n      {\n        GridItem checkItem;\n\n        checkItem = searchItems.Dequeue();\n        \n        if (checkItem.Label == itemLabel)\n        {\n          matchingItem = checkItem;\n        }\n\n        foreach (GridItem item in checkItem.GridItems)\n        {\n          searchItems.Enqueue(item);\n        }\n      }\n\n      return matchingItem;\n    }\n\n    public void SelectItem(string itemLabel)\n    {\n      GridItem selection;\n\n      selection = this.FindItem(itemLabel);\n      if (selection != null)\n      {\n        try\n        {\n          this.SelectedGridItem = selection;\n        }\n        catch\n        {\n          // ignore\n        }\n      }\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/ResizableSelectionDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class ResizableSelectionDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ResizableSelectionDemoForm));\n      this.demoLabel = new System.Windows.Forms.Label();\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.imageBox = new Cyotek.Windows.Forms.Demo.ImageBoxEx();\n      this.eventsSplitContainer = new System.Windows.Forms.SplitContainer();\n      this.tabControl1 = new System.Windows.Forms.TabControl();\n      this.eventsTabPage = new System.Windows.Forms.TabPage();\n      this.eventsListBox = new Cyotek.Windows.Forms.Demo.EventsListBox();\n      this.dragHandlesTabPage = new System.Windows.Forms.TabPage();\n      this.splitContainer1 = new System.Windows.Forms.SplitContainer();\n      this.enabledCheckedListBox = new System.Windows.Forms.CheckedListBox();\n      this.label1 = new System.Windows.Forms.Label();\n      this.visibleCheckedListBox = new System.Windows.Forms.CheckedListBox();\n      this.label2 = new System.Windows.Forms.Label();\n      this.propertiesTabPage = new System.Windows.Forms.TabPage();\n      this.propertyGrid = new System.Windows.Forms.PropertyGrid();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.selectNoneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.cursorToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.statusToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.autoScrollPositionToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.imageSizeToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.zoomToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.selectionToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.eventsSplitContainer.Panel1.SuspendLayout();\n      this.eventsSplitContainer.Panel2.SuspendLayout();\n      this.eventsSplitContainer.SuspendLayout();\n      this.tabControl1.SuspendLayout();\n      this.eventsTabPage.SuspendLayout();\n      this.dragHandlesTabPage.SuspendLayout();\n      this.splitContainer1.Panel1.SuspendLayout();\n      this.splitContainer1.Panel2.SuspendLayout();\n      this.splitContainer1.SuspendLayout();\n      this.propertiesTabPage.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.statusStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // demoLabel\n      // \n      this.demoLabel.AutoEllipsis = true;\n      this.demoLabel.BackColor = System.Drawing.SystemColors.Info;\n      this.demoLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n      this.demoLabel.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.demoLabel.ForeColor = System.Drawing.SystemColors.InfoText;\n      this.demoLabel.Location = new System.Drawing.Point(0, 0);\n      this.demoLabel.Name = \"demoLabel\";\n      this.demoLabel.Padding = new System.Windows.Forms.Padding(8, 8, 8, 8);\n      this.demoLabel.Size = new System.Drawing.Size(360, 180);\n      this.demoLabel.TabIndex = 1;\n      this.demoLabel.Text = resources.GetString(\"demoLabel.Text\");\n      // \n      // splitContainer\n      // \n      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.splitContainer.Location = new System.Drawing.Point(10, 23);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.imageBox);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.eventsSplitContainer);\n      this.splitContainer.Size = new System.Drawing.Size(705, 362);\n      this.splitContainer.SplitterDistance = 342;\n      this.splitContainer.SplitterWidth = 3;\n      this.splitContainer.TabIndex = 5;\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.SelectionMode = Cyotek.Windows.Forms.ImageBoxSelectionMode.Rectangle;\n      this.imageBox.Size = new System.Drawing.Size(342, 362);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.VirtualMode = true;\n      this.imageBox.VirtualSize = new System.Drawing.Size(256, 256);\n      this.imageBox.SelectionMoved += new System.EventHandler(this.imageBox_SelectionMoved);\n      this.imageBox.SelectionMoving += new System.ComponentModel.CancelEventHandler(this.imageBox_SelectionMoving);\n      this.imageBox.SelectionResized += new System.EventHandler(this.imageBox_SelectionResized);\n      this.imageBox.SelectionResizing += new System.ComponentModel.CancelEventHandler(this.imageBox_SelectionResizing);\n      this.imageBox.Selected += new System.EventHandler<System.EventArgs>(this.imageBox_Selected);\n      this.imageBox.Selecting += new System.EventHandler<Cyotek.Windows.Forms.ImageBoxCancelEventArgs>(this.imageBox_Selecting);\n      this.imageBox.SelectionRegionChanged += new System.EventHandler(this.imageBox_SelectionRegionChanged);\n      this.imageBox.VirtualDraw += new System.Windows.Forms.PaintEventHandler(this.imageBox_VirtualDraw);\n      this.imageBox.Zoomed += new System.EventHandler<Cyotek.Windows.Forms.ImageBoxZoomEventArgs>(this.imageBox_Zoomed);\n      this.imageBox.Scroll += new System.Windows.Forms.ScrollEventHandler(this.imageBox_Scroll);\n      this.imageBox.MouseLeave += new System.EventHandler(this.imageBox_MouseLeave);\n      this.imageBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseMove);\n      this.imageBox.Resize += new System.EventHandler(this.imageBox_Resize);\n      // \n      // eventsSplitContainer\n      // \n      this.eventsSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.eventsSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;\n      this.eventsSplitContainer.IsSplitterFixed = true;\n      this.eventsSplitContainer.Location = new System.Drawing.Point(0, 0);\n      this.eventsSplitContainer.Name = \"eventsSplitContainer\";\n      this.eventsSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;\n      // \n      // eventsSplitContainer.Panel1\n      // \n      this.eventsSplitContainer.Panel1.Controls.Add(this.demoLabel);\n      // \n      // eventsSplitContainer.Panel2\n      // \n      this.eventsSplitContainer.Panel2.Controls.Add(this.tabControl1);\n      this.eventsSplitContainer.Size = new System.Drawing.Size(360, 362);\n      this.eventsSplitContainer.SplitterDistance = 180;\n      this.eventsSplitContainer.SplitterWidth = 3;\n      this.eventsSplitContainer.TabIndex = 2;\n      // \n      // tabControl1\n      // \n      this.tabControl1.Controls.Add(this.eventsTabPage);\n      this.tabControl1.Controls.Add(this.dragHandlesTabPage);\n      this.tabControl1.Controls.Add(this.propertiesTabPage);\n      this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.tabControl1.Location = new System.Drawing.Point(0, 0);\n      this.tabControl1.Name = \"tabControl1\";\n      this.tabControl1.SelectedIndex = 0;\n      this.tabControl1.Size = new System.Drawing.Size(360, 179);\n      this.tabControl1.TabIndex = 0;\n      // \n      // eventsTabPage\n      // \n      this.eventsTabPage.Controls.Add(this.eventsListBox);\n      this.eventsTabPage.Location = new System.Drawing.Point(4, 22);\n      this.eventsTabPage.Name = \"eventsTabPage\";\n      this.eventsTabPage.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5);\n      this.eventsTabPage.Size = new System.Drawing.Size(352, 153);\n      this.eventsTabPage.TabIndex = 0;\n      this.eventsTabPage.Text = \"Events\";\n      this.eventsTabPage.UseVisualStyleBackColor = true;\n      // \n      // eventsListBox\n      // \n      this.eventsListBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.eventsListBox.FormattingEnabled = true;\n      this.eventsListBox.Location = new System.Drawing.Point(5, 5);\n      this.eventsListBox.Name = \"eventsListBox\";\n      this.eventsListBox.Size = new System.Drawing.Size(342, 143);\n      this.eventsListBox.TabIndex = 0;\n      // \n      // dragHandlesTabPage\n      // \n      this.dragHandlesTabPage.Controls.Add(this.splitContainer1);\n      this.dragHandlesTabPage.Location = new System.Drawing.Point(4, 24);\n      this.dragHandlesTabPage.Name = \"dragHandlesTabPage\";\n      this.dragHandlesTabPage.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5);\n      this.dragHandlesTabPage.Size = new System.Drawing.Size(351, 175);\n      this.dragHandlesTabPage.TabIndex = 1;\n      this.dragHandlesTabPage.Text = \"Drag Handles\";\n      this.dragHandlesTabPage.UseVisualStyleBackColor = true;\n      // \n      // splitContainer1\n      // \n      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer1.Location = new System.Drawing.Point(5, 5);\n      this.splitContainer1.Name = \"splitContainer1\";\n      // \n      // splitContainer1.Panel1\n      // \n      this.splitContainer1.Panel1.Controls.Add(this.enabledCheckedListBox);\n      this.splitContainer1.Panel1.Controls.Add(this.label1);\n      // \n      // splitContainer1.Panel2\n      // \n      this.splitContainer1.Panel2.Controls.Add(this.visibleCheckedListBox);\n      this.splitContainer1.Panel2.Controls.Add(this.label2);\n      this.splitContainer1.Size = new System.Drawing.Size(341, 165);\n      this.splitContainer1.SplitterDistance = 167;\n      this.splitContainer1.SplitterWidth = 3;\n      this.splitContainer1.TabIndex = 0;\n      // \n      // enabledCheckedListBox\n      // \n      this.enabledCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.enabledCheckedListBox.FormattingEnabled = true;\n      this.enabledCheckedListBox.IntegralHeight = false;\n      this.enabledCheckedListBox.Location = new System.Drawing.Point(3, 16);\n      this.enabledCheckedListBox.Name = \"enabledCheckedListBox\";\n      this.enabledCheckedListBox.Size = new System.Drawing.Size(162, 147);\n      this.enabledCheckedListBox.TabIndex = 1;\n      this.enabledCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.enabledCheckedListBox_ItemCheck);\n      // \n      // label1\n      // \n      this.label1.AutoSize = true;\n      this.label1.Location = new System.Drawing.Point(-3, 0);\n      this.label1.Name = \"label1\";\n      this.label1.Size = new System.Drawing.Size(91, 13);\n      this.label1.TabIndex = 0;\n      this.label1.Text = \"Enabled Handles:\";\n      // \n      // visibleCheckedListBox\n      // \n      this.visibleCheckedListBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.visibleCheckedListBox.FormattingEnabled = true;\n      this.visibleCheckedListBox.IntegralHeight = false;\n      this.visibleCheckedListBox.Location = new System.Drawing.Point(3, 16);\n      this.visibleCheckedListBox.Name = \"visibleCheckedListBox\";\n      this.visibleCheckedListBox.Size = new System.Drawing.Size(166, 147);\n      this.visibleCheckedListBox.TabIndex = 1;\n      this.visibleCheckedListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.visibleCheckedListBox_ItemCheck);\n      // \n      // label2\n      // \n      this.label2.AutoSize = true;\n      this.label2.Location = new System.Drawing.Point(0, 0);\n      this.label2.Name = \"label2\";\n      this.label2.Size = new System.Drawing.Size(82, 13);\n      this.label2.TabIndex = 0;\n      this.label2.Text = \"Visible Handles:\";\n      // \n      // propertiesTabPage\n      // \n      this.propertiesTabPage.Controls.Add(this.propertyGrid);\n      this.propertiesTabPage.Location = new System.Drawing.Point(4, 24);\n      this.propertiesTabPage.Name = \"propertiesTabPage\";\n      this.propertiesTabPage.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5);\n      this.propertiesTabPage.Size = new System.Drawing.Size(351, 175);\n      this.propertiesTabPage.TabIndex = 2;\n      this.propertiesTabPage.Text = \"Properties\";\n      this.propertiesTabPage.UseVisualStyleBackColor = true;\n      // \n      // propertyGrid\n      // \n      this.propertyGrid.CommandsVisibleIfAvailable = false;\n      this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.propertyGrid.HelpVisible = false;\n      this.propertyGrid.Location = new System.Drawing.Point(5, 5);\n      this.propertyGrid.Name = \"propertyGrid\";\n      this.propertyGrid.SelectedObject = this.imageBox;\n      this.propertyGrid.Size = new System.Drawing.Size(341, 165);\n      this.propertyGrid.TabIndex = 0;\n      this.propertyGrid.ToolbarVisible = false;\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.editToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);\n      this.menuStrip.Size = new System.Drawing.Size(726, 24);\n      this.menuStrip.TabIndex = 6;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // editToolStripMenuItem\n      // \n      this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.selectAllToolStripMenuItem,\n            this.selectNoneToolStripMenuItem});\n      this.editToolStripMenuItem.Name = \"editToolStripMenuItem\";\n      this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);\n      this.editToolStripMenuItem.Text = \"&Edit\";\n      // \n      // selectAllToolStripMenuItem\n      // \n      this.selectAllToolStripMenuItem.Name = \"selectAllToolStripMenuItem\";\n      this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(137, 22);\n      this.selectAllToolStripMenuItem.Text = \"Select &All\";\n      this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);\n      // \n      // selectNoneToolStripMenuItem\n      // \n      this.selectNoneToolStripMenuItem.Name = \"selectNoneToolStripMenuItem\";\n      this.selectNoneToolStripMenuItem.Size = new System.Drawing.Size(137, 22);\n      this.selectNoneToolStripMenuItem.Text = \"Select &None\";\n      this.selectNoneToolStripMenuItem.Click += new System.EventHandler(this.selectNoneToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.cursorToolStripStatusLabel,\n            this.statusToolStripStatusLabel,\n            this.autoScrollPositionToolStripStatusLabel,\n            this.imageSizeToolStripStatusLabel,\n            this.zoomToolStripStatusLabel,\n            this.selectionToolStripStatusLabel});\n      this.statusStrip.Location = new System.Drawing.Point(0, 385);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0);\n      this.statusStrip.Size = new System.Drawing.Size(726, 22);\n      this.statusStrip.TabIndex = 7;\n      // \n      // cursorToolStripStatusLabel\n      // \n      this.cursorToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Cursor;\n      this.cursorToolStripStatusLabel.Name = \"cursorToolStripStatusLabel\";\n      this.cursorToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.cursorToolStripStatusLabel.ToolTipText = \"Current Cursor Position\";\n      // \n      // statusToolStripStatusLabel\n      // \n      this.statusToolStripStatusLabel.Name = \"statusToolStripStatusLabel\";\n      this.statusToolStripStatusLabel.Size = new System.Drawing.Size(665, 17);\n      this.statusToolStripStatusLabel.Spring = true;\n      this.statusToolStripStatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\n      // \n      // autoScrollPositionToolStripStatusLabel\n      // \n      this.autoScrollPositionToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Position;\n      this.autoScrollPositionToolStripStatusLabel.Name = \"autoScrollPositionToolStripStatusLabel\";\n      this.autoScrollPositionToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.autoScrollPositionToolStripStatusLabel.ToolTipText = \"Auto Scroll Position\";\n      this.autoScrollPositionToolStripStatusLabel.Visible = false;\n      // \n      // imageSizeToolStripStatusLabel\n      // \n      this.imageSizeToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Size;\n      this.imageSizeToolStripStatusLabel.Name = \"imageSizeToolStripStatusLabel\";\n      this.imageSizeToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.imageSizeToolStripStatusLabel.ToolTipText = \"Image Size\";\n      this.imageSizeToolStripStatusLabel.Visible = false;\n      // \n      // zoomToolStripStatusLabel\n      // \n      this.zoomToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Zoom;\n      this.zoomToolStripStatusLabel.Name = \"zoomToolStripStatusLabel\";\n      this.zoomToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.zoomToolStripStatusLabel.ToolTipText = \"Zoom\";\n      // \n      // selectionToolStripStatusLabel\n      // \n      this.selectionToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.SelectAll;\n      this.selectionToolStripStatusLabel.Name = \"selectionToolStripStatusLabel\";\n      this.selectionToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      // \n      // ResizableSelectionDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(726, 407);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.statusStrip);\n      this.Name = \"ResizableSelectionDemoForm\";\n      this.Text = \"Resizable Selection Demonstration\";\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.eventsSplitContainer.Panel1.ResumeLayout(false);\n      this.eventsSplitContainer.Panel2.ResumeLayout(false);\n      this.eventsSplitContainer.ResumeLayout(false);\n      this.tabControl1.ResumeLayout(false);\n      this.eventsTabPage.ResumeLayout(false);\n      this.dragHandlesTabPage.ResumeLayout(false);\n      this.splitContainer1.Panel1.ResumeLayout(false);\n      this.splitContainer1.Panel1.PerformLayout();\n      this.splitContainer1.Panel2.ResumeLayout(false);\n      this.splitContainer1.Panel2.PerformLayout();\n      this.splitContainer1.ResumeLayout(false);\n      this.propertiesTabPage.ResumeLayout(false);\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.statusStrip.ResumeLayout(false);\n      this.statusStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private ImageBoxEx imageBox;\n    private System.Windows.Forms.Label demoLabel;\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.ToolStripStatusLabel selectionToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel cursorToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel statusToolStripStatusLabel;\n    private System.Windows.Forms.SplitContainer eventsSplitContainer;\n    private EventsListBox eventsListBox;\n    private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem selectAllToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem selectNoneToolStripMenuItem;\n    private System.Windows.Forms.ToolStripStatusLabel zoomToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel autoScrollPositionToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel imageSizeToolStripStatusLabel;\n    private System.Windows.Forms.TabControl tabControl1;\n    private System.Windows.Forms.TabPage eventsTabPage;\n    private System.Windows.Forms.TabPage dragHandlesTabPage;\n    private System.Windows.Forms.TabPage propertiesTabPage;\n    private System.Windows.Forms.PropertyGrid propertyGrid;\n    private System.Windows.Forms.SplitContainer splitContainer1;\n    private System.Windows.Forms.CheckedListBox enabledCheckedListBox;\n    private System.Windows.Forms.Label label1;\n    private System.Windows.Forms.CheckedListBox visibleCheckedListBox;\n    private System.Windows.Forms.Label label2;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/ResizableSelectionDemoForm.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.ComponentModel;\nusing System.Drawing;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class ResizableSelectionDemoForm : BaseForm\n  {\n    #region Public Constructors\n\n    public ResizableSelectionDemoForm()\n    {\n      InitializeComponent();\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    /// <summary>\n    /// Raises the <see cref=\"E:System.Windows.Forms.Form.Load\"/> event.\n    /// </summary>\n    /// <param name=\"e\">An <see cref=\"T:System.EventArgs\"/> that contains the event data. </param>\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      this.UpdateStatusBar();\n\n      // set a default selection\n      imageBox.SelectionRegion = new RectangleF(0, 0, 64, 64);\n\n      // apply a minimum selection size for resize operations\n      imageBox.MinimumSelectionSize = new Size(8, 8);\n\n      // setup the option lists\n      foreach (DragHandle handle in imageBox.DragHandles)\n      {\n        enabledCheckedListBox.Items.Add(handle.Anchor, handle.Enabled);\n        visibleCheckedListBox.Items.Add(handle.Anchor, handle.Visible);\n      }\n    }\n\n    #endregion\n\n    #region Private Members\n\n    private void SetStatus(string message)\n    {\n      statusToolStripStatusLabel.Text = message;\n    }\n\n    private void UpdateCursorPosition(Point location)\n    {\n      if (imageBox.IsPointInImage(location))\n      {\n        Point point;\n        point = imageBox.PointToImage(location);\n        cursorToolStripStatusLabel.Text = this.FormatPoint(point);\n      }\n      else\n      {\n        cursorToolStripStatusLabel.Text = string.Empty;\n      }\n    }\n\n    private void UpdateStatusBar()\n    {\n      autoScrollPositionToolStripStatusLabel.Text = this.FormatPoint(imageBox.AutoScrollPosition);\n      imageSizeToolStripStatusLabel.Text = this.FormatRectangle(imageBox.GetImageViewPort());\n      zoomToolStripStatusLabel.Text = string.Format(\"{0}%\", imageBox.Zoom);\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void enabledCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e)\n    {\n      DragHandleAnchor anchor;\n\n      anchor = (DragHandleAnchor)enabledCheckedListBox.Items[e.Index];\n\n      imageBox.DragHandles[anchor].Enabled = e.NewValue == CheckState.Checked;\n\n      imageBox.Invalidate(); // No change events on the DragHandleCollection class so need to manually refresh\n    }\n\n    private void imageBox_MouseLeave(object sender, EventArgs e)\n    {\n      cursorToolStripStatusLabel.Text = string.Empty;\n    }\n\n    private void imageBox_MouseMove(object sender, MouseEventArgs e)\n    {\n      this.UpdateCursorPosition(e.Location);\n    }\n\n    private void imageBox_Resize(object sender, EventArgs e)\n    {\n      this.UpdateStatusBar();\n    }\n\n    private void imageBox_Scroll(object sender, ScrollEventArgs e)\n    {\n      this.UpdateStatusBar();\n    }\n\n    private void imageBox_Selected(object sender, EventArgs e)\n    {\n      this.UpdateStatusBar();\n      eventsListBox.AddEvent((Control)sender, \"Selected\");\n    }\n\n    private void imageBox_Selecting(object sender, ImageBoxCancelEventArgs e)\n    {\n      eventsListBox.AddEvent((Control)sender, \"Selecting\", new Dictionary<string, object>\n                                                           {\n                                                             {\n                                                               \"Location\", e.Location\n                                                             },\n                                                             {\n                                                               \"Cancel\", e.Cancel\n                                                             }\n                                                           });\n    }\n\n    private void imageBox_SelectionMoved(object sender, EventArgs e)\n    {\n      this.SetStatus(string.Empty);\n\n      eventsListBox.AddEvent((Control)sender, \"SelectionMoved\");\n    }\n\n    private void imageBox_SelectionMoving(object sender, CancelEventArgs e)\n    {\n      this.SetStatus(\"Press escape to cancel move.\");\n\n      eventsListBox.AddEvent((Control)sender, \"SelectionMoving\", new Dictionary<string, object>\n                                                                 {\n                                                                   {\n                                                                     \"Cancel\", e.Cancel\n                                                                   }\n                                                                 });\n    }\n\n    private void imageBox_SelectionRegionChanged(object sender, EventArgs e)\n    {\n      selectionToolStripStatusLabel.Text = this.FormatRectangle(imageBox.SelectionRegion);\n    }\n\n    private void imageBox_SelectionResized(object sender, EventArgs e)\n    {\n      this.SetStatus(string.Empty);\n\n      eventsListBox.AddEvent((Control)sender, \"SelectionResized\");\n    }\n\n    private void imageBox_SelectionResizing(object sender, CancelEventArgs e)\n    {\n      this.SetStatus(\"Press escape to cancel resize.\");\n\n      eventsListBox.AddEvent((Control)sender, \"SelectionResizing\", new Dictionary<string, object>\n                                                                   {\n                                                                     {\n                                                                       \"Cancel\", e.Cancel\n                                                                     }\n                                                                   });\n    }\n\n    private void imageBox_VirtualDraw(object sender, PaintEventArgs e)\n    {\n      RectangleF bounds;\n\n      // draw the virtual area\n      bounds = imageBox.GetOffsetRectangle(new RectangleF(PointF.Empty, imageBox.VirtualSize));\n\n      using (Brush brush = new SolidBrush(Color.FromArgb(128, Color.Goldenrod)))\n      {\n        e.Graphics.FillRectangle(brush, bounds);\n      }\n      e.Graphics.DrawRectangle(Pens.DarkGoldenrod, bounds.X, bounds.Y, bounds.Width, bounds.Height);\n    }\n\n    private void imageBox_Zoomed(object sender, ImageBoxZoomEventArgs e)\n    {\n      this.UpdateStatusBar();\n    }\n\n    private void selectAllToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      imageBox.SelectAll();\n    }\n\n    private void selectNoneToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      imageBox.SelectNone();\n    }\n\n    private void visibleCheckedListBox_ItemCheck(object sender, ItemCheckEventArgs e)\n    {\n      DragHandleAnchor anchor;\n\n      anchor = (DragHandleAnchor)visibleCheckedListBox.Items[e.Index];\n\n      imageBox.DragHandles[anchor].Visible = e.NewValue == CheckState.Checked;\n\n      imageBox.Invalidate(); // No change events on the DragHandleCollection class so need to manually refresh\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/ResizableSelectionDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"demoLabel.Text\" xml:space=\"preserve\">\n    <value>This demonstration shows how to expand the SelectionRegion to include the ability to drag the region around, and to resize it via the use of drag handles.\n\nYou can use the MinimumSelectionSize and MaximumSelectionSize to allow greater control over the selection process - for example when cropping an image.\n\nVirtualMode is used to create a canvas area without requiring a backing image.\n</value>\n  </data>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>246, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>359, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/Resources/markdownpad-github.css",
    "content": "﻿/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */\n/* Author: Nicolas Hery - http://nicolashery.com */\n/* Version: 29d1c5bc36da364ad5aa86946d420b7bbc54a253 */\n/* Source: https://github.com/nicolahery/markdownpad-github */\n\n/* RESET\n=============================================================================*/\n\nhtml, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {\n  margin: 0;\n  padding: 0;\n  border: 0;\n}\n\n/* BODY\n=============================================================================*/\n\nbody {\n  font-family: Helvetica, arial, freesans, clean, sans-serif;\n  font-size: 14px;\n  line-height: 1.6;\n  color: #333;\n  background-color: #fff;\n  padding: 6px;\n  max-width: 960px;\n  margin: 0 auto;\n}\n\nbody>*:first-child {\n  margin-top: 0 !important;\n}\n\nbody>*:last-child {\n  margin-bottom: 0 !important;\n}\n\n/* BLOCKS\n=============================================================================*/\n\np, blockquote, ul, ol, dl, table, pre {\n  margin: 15px 0;\n}\n\n/* HEADERS\n=============================================================================*/\n\nh1, h2, h3, h4, h5, h6 {\n  margin: 20px 0 10px;\n  padding: 0;\n  font-weight: bold;\n  -webkit-font-smoothing: antialiased;\n}\n\nh1 tt, h1 code, h2 tt, h2 code, h3 tt, h3 code, h4 tt, h4 code, h5 tt, h5 code, h6 tt, h6 code {\n  font-size: inherit;\n}\n\nh1 {\n  font-size: 28px;\n  color: #000;\n}\n\nh2 {\n  font-size: 24px;\n  border-bottom: 1px solid #ccc;\n  color: #000;\n}\n\nh3 {\n  font-size: 18px;\n}\n\nh4 {\n  font-size: 16px;\n}\n\nh5 {\n  font-size: 14px;\n}\n\nh6 {\n  color: #777;\n  font-size: 14px;\n}\n\nbody>h2:first-child, body>h1:first-child, body>h1:first-child+h2, body>h3:first-child, body>h4:first-child, body>h5:first-child, body>h6:first-child {\n  margin-top: 0;\n  padding-top: 0;\n}\n\na:first-child h1, a:first-child h2, a:first-child h3, a:first-child h4, a:first-child h5, a:first-child h6 {\n  margin-top: 0;\n  padding-top: 0;\n}\n\nh1+p, h2+p, h3+p, h4+p, h5+p, h6+p {\n  margin-top: 10px;\n}\n\n/* LINKS\n=============================================================================*/\n\na {\n  color: #4183C4;\n  text-decoration: none;\n}\n\na:hover {\n  text-decoration: underline;\n}\n\n/* LISTS\n=============================================================================*/\n\nul, ol {\n  padding-left: 30px;\n}\n\nul li > :first-child, \nol li > :first-child, \nul li ul:first-of-type, \nol li ol:first-of-type, \nul li ol:first-of-type, \nol li ul:first-of-type {\n  margin-top: 0px;\n}\n\nul ul, ul ol, ol ol, ol ul {\n  margin-bottom: 0;\n}\n\ndl {\n  padding: 0;\n}\n\ndl dt {\n  font-size: 14px;\n  font-weight: bold;\n  font-style: italic;\n  padding: 0;\n  margin: 15px 0 5px;\n}\n\ndl dt:first-child {\n  padding: 0;\n}\n\ndl dt>:first-child {\n  margin-top: 0px;\n}\n\ndl dt>:last-child {\n  margin-bottom: 0px;\n}\n\ndl dd {\n  margin: 0 0 15px;\n  padding: 0 15px;\n}\n\ndl dd>:first-child {\n  margin-top: 0px;\n}\n\ndl dd>:last-child {\n  margin-bottom: 0px;\n}\n\n/* CODE\n=============================================================================*/\n\npre, code, tt {\n  font-size: 12px;\n  font-family: Consolas, \"Liberation Mono\", Courier, monospace;\n}\n\ncode, tt {\n  margin: 0 0px;\n  padding: 0px 0px;\n  white-space: nowrap;\n  border: 1px solid #eaeaea;\n  background-color: #f8f8f8;\n  border-radius: 3px;\n}\n\npre>code {\n  margin: 0;\n  padding: 0;\n  white-space: pre;\n  border: none;\n  background: transparent;\n}\n\npre {\n  background-color: #f8f8f8;\n  border: 1px solid #ccc;\n  font-size: 13px;\n  line-height: 19px;\n  overflow: auto;\n  padding: 6px 10px;\n  border-radius: 3px;\n}\n\npre code, pre tt {\n  background-color: transparent;\n  border: none;\n}\n\n/* QUOTES\n=============================================================================*/\n\nblockquote {\n  border-left: 4px solid #DDD;\n  padding: 0 15px;\n  color: #777;\n}\n\nblockquote>:first-child {\n  margin-top: 0px;\n}\n\nblockquote>:last-child {\n  margin-bottom: 0px;\n}\n\n/* HORIZONTAL RULES\n=============================================================================*/\n\nhr {\n  clear: both;\n  margin: 15px 0;\n  height: 0px;\n  overflow: hidden;\n  border: none;\n  background: transparent;\n  border-bottom: 4px solid #ddd;\n  padding: 0;\n}\n\n/* TABLES\n=============================================================================*/\n\ntable th {\n  font-weight: bold;\n}\n\ntable th, table td {\n  border: 1px solid #ccc;\n  padding: 6px 13px;\n}\n\ntable tr {\n  border-top: 1px solid #ccc;\n  background-color: #fff;\n}\n\ntable tr:nth-child(2n) {\n  background-color: #f8f8f8;\n}\n\n/* IMAGES\n=============================================================================*/\n\nimg {\n  max-width: 100%\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/ScaledAdornmentsDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class ScaledAdornmentsDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ScaledAdornmentsDemoForm));\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.demoLabel = new System.Windows.Forms.Label();\n      this.panel1 = new System.Windows.Forms.Panel();\n      this.scaleAdornmentsCheckBox = new System.Windows.Forms.CheckBox();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();\n      this.positionToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.panel1.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.statusStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // splitContainer\n      // \n      this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) \n            | System.Windows.Forms.AnchorStyles.Left) \n            | System.Windows.Forms.AnchorStyles.Right)));\n      this.splitContainer.Location = new System.Drawing.Point(10, 23);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.imageBox);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.demoLabel);\n      this.splitContainer.Panel2.Controls.Add(this.panel1);\n      this.splitContainer.Size = new System.Drawing.Size(789, 375);\n      this.splitContainer.SplitterDistance = 574;\n      this.splitContainer.TabIndex = 5;\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Map;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.Size = new System.Drawing.Size(574, 375);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.Paint += new System.Windows.Forms.PaintEventHandler(this.imageBox_Paint);\n      this.imageBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseClick);\n      this.imageBox.MouseLeave += new System.EventHandler(this.imageBox_MouseLeave);\n      this.imageBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseMove);\n      // \n      // demoLabel\n      // \n      this.demoLabel.AutoEllipsis = true;\n      this.demoLabel.BackColor = System.Drawing.SystemColors.Info;\n      this.demoLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;\n      this.demoLabel.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.demoLabel.ForeColor = System.Drawing.SystemColors.InfoText;\n      this.demoLabel.Location = new System.Drawing.Point(0, 0);\n      this.demoLabel.Name = \"demoLabel\";\n      this.demoLabel.Padding = new System.Windows.Forms.Padding(9, 9, 9, 9);\n      this.demoLabel.Size = new System.Drawing.Size(211, 352);\n      this.demoLabel.TabIndex = 1;\n      this.demoLabel.Text = resources.GetString(\"demoLabel.Text\");\n      // \n      // panel1\n      // \n      this.panel1.Controls.Add(this.scaleAdornmentsCheckBox);\n      this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;\n      this.panel1.Location = new System.Drawing.Point(0, 352);\n      this.panel1.Name = \"panel1\";\n      this.panel1.Size = new System.Drawing.Size(211, 23);\n      this.panel1.TabIndex = 2;\n      // \n      // scaleAdornmentsCheckBox\n      // \n      this.scaleAdornmentsCheckBox.AutoSize = true;\n      this.scaleAdornmentsCheckBox.Checked = true;\n      this.scaleAdornmentsCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;\n      this.scaleAdornmentsCheckBox.Location = new System.Drawing.Point(0, 3);\n      this.scaleAdornmentsCheckBox.Name = \"scaleAdornmentsCheckBox\";\n      this.scaleAdornmentsCheckBox.Size = new System.Drawing.Size(112, 17);\n      this.scaleAdornmentsCheckBox.TabIndex = 0;\n      this.scaleAdornmentsCheckBox.Text = \"&Scale Adornments\";\n      this.scaleAdornmentsCheckBox.UseVisualStyleBackColor = true;\n      this.scaleAdornmentsCheckBox.CheckedChanged += new System.EventHandler(this.scaleAdornmentsCheckBox_CheckedChanged);\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Size = new System.Drawing.Size(809, 24);\n      this.menuStrip.TabIndex = 6;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.toolStripStatusLabel1,\n            this.positionToolStripStatusLabel});\n      this.statusStrip.Location = new System.Drawing.Point(0, 398);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Size = new System.Drawing.Size(809, 22);\n      this.statusStrip.TabIndex = 7;\n      // \n      // toolStripStatusLabel1\n      // \n      this.toolStripStatusLabel1.Name = \"toolStripStatusLabel1\";\n      this.toolStripStatusLabel1.Size = new System.Drawing.Size(794, 17);\n      this.toolStripStatusLabel1.Spring = true;\n      // \n      // positionToolStripStatusLabel\n      // \n      this.positionToolStripStatusLabel.Name = \"positionToolStripStatusLabel\";\n      this.positionToolStripStatusLabel.Size = new System.Drawing.Size(0, 17);\n      // \n      // ScaledAdornmentsDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(809, 420);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.statusStrip);\n      this.Name = \"ScaledAdornmentsDemoForm\";\n      this.Text = \"Scaled Adornments\";\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.panel1.ResumeLayout(false);\n      this.panel1.PerformLayout();\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.statusStrip.ResumeLayout(false);\n      this.statusStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private ImageBox imageBox;\n    private System.Windows.Forms.Label demoLabel;\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.Panel panel1;\n    private System.Windows.Forms.CheckBox scaleAdornmentsCheckBox;\n    private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;\n    private System.Windows.Forms.ToolStripStatusLabel positionToolStripStatusLabel;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/ScaledAdornmentsDemoForm.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Drawing;\nusing System.Drawing.Drawing2D;\nusing System.Windows.Forms;\nusing Cyotek.Windows.Forms.Demo.Properties;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class ScaledAdornmentsDemoForm : BaseForm\n  {\n    #region Fields\n\n    private List<Point> _landmarks;\n\n    private Bitmap _markerImage;\n\n    #endregion\n\n    #region Constructors\n\n    public ScaledAdornmentsDemoForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      imageBox.ZoomToFit();\n\n      _markerImage = Resources.MapMarker;\n\n      _landmarks = new List<Point>();\n      this.AddLandmark(new Point(467, 447));\n      this.AddLandmark(new Point(662, 262));\n      this.AddLandmark(new Point(779, 239));\n    }\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void AddLandmark(Point point)\n    {\n      Debug.Print(\"Added landmark: {0}\", point);\n\n      _landmarks.Add(new Point(point.X, point.Y));\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void imageBox_MouseClick(object sender, MouseEventArgs e)\n    {\n      if (imageBox.IsPointInImage(e.Location))\n      {\n        // add a new landmark\n        this.AddLandmark(imageBox.PointToImage(e.Location));\n\n        // force the image to repaint\n        imageBox.Invalidate();\n      }\n    }\n\n    private void imageBox_MouseLeave(object sender, EventArgs e)\n    {\n      positionToolStripStatusLabel.Text = string.Empty;\n    }\n\n    private void imageBox_MouseMove(object sender, MouseEventArgs e)\n    {\n      this.UpdateCursorPosition(e.Location);\n    }\n\n    private void imageBox_Paint(object sender, PaintEventArgs e)\n    {\n      Graphics g;\n      GraphicsState originalState;\n      Size scaledSize;\n      Size originalSize;\n      Size drawSize;\n      bool scaleAdornmentSize;\n\n      scaleAdornmentSize = scaleAdornmentsCheckBox.Checked;\n\n      g = e.Graphics;\n\n      originalState = g.Save();\n\n      // Work out the size of the marker graphic according to the current zoom level\n      originalSize = _markerImage.Size;\n      scaledSize = imageBox.GetScaledSize(originalSize);\n      drawSize = scaleAdornmentSize ? scaledSize : originalSize;\n\n      foreach (Point landmark in _landmarks)\n      {\n        Point location;\n\n        // Work out the location of the marker graphic according to the current zoom level and scroll offset\n        location = imageBox.GetOffsetPoint(landmark);\n\n        // adjust the location so that the image is displayed above the location and centered to it\n        location.Y -= drawSize.Height;\n        location.X -= drawSize.Width >> 1;\n\n        // Draw the marker\n        g.InterpolationMode = InterpolationMode.NearestNeighbor;\n        g.DrawImage(_markerImage, new Rectangle(location, drawSize), new Rectangle(Point.Empty, originalSize), GraphicsUnit.Pixel);\n      }\n\n      g.Restore(originalState);\n    }\n\n    private void scaleAdornmentsCheckBox_CheckedChanged(object sender, EventArgs e)\n    {\n      imageBox.Invalidate();\n    }\n\n    private void UpdateCursorPosition(Point location)\n    {\n      Point point;\n\n      point = imageBox.PointToImage(location);\n\n      positionToolStripStatusLabel.Text = this.FormatPoint(point);\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/ScaledAdornmentsDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <data name=\"demoLabel.Text\" xml:space=\"preserve\">\n    <value>This demonstration shows how to add scaled adornments to an image.\n\nIn this case, we are displaying a map with a number of pre-defined points of interest. Clicking the image will add a new point.\n\nEach time the ImageBox is invalidated and the map drawn, a graphic is also drawn at each point of interest, scaled according to the current zoom level and scroll positions.\n\nBy making use of the GetOffsetPoint, GetOffsetRectangle, GetScaledPoint, GetScaledRectangle and GetScaledSize, you can easily add additional adornments to an ImageBox that are always sized and positioned appropriately.\n</value>\n  </data>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>248, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>363, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/SizeModeDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class SizeModeDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SizeModeDemoForm));\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.splitContainer1 = new System.Windows.Forms.SplitContainer();\n      this.imageBox1 = new Cyotek.Windows.Forms.ImageBox();\n      this.cyotekPreviewHeaderLabel = new System.Windows.Forms.Label();\n      this.splitContainer2 = new System.Windows.Forms.SplitContainer();\n      this.imageBox2 = new Cyotek.Windows.Forms.ImageBox();\n      this.label1 = new System.Windows.Forms.Label();\n      this.imageBox3 = new Cyotek.Windows.Forms.ImageBox();\n      this.label2 = new System.Windows.Forms.Label();\n      this.menuStrip.SuspendLayout();\n      this.splitContainer1.Panel1.SuspendLayout();\n      this.splitContainer1.Panel2.SuspendLayout();\n      this.splitContainer1.SuspendLayout();\n      this.splitContainer2.Panel1.SuspendLayout();\n      this.splitContainer2.Panel2.SuspendLayout();\n      this.splitContainer2.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Size = new System.Drawing.Size(771, 24);\n      this.menuStrip.TabIndex = 8;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Location = new System.Drawing.Point(0, 406);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Size = new System.Drawing.Size(771, 22);\n      this.statusStrip.TabIndex = 9;\n      // \n      // splitContainer1\n      // \n      this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer1.Location = new System.Drawing.Point(0, 24);\n      this.splitContainer1.Name = \"splitContainer1\";\n      // \n      // splitContainer1.Panel1\n      // \n      this.splitContainer1.Panel1.Controls.Add(this.imageBox1);\n      this.splitContainer1.Panel1.Controls.Add(this.cyotekPreviewHeaderLabel);\n      // \n      // splitContainer1.Panel2\n      // \n      this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);\n      this.splitContainer1.Size = new System.Drawing.Size(771, 382);\n      this.splitContainer1.SplitterDistance = 257;\n      this.splitContainer1.SplitterWidth = 3;\n      this.splitContainer1.TabIndex = 10;\n      // \n      // imageBox1\n      // \n      this.imageBox1.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox1.Image = ((System.Drawing.Image)(resources.GetObject(\"imageBox1.Image\")));\n      this.imageBox1.Location = new System.Drawing.Point(0, 0);\n      this.imageBox1.Name = \"imageBox1\";\n      this.imageBox1.Size = new System.Drawing.Size(257, 361);\n      this.imageBox1.TabIndex = 0;\n      // \n      // cyotekPreviewHeaderLabel\n      // \n      this.cyotekPreviewHeaderLabel.AutoEllipsis = true;\n      this.cyotekPreviewHeaderLabel.BackColor = System.Drawing.SystemColors.ActiveCaption;\n      this.cyotekPreviewHeaderLabel.Dock = System.Windows.Forms.DockStyle.Bottom;\n      this.cyotekPreviewHeaderLabel.ForeColor = System.Drawing.SystemColors.HighlightText;\n      this.cyotekPreviewHeaderLabel.Location = new System.Drawing.Point(0, 361);\n      this.cyotekPreviewHeaderLabel.Name = \"cyotekPreviewHeaderLabel\";\n      this.cyotekPreviewHeaderLabel.Size = new System.Drawing.Size(257, 21);\n      this.cyotekPreviewHeaderLabel.TabIndex = 8;\n      this.cyotekPreviewHeaderLabel.Text = \"Normal\";\n      this.cyotekPreviewHeaderLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;\n      // \n      // splitContainer2\n      // \n      this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer2.Location = new System.Drawing.Point(0, 0);\n      this.splitContainer2.Name = \"splitContainer2\";\n      // \n      // splitContainer2.Panel1\n      // \n      this.splitContainer2.Panel1.Controls.Add(this.imageBox2);\n      this.splitContainer2.Panel1.Controls.Add(this.label1);\n      // \n      // splitContainer2.Panel2\n      // \n      this.splitContainer2.Panel2.Controls.Add(this.imageBox3);\n      this.splitContainer2.Panel2.Controls.Add(this.label2);\n      this.splitContainer2.Size = new System.Drawing.Size(511, 382);\n      this.splitContainer2.SplitterDistance = 255;\n      this.splitContainer2.SplitterWidth = 3;\n      this.splitContainer2.TabIndex = 11;\n      // \n      // imageBox2\n      // \n      this.imageBox2.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox2.Image = ((System.Drawing.Image)(resources.GetObject(\"imageBox2.Image\")));\n      this.imageBox2.Location = new System.Drawing.Point(0, 0);\n      this.imageBox2.Name = \"imageBox2\";\n      this.imageBox2.Size = new System.Drawing.Size(255, 361);\n      this.imageBox2.SizeMode = Cyotek.Windows.Forms.ImageBoxSizeMode.Stretch;\n      this.imageBox2.TabIndex = 1;\n      this.imageBox2.Zoom = 167;\n      // \n      // label1\n      // \n      this.label1.AutoEllipsis = true;\n      this.label1.BackColor = System.Drawing.SystemColors.ActiveCaption;\n      this.label1.Dock = System.Windows.Forms.DockStyle.Bottom;\n      this.label1.ForeColor = System.Drawing.SystemColors.HighlightText;\n      this.label1.Location = new System.Drawing.Point(0, 361);\n      this.label1.Name = \"label1\";\n      this.label1.Size = new System.Drawing.Size(255, 21);\n      this.label1.TabIndex = 8;\n      this.label1.Text = \"Stretch\";\n      this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;\n      // \n      // imageBox3\n      // \n      this.imageBox3.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox3.Image = ((System.Drawing.Image)(resources.GetObject(\"imageBox3.Image\")));\n      this.imageBox3.Location = new System.Drawing.Point(0, 0);\n      this.imageBox3.Name = \"imageBox3\";\n      this.imageBox3.Size = new System.Drawing.Size(253, 361);\n      this.imageBox3.SizeMode = Cyotek.Windows.Forms.ImageBoxSizeMode.Fit;\n      this.imageBox3.TabIndex = 1;\n      this.imageBox3.Zoom = 166;\n      // \n      // label2\n      // \n      this.label2.AutoEllipsis = true;\n      this.label2.BackColor = System.Drawing.SystemColors.ActiveCaption;\n      this.label2.Dock = System.Windows.Forms.DockStyle.Bottom;\n      this.label2.ForeColor = System.Drawing.SystemColors.HighlightText;\n      this.label2.Location = new System.Drawing.Point(0, 361);\n      this.label2.Name = \"label2\";\n      this.label2.Size = new System.Drawing.Size(253, 21);\n      this.label2.TabIndex = 8;\n      this.label2.Text = \"Fit\";\n      this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;\n      // \n      // SizeModeDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(771, 428);\n      this.Controls.Add(this.splitContainer1);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.statusStrip);\n      this.Name = \"SizeModeDemoForm\";\n      this.Text = \"SizeMode Demonstation\";\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.splitContainer1.Panel1.ResumeLayout(false);\n      this.splitContainer1.Panel2.ResumeLayout(false);\n      this.splitContainer1.ResumeLayout(false);\n      this.splitContainer2.Panel1.ResumeLayout(false);\n      this.splitContainer2.Panel2.ResumeLayout(false);\n      this.splitContainer2.ResumeLayout(false);\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.SplitContainer splitContainer1;\n    private System.Windows.Forms.SplitContainer splitContainer2;\n    private ImageBox imageBox1;\n    private ImageBox imageBox2;\n    private ImageBox imageBox3;\n    private System.Windows.Forms.Label cyotekPreviewHeaderLabel;\n    private System.Windows.Forms.Label label1;\n    private System.Windows.Forms.Label label2;\n\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/SizeModeDemoForm.cs",
    "content": "﻿using System;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class SizeModeDemoForm : BaseForm\n  {\n    #region Public Constructors\n\n    public SizeModeDemoForm()\n    {\n      InitializeComponent();\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/SizeModeDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>479, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>594, 17</value>\n  </metadata>\n  <assembly alias=\"System.Drawing\" name=\"System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\" />\n  <data name=\"imageBox1.Image\" type=\"System.Drawing.Bitmap, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n    <value>\n        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\n</value>\n  </data>\n  <data name=\"imageBox2.Image\" type=\"System.Drawing.Bitmap, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n    <value>\n        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\n</value>\n  </data>\n  <data name=\"imageBox3.Image\" type=\"System.Drawing.Bitmap, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n    <value>\n        iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO\n        mwAADpsBVdD1ogAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAABNAUlEQVR4XuXd\n        a9B9713X9/8Dx7HTqYNWM0ohIwgI4TCcguEQSgjBQCDDMRwEJBwsBKEQICAUhWCUkxYErBhDITAWRG2h\n        YMtEeiC21ladqi0e8IFtZ3T0kczIdDrjzN31un77vfne13/t+3f/ITwAH3zme53X2uv73t/rWtda+76f\n        efvnvd3dmd7xd/7We3rnd/j3f8V6z3f67ed6l7e/e//3eIdTfch7/QdXO/Wh7/8uSx/5gb/7qfqYD3qn\n        u1d88Ls8Wp/8Ye+89FkveZe73/+y91x69Ue/4O4LPua97ulLP+F97r7qE99r6ete9b53X/8ZH3j3zZ/1\n        /le94XNfuOx3vPoD7r77Cz7w7rtf86F3b/xDH3L3pi9/8d0PvfZJmtT9mS/6oJX+S1/3kXf/9X/ykmfp\n        Ld/wEXdvef3L7t76ba9Y+tnXv3SV//TXffjdf/u6Fy/7E6/7sKUf+6oPXSo9y0vf0k/+4Q9fY5H0rPuB\n        P/R7777lc97v7vWf+T53X/cp7333Fa98wd2XfNwL7r7o973r3ed91Luu6/UZL36npWeBtQMVVL/7+b/j\n        HiTv9k5P8qDY9e7P/61LQcO+37v9zpVmU3ngfMB7vdPdB7/PEwXPi9/3+Ver/LEgpTNo6BM+/D2u8HzK\n        S97zmp5lNKHa4XJB6bWf+gFLgUWA+vYv/JAnQB0wXXUBaEIl/Ze/9j9cTtxhIjD9zLe84u4tb/jYK1QJ\n        bEFAP/U1H7E0IWEfC9StfKA6f1+UwCLX4DUf824LrHQPrB0kCqYsmFIQPU07UDMapYAqCp3pDJw0oXnZ\n        i97tXn7pxe/5REc6qIJnpulTP+LdloLqTMF1hcpFvoAVVEWootQEiXIWBVHR6qe+8aOWZoT6X7/jiWZa\n        1JoC2oLxsMB4LppQTU2ofFFELHB906vee0XqvmBf+PIncIla9AyQgJMNpB2qwNrBSe/z7u94z1IgTaBE\n        phmdpnaQHgIKQFeIAucBTXgCqPQOFwWRKPXZL3/vJen0xa9833Vh92hVlJowmfomVBMszpvT3w7Uz/7J\n        T7z73/70J59qwfWGlz8B67D/wx+5TJkDsF1NcVSaNZ1OTaje/KUfvCLtBMuXaYK1w7XA2qNUeekZpZ4G\n        VvCkswg1oZrpW1DtcL30Q97rns4g+viPeO8VmUh+hyaoWFCBE0TKAqo0iNiilPyaCj/pA6/RClDXtdQF\n        qtZRb/7qj1zp8hOsH3ndL0WpZNoD1A7R3/veTzlV0Yv+5h97ErmAEkhgSztgM30GFDnXN77mg65gUVMh\n        sPZ1VnrmLDKdAtV6adOEBlxgyc46CiR2gjR1BlMCkii1gDqLVFvZLbCmtGEBBqDslGgVWJ/38e+/LiSo\n        ilKgojUFXsACFAVS6ax1VVBNuID117/rU69A/a3v++y7v//Gz7r7R2/6/cv+3Pe9aqXZK2B/+uPv/v53\n        fMw9uIJpz6cJF9t0uENFwLoFFe1rrHtTIaCCqDRw7tkNrgXRC37XPbtrQpX2CLULRDP9kg969wVTcE14\n        nqUDLhGL5ANn1z797TA15TUNBtcO1Td9zgcvoIKq6EQ7XOksUpFpcEYsIP2DH/gDy/78D372UkCxC7I3\n        ftoCa4cr/d1ve9lVQTYFrKbGCRW5CwRV6ytQ/ZFPf3InDK7AaiqcUesasSZQwfSQRKXWUwE04dnLmvKm\n        JkwTpA974XtcgUpFquzTACtasSADj3S6BdSEqihF1lSmv6bAItWEqimQ1L/xtS9dAP3w177sCtNPvP7j\n        1h3eW779k5dd+WNNNddWIhaY6B//0OcvBZZoVcS6B9YWudgzBVxQJWBPqIpU6yZkA6uINafC5LoB7Jmm\n        PnaHh25BdhaJdk1gngbUVFBNuCZUymmHaZ8Ki1rXcvYS0QJrwhVEprtUGaDANRfr3/HFL777zj/4wb+0\n        WD9AEqG0MZ6o+MNf/4pVdoXqAOqt3/377/7m937msiAqSikz9TX9/b3vf/U9sFggqcuuCHaJWBOwn/+e\n        V15B21X0MiUGGLCaCoNqrqsCy5cpqPYpcQJ2L2I9LVoVpQBl6qNbcAEk+1wEInbCtafTadTa4NrLb0FF\n        M0q5OEH2rEj1eR+2otQECzwiE+lrbDcHgKIf/YZXLKiAFDxACrAJVFCVDiwQgZMTA2iHp7LK/863vGyp\n        +n/4pz52CVygas1VxGq6nlB1J0gzWqXAmloR62lA0YIpqC52h4k+6H3f5aodmseqKJUCaYdrAnNTlwgl\n        PafAHSp56yhRUaSZMH31p3/QFSgwASm1UAfOX/rGj1+O/4bPffE6P+NWFlQzKk2YAond1RQoqr30/d7h\n        7u1/27+3jjkBytJcUxGw5HewiljsXGPNddWC6YjQV7CO9BlcCVTsM4+BqrVUEesWUDMPkIfWUSwnZisL\n        nglVfSqvDz0LpKkLdGdAVQcmXxI3Jqydfu0Btaa9z/6QBdQVqi99yZryWkuZ6oLnJ97wSXc/+a1HVDms\n        dh756LfWU4eKUDtY4PnHf+GL7/6PH/z8Bdc/+v7PXWl26YBKhHLezu+3/5Z/9+793/W3r0gHNlFTxAGX\n        /ayAmtrhkg4qtgX8XFuJVCCaME2oVt1Fe90CCzQ7XKY5dsLytCjF4fLsmSzK2Q9/0XuuaUyerX6H6DEC\n        R3bXrQilvc/7rr/refc+s303fUAXVIEFqsBa0x6gvvkJSEvf/plXqJYO0AAo0v217/qsBdDf+HNfuGxr\n        LOkF0w9/ybIzSrkbBFXTobtPMPEBsJ7/O37z3Tsd8uhMuSj78S96/kp7pGLdBJjgAReYQAUy5drYami7\n        oWkQVKJTC/WAKRoF0VUX8EqvqXBe2F0gye4qQgGBFZ3KT4EnledY6SJWC/L6zPSZ1JN+rbOeFb0uESmo\n        Ktd/fok4KhlTBNPX9Eegaj21pr4DlqLUT/+pz7xKRAoydetu8GhnOg0q8CRl1OJ8AXaBiOSVS1tbiVSv\n        eOE7rvUwsEyHad14HRF35l/yPr9zOdiueYBNgQ1YTYErUh3TurXVPu0F1LSlr0Admm2uESu1KAeJPLur\n        CLVrByAFCggmTKa18rNd6bN8ZRMIqsz5NQXPzzUlMvVZZn9jW6wXsVzctZVwmf4WVMfi3HoKQCJRYJVe\n        U+Ih7VhggiqwRCcRKdhMgUUsKmIFHLA81gGOqAQcYO0Ckz1JaZGsdiIapwOo6ETdCc7pj3zmNkEnMEFT\n        /tZaK+ieGrFyVjoDaoqDpooqVNkOU7CUZ9ua8E3N+fPcdiDqs7c70wSq9saQbv1lCpxrqitYRxQC1U9/\n        73/0RBewrtPgAdOKWIdEMW3+0rfej1jAkQfNP/nRL7n7f37sNfdsUAUWuE1xzmvClIpUU6ZKdb/lN/87\n        K68/EEQwMBWpeg7YmsrUvQM1txFI2awPpqTNFawiVRc+Fb1oh0hZQJypKTB4wFVa/YStsll/pupp9g+q\n        CUs3HVO32lRmujR2YE2oyLrqv/yWVy0wZsQC1pwOF1RH+d/44a9Zd4kTrKl/9pNfvQSqCZa61ljuBEn0\n        CaQJVqo8uAhYv+k3/oZVLqqJeqAw7dlZD6g19Z3A1NbL1A7SlHqPeJ4VsbrQwbSrqLTbXXMt1Z0cFb26\n        40vl2VQfmm0rA8L+oHv/PEmd8wfgWX2fTbsZsSZUa6PTgv1YqINK+o9/8cuucJFyi3P2//yLX7WmOW0C\n        q2mP/b//ypffA2uPVqvdAZZo0zYDiapzuqt8T4tapQFG0sYDQPtUQRUYNPfynitcwFxgFZVmdDpTDn0a\n        VFNnMMx6AIKILc863g4KiGb+aWqM7IxOt9pSd4LPWl91J+gO8BAArcm+8jM/9ApVwAHpb//gFy/VB2iB\n        BKJ/9pY33P1/f+0rVx5kC6xjzcUWwcAFBEsCkLCmW2uuCU5pCropbQKsdOu2CRHb8z4bxrN81xlUtMBy\n        QXOY9Jl8yzkbSJTzp5SdlZM1VdNgY+ZE2qesPT+Beixcc3zHM+YcV/nengUVmL7nyz9q2cC6t71wQPJ9\n        X/fJa7uCY0QQ0501ljbaBlbWeEFF//pv/WdL4KqsqDXBErmABQIweHPAnlageUlT+YTMlLdDlZ1gJXXG\n        N6bI6DP1wh4F2S3Amj6DaoHlYufsW9qBKl1+WipCiUSgKmo1DVZvnLPj5eRb5c9FAUWzv/TKHxeUVW9r\n        4M+97mOXwMT++a897vAuUBV5CEj6/fA3H5HrWJcBUh8g/fU/+weWNd3Rz/3Il63pEET/+n/61itU0kWs\n        bEBRUYyznScAgA4sZQEEDmAFn7IZwWqT5rSozjhFOWMkn88WB9AIYDtUEybTaeu0FbEegmsCc0s7VGwA\n        BRMVuaqba6kJWWP6YJUtCA4g7kWs48O7KNf8RdroIz2hqsyxnYu07Rb14BBVwBFUgEoTKtOe6c+xjdVa\n        TDQDlCkv/ZMf//oFjLtDkesK1mF/4Wdef/cv/8dvX5Zm5PrnP/6l14glIgaRrY4Vsd7jeffAYkW2ynaw\n        qHYBVh5Urg9YgWSj9ZMP2Wjd4SmfFlC2HuYm6aEF1q4iFOf+3g944vgdoBQcU4EzgdI3mVrJsbJUffkU\n        VDtcLiKtH24c+er0WW188y7lysBjs1S04azqTAEiSlPghOvNr3v53Q9/4yevLYPu+N78DZ9w96qXv3A5\n        QpQDjfUYG1ALkiNCAYcFmDvEX/zf3/QErk0TKmo6BJaxA+a/+qMfu163AZHPrTxIpIMraCZAe36vc71c\n        i6ZCU19ATbjSgugA6rqZesh2hbvMe2AFlDQH7xAl8GR3oKb2CBU0RY+poNrB0rZtkG4uAmLKRQYTUPUJ\n        PioigUCksTCXL9z3yAZcwKKmw6ZCcEl/z1e+Yk17oLJL7w2Gr3jVixawxgYVmOhf/M9/5t60d50KR3qP\n        VIACU2staY9/mqpABTT59cU5ZGM0MECVndBQIE2gZnq2W1HsgNQOPtBEqmDaLbBSd5qnYNEOUwoqsDwE\n        FXEelQeXvgHUWDtQwb2gOqAAB1CCpfQOUH2MBbDK5d29veZTP2Q5v/WROnlArYj1mifpotaKVgdU2rsD\n        XH0Op4HIZ5FX7neLQfsPfupPXIFa0WlAdY1k6SibQLkDJHeGRSvbDSyQOdxuuQfN8oEVROXThGUu7i34\n        Z52yqbM6aV/eFvitvUyXohvIAGVfjBZYEyZOYM8EjlsQnSmoAix5jUX5hInKcxjL8cCqXl5dCprKfWhW\n        WfWsaYvjRRbRRl4d2IA0I9ZZ5ALWjFrK1mL26G96c6G/7bWftNJFLECxTY3WXvqusY+op8w6irVIB08P\n        paVZrye/9fKasvPmXGB5HMN5gGo6VNfdY7ZyOltzkUU8uwM1NccJtCIawEQz0co59XjoGrE4g6ypAslb\n        CL2JQDN9S01/O1TSHaNjdtzSIJjpoAqSWZeKTKXVA6z2vghf+AkvXBKxAKattxgAQ8CaAldbDR5Ef93n\n        f9STbQRrrcMCTvlayB/rKuOJYEUrsFiT/egf/4xrvxb17hKBJdLpK2IVreaPJ6TXD1UvrytbW3GmRzDA\n        Ug6epkjgAIBMXy989+dd69XN+vJB8rzf9iSCTciSvOtpu6H9LSBZTzXtJbv5vdN1byoEE0fvYD0GqKkz\n        qCZcAKAdMuKks7I0y+Z013jBVXvTVmCJMABwLk2JIkGWgDUjF4CMU73IBbiil7LP/6QPXcf2pVqwXBbr\n        QEq2HAAkzQLN+F6H6Q3S+RtCaym/5BGh1vT3+peuKYfzgGU6nNAEGCuCOmdgkXp1RTJRTtmMRCmY9jJ9\n        A0p0skAPqKa/3pK4B5YLQ0FFQAiql734fZedmmW9pTnrAyuJHh3vuWpOieTCOd+gAkxTISkDFacTsDoP\n        UcvbC+ACRpZmBAsuztdPnTz52X93lup+9Nu/YJ2DTVP57/iKj1tRK7AmVKwI1ZsMoLJAL0L5YQWYAssr\n        OGDySMk0AzI/mFjHH1GL5BdYBwiBREWrvQxkwTNBKoqVT7Y5AAas9Vr2BSoCPbC8O/9MQD20xpoRC0w7\n        ZB/3kve/pl3UackFN+4EYyoYzspmXWNMq44FFZhqCyoRakYrd3GgAlpwWXf17hWwAMWCCUCmLbvs1lXf\n        92UfseAyjXVscmyRylRorSWvHnzaGieokogFqF5X7kcV6xc8l1daALVHLWWgIpHNGgcsQQAYx2eDi1qL\n        VR5cytkZvUpPoNpUbWPVGBbuthcmXGuqPr4cC6xbd4GBcaYAm6AFkykBTNI+pGiTw7O31B3hLudZWhtj\n        d+4s5WjHBlIqYllj0fwp1wSs6RFcLljToqnPtGf/SpQATFPwctBhwQcs06BFPHDAptz52JaQNyVaZ4HK\n        FGj6A5W3IYAlWhWxptb0d4D11mO9xf7t73rl2igVxZxDUIiYogrHu/Yk7e4ZRPLrjvoo2wHb4doBC6rS\n        6kRLY776WIOZIouoz+wwzTXVvrYCUNEpoEyBgUVFpxzddkFwTchSQBBQZn1jzfbOM3Cr73isyESBNSFq\n        AT8Fql5FLmKxZDoMKpCJQD5PF74XJR0XONZWPcpJ1mMuvinKYt52wq2I5QVB78r71lNQJU6zvhKxgCVq\n        AaN1FAHG4r1jBpd2Fvblp54GFwHKeI3ZloO1n1dlRCxToXe9rhGL3SELlsfKGHPxzLroQQOqwKp+V+VZ\n        Y3aOM+944LJuk9eeNQXaTpgRCziAktZmh41EqyIUmCjIlNUHWC62TckJGInYoqP2vdkQXMocG/CgIusr\n        EUvk8gDbN140tOMdVOuHrJepccF1lIOr6dAdJOc6Prg4HyRgCQJyfYINEOwC7CifcFFjgWnCZmwQOQ/w\n        OKfuAv1I45/+mVdef894XWMBqWj1GKjaz6r/LmOw68QP7VHrDKRZHuwzzyrjwKbdbgiUywdVtikQFKBz\n        HuCv/gws2wmmRH05GUzOzwUG1Nrpft7brfxyxgYYWZvNqAWkQHM8eZHQcTuGL4q+/hRSUE2gdqjWdHg4\n        0dqvBXxgme4AZVzP/YLINAnEFXWO9AQMeEFmPHI+xgNYEQtUwWWhDqp//p9/yt2/+rE/cPcLf+Vz7/7F\n        X/is+1PhnAafJu2ajs4UFAETVIGya6/TvzHYplhTLyiakmcb5QEzxZEgMQYIkj5tdFp3iU6AspDnbO1z\n        Npn22OBywddUeFifz5jWOLUHtD0wQAHJvpdzEQ0W5Ec/7dgiBjismxZIgCIL+gtU7FuPdVZwmQpFLeMU\n        sUBgPNEPVKJMUcp1Xg+Zj88dVNfp8ahjnUfnFlzGM7a1lb2sXm0uWoHp//2rf+iqZ4JpAlXECjbpuY6a\n        Ejk4OUfrk7O72E6YpAMn7ZFJuum0/DwecGbEqv+EasJVxJI2XlAlF42MJ3pYtEtbpAdJNqDq4/NNyLQz\n        JudIrzxofHbOcszDgkef7Kq7iCMt5MFD1l3WVBRQrGglbZ3ld4fO1zkZ0xjGch4iFrAogEQdYBXJSF31\n        pL/xZtQydgt4oLoDtKYClmgFqH/z1//wegXoGrGCK6huqUV7mkBNqHa5uKWb1mZev6SstLGDKKg6l9nm\n        DKrPfeWL1poHWMqNW+QMLBGnSETuaLuogVfbQAm0yqQDzBRZmtSttke/5ZzLi3mpek5jfREs6lvYrzXY\n        BbKgWtHqP/2EFa2A5edh7lyNkUSYBdAlYhW11vRo0b1FMuVrBjosuUatrwJVuvN2DFOpX/QAu0gFLFpg\n        cQxISrMzglUfRDSjVEByMjuhoR2qCVZQSQdKMjaQQJHkqTaON4EC08ybeoBlrM4jUHZNGLrb26Vur5ev\n        72yT1oPyi2Pm2gyUpq/acZg1nilz/dLnuIM0zYEMSAuoi0DVlgOw3AAEp3HmGiuwWltVbkpTXhmZJsEm\n        ellzGe8MrOBSrr2lg9ey74GVXPzSQAJMkUldmpBN2PQLHE4PnjNpM4ELFFJnPAAZfwfLcWrbmktkYn3j\n        A6w02/QaDKkyFw0snF0Eayq/6gLDHvWSssSxyVgzepUGWesiMs1M0NxMuHME0QLrEqWmgOVvO3gbIhAC\n        TCRqPRVcV7AOGID16o9+wXW9pWwt9o98kUzkM5bo5fMHlDppY9rwDah7YAHI3ZV0kJwpyNKMWtPZpQES\n        RNOmWV5fefYMKppjm7aUgYfA1fQHJnXA89nalQ+CIo6x+guGLmD1u7RhtTdO1sVuXLZ0UyQVzTgETEvS\n        Q4G1HHfU+zzuIEWrM5hY0cw05E8asaKz6GI8gAZWr7bQjFryPVgGUsBpk4zRlDjB0tZ7YfKO4QYlqNYa\n        C1QzMs38hKl0MO1QncnF97ZEb6GCYZdymoDpu0MFNMei+oCmiBRM0+qTo/VzjPLJOOxenuaU5yJrby3i\n        m80GUxeeAlS5iKXfXItxTFFL+8o4CRDSduxtpIpYAEoAKu31GnkRi9742peuvsZlRRvviu1gBZG0Kczm\n        pnRgASXo5PtMxjMuAdjdql8M9Tkc36tAK2IFEmdOoFL5IAquyidIZ+JMkg6cCdYu7YwNpiw5FlACUBRS\n        XqTybZ2W1AUOq2+QAGbVHRdE+Zz29qlOOwKTc2BtFwSWMYATLAu2wwnLHtIOXCDThuRzGIEq5TzbBd6m\n        WAB9/5O/OpMNMvnAstjXr/GMXwQKLALOAuuwvRnqLx5Xzurz6ss06bM0FbLGBpa+Fuz+gAmALeaN5WH0\n        ve0GjmQ5cVcRShua8JxJlAqUxDmVU5AozzpW66bEmWwOJnmL8gSk0uAStaTr51jZohBAnrWOuii4ik4J\n        UAkcC6yjfYBIBxRp0xiBxFHK60MzagVoZTZbwRVgpad641S/pkNpoARUi/WiEytarddhPuW9V7qINWHs\n        XJ2/cw9+kAHc1AcwD8hBZS34DEdyuggAmEDa06n2tzRh6qXBAEocPPM53dj7FJg4R5vaTZC+9NM/7KrK\n        7EmR/R3jU8DM9RW7K6jUgzqQev7oXIpC2rvopI+oFFD6Oz7VVhRqUa+stvoDaUasCch6z+snv3pNj2dQ\n        JcDUj4zdVNh6CjTgAVERq/fX1/R3fAnU6yOSNR2meX7GBpVj2yRN14jFWUUtaSpdpAqYHEyVnUm9RfPM\n        sxMotvKi4g4V5zaG8xHRJkwUSBMs/UA0o1JQmbo4laoPKGnnBB5OEP2sRURCF91nUteY+oBHG+21o1df\n        fuSpDyhZjteeBWsRAWhrfXUs3IOLTfLBtaLTBbCAKu14O1ggKVpNuJyDtGeUweXXOEG3PssBnjYiVV8g\n        MrbzdSy/FXBsj3M6nxWxQDOhYkunHPs0mM4USLTXiZQdoymPRCQWaPOOVRt1E6jd6sd54AmkNPNFsRRk\n        LAiKVqABhnRArTaXelp/9ujznrxuIw0sj4b0K2Lpoy+HAUA7r9M4FmeJZrYMmjJFsKIY6b9+hLEpZ5LH\n        Upytvz7GCiCQBJdIAx7WWwmilfraBFb9iqqNXRpgrI3bNklpgbVHqsSZE6SmtjNAHlJjBCyH7JrrqrYM\n        9nPSTv1XfvZLFkBf9GkvuQKWgooDd7B2yKi2bKDZxvBOPOcDgxW1fA7Ol/ZMETy1kQYWAUb5jFAk3X8i\n        4zyvxyjjfMAq48y1ED4caQ0zIeFEU7GXBoPKXdj8casdeO2LWNLGMraIBJRgsXh3LsDyRmjToagVWPpp\n        K4oF07QdxyvL1lppTYU5Lkcqm0A8V5B2GXNOcyxIOm511YNKfdEsq25FpQOsHaimwLmeAtIZTMq0mTDN\n        PCdzIAFEROIADrIzTsASnUjans4bj9tt04IyTiFjGVdfaWWiFAHQFGPsIsVy+NEmINtDyoEcaizvh024\n        ilzuIieMpD0wgGN8YEk7HoHJw+QJmHNwXqw2+vgCGDtgyXS4jnHcEQL7ClZRhOMAFURNXS50gMg/ZioM\n        TJrgAGNKGYDO6ub0x2oDnAmTqBVk6ow1YQmiIldrqWDzWVgRSj/i/KIVOYapzDmJRiJC72iBSJn0+nnY\n        Ie9x6ceZrL7rdZRj7AXQEdnA9Opj/SUycZx2nGetA7Ycrn1rG85sj6syr91MqMhjFe1yuPZNh44jGjmO\n        Z3zSjgMkYHmoDC71yudzRkCCZ4Il3TmR131ayC+wOC6Qgqm0i19auzY7pc8UVEXCoPrsT3jxdd3Elp4C\n        h2mwcwIKaxztAWT6A5PXURLnawucCVUQBZK6mfc5lIHAMZSJTiJVayPRiAXPhMg78BwbbCIWy3mAMGWC\n        RF+wKpPmYDAFFXGafiu6HdA4HzAE0C4OBap2fpPIkcHl9RxOng7XR1tRB1D9ugZAjg0w2wReKwaYOrAF\n        vHWYu0PnHkxs5+MYIBZdbZpe38d6CKakXjk9DS4Cx4xEEypw7HBVJg0Sji5aVT9hIk5m1Ts/AkeRKQFJ\n        HWdUx/oMwVi0AxYAjOnCijDANfUAiQAUTBwDLlHMDzBMccYBxvqWHw41HoBEQs5RRjmFDZS1XXEAVb6X\n        74yXI3Mq6w+U9AfcRC+PVpRTYJGxrJtAE1ymPVAFXGCx8va1gNWUSMYtIs7jFB218chpgZVTzmDKzjYP\n        QSVSTag+51UvXVBMmKj8tNrrN6Fi1T8GqlviJOc8YZtltg+MAyplLiSoRCsvAILJT7n6LSGQrKNAp4/o\n        pt2auo5x3cmByU/CXOiiGAEnQGg6RT+fyWdWJwIEGAswjqwfC/rAmhFrjk/A9MYCYEQqauoDkHWWtDdC\n        gSUPKmsz0leUDarAYo3vM/Q59H0miDhx7ooHUMpJs24ClSZUYAHWJ33cE7B2yEqb2uT11c84M1qpcwED\n        6g1f9okrrW/gdH7UOReZKtsfRAdYcIlaHG9KMh2KQuDx3E7EorYTQCL6GFe6hbnxAOLvZnFybU2N6nI4\n        FYVyCif5TL/4L99y921/9NVrnIAo0k24WPA5TneH1liBpa60tsYwxQEogQtkYJgRq2jWnpZjNxUas3ED\n        i/ocznFFrB2oCU5bDDlH+pZEK1ABCBDZAJIHyYQqacexFu2OxdGs8rVQ39ZVygPK+bL1c57STXvy2lbe\n        GmuqsUqLMiBea6ojUllTtZB3kY3VsQJHfRuvNjNJP33UgxYsHELaseBZznne262x/+nP/eW7f/OvfmZd\n        L+XarSnp4uCALHIoA5eo5UcZjRlYYAgs8AOHTIfAApFIJk3qQFfUCmrquI07wZrpe+9jubAsR1XmwgVb\n        kJ0JVJxNLkgCjYV7UO1AVd8UCC7HNKbzqc+EStsFzgt+1xWq/e+nTmhMV8o4iIAVdPLqRBztKhOxTHme\n        04k+1lTqtSMwFakqB78L74vA0X6UYQyQqp/ToDRHGYPjAMchvu3/3X/x+gXWz7/1jdcIYa0FCsrBpA5E\n        +olWjquPsoDN4QusIwKJSlTE+rNf+OROULqIVZl1omMGV+dThJWeUkb3IlYQTWCmAizHU3eBQWXaKw0Y\n        FhhZZQGVak9tMwQI2LQJKnnlwCiqBUdyfqWBYlyOLVKx+kgnfYJE2poJFKZBYJkS1U8Zw0W3FluvNB/j\n        cLb2opxyY7QRqm45+4hM1itr4X84Tx2HqRfxfM5f/HtvXhuhpmORp76cqz2QKg8keV8E5yatTH1OF/HI\n        Mf36R6QqegXZWmMdd4hNlaKWxX3Rco5HgbbrXsS6FZEmbC66dhOu1lQUOEWrbJqRi62fMch4OyQUUNLV\n        zSgFtB2WQAKL/trMSHWNXIcDOMPYRR/nxKkcZTpUrg+Z2uSNIw0E5S46wPwS2mLfNGJvB1jGXOcFrOPC\n        B5U1T32Vs6Dzt7Xc4bnrCyT1AQicCdcESRtRQ7qoIsIElmMDK3ia/kSrHSz/T2eBdUTWGbGepntgPVaB\n        1l4VJ8xIRUWrbIDtUAWUtLGMHSw08xOqBIxnlV3+AmAAGVffWaafC1+Z4ys3FYtCwSXieOYnr15b2wYu\n        sosNMGmRxnj24ryzDkYRy2K/dZn+pjzOtlWhzhimxQXcEcmMYdoDJ7C8QeocgNM0E0QTsqxydjq5RbVj\n        +WwilfWVaGSBzipbEeyAKujamgBid4bOcY49QXOM0tepcILzGAVXd3IJYCDa7wSn1U56Rjo6A4eUU5Bx\n        UGV7W3Ws8UQSf6RD2hQbROrZIhrIwGdqBVAQgQwUTYPKEriUXae4YxzWusoGKpDAZX3VdoN+q+3hfGBx\n        qmgmQhV9ijS2NayX/EjC3z1V1rGIQ4tQFFCVU07vlWcRdD2uOSBxbG9/vvXyC6B+v+i3i+ACVZrrrMBx\n        zAlS6eyjIlbrqDNNMHZNiLI0p8DUNBg88xh7FFMWWGeAGa87OgIYSNT17jqJMqWpcbRtSgRE+1UuZusz\n        ZeBZ0eboqw6EgPGQ2sW11bA2U1/zocs52ohYnCQiiFjO79Uf/YIrdPqxxgeWBbmIpQ8oTGXqORBIwVS/\n        YFM2I5c8MPQHqj+j5IU8UNGC6g0vXxZ0IhWoRDHnbjp0Do3nC3AGVukHwQLU1F4/o1UQiVQey2SpSMW2\n        BtujFe3jU7CAa1/Y7wKN+mDikOAyPnCCCFRU1OIMIIlaQSZvm6DHO9roI1qVX8689O/hMudaa/n5Flmr\n        6aMNhwCqf5+yHgUd4OnTnaF2gAaVH6+KaP0DKFFHW84Di7Y5NAXXLAOZMfsDcH6McYWqn+8fYIlWNkyb\n        BvufhUUtx+3YO0xJ/llgBdCE6QwqAse+tjpT0AXXWR1IwdHYRSnWNJW0FVE4UztWuT0kkVBaxAAVuKxz\n        gGX7ACzACSaWA8ACSvWiUAAWRRLHKwecdsrkWyM5hjppd5P2sWyqilwuduOYKkUyD6xFD/XG43zgcZqp\n        0VrNPpi2ACOAaecYQJmOLa2/+lmuj+sAqn5SJjotXcAiv2wG0lRwiVpzzGl3XcHiwNJTDwE2ATlTELEz\n        WlVfVGsatNabEYiDgVJkBA/ZJwKRqMACjdZu+QFTCiqyxzQj0gRLOqtN4BK4CFSBkdSLaKDQTxTjUO37\n        G1kAV6a9cp9j/b34AxoRiW0NVjvHAgIA/XDVPw0QrYBlPPABTuTjRBCLJs6Bo5Oxcry06+DVFn82CVAW\n        6f3REfanvuYj1p2hiGXabWEPrOCa40+QrONm+b1HOmcKrB0q+QnITN+KYt0h0lxnAceYnM4Cyvig4mRt\n        wLR24MF1QJJ1FwYiae3kXUBlQZWMZXxAiVAuNgWRyOPYAOlVGrYI1tQ5+1h7cerafjjAcCNgffSzb/qK\n        teUAvKC0vvnzf+wLrn9dmTUNcqKpJrASiPxAYU2bhyVtfBbQAsmxpckdJFBbC4lc1A2B115q529CBJYt\n        BvJv5myMmm7BRcFFztM4E6jUDUJaf4M0WKgpaJZNsLJzfXVLgbRHqxm1CECcV6RyDOPPdZg+V7CC65D1\n        SxFK/Q5TgLk7lA6SwJqLeccuqgAFYJQDWY4NONCoF22aGq2lHMc0KIIq0we0oPdX/wAlar3xtS9d0Qg4\n        gUWg0M82hzrTE8vhoPUXlEUz7USrYHEHKe2HrqAEVWOxplfvylu4r/bH+gpYa7f9sndlbQUi+1rAMv0F\n        Fsic3wTolu5NhROotiByMtu0pHxffBeldrsrqIpYxuPspkFjF6WmtOeYBdcGVPAYu7QH1YFVf2XO23EC\n        SzQRiYILNI7vj7XpBxzQKFvT1dHG+YJGngAGuvraedcvh3KGcwcBsEAHDNGl54nu2CzS9SFTod1/QHX7\n        DypRC1jG954UmPyeMAus4LEec3MAsCKKem9D9EffgNVjHWAFFwsqMAcV+Tw7RMZ+VsTaQQLYvq8FKuKU\n        1kPT6b8ScUSwkrTyHVxgBFURa4KV1AEquEQq0j9wTGcJYDtcINFf1AKOPtKAEnnUg0AedEXBFsjOt+lP\n        X9HOuYDof/mxb15A/dXv/JzlZGnRyjpLROG4ogyQgPWmL3/yj86lSZRzXOkW9SQKAcq4wGEBB+IcDnrT\n        sHp9RCtQ7fqmVz15AC1qWV+99pW/Z+UDa4L0IFi+xXOtVTqocvhcTO/Op1uRKhWpyDiN4VjGrrw25NtO\n        1+mwafAMrKNc2+Ci4JJ2DBBMuIgjS4NBxCoiybchuqLXUSZdXl/AOVdt5YElLbJ86Re+6u6/eeNXLbA4\n        27/+LVKtv5t+TFs2VsEquulPviSgMmWaDn/kdUd0OWCyaBdV2oIAiGjVXw9sWpxRzLXhcNcAfMpFq6bA\n        BCoRTJTy1igLLNHKznvg3AIru8AClShFTYlzapzRasKQ5J8G1Jn6ZY6o5VvfuHP8pkBQ0UNQpQlXUyL5\n        2+sA87luwUXSzqdzA8gECSzlRZr6GLNoI+0b7rg/9Ke+4glUx9rK3pW0bQiRpHJTlsgVmKYv0z2wWmOR\n        qdCfhnRHCRzQEKD63zzrxuAoC7DqnBuITYGm030K7FGPMmnRyl4WtdXwUMSaeqZpjw2wYHNxi1y7058G\n        kna7Kg/OvXz251AWWEF1XV+B5/g2X0GSHmsuzmRNXxxlY7Vx224IhAlYedMiaQ8kAFmsF6lMUS3mbZ6u\n        52eH5vSnrXNwzuAhd4nE6SIYqxxUIDOm4wWnxfuKKMc0yAaXB9MBRevnYKBKB1xgstZSL6/cOTnWinyX\n        B8+AAi6YWlsFG7hAJWo5n+cEVlCBKLiKVMn0MUGYEEzASp+1S7fKq5t5e1xFLJpg0Ype1lsXyOSDKmuR\n        bSygBs4uIFD5tWY6piRODhJpoBKHKxO52AmVfsod3/mIVk2DLda7M1x3h0eZKEIW8G0NcKDbe0BNAesh\n        qPr/iKQugcwXYq3VDqgIPPazRLXWaaAisAHLWms9fL5AFVhTp2CJSEHl28wqa/q7FV3OItbeZi+b5bcE\n        BDC1Fps/ZAVW02FwLaAucFXOqUm+sdgJ1NR6fWbkRSMWWGACFoikOSiwtAMVaeMOUb3NWS/sBZF9LVAF\n        1Ipgx7RoV329vvzCJ+87UQ4EsIW6dm1L+DvwRSxvP4hM/eMC/yAqLbgu06I22ptCV9S7QGVaVW7N1WIf\n        aK3nvuj3PfnFtGnZjQXgd6hughVITYMTqimOYXeg9ihVetq9bJbfUtFKWsTk4Kbn/a/RUJFJvSjbl2W+\n        QkP7tEegUmb6c/FIHjSOu7YWLhEPWCA2bUkrB1V3i54Vqn/TN33W3d/+iW+/+4dv+dPrThBMa/q7QNU7\n        9OC3tnr1Rz/5jV+Ld2BZpItoS9/6qutUKA0CYxWx+ld26QrYAdcC5ohGFvqtq+in/8QnLqgCNAAt6kEn\n        YnoTYr7VQGDKnoH1m37jb3iyQcoBbNFrj1IThtKA2stSZeyefkhgynLmjF4EKOc5gQi4KU6e7aZ2qPSn\n        8sElbRxRXH3AOacF1CViuVvUVl47Fiyg+Ws/+PULLIDtkcobpv7tHECNI2pxoGMCleO8ZAgqC3XSD1ju\n        BkUtQABLxAokb54SuFjATbBEI1MqW39ASZNpEXDaWlvNRfsOVXZCJb/AmtGqb/uE5Eyc3676Wd20e9lj\n        BKy5vjIFznWWh8zaiRaimfP2GZrOikpBlA1C6Sll6lrYB1ECm2OIJuodt4V7UY2l1lfAKmqRqLWgOhbv\n        gAKMSCXCsabCIhaHOa42a/oUnQ7JmxIJXKv8gNW/WQHQBGsCBh7ArH4HMPoFFUkr8wxROwKy82r3PkvW\n        gUEVWBOwBRagggpkwfArEadnZ3qWPU0zUgVVYNFcY7WWSvq0FmPdFTYlgiCgEnD2MpCJHhxcJAKOfGsh\n        EFlTqVuQHxFHmT0pvykEBRWxlAFLWYt1U6D9K2sZfW2ycppjtokaXJwNqLXu+saPv8IFjv/rv/+uBdYv\n        /J0fuAeWvKlSO1Gr9jtUqW0MEdG5eJt1QrVrRqp7YPm2FrXOolXT4q3pcdfTpsips7J0BlVgAWYu4NuO\n        SLPMWK3RCGDsWeQqQiX9QAcoIOmnXNvWVPSVX/RpKyK5AwQ5iUrWVEAClmkx0EyD9r8AZYNUZLCeMi0a\n        n8PAGlBU37XeOgSqGdGaDoGU5loLRK3JUmOTaMUWrZybKNpjnASyQLsVrdjr4p3mneCuCcjTxJnZtNc/\n        TaY7CrAgA1bwTKn3xQiSACo/11ZBVl60Lj+fIcovRz/v7a5pFmyBBTg76013YBKNTIXSolTTIP34n/y8\n        FdFABB6AaS9a9UiHo0yzCxprs8PhASSSLKAOCwDlIJnrrAArvSLWMc4enUC0W+rN132rYUJFwTTBousa\n        i0OKVmdQTU1AHhI4zsrSnt/VQv40Yl32rW7J+q/+rZ/YuaUAROVBFEgBRGCsPqiCcOUve13G/ovf/VVr\n        ewFEdvh70Y/ax2LXT8MOiQbg8ksdYIlYxuMk8lkXAAcQtiqkGw9UbBFo324wLSblKzodbReU3/qqX4p2\n        xrkIUMZsfWi6nQ+dWWur1lcB1PlOsOi6QfpQtLqlCc0uTp12r0uzzSyfKloF1q2o9ZC0b/p0dwkQ4ATV\n        1ARqyppDOQuygNXem7AeF4FrTYVHpJpAZf1IAliindt5UNl1F7kmWD538JzBJV2UcucJoqzyXcYIKneX\n        waUsuMDEKnPnKIIG1VQgVdf0N+01YgHFmmLaW5qQPFYu1J4OnLOy1F2fBXj7V6ZIkIlcRbDsHs1awOsn\n        YgEBHIETRE2BlVNpU6E0x4PJNNgCvihnXJESWI4XSH/5u77kmibrK2ABCVi2FGyomnImWLY0wCMCXsEC\n        mShGR7rpDlA0QSqS9U/PW/ivf6Vy+XcqAba2Pw64pWsjmk54dqiqK58til2fFYpYO0Ccmva6IDkTJ057\n        JnXGmW3P1MancwDGnM44k3w5wDclIoCgtgCyNgKQdEApk65dCi5a/3j78tiG89Ube91NHnnjNEbHFrG6\n        Myx6kbQFPbBo3hRwHMsx7jJXZALTJpCBpgi1RykgNf2BsMgEIFEJRN1ZTtCUkfOaINEZVMrmdFj9ilit\n        rwIIYLcgywaH/LTPRWd9JlC+saVbvEuvrYMB164czIJOOsefATQViJwq2jkeqGbUkma1m3lyR8z6Moic\n        FufGkDdNWnc1rulUvamQIxsjhzqXp4EVXDtURTlQ2bJYYB1q7TQFMmCVtnAXrSzSg2VCdVYWYEnZFawd\n        qEArT9VndzBu6TFtOVM7F12enWoX3hRYm7V3dJyjKMERgTPBU25PirQTIfQDqLToIl+k4ey2DGgC1MVc\n        F/YSwcBraqwdmX5FJjABbH5JTJO2F+xoc6Lb+tZuxu8Y8rfAInehE6i/+1dev6Tu3nrM+umwwGrKu6U3\n        Xv6GKrD6nFMzUs38rKdrxDIdBlGQ7VBxJBtw5XfIZnvitNK7AiRZQ6XZJk24vIi3FuSX9RUFHRnDscFC\n        nGttZgyPYeTnXhiI9jRrLBdtOf6AqYsobxoMSpACzbH0A5a1lDtEAMmTqOUv/9le6BGOsXawWG1Nn8Ei\n        OvkLNEAqUrXNoc01Ul20wLoIWEWl9ObXvfyX0l/95D0v5zrPI02o6AyqexFrLt4DKgXNrurLB0FlE4xZ\n        f0ucswMYIDNN7W3NO8QW8g/JAtlFkw6gqy7vcs2fiyXvYRWN1oU94Op1ZmVAWuuuy1rLtAYIUFmYm+pE\n        KFC5I/RbQpuiokJrKxFr3cYPcOV93sAACqhSYIlS96a/QyBM9W+RDiYQiU73dNwFelervbQJzg7VXs5O\n        XSMW5wfR2bSYAiqAgmDms3sb2uGZ0Unb6me74JrTyYxcKciuMB3RaEJ1LT8EpDOIen2Z9TMtsBXxTLMt\n        4l1cYAGj6VTkUeZYwCJgefXF8eSN3ZuiRSqOBOXuNGl1oBC1gLODpew0Wh3T4JwOmwYBZOMzmEx7CfD2\n        1hwXHJ2LdOczz6+62gfUNWIFAKAmVMqnLZ30yaZZP9sESdoBkyftq5vQmbqCagdswsWpQRZE0vfAukx/\n        1/worw4ArOODrIgGoAXXcTFFMXnnoZ9zabE+wbLxWbq8dqABlnECazqNnEcRBzhgSnMKnNqjlUdLFu2A\n        AvWEiZSRZ5WdQ3aHap5jdROq7IpYgAmqCRcnZ89gmeXSuwCR1SZIAki+tPLqptSx6jhMGlgTLuJU8Ewt\n        RxvncCIAWGUTJuu0ZJpkQcTqYxzOFb1YAgOpN541FGAWLEcE02eCpQ9bmWglyq0F/5hCcxhwWQ+3W5cB\n        BkhpRqopkQ1QLKg8PgKV6ASe7/yDH3wFKa2flR3n1I76Q1ClYJrpCRZ7BWva0hw7wQmkW5rtswESPBRk\n        tJw/NMerb3Ug0jegPE+j4FowHQ52p8bJ/d6PeiXGOKCaECZwsY7NAkxbcACINYU6Hri1Ueb1GBHNhWaD\n        aMr6SluRAVgrWl2g0i+wknMWbYpWu4DkwTYFlrYTKtOf487IROU9TvKZO4dssEjvcm7Vz3SRKj1ruyFx\n        6LSBws52QfA01bd0sFD56mfdrAdV0ao7O2C5w1Lv7kz/ohqpC0J5cLHBtAuY10X+Eb1YYy8ojzo3D/oH\n        h7GbJhsbhD0vpCKXyKAd6O0T5cgcNhfvviSiFUjAI21X/wwoCqigAuWC6pgCmwbJWqq08+nB8g64dHU0\n        zzPoShelboK1Q8ah06YASJXZG9rLkjGyExhl0rWb6fJT4CpqcSILKFKvbBe4AmxOWe7ginTyLGCDSvui\n        Cq310CH9W6y7wNf6oy3gQNT0F1RgdSeonuYDXQ6SNkaOtW5rKrTO85AbTACiYBK9JlTae2wEqsAKJtMe\n        61GSc3DsuYfWsaUfgqp2NKGacF3BmnAFEMcHVRDQ7JNAFVizfAfssQLJrXRwgUYEWD/NOsqlb8FF4GLB\n        ARpRLKg43sLfBQeWsbqoAAINmILKGMEWFNoQkJo6WQt2x7ZvRdp0d5mD9He88o6hP/lMAeXZo99KBhkb\n        UOyEqj+BBKb1FsUh5yJSOYeO2ed0XFZeHckn9ROsM6CuYAXR0zRh4eCZFy3O0ruC40wTzBn5gmraJO94\n        IJtl7A5VEY5csAkVtZ4yHnjWRT2cz8orBxvwrnAdzpHXJviMNcEKKtHKa8giJhCnk/TveDltOfPIa2Nr\n        BTRuInw2QJkWg6vIZu9MlARUUNlHA9Q3fdr7Ptk/e9HzFzgi1QSKAkrdrJ9tpm5BRfcW77e0A0KczwYS\n        u2u253CS5qDyxpl50SfIJmDkoioLIov0mTeOPCs/wUqmOhcPaK2lkogFGA+XtRGNgCPKsF7T7ZvOFsGk\n        QQAaU2iRBlSmW1AlbXcHGY84kKMCLusYbnQA6WkDoOa0WMSyripiOX4RytRnj8qxg2dCkyoPqjTPNYGn\n        c51AlT+NWBOIvQwwnCzNiZXP+jOwjKHf7CNNjadP+eoIKEldcsHB1XPA6psaJ1Cts5QDR2TZoQKSyOMC\n        B5djuLtk5ZO2C6rDchinG1/k41R3j47hBxKAa301nTMdWnpCRcrKc7jXnydUgGJFqyKW45v+QOVn8u5E\n        PZu0dxYsjcvKO4cZqfZ2uyZE2alnrbF2cRQ725HyvWyHKYGDrZ49awsM5cFFMw0YbbIUXEHFiVkQiUxT\n        9VkbogMs7V3cprSgCSJ2AXCZHrWZZfIgKmKJhkHVH/uYjuGw1fewoGx65BSWs2qXNXUH1ISqabDHSKDy\n        PHL9LvAC9ASFglaZ87gFVXIOyTnqfwZUugfWVDAFV1J2C4wz1bb2Z+lZNiNUxyytLtBqswtMU6KI6ag7\n        QMAA7ArVZce9aFUkSpUHEMmnLjxwHMuYFsfSOXV3THDWt7S6HJbjU9EqqEqDqm2N7kJ71dnvAk3jc5yO\n        If1YqFLnD5yHoKJn7WM9LT/LbmkHJmge0y5VD5aAor1Muj7STYNkPcWaCsHE2QCwGL5CdVh1waMeTC3O\n        qbqpCZWLrZ3oBCpAdfenbrU9YCqtf/3mGDlFmuNmvak6qNZ6agAFpnRdsB969Uf/0u8Cg7UxgyqQngZW\n        5+T8dnum6xprdzrdqptvbO51lU17pofq0t5mB2pXbZoGp0AlAqmfUJF+LjKglg4grLFSMLCp6EVABTSY\n        QOU4gTQdM/PGm2WlOSUAqiMRyl7WDpRp9zv/45cvS6Zin7+3FGgfDzhB5bPO/ISq9vU1ztQO09TNqZAC\n        awLGcoR0gElPW/nZK8NnZbdk7bSXFbVKT6g4lgWSaJVcaAt8Fw8E6yH1BSxpF1ddUPXCoLIJk3yaF9x5\n        zjvEyq/wjbby+remCsAcIh0I+hlPtAqmtjGoyETlRan6BkB5Ch4Spfo8s7y2qXNyfvKd60N6EKw0wUo5\n        VxoslZWecJGXCTkg1V5541QHAla5dJJPYLoVuSi4WHkXj+2HGNQ02MWl4JJ+DFRddH2ChbTRj+3B8j5O\n        bYkzssbrzjWIdoFIdJryN0vB4pi3oMpOgG6Vk/5B1ZjlH9JNsHLgWR0BImimAMHqe8vS3i6QqguuqQlX\n        U2ICzUwHFysCiSZtO0y4TGGcPAGatqiz0pcLPRU0Raba6l+ZemWcboqyHzbB4oggIAt+2xVg8T5X747N\n        CAU60cn+1ARC/5y/zuc5Sv+ZDqLOr/zTdG8f6wygWwoIduYnLGxQzLbyZ3Xld+2QBdGEqTxQSuu3Q0Xu\n        DkHFOdoETwJBAsCUsmDqQk9nqG8PbJbJA4aaLnenOXcPtJcOqGxZuLtbd3hHHmCgEmlbQ83zSPN8HtLs\n        J88CtHz1neNMB9AtPWoqpKCZkQoMtyIXgUAb6eys2/UQXASCotaEa6otCj+oCCpT4twoDSwSvYy5r6l2\n        wCrLkVM5Sn/QiEyr/SgHlP0sQOx7VtqYkpvmgOM8gRVQRTAbsMbI0buz5zmBxD8NWDcVL3r+2lfrT2zb\n        NBXtGqs+2rPyc+wk/xjd+xukZzBldyhKB4x2lQfC3iZVf0tgSHtdYFFgSTu+tHqOFDXAosyUGFjBxZGg\n        ErUAZhHPKjceQMg5gKJ3u/QHqmNMJwKp9urAo1xaWdsP9ctR2rmh6LVo0Uo78AMJZCw5V9Dm4GlTcKyf\n        8B8wEZjafWdT9TNKSe9Qndmn6d6fMSrNSdnp1B2MHZbd3mp3S4HEnqUpqDiZRKfyohTHAUqf6q/bDxcb\n        YJzXeivA2KSuNpXJG3tGL2nHBaC6IlZl/okkG1TJuQEpqAjYHGwcxwsu5x4AuxpP9AEKaIpOU5VNqGbU\n        mmOBYx6j/ITnIa1f6YBo2l0cOu0s1yenz3bE4bPuMXJBqfSsK1oBvmgFFOWmvQmVdtYsAbjaAuui4Cpy\n        7QIQudMqTaJJ01xOWMc9ysFj20EeBM5DpAqq+gDReQMJVEleZNTu2nakOWw6O6kHCGB2mKipbyqodrBS\n        gMz0c9H1L/pNu5fN8lm2a29/VjfBmZpls81Mg6XolIDk51gTqACszd6HJlwe9+xA7XIHdgaVNJiCqjZr\n        X+twmOi1QyXvHLxXlUDFOi+O4dCOMZ09LQEYJDNCOdeA2qGakSrtkXCOv+elH6MFVk6f6V9NmbKo/BlE\n        s5wmVKyyNjI5cbYhjq49ZwUUiWRBZb3FBtAZXOq70wMN5XRpx3KuzqP6YLo3ZR555WBzHhMo1rToeMaa\n        TpTWfzpOGSAmNBRMEyggLfth73wPLH+IhHVeE5xpSz9Xrb/o54+U5cA9v9f9ShRQE5ikrD+WFii1mwt2\n        AlOLc20CaEaq7Jr6Wl9dNKGamjCJYl4GNAYYgmqCQiKUNjMyFZ2m9AOC9s7bObW1EFRkXeXYa4/qOFfr\n        M843pYqAILY4N5byoEkTqiCaaQoqetHved49eHa49vLH6pkzqN6WMBHnBwlNwNiizio/ji0fNPUBinrO\n        K1Kp51QRiKO0ARcpd3t/hSsd7XxzJ1zWWROqfnjhnIDgmBMSgLWXpZ7T9zYcwRalSL/OyzEDyp+aLA0q\n        YDSVgQBMjkETkAlUWlFpRKZr2SVvvMACaOc6obgF12Ol34pYy9kXmKa1MN8hk9/LHlLtCQyBpG4CVHq1\n        Pdrs44hQRSkqIlnEF5HkA6v6tOAbgE24JlRkvCJLQATMKj+0oDmikEgFwLMotdpcwCqSAcoxbW8UpVL7\n        V85tRp0goAnXBOoK0IBoaYOKnVDtQJzZ5yqfc0WsnFnEOBPnZh+j4ABNkUmesyZISf2er90EyhhFpgkO\n        GMATWHt9Ei1m5OJIEYrDi1zaFWUcO7Acv+gEKoCBagfLxeUU6cZRb88KPI7Te2ALqEvasZ1TUWWmF1iX\n        aTBArtCw6QLRWVljmVLneU4ofqUyHt2LWKc6HMyetZl9S09Vzu5RqfQtad9f2ausSDQFgrOIdQssmjvx\n        xNG9CCgNlIAQkUABLo7VX1oZsJQVwabU628tJE3aAsl+2TVKHUDJ21EHOceDV1QJBCpi0YpaG0Q3I9ah\n        9WW6jNPWQhDsUJyVP1b6pfsRq/TMs4c4tjRNcM6kzYpUR5vsKj9soKwxt3wClWjReiqQOAc0bGC1xpJW\n        Xh0bTAmAgcUJbOss1j5SUDkuGyQcaswJDivfBZ111RMYi1QTKkCBuilwHeMSnaQDAmgeXgeXsnsAXYCq\n        /S59nIdzDIIdipn/5ahrQL8E1i4AnZXTpS5Q7gFV/UWcU1nQVHYrzwmcAir9jDthkg6q1kyBA2LSNrBq\n        MzUjFilz7O7uRC3fbudStKI9OnUhyweVSMVeo9sxdkCRX9uIVE1/BK7gLTJNONZd4QWsPaKdyTg+j/PK\n        8dNOGMr/ctU46T5YAVF62hvaobrCRY03xgqeW+KIOQUGyjzOBEu0CipyMWsfDBOo2olwQSVKAWbpOKZj\n        6ycPCpCt/FFnneTCnUHl3ANTtAWPtDFEK38PPrAs3j0jLFKlGbHOpsMdrh0+5U3f8zwnABOEyt8WmmM+\n        AWtzvPSyFyik97w2QZS96tJuqjEeUtFh7qQHCRso8sAKrqn61K5yUAXhBK2pb53DBSRWf+VkvNZdXbgZ\n        BYKq9uDzF5QBVLl0i3TAzYjl5mFCBZ4F0HEOExqqrmlxwsVOqRM5O+fp+OzbUnPsZ5bjDxhc2Ifs0gDk\n        WjY1QKpsti99JjAFlm/7PBangiTAaF9nTdUGNGcAzsjF6UUrxzYmqQOIeo5ki0xTLmTwOI60Z5lAEqW0\n        YYNJeVCJWMAi5wSEBcxx/AXWAU6QAM8ifIJHZ1FLXl1RK00IfrXUcVbE4rxAaLFc2TV9cfQVmgHPSk9d\n        yur7GHFMYJ3VE1iyIAuuAAqW5ZijTZCQehe8NuSY6ozJCdLKgSwPCsBNqLp4XcB1vhcwTavyAWQf0Ng7\n        VCmoQAMIx78H1mEnOEW1CRbQ1GlHAZWjO9+z9K+mrmustVAeNmdS+Vl+DyIqfwJU/Yw9NdsEFSfOcuLo\n        mS8iufAAY8EFCgCZ8nawqk9FKMejNjv1C6p1Lkc7eTvtLlhwBZo2jRnc1lLAUTejFVlbsSJWUWtOg9c7\n        P+d92MAi7chjmB2uwHK+ziv4f7VAetq4C6ycPNNsQOyq/GpPYJqaY5be6wOr9dUtgSywdnimg+VFNG2K\n        aKy8Kc7FB4xjTtuzQHlOAkcQ5ajy9QEPATqA1t7aIWnwTNUmiXTXz3GBCkhAmdCsqe6YMidUU87llwtT\n        n+usbtdjjvFMAE3n7/mp2UZ6t7tmnznGVHeBHLUcqvxw6j07NMGipsTAkg6upJ2xXTzwUHkKIM6RDqrZ\n        Jrlwq+0xhvWg6Sy4gkcknTCRduyESt6dYeunBKSiWGAF14Rp3gE6r8c4fUpb/dvIPWsz9djxn5kOC44J\n        wa4ZnQKQ9jGSOuDMdrM95cAc7mIpZ1fbAdcEKmjmGss3ekYsfSYcLt71WBeHlFY/ocpp175Hu9LlnYeI\n        E1hrIX5EqglZ/4ms/xqblLXl4bxBFDBXyHzGC1zS2UDIyY9xdlqf+eib9rHeFnowYqXKdynfYZTe2wPL\n        N5uzmur2tso5ylqGXQ5WPyJXa60drKBqGtROfxfrHggu5DH2AuuSdhG0pWBZx77ANfvtY2kDCAKHyBNk\n        RacdpJkOqvX7xwtYZwKadVXpthCeK1TXz3JRQKWzPr9crYiVk9k9CpXepW5vW1lp5YAhTqrdbJ84u0iy\n        4Do+qD6BmOYaC1RNgwvAQzM6Ua+3NH4KGpKm+jZW9RRYnOg8Aop6sB1Uu2bbHieVn2mfo4gVTDMfUBz3\n        GJi0meA8TWdj/HJ1XbxPSB6rnP1QeVAFCTv71DbHBlZALKceHzoYpmpfnwnBgvNSp12qL3CMq/0s41zp\n        eezakXoQtNkKqmy7+SJXULmLq767uxRQyTQ3QaK5hkpnjpya5/0YPWbM56o1Fe6aYDxX1bf+OW1GrdnW\n        FFnbCQAgXKAJzEOqT/YhoKh8F1daFBQR5ffxXXz1TbnBIW1BzYJu5d0RXmCZbXeBE3BBB6w5PU2HPxYo\n        qv9U5bWhXw2g0hWsGbFuRS8QlA6GKWUAmvUzYlFrrVQ75TRhoCChIMvu8Oy6HuMCU0Blm1blRQf5eeFz\n        BAdov4MRNFlQgKuyCVWLbsdrTy34Knceu7Of5nz1nePU/BxT+gTbPtYu45yVP0ZXsAAQFFO3ys+k3Q4c\n        h3CyOuk0205L9ZlwVDZhcnFmuxX9AHQZ5ypll3IOpKBi1RWppnKGdNFoQjPB6RwDqHJt5ClwjCft+Mrl\n        pxOf5tAJTn2fJu3qH2APSZ+z9GN1OhVOPQ0qzgyaolF1ynN8zp9AlVZ+heDi/JU+Lr66+iblV4jS6D/F\n        ce4USaSQD651nKNvUC1HHeDmNBeU1W6Csltj6E9BROrZs3VS4oTSObzyXbV7SA+128e7pdo+lz67nuHc\n        M+X40rc0YcoqqxwUxgiKyrMUBDm7aDK12hwOXO1vwKSfu0QQWb/0dxw4P6joOu4x/el3hWqzLqzjTFDO\n        4GonX3u2czT+DlQXvvRevkudMRt/qvpb+ak55kOq7XPpc6abYO2aMFHlLqJ8kMy8+qLNjFiNIQ+wM0Am\n        VGfK2e1hZQOJ3eGqj/6Owfk5rUgVVOT86gOgjjE1waLn6si095Gf4+2afXY7Nds/Rs+l7UN6Jmfvqvyh\n        +gApTzMigWlGrGxt9D2Dis35ZzBJF5k41y91lvM3qNoSIG3ru3REExcxIGhCRR1vSuQDE1VmLBdTnxyz\n        O/SsfNZT5zAj5plm31tlt+oe0mPaPFbP5PwcP6Us7XVFHALKBCxwqLF31f8eWJfpbT42OoteOTS4UgAB\n        rb/t4FyUzfXVjFRT7jZdXOk5BT5NxvRZ9ov7WGcG04SK1N3S2Vi73tbtnoueBVaOn0AoP2vzNOnTXdxZ\n        PXA43uL2WnaBaxfAkjZBBh7QnAGWw9udL5/jHpK2O0BT6r3i0msuraf0dWFvOWuWa7sDpV6anZpjPE1n\n        7R9b9rbSWmO52Jy/S90EqfTsU12q7/WCHWApn2PNMRc4BygzylV2BeuSvtYD63DkdD6YAoombLXRN3CS\n        izvTpF19bsnxfSFond8h/XxmF/Yhp6m7Xp+LOofSnUvjPDTec9XbcqxbukYszi6950uzprDSLmS2ttKp\n        sspnnwnSnFZJXUDNcrqCBq4DrOBJRSfp/U6Qw3zoNli7wNORHPvUaHVANc+piNuuucX8hCU5lmNUPyGq\n        TedBOeltrV/NsdP1rpDzs2eabVzEbPVd5Jmem5mpfg+p6DTHmprrrt4g3QED1QREv5y3O7H8o6A66kE9\n        YUrBMqG5peo7vnznM3XmtF8LWhHLBXoIqjTh2ttXdjaWsueqW/3X1HOAF1yBFBBsCi7tOc8HzrHSHDfz\n        c4wJ0r30ZT014ZowpcZNOzBPq89Bv1b1YMTa89RUSOpz+GxzpnmMx7Q/ayMCrmlwgJX6BQ+YAoqMMx1n\n        GuzDT8fKN71OBdRVF6geAqsxO+aen+V7GXV+v5a1ItYZQGea7SZg5AKfQdPivTazbi+T3vN7HXV3mHI6\n        Z5fXjuN8SM7KufLZCRkFzrRz/FW2gUVnUNEOzNM0z+XXulbEynmP0Wz/mL6BRY89lrZ7unFy6lrEb5FL\n        /paDg0i+Dz/byAdmY17TA6g1FV/OQbq11RyLHFP5BOdMjrvbXw+6eVe467FQ7Av2PT/LZ92en1IeYLfg\n        Cqoc68NNJ5fvg89yVj6gAokCa8KUnMstsMi4uzpe53GW//WgK1hTHOkbfubohwC7BYc+gZFm29JnfWe5\n        MVKODippH4hDp92dupdLV26MW1Blz6AKLOOxpXd13GnTnv+1rlOwpm45fFftZtuzfnu7mX9I2gZVji1i\n        cTjn+kA7OLsjpy3dvhYZ23i7AqpjT7AeginNY6c9/+tJzxmsPV/ZQ3XPSZcIsLTVcaYxc2wQSHNSUGWV\n        tbaSzpHTngFhvFtQBdYerdI+1tQ89q93PcNhE4QpTqGzspxd+Vm6No/WCVScVZpDjRtUbPJhducF1Vkd\n        u5dNQDrGhCmBaoJF9WvcKWPP4/zboGdFLA6c6bTnKzvTbONiT3vVBGhzztTsM51LOdwxtfWBdnvLuZV3\n        nPqQcuczj0FnQHXebGOeqeP/26HfcPf/A+LR+A0kcM27AAAAAElFTkSuQmCC\n</value>\n  </data>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/SwitchImageDuringZoomDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class SwitchImageDuringZoomDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.components = new System.ComponentModel.Container();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.statusToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.cursorToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.zoomToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.mapNameToolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.messageLabel = new System.Windows.Forms.Label();\n      this.resetMessageTimer = new System.Windows.Forms.Timer(this.components);\n      this.refreshMapTimer = new System.Windows.Forms.Timer(this.components);\n      this.menuStrip.SuspendLayout();\n      this.statusStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Size = new System.Drawing.Size(747, 24);\n      this.menuStrip.TabIndex = 10;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.statusToolStripStatusLabel,\n            this.cursorToolStripStatusLabel,\n            this.zoomToolStripStatusLabel,\n            this.mapNameToolStripStatusLabel});\n      this.statusStrip.Location = new System.Drawing.Point(0, 496);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Size = new System.Drawing.Size(747, 22);\n      this.statusStrip.TabIndex = 11;\n      // \n      // statusToolStripStatusLabel\n      // \n      this.statusToolStripStatusLabel.Name = \"statusToolStripStatusLabel\";\n      this.statusToolStripStatusLabel.Size = new System.Drawing.Size(649, 17);\n      this.statusToolStripStatusLabel.Spring = true;\n      this.statusToolStripStatusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;\n      // \n      // cursorToolStripStatusLabel\n      // \n      this.cursorToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Cursor;\n      this.cursorToolStripStatusLabel.Name = \"cursorToolStripStatusLabel\";\n      this.cursorToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.cursorToolStripStatusLabel.ToolTipText = \"Current Cursor Position\";\n      // \n      // zoomToolStripStatusLabel\n      // \n      this.zoomToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.Zoom;\n      this.zoomToolStripStatusLabel.Name = \"zoomToolStripStatusLabel\";\n      this.zoomToolStripStatusLabel.Size = new System.Drawing.Size(51, 17);\n      this.zoomToolStripStatusLabel.Text = \"100%\";\n      this.zoomToolStripStatusLabel.ToolTipText = \"Zoom\";\n      // \n      // mapNameToolStripStatusLabel\n      // \n      this.mapNameToolStripStatusLabel.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.SmallMap;\n      this.mapNameToolStripStatusLabel.Name = \"mapNameToolStripStatusLabel\";\n      this.mapNameToolStripStatusLabel.Size = new System.Drawing.Size(16, 17);\n      this.mapNameToolStripStatusLabel.ToolTipText = \"Zoom\";\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.Location = new System.Drawing.Point(0, 24);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.Size = new System.Drawing.Size(747, 451);\n      this.imageBox.TabIndex = 12;\n      this.imageBox.ZoomChanged += new System.EventHandler(this.imageBox_ZoomChanged);\n      this.imageBox.Zoomed += new System.EventHandler<Cyotek.Windows.Forms.ImageBoxZoomEventArgs>(this.imageBox_Zoomed);\n      this.imageBox.MouseLeave += new System.EventHandler(this.imageBox_MouseLeave);\n      this.imageBox.MouseMove += new System.Windows.Forms.MouseEventHandler(this.imageBox_MouseMove);\n      // \n      // messageLabel\n      // \n      this.messageLabel.AutoEllipsis = true;\n      this.messageLabel.BackColor = System.Drawing.SystemColors.ActiveCaption;\n      this.messageLabel.Dock = System.Windows.Forms.DockStyle.Bottom;\n      this.messageLabel.ForeColor = System.Drawing.SystemColors.HighlightText;\n      this.messageLabel.Location = new System.Drawing.Point(0, 475);\n      this.messageLabel.Name = \"messageLabel\";\n      this.messageLabel.Size = new System.Drawing.Size(747, 21);\n      this.messageLabel.TabIndex = 13;\n      this.messageLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;\n      // \n      // resetMessageTimer\n      // \n      this.resetMessageTimer.Interval = 5000;\n      this.resetMessageTimer.Tick += new System.EventHandler(this.resetMessageTimer_Tick);\n      // \n      // refreshMapTimer\n      // \n      this.refreshMapTimer.Interval = 5;\n      this.refreshMapTimer.Tick += new System.EventHandler(this.refreshMapTimer_Tick);\n      // \n      // SwitchImageDuringZoomDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(747, 518);\n      this.Controls.Add(this.imageBox);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.messageLabel);\n      this.Controls.Add(this.statusStrip);\n      this.Name = \"SwitchImageDuringZoomDemoForm\";\n      this.Text = \"Switch Image During Zoom Demonstration\";\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.statusStrip.ResumeLayout(false);\n      this.statusStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private ImageBox imageBox;\n    private System.Windows.Forms.ToolStripStatusLabel zoomToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel mapNameToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel cursorToolStripStatusLabel;\n    private System.Windows.Forms.ToolStripStatusLabel statusToolStripStatusLabel;\n    private System.Windows.Forms.Label messageLabel;\n    private System.Windows.Forms.Timer resetMessageTimer;\n    private System.Windows.Forms.Timer refreshMapTimer;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/SwitchImageDuringZoomDemoForm.cs",
    "content": "﻿using System;\nusing System.Collections.Generic;\nusing System.Drawing;\nusing System.IO;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class SwitchImageDuringZoomDemoForm : BaseForm\n  {\n    #region Instance Fields\n\n    private int _virtualZoom;\n\n    #endregion\n\n    #region Public Constructors\n\n    public SwitchImageDuringZoomDemoForm()\n    {\n      InitializeComponent();\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing)\n      {\n        if (components != null)\n        {\n          components.Dispose();\n        }\n\n        if (this.ImageCache != null)\n        {\n          foreach (Image image in this.ImageCache.Values)\n          {\n            image.Dispose();\n          }\n          this.ImageCache = null;\n        }\n      }\n      base.Dispose(disposing);\n    }\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      LayerData = new List<MapLayerData>();\n\n      // add some map layers for the different zoom levels\n      this.AddLayer(\"map10\", int.MinValue, 0);\n      this.AddLayer(\"map20\", 0, 2);\n      this.AddLayer(\"map30\", 2, 4);\n      this.AddLayer(\"map40\", 4, 6);\n      this.AddLayer(\"map50\", 6, 8);\n      this.AddLayer(\"map60\", 8, 9);\n      this.AddLayer(\"map70\", 9, 10);\n      this.AddLayer(\"map80\", 10, 11);\n      this.AddLayer(\"map90\", 11, 12);\n      this.AddLayer(\"map100\", 12, int.MaxValue);\n\n      // load the lowest detail map\n      imageBox.Image = this.GetMapImage(\"map10\");\n\n      // now zoom in a bit\n      this.VirtualZoom = 5;\n      this.UpdateMap();\n      imageBox.Zoom = 125;\n      imageBox.CenterAt(3350, 800);\n    }\n\n    #endregion\n\n    #region Private Properties\n\n    private IDictionary<string, Image> ImageCache { get; set; }\n\n    private bool IsUpdatingMap { get; set; }\n\n    private int Layer { get; set; }\n\n    private List<MapLayerData> LayerData { get; set; }\n\n    private bool ResetZoomOnUpdate { get; set; }\n\n    private int VirtualZoom\n    {\n      get { return _virtualZoom; }\n      set\n      {\n        _virtualZoom = value;\n\n        this.UpdateZoomLabel();\n      }\n    }\n\n    #endregion\n\n    #region Private Members\n\n    private void AddLayer(string name, int lowerZoom, int upperZoom)\n    {\n      // The larger map sizes (>map50) are 80MB, so I'm not including them in the GitHub repository.\n      // Therefore, just silently skip any missing maps without raising an error\n\n      if (File.Exists(this.GetMapFileName(name)))\n      {\n        MapLayerData data;\n\n        data = new MapLayerData();\n        data.Name = name;\n        data.UpperZoom = upperZoom;\n        data.LowerZoom = lowerZoom;\n\n        this.LayerData.Add(data);\n      }\n    }\n\n    private int FindNearestLayer(int zoom)\n    {\n      int result;\n\n      result = -1;\n\n      for (int i = 0; i < this.LayerData.Count; i++)\n      {\n        MapLayerData data;\n\n        data = this.LayerData[i];\n\n        if (zoom >= data.LowerZoom && zoom < data.UpperZoom)\n        {\n          result = i;\n          break;\n        }\n      }\n\n      return result;\n    }\n\n    private string GetMapFileName(string name)\n    {\n      return Path.GetFullPath(Path.Combine(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @\"..\\..\\..\\maps\"), Path.ChangeExtension(name, \".jpg\")));\n    }\n\n    private Image GetMapImage(string name)\n    {\n      Image result;\n\n      if (this.ImageCache == null)\n      {\n        this.ImageCache = new Dictionary<string, Image>();\n      }\n\n      if (!this.ImageCache.TryGetValue(name, out result))\n      {\n        this.SetStatus(\"Loading image...\");\n\n        result = Image.FromFile(this.GetMapFileName(name));\n\n        this.ImageCache.Add(name, result);\n\n        this.SetStatus(string.Empty);\n      }\n\n      this.SetMessage(string.Format(\"Switching to image {0}.jpg\", name));\n\n      return result;\n    }\n\n    private void SetMessage(string message)\n    {\n      messageLabel.Text = message;\n      resetMessageTimer.Stop();\n      resetMessageTimer.Start();\n    }\n\n    private void SetStatus(string message)\n    {\n      Cursor.Current = string.IsNullOrEmpty(message) ? Cursors.Default : Cursors.WaitCursor;\n\n      statusToolStripStatusLabel.Text = message;\n      statusToolStripStatusLabel.Owner.Refresh();\n    }\n\n    private void UpdateCursorPosition(Point location)\n    {\n      if (imageBox.IsPointInImage(location))\n      {\n        Point point;\n        point = imageBox.PointToImage(location);\n        cursorToolStripStatusLabel.Text = this.FormatPoint(point);\n      }\n      else\n      {\n        cursorToolStripStatusLabel.Text = string.Empty;\n      }\n    }\n\n    private void UpdateMap()\n    {\n      if (!this.IsUpdatingMap)\n      {\n        int mapLayer;\n\n        this.IsUpdatingMap = true;\n\n        mapLayer = this.FindNearestLayer(this.VirtualZoom);\n\n        if (mapLayer != -1 && mapLayer != this.Layer)\n        {\n          MapLayerData data;\n          Image newImage;\n          RectangleF currentViewport;\n          RectangleF newViewport;\n          Size currentSize;\n          float vAspectRatio;\n          float hAspectRatio;\n\n          this.Layer = mapLayer;\n          data = this.LayerData[mapLayer];\n          mapNameToolStripStatusLabel.Text = data.Name;\n\n          newImage = this.GetMapImage(data.Name);\n          currentViewport = imageBox.GetSourceImageRegion();\n          currentSize = imageBox.Image.Size;\n\n          hAspectRatio = newImage.Width / (float)currentSize.Width;\n          vAspectRatio = newImage.Height / (float)currentSize.Height;\n\n          imageBox.BeginUpdate();\n          imageBox.Image = newImage;\n          newViewport = new RectangleF(currentViewport.X * hAspectRatio, currentViewport.Y * vAspectRatio, currentViewport.Width * hAspectRatio, currentViewport.Height * vAspectRatio);\n          imageBox.ZoomToRegion(newViewport);\n\n          if (this.ResetZoomOnUpdate)\n          {\n            this.ResetZoomOnUpdate = false;\n            imageBox.Zoom = 100;\n            imageBox.CenterToImage();\n          }\n\n          imageBox.EndUpdate();\n        }\n\n        this.IsUpdatingMap = false;\n      }\n    }\n\n    private void UpdateZoomLabel()\n    {\n      zoomToolStripStatusLabel.Text = string.Format(\"{0}% [{1}]\", imageBox.Zoom, this.VirtualZoom);\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void imageBox_MouseLeave(object sender, EventArgs e)\n    {\n      cursorToolStripStatusLabel.Text = string.Empty;\n    }\n\n    private void imageBox_MouseMove(object sender, MouseEventArgs e)\n    {\n      this.UpdateCursorPosition(e.Location);\n    }\n\n    private void imageBox_ZoomChanged(object sender, EventArgs e)\n    {\n      this.UpdateZoomLabel();\n    }\n\n    private void imageBox_Zoomed(object sender, ImageBoxZoomEventArgs e)\n    {\n      if ((e.Source & ImageBoxActionSources.User) == ImageBoxActionSources.User)\n      {\n        if ((e.Actions & ImageBoxZoomActions.ActualSize) == ImageBoxZoomActions.ActualSize)\n        {\n          this.VirtualZoom = 0;\n          this.ResetZoomOnUpdate = true;\n        }\n        else if ((e.Actions & ImageBoxZoomActions.ZoomIn) == ImageBoxZoomActions.ZoomIn)\n        {\n          this.VirtualZoom++;\n        }\n        else if ((e.Actions & ImageBoxZoomActions.ZoomOut) == ImageBoxZoomActions.ZoomOut)\n        {\n          this.VirtualZoom--;\n        }\n\n        // TODO: Currently the ZoomChanged and Zoomed events are raised after the zoom level has changed, but before any\n        // actions such as modifying scrollbars occur. This means methods such as GetSourceImageRegion will return the\n        // wrong X and Y values. Until this is fixed, using a timer to trigger the change.\n        // However, if you had lots of map changes to make then using a timer would be a good idea regardless; for example\n        // if the user rapdily zooms through the available levels, they'll have a smoother experience if you only load\n        // the data once they've stopped zooming\n        refreshMapTimer.Stop();\n        refreshMapTimer.Start();\n      }\n    }\n\n    private void refreshMapTimer_Tick(object sender, EventArgs e)\n    {\n      refreshMapTimer.Stop();\n\n      this.UpdateMap();\n    }\n\n    private void resetMessageTimer_Tick(object sender, EventArgs e)\n    {\n      resetMessageTimer.Stop();\n      messageLabel.Text = string.Empty;\n    }\n\n    #endregion\n\n    #region Nested Types\n\n    private struct MapLayerData\n    {\n      #region Public Properties\n\n      public int LowerZoom { get; set; }\n\n      public string Name { get; set; }\n\n      public int UpperZoom { get; set; }\n\n      #endregion\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/SwitchImageDuringZoomDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>17, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>125, 17</value>\n  </metadata>\n  <metadata name=\"resetMessageTimer.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>234, 17</value>\n  </metadata>\n  <metadata name=\"refreshMapTimer.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>321, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/TextDemoForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class TextDemoForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.propertyGrid = new Cyotek.Windows.Forms.Demo.PropertyGrid();\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.menuStrip.SuspendLayout();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Size = new System.Drawing.Size(771, 24);\n      this.menuStrip.TabIndex = 0;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // statusStrip\n      // \n      this.statusStrip.Location = new System.Drawing.Point(0, 406);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Size = new System.Drawing.Size(771, 22);\n      this.statusStrip.TabIndex = 2;\n      // \n      // splitContainer\n      // \n      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;\n      this.splitContainer.Location = new System.Drawing.Point(0, 24);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.propertyGrid);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.imageBox);\n      this.splitContainer.Size = new System.Drawing.Size(771, 382);\n      this.splitContainer.SplitterDistance = 300;\n      this.splitContainer.SplitterWidth = 3;\n      this.splitContainer.TabIndex = 1;\n      // \n      // propertyGrid\n      // \n      this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.propertyGrid.Location = new System.Drawing.Point(0, 0);\n      this.propertyGrid.Name = \"propertyGrid\";\n      this.propertyGrid.SelectedObject = this.imageBox;\n      this.propertyGrid.Size = new System.Drawing.Size(300, 382);\n      this.propertyGrid.TabIndex = 0;\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));\n      this.imageBox.Image = global::Cyotek.Windows.Forms.Demo.Properties.Resources.samplecrop;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.ScaleText = true;\n      this.imageBox.ShowPixelGrid = true;\n      this.imageBox.Size = new System.Drawing.Size(468, 382);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.Text = \"This is a demonstration of the ImageBox text functionality\";\n      this.imageBox.TextBackColor = System.Drawing.Color.Teal;\n      this.imageBox.TextDisplayMode = Cyotek.Windows.Forms.ImageBoxGridDisplayMode.Image;\n      this.imageBox.TextPadding = new System.Windows.Forms.Padding(3);\n      // \n      // TextDemoForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(771, 428);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.menuStrip);\n      this.Controls.Add(this.statusStrip);\n      this.Name = \"TextDemoForm\";\n      this.Text = \"Text Demonstation\";\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private PropertyGrid propertyGrid;\n    private ImageBox imageBox;\n\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/TextDemoForm.cs",
    "content": "﻿using System;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class TextDemoForm : BaseForm\n  {\n    #region Public Constructors\n\n    public TextDemoForm()\n    {\n      InitializeComponent();\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      propertyGrid.SelectItem(\"TextPadding\"); // HACK: This forces the property grid to scroll the property into view\n      propertyGrid.SelectItem(\"Text\");\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/TextDemoForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>479, 17</value>\n  </metadata>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>594, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/VirtualModeDemonstrationForm.Designer.cs",
    "content": "﻿namespace Cyotek.Windows.Forms.Demo\n{\n  partial class VirtualModeDemonstrationForm\n  {\n    /// <summary>\n    /// Required designer variable.\n    /// </summary>\n    private System.ComponentModel.IContainer components = null;\n\n    /// <summary>\n    /// Clean up any resources being used.\n    /// </summary>\n    /// <param name=\"disposing\">true if managed resources should be disposed; otherwise, false.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing && (components != null))\n      {\n        components.Dispose();\n      }\n      base.Dispose(disposing);\n    }\n\n    #region Windows Form Designer generated code\n\n    /// <summary>\n    /// Required method for Designer support - do not modify\n    /// the contents of this method with the code editor.\n    /// </summary>\n    private void InitializeComponent()\n    {\n      this.imageBox = new Cyotek.Windows.Forms.ImageBox();\n      this.splitContainer = new System.Windows.Forms.SplitContainer();\n      this.propertyGrid = new Cyotek.Windows.Forms.Demo.PropertyGrid();\n      this.statusStrip = new System.Windows.Forms.StatusStrip();\n      this.menuStrip = new System.Windows.Forms.MenuStrip();\n      this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.closeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.helpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();\n      this.splitContainer.Panel1.SuspendLayout();\n      this.splitContainer.Panel2.SuspendLayout();\n      this.splitContainer.SuspendLayout();\n      this.menuStrip.SuspendLayout();\n      this.SuspendLayout();\n      // \n      // imageBox\n      // \n      this.imageBox.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.imageBox.Location = new System.Drawing.Point(0, 0);\n      this.imageBox.Name = \"imageBox\";\n      this.imageBox.SelectionMode = Cyotek.Windows.Forms.ImageBoxSelectionMode.Rectangle;\n      this.imageBox.Size = new System.Drawing.Size(423, 277);\n      this.imageBox.TabIndex = 0;\n      this.imageBox.VirtualMode = true;\n      this.imageBox.VirtualSize = new System.Drawing.Size(300, 200);\n      this.imageBox.VirtualDraw += new System.Windows.Forms.PaintEventHandler(this.imageBox_VirtualDraw);\n      // \n      // splitContainer\n      // \n      this.splitContainer.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.splitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;\n      this.splitContainer.Location = new System.Drawing.Point(0, 24);\n      this.splitContainer.Name = \"splitContainer\";\n      // \n      // splitContainer.Panel1\n      // \n      this.splitContainer.Panel1.Controls.Add(this.propertyGrid);\n      // \n      // splitContainer.Panel2\n      // \n      this.splitContainer.Panel2.Controls.Add(this.imageBox);\n      this.splitContainer.Size = new System.Drawing.Size(726, 277);\n      this.splitContainer.SplitterDistance = 300;\n      this.splitContainer.SplitterWidth = 3;\n      this.splitContainer.TabIndex = 0;\n      // \n      // propertyGrid\n      // \n      this.propertyGrid.Dock = System.Windows.Forms.DockStyle.Fill;\n      this.propertyGrid.Location = new System.Drawing.Point(0, 0);\n      this.propertyGrid.Name = \"propertyGrid\";\n      this.propertyGrid.SelectedObject = this.imageBox;\n      this.propertyGrid.Size = new System.Drawing.Size(300, 277);\n      this.propertyGrid.TabIndex = 0;\n      // \n      // statusStrip\n      // \n      this.statusStrip.Location = new System.Drawing.Point(0, 301);\n      this.statusStrip.Name = \"statusStrip\";\n      this.statusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0);\n      this.statusStrip.Size = new System.Drawing.Size(726, 22);\n      this.statusStrip.TabIndex = 8;\n      // \n      // menuStrip\n      // \n      this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.fileToolStripMenuItem,\n            this.helpToolStripMenuItem});\n      this.menuStrip.Location = new System.Drawing.Point(0, 0);\n      this.menuStrip.Name = \"menuStrip\";\n      this.menuStrip.Padding = new System.Windows.Forms.Padding(5, 2, 0, 2);\n      this.menuStrip.Size = new System.Drawing.Size(726, 24);\n      this.menuStrip.TabIndex = 7;\n      // \n      // fileToolStripMenuItem\n      // \n      this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.closeToolStripMenuItem});\n      this.fileToolStripMenuItem.Name = \"fileToolStripMenuItem\";\n      this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);\n      this.fileToolStripMenuItem.Text = \"&File\";\n      // \n      // closeToolStripMenuItem\n      // \n      this.closeToolStripMenuItem.Name = \"closeToolStripMenuItem\";\n      this.closeToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.W)));\n      this.closeToolStripMenuItem.Size = new System.Drawing.Size(148, 22);\n      this.closeToolStripMenuItem.Text = \"&Close\";\n      this.closeToolStripMenuItem.Click += new System.EventHandler(this.closeToolStripMenuItem_Click);\n      // \n      // helpToolStripMenuItem\n      // \n      this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {\n            this.aboutToolStripMenuItem});\n      this.helpToolStripMenuItem.Name = \"helpToolStripMenuItem\";\n      this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 20);\n      this.helpToolStripMenuItem.Text = \"&Help\";\n      // \n      // aboutToolStripMenuItem\n      // \n      this.aboutToolStripMenuItem.Name = \"aboutToolStripMenuItem\";\n      this.aboutToolStripMenuItem.Size = new System.Drawing.Size(116, 22);\n      this.aboutToolStripMenuItem.Text = \"&About...\";\n      this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);\n      // \n      // VirtualModeDemonstrationForm\n      // \n      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);\n      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;\n      this.ClientSize = new System.Drawing.Size(726, 323);\n      this.Controls.Add(this.splitContainer);\n      this.Controls.Add(this.statusStrip);\n      this.Controls.Add(this.menuStrip);\n      this.Name = \"VirtualModeDemonstrationForm\";\n      this.Text = \"Virtual Mode Demonstration\";\n      this.splitContainer.Panel1.ResumeLayout(false);\n      this.splitContainer.Panel2.ResumeLayout(false);\n      this.splitContainer.ResumeLayout(false);\n      this.menuStrip.ResumeLayout(false);\n      this.menuStrip.PerformLayout();\n      this.ResumeLayout(false);\n      this.PerformLayout();\n\n    }\n\n    #endregion\n\n    private ImageBox imageBox;\n    private System.Windows.Forms.SplitContainer splitContainer;\n    private PropertyGrid propertyGrid;\n    private System.Windows.Forms.StatusStrip statusStrip;\n    private System.Windows.Forms.MenuStrip menuStrip;\n    private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem closeToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem helpToolStripMenuItem;\n    private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;\n  }\n}"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/VirtualModeDemonstrationForm.cs",
    "content": "﻿using System;\nusing System.Drawing;\nusing System.Windows.Forms;\n\nnamespace Cyotek.Windows.Forms.Demo\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  internal partial class VirtualModeDemonstrationForm : BaseForm\n  {\n    #region Public Constructors\n\n    public VirtualModeDemonstrationForm()\n    {\n      this.InitializeComponent();\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    protected override void OnLoad(EventArgs e)\n    {\n      base.OnLoad(e);\n\n      propertyGrid.SelectItem(\"VirtualSize\");\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    private void aboutToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      AboutDialog.ShowAboutDialog();\n    }\n\n    private void closeToolStripMenuItem_Click(object sender, EventArgs e)\n    {\n      this.Close();\n    }\n\n    private void imageBox_VirtualDraw(object sender, PaintEventArgs e)\n    {\n      RectangleF bounds;\n\n      bounds = imageBox.GetOffsetRectangle(new RectangleF(PointF.Empty, imageBox.VirtualSize));\n\n      using (Brush brush = new SolidBrush(Color.FromArgb(128, Color.Goldenrod)))\n      {\n        e.Graphics.FillRectangle(brush, bounds);\n      }\n\n      e.Graphics.DrawRectangle(Pens.DarkGoldenrod, bounds.X, bounds.Y, bounds.Width, bounds.Height);\n\n      using (Font font = new Font(this.Font.FontFamily, (float)(8 * imageBox.ZoomFactor)))\n      {\n        TextRenderer.DrawText(e.Graphics, \"Use the VirtualMode and VirtualSize properties along with the VirtualDraw event to provide full control without needing a backing image.\", font, new Rectangle((int)bounds.Left, (int)bounds.Top, (int)bounds.Width, (int)bounds.Height), Color.Black, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak | TextFormatFlags.WordEllipsis);\n      }\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/VirtualModeDemonstrationForm.resx",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<root>\n  <!-- \n    Microsoft ResX Schema \n    \n    Version 2.0\n    \n    The primary goals of this format is to allow a simple XML format \n    that is mostly human readable. The generation and parsing of the \n    various data types are done through the TypeConverter classes \n    associated with the data types.\n    \n    Example:\n    \n    ... ado.net/XML headers & schema ...\n    <resheader name=\"resmimetype\">text/microsoft-resx</resheader>\n    <resheader name=\"version\">2.0</resheader>\n    <resheader name=\"reader\">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>\n    <resheader name=\"writer\">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>\n    <data name=\"Name1\"><value>this is my long string</value><comment>this is a comment</comment></data>\n    <data name=\"Color1\" type=\"System.Drawing.Color, System.Drawing\">Blue</data>\n    <data name=\"Bitmap1\" mimetype=\"application/x-microsoft.net.object.binary.base64\">\n        <value>[base64 mime encoded serialized .NET Framework object]</value>\n    </data>\n    <data name=\"Icon1\" type=\"System.Drawing.Icon, System.Drawing\" mimetype=\"application/x-microsoft.net.object.bytearray.base64\">\n        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>\n        <comment>This is a comment</comment>\n    </data>\n                \n    There are any number of \"resheader\" rows that contain simple \n    name/value pairs.\n    \n    Each data row contains a name, and value. The row also contains a \n    type or mimetype. Type corresponds to a .NET class that support \n    text/value conversion through the TypeConverter architecture. \n    Classes that don't support this are serialized and stored with the \n    mimetype set.\n    \n    The mimetype is used for serialized objects, and tells the \n    ResXResourceReader how to depersist the object. This is currently not \n    extensible. For a given mimetype the value must be set accordingly:\n    \n    Note - application/x-microsoft.net.object.binary.base64 is the format \n    that the ResXResourceWriter will generate, however the reader can \n    read any of the formats listed below.\n    \n    mimetype: application/x-microsoft.net.object.binary.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter\n            : and then encoded with base64 encoding.\n    \n    mimetype: application/x-microsoft.net.object.soap.base64\n    value   : The object must be serialized with \n            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter\n            : and then encoded with base64 encoding.\n\n    mimetype: application/x-microsoft.net.object.bytearray.base64\n    value   : The object must be serialized into a byte array \n            : using a System.ComponentModel.TypeConverter\n            : and then encoded with base64 encoding.\n    -->\n  <xsd:schema id=\"root\" xmlns=\"\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:msdata=\"urn:schemas-microsoft-com:xml-msdata\">\n    <xsd:import namespace=\"http://www.w3.org/XML/1998/namespace\" />\n    <xsd:element name=\"root\" msdata:IsDataSet=\"true\">\n      <xsd:complexType>\n        <xsd:choice maxOccurs=\"unbounded\">\n          <xsd:element name=\"metadata\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" use=\"required\" type=\"xsd:string\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"assembly\">\n            <xsd:complexType>\n              <xsd:attribute name=\"alias\" type=\"xsd:string\" />\n              <xsd:attribute name=\"name\" type=\"xsd:string\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"data\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n                <xsd:element name=\"comment\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"2\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" msdata:Ordinal=\"1\" />\n              <xsd:attribute name=\"type\" type=\"xsd:string\" msdata:Ordinal=\"3\" />\n              <xsd:attribute name=\"mimetype\" type=\"xsd:string\" msdata:Ordinal=\"4\" />\n              <xsd:attribute ref=\"xml:space\" />\n            </xsd:complexType>\n          </xsd:element>\n          <xsd:element name=\"resheader\">\n            <xsd:complexType>\n              <xsd:sequence>\n                <xsd:element name=\"value\" type=\"xsd:string\" minOccurs=\"0\" msdata:Ordinal=\"1\" />\n              </xsd:sequence>\n              <xsd:attribute name=\"name\" type=\"xsd:string\" use=\"required\" />\n            </xsd:complexType>\n          </xsd:element>\n        </xsd:choice>\n      </xsd:complexType>\n    </xsd:element>\n  </xsd:schema>\n  <resheader name=\"resmimetype\">\n    <value>text/microsoft-resx</value>\n  </resheader>\n  <resheader name=\"version\">\n    <value>2.0</value>\n  </resheader>\n  <resheader name=\"reader\">\n    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <resheader name=\"writer\">\n    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>\n  </resheader>\n  <metadata name=\"statusStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>479, 17</value>\n  </metadata>\n  <metadata name=\"menuStrip.TrayLocation\" type=\"System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a\">\n    <value>595, 17</value>\n  </metadata>\n</root>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/app.manifest",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<asmv1:assembly manifestVersion=\"1.0\" xmlns=\"urn:schemas-microsoft-com:asm.v1\" xmlns:asmv1=\"urn:schemas-microsoft-com:asm.v1\" xmlns:asmv2=\"urn:schemas-microsoft-com:asm.v2\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:asmv3=\"urn:schemas-microsoft-com:asm.v3\">\n  <assemblyIdentity version=\"1.0.0.0\" name=\"imgbxdmo.app\" />\n  <asmv3:application>\n    <asmv3:windowsSettings xmlns=\"http://schemas.microsoft.com/SMI/2005/WindowsSettings\">\n      <dpiAware>true/PM</dpiAware>\n    </asmv3:windowsSettings>\n  </asmv3:application>\n  <trustInfo xmlns=\"urn:schemas-microsoft-com:asm.v2\">\n    <security>\n      <requestedPrivileges xmlns=\"urn:schemas-microsoft-com:asm.v3\">\n        <!-- UAC Manifest Options\n            If you want to change the Windows User Account Control level replace the\n            requestedExecutionLevel node with one of the following.\n\n        <requestedExecutionLevel  level=\"asInvoker\" uiAccess=\"false\" />\n        <requestedExecutionLevel  level=\"requireAdministrator\" uiAccess=\"false\" />\n        <requestedExecutionLevel  level=\"highestAvailable\" uiAccess=\"false\" />\n\n            Specifying requestedExecutionLevel node will disable file and registry virtualization.\n            If you want to utilize File and Registry Virtualization for backward\n            compatibility then delete the requestedExecutionLevel node.\n        -->\n        <requestedExecutionLevel level=\"asInvoker\" uiAccess=\"false\" />\n      </requestedPrivileges>\n    </security>\n  </trustInfo>\n  <compatibility xmlns=\"urn:schemas-microsoft-com:compatibility.v1\">\n    <application>\n      <!-- Windows 10 -->\n      <supportedOS Id=\"{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}\" />\n      <!-- Windows 8.1 -->\n      <supportedOS Id=\"{1f676c76-80e1-4239-95bb-83d0f6d0da78}\" />\n      <!-- Windows 8 -->\n      <supportedOS Id=\"{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}\" />\n      <!-- Windows 7 -->\n      <supportedOS Id=\"{35138b9a-5d96-4fbd-8e2d-a2440225f93a}\" />\n      <!-- Windows Vista -->\n      <supportedOS Id=\"{e2011457-1546-43c5-a5fe-008deee3d3f0}\" />\n    </application>\n  </compatibility>\n  <dependency>\n    <dependentAssembly>\n      <assemblyIdentity type=\"win32\" name=\"Microsoft.Windows.Common-Controls\" version=\"6.0.0.0\" processorArchitecture=\"*\" publicKeyToken=\"6595b64144ccf1df\" language=\"*\" />\n    </dependentAssembly>\n  </dependency>\n</asmv1:assembly>\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Demo/packages.config",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<packages>\n  <package id=\"CommonMark.NET\" version=\"0.9.0\" targetFramework=\"net35\" />\n  <package id=\"HtmlRenderer.Core\" version=\"1.5.0.5\" targetFramework=\"net35\" />\n  <package id=\"HtmlRenderer.WinForms\" version=\"1.5.0.6\" targetFramework=\"net35\" />\n</packages>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Design/Cyotek.Windows.Forms.ImageBox.Design.csproj",
    "content": "﻿<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n  <Import Project=\"$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props\" Condition=\"Exists('$(MSBuildExtensionsPath)\\$(MSBuildToolsVersion)\\Microsoft.Common.props')\" />\n  <PropertyGroup>\n    <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>\n    <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>\n    <ProjectGuid>{9F169B78-70FD-456A-BB48-2AA470938D38}</ProjectGuid>\n    <OutputType>Library</OutputType>\n    <AppDesignerFolder>Properties</AppDesignerFolder>\n    <RootNamespace>Cyotek.Windows.Forms.ImageBox.Design</RootNamespace>\n    <AssemblyName>Cyotek.Windows.Forms.ImageBox.Design</AssemblyName>\n    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>\n    <FileAlignment>512</FileAlignment>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">\n    <DebugSymbols>true</DebugSymbols>\n    <DebugType>full</DebugType>\n    <Optimize>false</Optimize>\n    <OutputPath>bin\\Debug\\</OutputPath>\n    <DefineConstants>DEBUG;TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">\n    <DebugType>pdbonly</DebugType>\n    <Optimize>true</Optimize>\n    <OutputPath>bin\\Release\\</OutputPath>\n    <DefineConstants>TRACE</DefineConstants>\n    <ErrorReport>prompt</ErrorReport>\n    <WarningLevel>4</WarningLevel>\n  </PropertyGroup>\n  <ItemGroup>\n    <Reference Include=\"System\" />\n    <Reference Include=\"System.Design\" />\n    <Reference Include=\"System.Windows.Forms\" />\n    <Reference Include=\"System.Data\" />\n    <Reference Include=\"System.Xml\" />\n  </ItemGroup>\n  <ItemGroup>\n    <Compile Include=\"ImageBoxDesigner.cs\" />\n    <Compile Include=\"Properties\\AssemblyInfo.cs\" />\n  </ItemGroup>\n  <ItemGroup>\n    <ProjectReference Include=\"..\\Cyotek.Windows.Forms.ImageBox\\Cyotek.Windows.Forms.ImageBox.csproj\">\n      <Project>{4159C8D3-C18D-4BED-8BE6-9BAD1B0CA4F6}</Project>\n      <Name>Cyotek.Windows.Forms.ImageBox</Name>\n    </ProjectReference>\n  </ItemGroup>\n  <Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />\n  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \n       Other similar extension points exist, see Microsoft.Common.targets.\n  <Target Name=\"BeforeBuild\">\n  </Target>\n  <Target Name=\"AfterBuild\">\n  </Target>\n  -->\n</Project>"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Design/ImageBoxDesigner.cs",
    "content": "﻿using System;\nusing System.ComponentModel;\nusing System.ComponentModel.Design;\nusing System.Windows.Forms;\nusing System.Windows.Forms.Design;\n\n// ReSharper disable CheckNamespace\n\nnamespace Cyotek.Windows.Forms.Design // ReSharper restore CheckNamespace\n{\n  // Cyotek ImageBox\n  // Copyright (c) 2010-2015 Cyotek Ltd.\n  // http://cyotek.com\n  // http://cyotek.com/blog/tag/imagebox\n\n  // Licensed under the MIT License. See license.txt for the full text.\n\n  // If you use this control in your applications, attribution, donations or contributions are welcome.\n\n  // TODO: This library currently isn't used until I can work out how to properly get client applications to use it without an explicit reference.\n  // Using a Designer attribute with a string type and DLL name is supposed to work, but the IDE isn't displaying tasks for the demo project this way\n  // I don't want it to be a part of the core ImageBox library due to the reference to System.Design as this means you can no longer flag\n  // the assembly as only requiring the Client version of the .NET Framework but only the Full, which may not be suitable for everyone\n\n  /// <summary>\n  /// Provides design mode behavior for an <see cref=\"ImageBox\"/> control.\n  /// </summary>\n  public class ImageBoxDesigner : ControlDesigner\n  {\n    #region Instance Fields\n\n    private DesignerVerb _dockVerb;\n\n    private DesignerVerb _undockVerb;\n\n    private DesignerVerbCollection _verbs;\n\n    #endregion\n\n    #region Overridden Properties\n\n    /// <summary>\n    /// Gets the design-time verbs supported by the component that is associated with the designer.\n    /// </summary>\n    /// <value>A collection that contains the verbs that are available to the designer.</value>\n    /// <returns>A <see cref=\"T:System.ComponentModel.Design.DesignerVerbCollection\" /> of <see cref=\"T:System.ComponentModel.Design.DesignerVerb\" /> objects, or null if no designer verbs are available. This default implementation always returns null.</returns>\n    public override DesignerVerbCollection Verbs\n    {\n      get\n      {\n        if (_verbs == null)\n        {\n          _verbs = new DesignerVerbCollection();\n\n          _dockVerb = new DesignerVerb(\"Dock to parent control\", this.DockVerbHandler)\n                      {\n                        Description = \"Dock this control with its parent.\",\n                        Enabled = this.ImageBoxControl.Dock == DockStyle.None\n                      };\n          _verbs.Add(_dockVerb);\n\n          _undockVerb = new DesignerVerb(\"Undock from parent control\", this.UndockVerbHandler)\n                        {\n                          Description = \"Undock this control from its parent.\",\n                          Enabled = this.ImageBoxControl.Dock != DockStyle.None\n                        };\n          _verbs.Add(_undockVerb);\n        }\n\n        return _verbs;\n      }\n    }\n\n    #endregion\n\n    #region Overridden Methods\n\n    /// <summary>\n    /// Initializes the designer with the specified component.\n    /// </summary>\n    /// <param name=\"component\">The <see cref=\"T:System.ComponentModel.IComponent\" /> to associate with the designer.</param>\n    public override void Initialize(IComponent component)\n    {\n      IComponentChangeService changeService;\n\n      base.Initialize(component);\n\n      // attach an event to notify us of when a component has been modified\n      changeService = (IComponentChangeService)this.GetService(typeof(IComponentChangeService));\n      if (changeService != null)\n      {\n        changeService.ComponentChanged += this.OnComponentChanged;\n      }\n    }\n\n    /// <summary>\n    /// Releases the unmanaged resources used by the <see cref=\"T:System.Windows.Forms.Design.ParentControlDesigner\" />, and optionally releases the managed resources.\n    /// </summary>\n    /// <param name=\"disposing\">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param>\n    protected override void Dispose(bool disposing)\n    {\n      if (disposing)\n      {\n        IComponentChangeService changeService;\n\n        changeService = (IComponentChangeService)this.GetService(typeof(IComponentChangeService));\n        if (changeService != null)\n        {\n          changeService.ComponentChanged -= this.OnComponentChanged;\n        }\n      }\n\n      base.Dispose(disposing);\n    }\n\n    #endregion\n\n    #region Protected Properties\n\n    /// <summary>\n    /// Gets the TabList control currently being designed\n    /// </summary>\n    /// <value>The TabList control being designed.</value>\n    protected ImageBox ImageBoxControl\n    {\n      get { return this.Component as ImageBox; }\n    }\n\n    #endregion\n\n    #region Private Members\n\n    /// <summary>\n    /// Called when the Dock verb is activated\n    /// </summary>\n    /// <param name=\"sender\">The sender.</param>\n    /// <param name=\"e\">The <see cref=\"EventArgs\" /> instance containing the event data.</param>\n    private void DockVerbHandler(object sender, EventArgs e)\n    {\n      this.SetDock(DockStyle.Fill);\n    }\n\n    /// <summary>\n    /// Applies a new dock setting to the hosted control\n    /// </summary>\n    private void SetDock(DockStyle dock)\n    {\n      ImageBox control;\n      IDesignerHost host;\n\n      control = this.ImageBoxControl;\n      host = (IDesignerHost)this.GetService(typeof(IDesignerHost));\n\n      if (control != null && host != null)\n      {\n        using (DesignerTransaction transaction = host.CreateTransaction(string.Format(\"Add TabListPage to '{0}'\", control.Name)))\n        {\n          try\n          {\n            MemberDescriptor dockProperty;\n\n            dockProperty = TypeDescriptor.GetProperties(control)[\"Dock\"];\n\n            // tell the designer we're about to start making changes\n            this.RaiseComponentChanging(dockProperty);\n\n            // dock it!\n            control.Dock = dock;\n\n            // inform the designer we're finished making changes\n            this.RaiseComponentChanged(dockProperty, null, null);\n\n            // commit the transaction\n            transaction.Commit();\n          }\n          catch\n          {\n            transaction.Cancel();\n            throw;\n          }\n        }\n      }\n    }\n\n    /// <summary>\n    /// Occurs when the Undock verb is activated\n    /// </summary>\n    /// <param name=\"sender\">The sender.</param>\n    /// <param name=\"e\">The <see cref=\"EventArgs\"/> instance containing the event data.</param>\n    private void UndockVerbHandler(object sender, EventArgs e)\n    {\n      this.SetDock(DockStyle.None);\n    }\n\n    #endregion\n\n    #region Event Handlers\n\n    /// <summary>\n    /// Called when the component attached to this designer has changed\n    /// </summary>\n    /// <param name=\"sender\">The sender.</param>\n    /// <param name=\"e\">The <see cref=\"ComponentChangedEventArgs\" /> instance containing the event data.</param>\n    private void OnComponentChanged(object sender, ComponentChangedEventArgs e)\n    {\n      if (_dockVerb != null)\n      {\n        _dockVerb.Enabled = this.ImageBoxControl.Dock == DockStyle.None;\n      }\n      if (_undockVerb != null)\n      {\n        _undockVerb.Enabled = this.ImageBoxControl.Dock != DockStyle.None;\n      }\n    }\n\n    #endregion\n  }\n}\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.Design/Properties/AssemblyInfo.cs",
    "content": "﻿using System;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\n\n[assembly: AssemblyTitle(\"Cyotek ImageBox Control Designer\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"Cyotek Ltd\")]\n[assembly: AssemblyProduct(\"Cyotek ImageBox Control\")]\n[assembly: AssemblyCopyright(\"Copyright © 2013-2015 Cyotek Ltd.\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n[assembly: ComVisible(false)]\n[assembly: Guid(\"3cadaf8e-61b8-407c-a82d-0d29f70ce38f\")]\n[assembly: CLSCompliant(true)]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"
  },
  {
    "path": "Cyotek.Windows.Forms.ImageBox.sln",
    "content": "﻿\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio 14\nVisualStudioVersion = 14.0.25420.1\nMinimumVisualStudioVersion = 10.0.40219.1\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Cyotek.Windows.Forms.ImageBox.Demo\", \"Cyotek.Windows.Forms.ImageBox.Demo\\Cyotek.Windows.Forms.ImageBox.Demo.csproj\", \"{86D47D73-B3E7-4ED3-86EA-7BFC0C978A7B}\"\n\tProjectSection(ProjectDependencies) = postProject\n\t\t{9F169B78-70FD-456A-BB48-2AA470938D38} = {9F169B78-70FD-456A-BB48-2AA470938D38}\n\tEndProjectSection\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Cyotek.Windows.Forms.ImageBox\", \"Cyotek.Windows.Forms.ImageBox\\Cyotek.Windows.Forms.ImageBox.csproj\", \"{4159C8D3-C18D-4BED-8BE6-9BAD1B0CA4F6}\"\nEndProject\nProject(\"{2150E333-8FDC-42A3-9474-1A3956D46DE8}\") = \"Resources\", \"Resources\", \"{7E34AEC6-0EF4-4B37-B0DE-E28096960FA0}\"\n\tProjectSection(SolutionItems) = preProject\n\t\tACKNOWLEDGEMENTS.md = ACKNOWLEDGEMENTS.md\n\t\tCHANGELOG.md = CHANGELOG.md\n\t\tLICENSE.txt = LICENSE.txt\n\t\tREADME.md = README.md\n\tEndProjectSection\nEndProject\nProject(\"{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}\") = \"Cyotek.Windows.Forms.ImageBox.Design\", \"Cyotek.Windows.Forms.ImageBox.Design\\Cyotek.Windows.Forms.ImageBox.Design.csproj\", \"{9F169B78-70FD-456A-BB48-2AA470938D38}\"\nEndProject\nGlobal\n\tGlobalSection(SolutionConfigurationPlatforms) = preSolution\n\t\tDebug|Any CPU = Debug|Any CPU\n\t\tRelease|Any CPU = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(ProjectConfigurationPlatforms) = postSolution\n\t\t{86D47D73-B3E7-4ED3-86EA-7BFC0C978A7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{86D47D73-B3E7-4ED3-86EA-7BFC0C978A7B}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{86D47D73-B3E7-4ED3-86EA-7BFC0C978A7B}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{86D47D73-B3E7-4ED3-86EA-7BFC0C978A7B}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{4159C8D3-C18D-4BED-8BE6-9BAD1B0CA4F6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{4159C8D3-C18D-4BED-8BE6-9BAD1B0CA4F6}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{4159C8D3-C18D-4BED-8BE6-9BAD1B0CA4F6}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{4159C8D3-C18D-4BED-8BE6-9BAD1B0CA4F6}.Release|Any CPU.Build.0 = Release|Any CPU\n\t\t{9F169B78-70FD-456A-BB48-2AA470938D38}.Debug|Any CPU.ActiveCfg = Debug|Any CPU\n\t\t{9F169B78-70FD-456A-BB48-2AA470938D38}.Debug|Any CPU.Build.0 = Debug|Any CPU\n\t\t{9F169B78-70FD-456A-BB48-2AA470938D38}.Release|Any CPU.ActiveCfg = Release|Any CPU\n\t\t{9F169B78-70FD-456A-BB48-2AA470938D38}.Release|Any CPU.Build.0 = Release|Any CPU\n\tEndGlobalSection\n\tGlobalSection(SolutionProperties) = preSolution\n\t\tHideSolutionNode = FALSE\n\tEndGlobalSection\nEndGlobal\n"
  },
  {
    "path": "LICENSE.txt",
    "content": "The MIT License (MIT)\n\nCopyright © 2010-2022 Cyotek Ltd.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
  },
  {
    "path": "README.md",
    "content": "# Cyotek ImageBox Control\n\n## About\n\nThe `ImageBox` is a lightweight owner drawn control for displaying images. It\nsupports zooming, scrolling, panning, region selection and much more! In\naddition to the traditional mode of binding to an `Image`, you can also use a\n*virtual mode*, and provide your own custom drawing whilst retaining all the\n`ImageBox` functionality. \n\nThe `ImageBox` control also provides convenient helper methods for translating\npoints, rectangles and sizes according to the current zoom level and scroll\nposition of the control - this makes it easy to scale custom drawing to fit the\ncontrol.\n\nAs well as the different behaviours offered, the `ImageBox` also supports a\nlarge number of display properties. The background of the control can display a\nsolid colour, or a coloured grid in various sizes. You can also configure how\nthe grid is to be drawn, for example just around the image bounds, or the full\ncontrol bounds. Other options include the pixel grid, which is displayed when\nzooming in on an image to highlight each pixel, custom border styles for\nsurrounding the image, and many other properties. You can also display text, and\nspecifying formatting and alignment options.\n\n## Example Screenshots\n\n![ImageBox control demonstration](https://static.cyotek.com/files/articleimages/imgbox-5a.png)\n\n![Virtual mode demonstration, where the ImageBox can be used without a backing image](https://static.cyotek.com/files/articleimages/imgbox-6a.png)\n\n![The ImageBox can display a pixel grid when zooming in](https://static.cyotek.com/files/articleimages/imgbox-6b.png)\n\n## License\n\nThe `ImageBox` control is licensed under the MIT License. See `license.txt` for\nthe full text.\n\n## Further Reading\n\nFor more information on this control, see the\n[articles tagged withimagebox](https://www.cyotek.com/blog/tag/imagebox) at\ncyotek.com.\n"
  },
  {
    "path": "acknowledgements.md",
    "content": "# Acknowledgements\n\n## Graphics\n\n### Toolbar Icons\nToolbar icons from [Fugue Icons](http://p.yusukekamiyamane.com/).\n\n### The Dread Pirate Hale's Legendary Treasure Map\nTreasure map graphic created by [~Bogbrush](http://bogbrush.deviantart.com/).\n\nOriginal map can be found [here](http://bogbrush.deviantart.com/art/The-Legendary-Treasure-Map-64737930).\n\n### Marker Icon\nMarker icon used in Scaled Adornments demonstrated created by [Icons Land](http://www.icons-land.com).\n\nOriginal graphic can be found [here](https://www.iconfinder.com/icondetails/73053/128/base_map_marker_outside_pink_icon).\n\n### World Maps\nPhysical Map of the World image by [Tom Patterson](http://www.shadedrelief.com/).\n\nOriginal map (I used the \"Large Wall Map\", both labelled and unlabelled) can be found [here](http://www.shadedrelief.com/world/).\n\n### Animated GIF's\n[Newtons cradle animation book 2.gif](http://en.wikipedia.org/wiki/File:Newtons_cradle_animation_book_2.gif).\n\n## Code\n\n### ScrollControl\nOriginal `ScrollControl` code by [Scott Crawford](http://sukiware.com/).\n\n### Pixel Clipping\nOriginal information on pixel clipping [Rotem](http://stackoverflow.com/questions/14070311/why-is-graphics-drawimage-cropping-part-of-my-image/14070372#14070372)\n\n### Animated GIF Support\nContribution by [Eggy](https://github.com/teamalpha5441)\n\n### Removal of .NET 3.5 requirement\nContribution by [dahmage](https://github.com/dahmage)\n\n### Focusless Mouse Wheel Scroll\nDerived from this [answer](http://stackoverflow.com/a/11034674/148962) and [this answer](http://stackoverflow.com/a/13292894/148962) on StackOverflow as suggested by [mtagliaf](http://forums.cyotek.com/imagebox/mouse-scroll-without-focusing-on-imagebox/msg194/#msg194)\n\n### Mouse wheel scroll and zoom\n\nContribution by [Fruchtzwerg94](https://github.com/Fruchtzwerg94)\n"
  },
  {
    "path": "build.cmd",
    "content": "@ECHO OFF\n\nSETLOCAL\n\nCALL ..\\..\\..\\build\\set35vars.bat\n\n%msbuildexe% Cyotek.Windows.Forms.ImageBox.sln /p:Configuration=Release /verbosity:minimal /nologo /t:Clean,Build\nCALL dualsigncmd Cyotek.Windows.Forms.ImageBox\\bin\\Release\\Cyotek.Windows.Forms.ImageBox.dll\n\nPUSHD\nIF NOT EXIST nuget MKDIR nuget\nCD nuget\n\nDEL *.* /Q\n\n%nugetexe% pack ..\\Cyotek.Windows.Forms.ImageBox\\Cyotek.Windows.Forms.ImageBox.csproj -Prop Configuration=Release\n%zipexe% a -bd -tZip  Cyotek.Windows.Forms.ImageBox.x.x.x.x.zip ..\\Cyotek.Windows.Forms.ImageBox\\bin\\Release\\Cyotek.Windows.Forms.ImageBox.*\n\nCALL sign-package *.nupkg\n\nREM temp for push\nDEL ..\\Cyotek.Windows.Forms.ImageBox\\bin\\Release\\*.nupkg\nCOPY *.nupkg ..\\Cyotek.Windows.Forms.ImageBox\\bin\\Release\\\nPOPD\n\nENDLOCAL\n"
  },
  {
    "path": "nuget.config",
    "content": "<configuration>\n  <config>\n    <add key=\"repositoryPath\" value=\"packages\" />\n  </config>\n</configuration>"
  }
]