Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic NodeCreating and NodeCreated events issue.. (Read 1453 times)
Czhao_pfs
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Apr 5th, 2012
NodeCreating and NodeCreated events issue..
Apr 5th, 2012 at 6:32am
Print Post  
Hi,

I am working for StateSteet and I want FlowChart.Net to help build the new product of our company.

Currently I am evaluating the controls with the trial version, one (which is most likely the last) issue I have is the NodeCreating and NodeCreated events don't work as I expected.
When I create a shape node via code like:
WorkflowDiagram.Factory.CreateShapeNode(....

The events are not invoked.
Am I missing some settings?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NodeCreating and NodeCreated events issue..
Reply #1 - Apr 5th, 2012 at 7:06am
Print Post  
Most events are raised only after users actions. If you need to run the same code for both users and program actions, you will have to move it to a common method called in both situations:

void HandleNodeCreated(node) {...}

void OnNodeCreate(sender, e) { HandleNodeCreated(e.Node); }

var node = diagram.Factory.CreateShapeNode(...);
HandleNodeCreated(node);

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint