示例#1
0
        protected void GetTransitionList(ArrayList transitionList, IStateGlyph state)
        {
            // now find transitions
            foreach (IGlyph child in state.Children)
            {
                ITransitionContactPointGlyph transContactPoint = child as ITransitionContactPointGlyph;
                if (transContactPoint != null)
                {
                    ITransitionGlyph trans = transContactPoint.Owner as ITransitionGlyph;

                    if (transContactPoint.WhichEnd == TransitionContactEnd.From)
                    {
                        // this is a from transition

                        ITransitionContactPointGlyph transTo = null;
                        foreach (ITransitionContactPointGlyph contactPoint in trans.ContactPoints)
                        {
                            if (contactPoint.WhichEnd == TransitionContactEnd.To)
                            {
                                transTo = contactPoint;
                                break;
                            }
                        }
                        System.Diagnostics.Debug.Assert(transTo != null, "Transition To Contact Point not found");

                        IStateGlyph toStateGlyph = transTo.Parent as IStateGlyph;
                        string      toStateName  = "TRANSITION_TOSTATE_NOT_SET";
                        if (toStateGlyph != null)
                        {
                            if (IsNotEmptyString(toStateGlyph.Name))
                            {
                                toStateName = StateNameFrom(toStateGlyph);
                            }
                            else
                            {
                                toStateName = "TRANSITION_TOSTATE_SET_BUT_STATE_NOT_NAMED";
                            }
                        }

                        TransitionInfo info = new TransitionInfo(trans, StateNameFrom(state), toStateName, toStateGlyph);
                        transitionList.Add(info);
                    }
                }
            }
        }
示例#2
0
 public void Visit(ITransitionContactPointGlyph transitionContactPoint)
 {
 }
 public void Visit(ITransitionContactPointGlyph transitionContactPoint)
 {
 }