/// <summary> /// Return the last node from Node chain /// </summary> /// <param name="root"></param> /// <returns></returns> public static OrgNode GetLastNodeOfNodeChain(OrgPanel root) { OrgNode theLastNode = root.Nodes.Last(); while (theLastNode != null) { if (theLastNode.Nodes.Count > 0) { theLastNode = theLastNode.Nodes.Last(); } else { break; } } return(theLastNode); }
/// <summary> /// Returns Wf activity by name from wfOrgPanel /// </summary> /// <param name="wfOrgPanel"></param> /// <param name="activityName"></param> /// <returns></returns> public static Control GetWfActivityControlByName(OrgPanel wfOrgPanel, string activityName) { Control[] matchControls = wfOrgPanel.Controls.Find(activityName, true); return((matchControls.Count() > 0) ? matchControls.First() : null); }