/// <summary>
 /// Initializes a new instance of the <see cref="T:DescriptorBase"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="parentdescriptor">The parentdescriptor.</param>
 /// <param name="objectType">Type of the object.</param>
 public DescriptorBase(ShapeProvider provider, ICustomTypeDescriptor parentdescriptor, Type objectType)
     : base(parentdescriptor)
 {
     this.provider = provider;
     this.type = objectType;
     mProperties = new PropertyDescriptorCollection(null);
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:DescriptorBase"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="parentdescriptor">The parentdescriptor.</param>
 /// <param name="objectType">Type of the object.</param>
 public DescriptorBase(ShapeProvider provider, ICustomTypeDescriptor parentdescriptor, Type objectType)
     : base(parentdescriptor)
 {
     this.provider = provider;
     this.type     = objectType;
     mProperties   = new PropertyDescriptorCollection(null);
 }
    /// <summary>
    /// Initializes a new instance of the <see cref="T:ClassShapeDescriptor"/> class.
    /// </summary>
    /// <param name="provider">The provider.</param>
    /// <param name="type">The type.</param>
    public ClassShapeDescriptor(ShapeProvider provider, Type type)
      : base(provider, type) {
      this.AddProperty("Title", typeof(string), constContent, "The title appearing at the top of the shape.");
      this.AddProperty("SubTitle", typeof(string), constContent, "The sub-title appearing underneath the title.");
      this.AddProperty("FreeText", typeof(string), constContent, "The text of the body when the shape is set to free-text mode.");
      this.AddProperty("BodyType", typeof(BodyType), constContent, "The body type.");
      this.AddProperty("Folders", typeof(CollectionBase<FolderMaterial>), constContent, "The folders when the shape is set to list mode.");

    }
 /// <summary>
 /// Initializes a new instance of the <see cref="T:ClassShapeDescriptor"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="type">The type.</param>
 public ClassShapeDescriptor(ShapeProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("Title", typeof(string), constContent, "The title appearing at the top of the shape.");
     this.AddProperty("SubTitle", typeof(string), constContent, "The sub-title appearing underneath the title.");
     this.AddProperty("FreeText", typeof(string), constContent, "The text of the body when the shape is set to free-text mode.");
     this.AddProperty("BodyType", typeof(BodyType), constContent, "The body type.");
     this.AddProperty("Folders", typeof(CollectionBase <FolderMaterial>), constContent, "The folders when the shape is set to list mode.");
 }
        /// <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>
        /// 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>
        /// 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);
        }
Beispiel #8
0
 public SimpleShapeBaseDescriptor(ShapeProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("Demo", typeof(int));
 }
Beispiel #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShapeBaseDescriptor"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="objectType">Type of the object.</param>
 public ShapeBaseDescriptor(ShapeProvider provider, Type objectType)
     : base(provider, objectType)
 {
     AddBaseProperties();
 }
 public ComplexShapeBaseDescriptor(ShapeProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("Materials", typeof(CollectionBase<IShapeMaterial>),constLayout,"The collection of shape materials.");
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ShapeBaseDescriptor"/> class.
 /// </summary>
 /// <param name="provider">The provider.</param>
 /// <param name="objectType">Type of the object.</param>
 public ShapeBaseDescriptor(ShapeProvider provider, Type objectType)
   : base(provider, objectType) {
   AddBaseProperties();
 }
 public SimpleShapeBaseDescriptor(ShapeProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("Demo", typeof(int));
 }
Beispiel #13
0
 public ComplexShapeBaseDescriptor(ShapeProvider provider, Type type)
     : base(provider, type)
 {
     this.AddProperty("Materials", typeof(CollectionBase <IShapeMaterial>), constLayout, "The collection of shape materials.");
 }
    /// <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);
    }