Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConnectionBase"/> class.
 /// </summary>
 /// <param name="from">From.</param>
 /// <param name="to">To.</param>
 protected ConnectionBase(Point from, Point to) : base()
 {
     this.mFrom        = new Connector(from);
     this.mFrom.Parent = this;
     this.mTo          = new Connector(to);
     this.mTo.Parent   = this;
     PenStyle          = ArtPallet.GetDefaultPenStyle();
 }
Beispiel #2
0
        /// <summary>
        /// Inits this instance.
        /// </summary>
        private void Init()
        {
            mConnectors              = new CollectionBase <IConnector>();
            mConnectors.OnItemAdded += new EventHandler <CollectionEventArgs <IConnector> >(mConnectors_OnItemAdded);
            mRectangle = new Rectangle(0, 0, 100, 70);

            PaintStyle = ArtPallet.GetDefaultPaintStyle();
            PenStyle   = ArtPallet.GetDefaultPenStyle();
        }
Beispiel #3
0
 /// <summary>
 /// Constructs a connection between the two given points
 /// </summary>
 /// <param name="mFrom">the starting point of the connection</param>
 /// <param name="mTo">the end-point of the connection</param>
 /// <param name="model">The model.</param>
 public Connection(Point mFrom, Point mTo, IModel model) : base(model)
 {
     this.From        = new Connector(mFrom, model);
     this.From.Name   = "From";
     this.From.Parent = this;
     this.To          = new Connector(mTo, model);
     this.To.Name     = "To";
     this.To.Parent   = this;
     PenStyle         = ArtPallet.GetDefaultPenStyle();
 }
Beispiel #4
0
 /// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="site"></param>
 protected ConnectionBase(IModel site) : base(site)
 {
     PenStyle = ArtPallet.GetDefaultPenStyle();
 }