Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, June 19, 2015 4:49:35 AM(UTC)
anilsharma150

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);
}
}
}
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, June 22, 2015 2:28:56 AM(UTC)
Maen Hasan

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)
anilsharma150

Groups: Registered
Posts: 16


Thanks a lot
 
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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.046 seconds.