Two new events have been added to the MedicalViewer for our Annotation functionality:
1) The DesignerCreated event has been added to the Medical Viewer.
This is fired every time the viewer creates either one of the following:
- Drawdesginer.
- EditDesigner.
- RunDesigner.
A flag is sent through the event arguments to notify the user which designer has been
created. The argument also contains:
a) SubCellIndex (the sub-cell index)
b) Designer (the created designer).
c) Type (the designer type).
d) Container (the annotation container).
e) Object (the object created, modified...etc)
through this event
You can check if you received a DrawDesigner and register the event
"Draw" which will fire when drawing an annotation object.
2) The StartDrawingAnnotation event is fired when the user clicks to
start drawing an annotation object. The event arguments contain:
a) SubCellIndex (the sub-cell index)
b) Container (the annotation container).
c) Object (the annotation that is about to be created).
d) Type (the type of the annotation object).
The attached project uses the DesignerCreated for two purposes:
a) To show you how to apply default values to the annotation objects. Once set the values will always be used until adjusted again.
b) To show you how to obtain positioning information on the annotation as it is being drawn.
Once you run the project you can press the "Rectangle Properties" button to adjust the values of the Pen used to draw the rectangle. These values will then be used to create any other Rectangle objects. You can also select any rectangle object and use this same dialog to adjust it's properties. The Dialog was created from scratch and is merely showing you how to adjust the Pen's properties. Of course you can add additional code to adjust other properties of the rectangle and/or adjust any of the other properties of any of the other annotations.
The project is in C# with Visual Studio 2008
Travis Montgomery
Senior Sales Engineer