Exemple #1
0
        private void DrawStubs(Graphics g, Pen linkPen)
        {
            /* Place the stub on the correct side of the attribute depending
             * on where it is in relation to its partner attribute */
            if (Source.Rect.Left == Destination.Rect.Left)
            {
                SourceStub.LinkLoc = LinkLocation.Left;
                DestStub.LinkLoc   = LinkLocation.Left;
            }
            else if (Source.Rect.Left < Destination.Rect.Right / 2)
            {
                SourceStub.LinkLoc = LinkLocation.Right;
                DestStub.LinkLoc   = LinkLocation.Left;
            }
            else if (Source.Rect.Left > Destination.Rect.Right / 2)
            {
                SourceStub.LinkLoc = LinkLocation.Left;
                DestStub.LinkLoc   = LinkLocation.Right;
            }

            SourceStub.Pen = new Pen(linkPen.Color, linkPen.Width);
            DestStub.Pen   = new Pen(linkPen.Color, linkPen.Width);
            SourceStub.Draw(g);
            DestStub.Draw(g);
        }
 public void SetUp(string str)
 {
     this.source      = new SourceStub(str);
     this.destination = new Mock <IDestination>();
     this.copier      = new Copier(this.source, this.destination.Object);
 }
Exemple #3
0
 // needs to override to clearselection both stubs
 public override void ClearSelection()
 {
     base.ClearSelection();
     SourceStub.Select();
     DestStub.Select();
 }
Exemple #4
0
 // needs to override to select both stubs
 public override void Select()
 {
     base.Select();
     SourceStub.Select();
     DestStub.Select();
 }