Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
Noufal123  
#1 Posted : Wednesday, March 23, 2011 6:23:00 AM(UTC)
Noufal123

Rank: Advanced Member

Groups: Member
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
Hello.. I have selected the rectangle & Ellips in multilayerviewer ,when i added to the multilayerviewer, its making unhandeled exception.. I attached a sample ,you please check it and give me appropriate way to select object at the adding time to layer...pls help me soon..

Edited by user Wednesday, March 23, 2011 6:27:10 AM(UTC)  | Reason: Not specified

File Attachment(s):
MultiLayerImageEditorCS_NET20.rar (198kb) downloaded 7 time(s).
Dmitry.Obukhov  
#2 Posted : Friday, March 25, 2011 1:43:47 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Administration
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

I tried attached sample and got the error. However, I could not figure out what causes it. Could you please clarify whether you made some changes with this sample?
Best regards,
Dmitry Obukhov
Technical Support. Aurigma, Inc.
Noufal123  
#3 Posted : Monday, March 28, 2011 2:41:18 AM(UTC)
Noufal123

Rank: Advanced Member

Groups: Member
Joined: 3/29/2010(UTC)
Posts: 81

Thanks: 10 times
sorry.. I have Changed in the function "UpdateObjectsListBox()" line no:2735 to 2738, which is i have selected the objects by selecting Objectlist box first item.. I have also tried to select objects from multilayer mouse_up events,

ie, if(_objectsListBox.Items.Count>0)
_objectsListBox.SelectedIndex = 0; its also not correct...

actually, i want to select the objects(by code) when its add to multlayerviewer. is it have any function to select vobjects?

Edited by user Monday, March 28, 2011 3:00:17 AM(UTC)  | Reason: Not specified

Alex Kon  
#4 Posted : Wednesday, March 30, 2011 10:08:10 PM(UTC)
Alex Kon

Rank: Advanced Member

Groups: Administration
Joined: 1/31/2005(UTC)
Posts: 458

Was thanked: 5 time(s) in 5 post(s)
Hello,

Here is code sample which, I hope, will be helpful:

I suggest to add new code to the method Form1._multiLayerViewer_LayerChanged(...), as it processes "ObjectAdded" event which we need. Here is this part:

Code:
if (e.ChangeType == Aurigma.GraphicsMill.WinControls.LayerChangeType.ObjectAdded)
{
	UpdateObjectsListBox();
	ClearAddObjectToggle();
	UpdateVObjectContextMenu((Aurigma.GraphicsMill.WinControls.VObject) e.VObject);

    // New code to perform selection of
    // the added object.
    BeginInvoke((MethodInvoker)delegate
    {
        _multiLayerViewer.CurrentDesigner = e.VObject.Designer;
    });
}

Note, that I have to use BeginInvoke() to let CreationDesigner to finish its part of object's initialization. And I have to confirm that it is not the most obvious behavior.

Edited by user Wednesday, March 30, 2011 10:09:58 PM(UTC)  | Reason: Not specified

thanks 1 user thanked Alex Kon for this useful post.
Noufal123 on 3/31/2011(UTC)
Users browsing this topic
Forum Jump  
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.