Inheritance: System.EventArgs
Exemplo n.º 1
0
        void obj_Link(object sender, LinkEventArgs e)
        {
            NoiseObject obj = sender as NoiseObject;

              // set line begin - line end is mouse
              if (mCurrentLine == null)
              {
            if (e.type != LinkType.Out && e.id.Connection != null) obj_Erase(sender, e);
            mCurrentLine = new LinkLine(xBoard, e.type, e.id);
              }
              // set line end
              else
              {
            if (mCurrentLine.Source != null && sender == mCurrentLine.Source) { mCurrentLine.Erase(); mCurrentLine = null; }
            else if (mCurrentLine.Target != null && sender == mCurrentLine.Target) { mCurrentLine.Erase(); mCurrentLine = null; }
            else if (mCurrentLine.TargetLink == null && e.type == LinkType.Out) { mCurrentLine.Erase(); mCurrentLine = null; }
            else if (mCurrentLine.SourceLink == null && e.type != LinkType.Out) { mCurrentLine.Erase(); mCurrentLine = null; }
            else if (obj.Module == null) { mCurrentLine.Erase(); mCurrentLine = null; }
            else
            {
              if (e.id.Connection != null) obj_Erase(sender, e);
              mCurrentLine.EndLink(e.type, e.id);
              mLines.Add(mCurrentLine);
              mCurrentLine = null;
            }
              }
        }
Exemplo n.º 2
0
 void obj_Erase(object sender, LinkEventArgs e)
 {
     obj_Erase(e.id);
 }
Exemplo n.º 3
0
 void xLinks_Link(object sender, LinkEventArgs e)
 {
     OnLink(e);
 }
Exemplo n.º 4
0
 void xLinks_Erase(object sender, LinkEventArgs e)
 {
     OnErase(e);
 }
Exemplo n.º 5
0
 public virtual void OnLink(LinkEventArgs l)
 {
     if (Link != null) Link(this, l);
 }
Exemplo n.º 6
0
 public virtual void OnErase(LinkEventArgs l)
 {
     if (Erase != null) Erase(this, l);
 }