Hi,
I have a simple example of a color visualizer and it works fine.
I've tried to add another (new) color visualizer
(an exact copy of the example) in a different (new) solution,
but for some reason I can't see my
new visualizer while debugging. (see code below)
Isn't it possible to add more than one visualizer
to the same type (Color)?
Why do I see only the visualizer from the example
(even when debugging the new solution), and can't
see my own visualizer which is part of that solution?
Thanks,
Udi.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
MyColorVizualiz er.cs
~~~~~~~~~~~~~~~ ~
public class MyColorVizualiz er : DialogDebuggerV isualizer
{
protected override void Show(IDialogVis ualizerService
windowService, IVisualizerObje ctProvider objectProvider)
{
Debug.Assert(wi ndowService != null);
Debug.Assert(ob jectProvider != null);
Color data = (Color)objectPr ovider.GetObjec t();
Debug.Assert(da ta != null);
using (MyColorVizuali zerDlg displayForm =
new MyColorVizualiz erDlg(data))
{
displayForm.Tex t += " " + data.ToString() ;
windowService.S howDialog(displ ayForm);
}
}
}
//////////////////////////////////////////////////////////
MyColorVizualiz erDlg.cs
~~~~~~~~~~~~~~~ ~~~
public partial class MyColorVizualiz erDlg : Form
{
public MyColorVizualiz erDlg(Color color)
{
InitializeCompo nent();
BackColor = color;
}
}
////////////////////////////////////////////////////////////////////
AssemblyInfo.cs
~~~~~~~~~~~~
[assembly: DebuggerVisuali zer(typeof(MyCo lorVizualizer), Description =
"Udi's Color Visualizer", Target = typeof(Color))]
///////////////////////////////////////////////////////////////////
I have a simple example of a color visualizer and it works fine.
I've tried to add another (new) color visualizer
(an exact copy of the example) in a different (new) solution,
but for some reason I can't see my
new visualizer while debugging. (see code below)
Isn't it possible to add more than one visualizer
to the same type (Color)?
Why do I see only the visualizer from the example
(even when debugging the new solution), and can't
see my own visualizer which is part of that solution?
Thanks,
Udi.
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
MyColorVizualiz er.cs
~~~~~~~~~~~~~~~ ~
public class MyColorVizualiz er : DialogDebuggerV isualizer
{
protected override void Show(IDialogVis ualizerService
windowService, IVisualizerObje ctProvider objectProvider)
{
Debug.Assert(wi ndowService != null);
Debug.Assert(ob jectProvider != null);
Color data = (Color)objectPr ovider.GetObjec t();
Debug.Assert(da ta != null);
using (MyColorVizuali zerDlg displayForm =
new MyColorVizualiz erDlg(data))
{
displayForm.Tex t += " " + data.ToString() ;
windowService.S howDialog(displ ayForm);
}
}
}
//////////////////////////////////////////////////////////
MyColorVizualiz erDlg.cs
~~~~~~~~~~~~~~~ ~~~
public partial class MyColorVizualiz erDlg : Form
{
public MyColorVizualiz erDlg(Color color)
{
InitializeCompo nent();
BackColor = color;
}
}
////////////////////////////////////////////////////////////////////
AssemblyInfo.cs
~~~~~~~~~~~~
[assembly: DebuggerVisuali zer(typeof(MyCo lorVizualizer), Description =
"Udi's Color Visualizer", Target = typeof(Color))]
///////////////////////////////////////////////////////////////////
Comment