forked from andrewkirillov/AForge.NET
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathImageVisualizer.cs
34 lines (29 loc) · 980 Bytes
/
ImageVisualizer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// AForge debugging visualizers
// AForge.NET framework
// http://www.aforgenet.com/framework/
//
// Copyright © AForge.NET, 2011
// contacts@aforgenet.com
//
using System;
using System.Drawing;
using System.Windows.Forms;
using Microsoft.VisualStudio.DebuggerVisualizers;
[assembly: System.Diagnostics.DebuggerVisualizer(
typeof( AForge.DebuggerVisualizers.ImageVisualizer ),
typeof( VisualizerObjectSource ),
Target = typeof( System.Drawing.Image ),
Description = "Image Visualizer" )]
namespace AForge.DebuggerVisualizers
{
public class ImageVisualizer : DialogDebuggerVisualizer
{
override protected void Show( IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider )
{
Image image = (Image) objectProvider.GetObject( );
ImageView imageViewer = new ImageView( );
imageViewer.SetImage( image );
windowService.ShowDialog( imageViewer );
}
}
}