LEADTOOLS Support
Document
Document SDK Questions
Error : Can not Convert type LeadTools.Annotation.Designers.AnnDesigner to Leadtools.Annotations.Ann
#1
Posted
:
Friday, June 19, 2015 4:49:35 AM(UTC)
Groups: Registered
Posts: 16
Hello Sir,
Error : Can not Convert type LeadTools.Annotation.Designers.AnnDesigner to Leadtools.Annotations.AnnEditDesigner .
this code is run in v18 trail but not work in v19 trail
void cell_DesignerCreated(object sender, MedicalViewerDesignerCreatedEventArgs e)
{
if (e.Type == MedicalViewerDesignerType.DrawDesigner)
{
Leadtools.Annotations.AnnDrawDesigner designer = (Leadtools.Annotations.AnnDrawDesigner)e.Designer;
designer.Draw += new EventHandler(designer_Draw);
}
else if (e.Type == MedicalViewerDesignerType.EditDesigner)
{
Leadtools.Annotations.AnnEditDesigner designer = (Leadtools.Annotations.AnnEditDesigner)e.Designer;
designer.Edit += new EventHandler(designer_Edit);
}
}
}
#2
Posted
:
Monday, June 22, 2015 2:28:56 AM(UTC)
Groups: Registered, Tech Support
Posts: 1,326
Was thanked: 1 time(s) in 1 post(s)
The new LEADTOOLS v19 Medical Viewer control no longer uses the old Leadtools.Annotations.dll, because it is deprecated.
It is now uses Leadtools.Annotations.Core instead with the other new annotations DLLs (Leadtools.Annotations.Core.dll, Leadtools.Annotations.Automation.dll, Leadtools.Annotations.Designers.dll, Leadtools.Annotations.WinForms.dll, etc.).
About the casting problem in your code, you need to change the code as follows:
+----------------------+
void cell_DesignerCreated(object sender, MedicalViewerDesignerCreatedEventArgs e)
{
if (e.Type == MedicalViewerDesignerType.DrawDesigner)
{
Leadtools.Annotations.Designers.AnnDrawDesigner designer = (Leadtools.Annotations.Designers.AnnDrawDesigner)e.Designer;
designer.Draw += designer_Draw;
}
else if (e.Type == MedicalViewerDesignerType.EditDesigner)
{
Leadtools.Annotations.Designers.AnnEditDesigner designer = (Leadtools.Annotations.Designers.AnnEditDesigner)e.Designer;
designer.Edit += designer_Edit;
}
}
+----------------------+
Thanks,
Maen Badwan
LEADTOOLS Technical Support
#3
Posted
:
Thursday, June 25, 2015 2:03:32 AM(UTC)
Groups: Registered
Posts: 16
LEADTOOLS Support
Document
Document SDK Questions
Error : Can not Convert type LeadTools.Annotation.Designers.AnnDesigner to Leadtools.Annotations.Ann
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.