static void Compute_LoopNode(ActionNode actionNode, Rect placeRect, bool isActive, bool haveWarning, bool haveError) { LoopNode loopNode = (LoopNode)actionNode; string typeName = "For"; int tmpCommentIndex = 90; string detailsText = ""; #region task information float fTmp = (float)(loopNode.EndTo - loopNode.StartFrom) / (float)loopNode.IncrementBy; int iTmp = (int)fTmp; if (fTmp - iTmp >= 0) { iTmp++; } if (loopNode.m_infinit) { typeName = "While"; detailsText = " true:"; } else { if (loopNode.IncrementBy > 1) { detailsText = string.Format(" i in range({0}, {1}, {2}):\t# total:{3}", loopNode.StartFrom, loopNode.EndTo, loopNode.IncrementBy, iTmp.ToString()); } else { detailsText = string.Format(" i in range({0}, {1}):\t# total:{2}", loopNode.StartFrom, loopNode.EndTo, iTmp.ToString()); } } #endregion #region show stuff ShowInformations_DefultStyle(actionNode, isActive, haveWarning, haveError, typeName, detailsText, placeRect, tmpCommentIndex, COLOR_SpacialNode); #endregion }