home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.tcs3.com
/
ftp.tcs3.com.tar
/
ftp.tcs3.com
/
DRIVERS
/
Audio
/
Office2010
/
InfoPath.en-us
/
InfLR.cab
/
FL_Visualizer_zip_147037_ENU____.3643236F_FC70_11D3_A536_0090278A1BB8
/
Visualizer.cs
next >
Wrap
Text File
|
2005-09-23
|
2KB
|
53 lines
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Windows.Forms;
using Microsoft.VisualStudio.DebuggerVisualizers;
namespace $rootnamespace$
{
// TODO: Add the following to SomeType's definition to see this visualizer when debugging instances of SomeType:
//
// [DebuggerVisualizer(typeof($safeitemrootname$))]
// [Serializable]
// public class SomeType
// {
// ...
// }
//
/// <summary>
/// A Visualizer for SomeType.
/// </summary>
public class $safeitemrootname$ : DialogDebuggerVisualizer
{
protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
{
// TODO: Get the object to display a visualizer for.
// Cast the result of objectProvider.GetObject()
// to the type of the object being visualized.
object data = (object)objectProvider.GetObject();
// TODO: Display your view of the object.
// Replace displayForm with your own custom Form or Control.
using(Form displayForm = new Form())
{
displayForm.Text = data.ToString();
windowService.ShowDialog(displayForm);
}
}
// TODO: Add the following to your testing code to test the visualizer:
//
// $safeitemrootname$.TestShowVisualizer(new SomeType());
//
/// <summary>
/// Tests the visualizer by hosting it outside of the debugger.
/// </summary>
/// <param name="objectToVisualize">The object to display in the visualizer.</param>
public static void TestShowVisualizer(object objectToVisualize)
{
VisualizerDevelopmentHost visualizerHost = new VisualizerDevelopmentHost(objectToVisualize, typeof($safeitemrootname$));
visualizerHost.ShowVisualizer();
}
}
}