/// <summary>
        /// Default constructor
        /// </summary>
        protected DiagramControlBase()
        {
            //create the provider for all shapy diagram elements
            ShapeProvider shapeProvider = new ShapeProvider();
            TypeDescriptor.AddProvider(shapeProvider, typeof(SimpleShapeBase));
            TypeDescriptor.AddProvider(shapeProvider, typeof(ComplexShapeBase));
            //the provider for connections
            ConnectionProvider connectionProvider = new ConnectionProvider();
            TypeDescriptor.AddProvider(connectionProvider, typeof(ConnectionBase));

            //scrolling stuff
            this.AutoScroll = true;
            this.HScroll = true;
            this.VScroll = true;
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConnectionDescriptor"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="type">The type.</param>
 public ConnectionDescriptor(ConnectionProvider provider, Type type)
   : base(provider, type) {
   this.AddProperty("Demo", typeof(int));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConnectionBaseDescriptor"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="objectType">Type of the object.</param>
 public ConnectionBaseDescriptor(ConnectionProvider provider, Type objectType)
     : base(provider, objectType)
 {
     AddBaseProperties();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConnectionBaseDescriptor"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="objectType">Type of the object.</param>
 public ConnectionBaseDescriptor(ConnectionProvider provider, Type objectType)
     : base(provider, objectType)
 {
     AddBaseProperties();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ConnectionDescriptor"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="type">The type.</param>
 public ConnectionDescriptor(ConnectionProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("Demo", typeof(int));
 }
    /// <summary>
    /// Default constructor
    /// </summary>
    protected DiagramControlBase() {
      // Update the display setting.
      Graphics g = CreateGraphics();
      Display.DpiX = g.DpiX;
      Display.DpiY = g.DpiY;

      //create the provider for all shapy diagram elements
      ShapeProvider shapeProvider = new ShapeProvider();
      TypeDescriptor.AddProvider(
          shapeProvider,
          typeof(SimpleShapeBase));

      TypeDescriptor.AddProvider(
          shapeProvider,
          typeof(ComplexShapeBase));

      //the provider for connections
      ConnectionProvider connectionProvider =
          new ConnectionProvider();

      TypeDescriptor.AddProvider(
          connectionProvider,
          typeof(ConnectionBase));

      //scrolling stuff
      this.AutoScroll = true;
      this.HScroll = true;
      this.VScroll = true;

      mPageSettings = new PageSettings();
      mPageSettings.Landscape = true;
      mPageSettings.PaperSize = new PaperSize("Letter", 850, 1100);
    }