Example #1
0
        public AnimatedLink InsertLink(GoNode from, GoNode to, string relation, int userFlag = 0, Object userObj = null)
        {
            AnimatedLink link = new AnimatedLink();

            link.UserFlags  = userFlag;
            link.UserObject = userObj;
            link.FromPort   = from.Ports.ToList()[1];
            link.ToPort     = to.Ports.ToList()[0];
            (link.MidLabel as GoText).Text = relation;
            goView.Document.LinksLayer.Add(link);
            return(link);
        }
Example #2
0
 private void timerLinkAnimate_Tick(object sender, EventArgs e)
 {
     goView.Document.SkipsUndoManager = true;
     foreach (GoObject obj in goView.Document)
     {
         AnimatedLink link = obj as AnimatedLink;
         if (link != null)
         {
             link.Step();
         }
     }
     goView.Document.SkipsUndoManager = false;
 }