Welcome to LEAD Support Forum Login | Register | Faq  

    LEAD Support Forum
  Resource to find answers and post technical questions about LEAD products.
Search    
   

Detection on drawing annotation in the RasterImageViewer
Started by roadman at 09-01-2008 12:56. Topic has 28 replies.

Print Search « Previous Thread Next Thread »
  09-01-2008, 12:56
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Detection on drawing annotation in the RasterImageViewer
Reply Quote
How can i detect if the user draw on a RasterImageViewer?

I want to force the user to save the annotation if the user has drawn sth in the viewer.
   Report 
  09-02-2008, 8:00
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote

How is the user doing the drawing exactly? Is this using our annotations automation manager, or do you give the user a different kind of drawing functionality?


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-02-2008, 10:33
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
Yes, using the default automation manager and the default toolbar
   Report 
  09-03-2008, 8:21
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
Try by using the AnnAutomation.CurrentDesignerChanged Event

Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-11-2008, 6:04
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
It failed. Once i clicked the toolbar button in the annotation toolbar button, the event was fired.
What i want is to mark the RasterImageViewer.Image as "modified" if user has drawn sth (including annotation object or adjusting the contract/brightness) on the image
   Report 
  09-11-2008, 6:15
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
I have tried the RasterImage.Changed event. It work for image manipulation action only but not work for annotation object.
   Report 
  09-11-2008, 8:49
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
Use this event:
 AnnAutomation Class : AfterObjectChanged Event

Examine this property:
 AnnAfterObjectChangedEventArgs Class : ChangeType
It will tell you what type of change was made to annotations.


Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-12-2008, 1:02
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote

I got the following errors after the event was fired

  StackTrace "   at Leadtools.Annotations.AnnDrawDesigner.EndWorking()\r\n   at Leadtools.Annotations.AnnRectangleDrawDesigner.MouseUp(MouseEventArgs e)\r\n   at Leadtools.Annotations.AnnAutomation.Viewer_MouseUp(Object sender, MouseEventArgs e)\r\n   at System.Windows.Forms.Control.OnMouseUp(MouseEventArgs e)\r\n   at Leadtools.WinForms.RasterImageViewer.OnMouseUp(MouseEventArgs e)\r\n   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n   at System.Windows.Forms.Control.WndProc(Message& m)\r\n   at Leadtools.WinForms.RasterImageViewer.WndProc(Message& m)\r\n   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n   at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n   at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n   at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)\r\n   at System.Windows.Forms.Form.ShowDialog()\r\n   at hk.org.ha.view.cid.realtimecap.MainForm.rasterThumbnailBrowser_DoubleClick(Object sender, EventArgs e) in C:\\xxxxx\\MainForm.cs:line 2184" string


   Report 
  09-12-2008, 13:16
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
Is there any event that can be triggered when user perform some actions( include image manipulation and image annotation) on the RasterImageViewer.Image?
   Report 
  09-13-2008, 1:50
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
Let me further clarify the requirement. I need to detect the change on the image of the RasterImageViewer. The change includes by automation manager or by directly adjust some properties of the image such as changing the brightness, contract and hue of the image by user.

One user has drawn sth, i have to warn it before the user left the application
   Report 
  09-14-2008, 8:55
Maen Hasan is not online. Last active: 1/8/2009 5:45:48 PM Maen Hasan



Top 10 Posts
Joined on 08-05-2004
Posts 1,880
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
For image manipulation, use the RasterImage.Changed Event.
For annotation, use the AfterObjectChanged Event.

How exactly did you use the AfterObjectChanged Event?

Thanks,
Maen Badwan
LEADTOOLS Technical Support
   Report 
  09-15-2008, 23:30
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
I use the AfterObjectChanged Event as follow:

public class PictorialIndex
{
AnnAnnotation ann = new AnnAnnotation

PictorialIndex()
{
ann.AfterObjectChanged +=......
}

public void Pictorial_AfterObjectChanged(){

}
}

In another class, I create the PictorialIndex
   Report 
  09-16-2008, 6:25
Qasem Lubani is not online. Last active: 12/21/2008 9:12:09 PM Qasem Lubani



Top 10 Posts
Joined on 08-13-2006
Posts 1,187
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote

I would like to test the issue here and see the error message for my self. Can you please create a new small project(Not your full application) that has the minimal code possible to show the error message and send it to me in a ZIP or RAR file?
Qasem Al-Lubani
LEAD Technical Support
www.leadtools.com
   Report 
  09-16-2008, 12:38
roadman is not online. Last active: 12/12/2008 4:56:50 AM roadman

Top 25 Posts
Joined on 06-27-2007
Posts 104
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
Attached the sample

[EDIT:  I had to delete the attachment.  It contained DLLs.  You should strip out the DLLs using Build > Clean Solution in Visual Studio.  Also make sure that you don't have any unlock codes in your source code since these forums are public.]

   Report 
  09-16-2008, 12:49
jigar is not online. Last active: 12/12/2008 5:08:42 PM jigar



Top 10 Posts
Joined on 08-22-2007
Posts 480
Re: Detection on drawing annotation in the RasterImageViewer
Reply Quote
I had to delete the attachment because it contained DLLs.  Read your post above, I added a note.  Don't forget to remove the unlock codes also.  Thanks.

LEADTOOLS Technical Support
   Report 
Post
 Page 1 of 2 (29 items) 1 2 »
LEAD Support Fo... » Developer » Annotations » Detection on drawing annotation in the RasterImageViewer

Powered by Community Server, by Telligent Systems