Пример #1
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            Text text = (Text)obj;

            text.rect = rect;
        }
Пример #2
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            var trans = (SimpleTransition)obj;

            trans.Condition = Condition;
            trans.output    = output;
        }
Пример #3
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            var nested = (Nested)obj;

            nested.enterOutput = enterOutput;
            nested.exitOutput  = exitOutput;
        }
Пример #4
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            Equation eq = (Equation)obj;

            eq.rect      = rect;
            eq.result    = result;
            eq.operation = operation;
        }
Пример #5
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            Relation indir = obj as Relation;

            indir.Location = Location;
            indir.Trigger  = Trigger;
            indir.Output   = Output;
            indir.Action   = Action;
        }
Пример #6
0
        public virtual bool DeserializeRelations(Dictionary <int, DrawableObject> dictionary, byte[] data, ref int index)
        {
            DrawableObject stateRef;

            if (DeserializeRelation(dictionary, data, ref index, out stateRef))
            {
                pointing = stateRef;
            }
            return(true);
        }
Пример #7
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            State state = obj as State;

            state.rect          = rect;
            state.inTransitions = new List <Transition>(inTransitions);
            state.enterOutput   = enterOutput;
            state.exitOutput    = exitOutput;
            state.Track         = Track;
        }
Пример #8
0
 public Transition(DrawableCollection ownerDraw, Point[] splinePoints, DrawableObject startObject)
     : base(ownerDraw)
 {
     guides.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
     points           = (Point[])splinePoints.Clone();
     textPointOffset  = Point.Empty;
     StartObject      = startObject;
     maxDist          = new double[2];
     maxDist[0]       = points[0] == points[1] ? 50d : Math.Sqrt(Math.Pow(points[0].X - points[1].X, 2) + Math.Pow(points[0].Y - points[1].Y, 2));
     maxDist[1]       = points[2] == points[3] ? 50d : Math.Sqrt(Math.Pow(points[2].X - points[3].X, 2) + Math.Pow(points[2].Y - points[3].Y, 2));
 }
Пример #9
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            var link = (Link)obj;

            link.location        = location;
            link.textPointOffset = textPointOffset;
            if (inTransitions != null)
            {
                link.inTransitions = new List <Transition>(inTransitions);
            }
        }
Пример #10
0
        public override void CopyTo(DrawableObject obj)
        {
            base.CopyTo(obj);
            Transition trans = (Transition)obj;

            trans.points          = (Point[])points.Clone();
            trans.maxDist         = (double[])maxDist;
            trans.startObject     = startObject;
            trans.endObject       = endObject;
            trans.EndAngle        = EndAngle;
            trans.StartAngle      = StartAngle;
            trans.textPointOffset = textPointOffset;
            trans.ForceStraight   = ForceStraight;
        }
Пример #11
0
 protected static void ChangeStartObject(Transition trans, DrawableObject value)
 {
     if (trans.StartObject != null && trans.StartObject != value)
     {
         trans.StartObject.outTransitions.Remove(trans);
     }
     if (value != null)
     {
         if (!(value is Origin) && value.outTransitions.Count > 0 && value.outTransitions.Last() is SimpleTransition strans && strans.DefaultTransition)
         {
             value.outTransitions.Insert(value.outTransitions.Count - 1, trans);
         }
         else
         {
             value.outTransitions.Add(trans);
         }
         if (value is Alias alias && alias.Pointing != null)
         {
             alias.AliasOutTransitions.Add(trans);
         }
Пример #12
0
 public override void CopyTo(DrawableObject obj)
 {
     base.CopyTo(obj);
     var state = (StateAlias)obj;
 }
Пример #13
0
 public SuperTransition(DrawableCollection ownerDraw, Point[] splinePoints, DrawableObject startObject)
     : base(ownerDraw, splinePoints, startObject)
 {
 }
Пример #14
0
        public static Transition Create(ObjectType objectType, DrawableCollection ownerDraw, Point[] splinePoints, DrawableObject startObject)
        {
            switch (objectType)
            {
            case ObjectType.SimpleTransition:
                return(new SimpleTransition(ownerDraw, splinePoints, startObject));

            case ObjectType.SuperTransition:
                return(new SuperTransition(ownerDraw, splinePoints, startObject));

            default:
                throw new Exception("Invalid Transition type.");
            }
        }
Пример #15
0
 public override void CopyTo(DrawableObject obj)
 {
     base.CopyTo(obj);
     SuperState state = (SuperState)obj;
 }