Beispiel #1
0
        public Page(double width, double height)
        {
            if (width < 0)
            {
                throw new System.ArgumentOutOfRangeException(nameof(width));
            }

            if (height < 0)
            {
                throw new System.ArgumentOutOfRangeException(nameof(height));
            }

            this.Shapes         = new ShapeList(this);
            this.Connects       = new List <Connect>();
            this.PageProperties = new Sections.PageProperties();
            this.PageProperties.PageWidth.Result  = width;
            this.PageProperties.PageHeight.Result = height;
            this.PrintProperties = new Sections.PrintProperties();
            this.PageLayout      = new Sections.PageLayout();
            this.ID = Page.idgen.GetNextID();
            var culture = System.Globalization.CultureInfo.InvariantCulture;

            this.Name   = string.Format(culture, "Page-{0}", this.ID + 1);
            this.Layers = new LayerList();
        }
        public Page(double width, double height)
        {
            if (width < 0)
            {
                throw new System.ArgumentOutOfRangeException("width");
            }

            if (height < 0)
            {
                throw new System.ArgumentOutOfRangeException("height");
            }

            this.Shapes = new ShapeList(this);
            this.Connects = new List<Connect>();
            this.PageProperties = new Sections.PageProperties();
            this.PageProperties.PageWidth.Result = width;
            this.PageProperties.PageHeight.Result = height;
            this.PrintProperties = new Sections.PrintProperties();
            this.PageLayout = new Sections.PageLayout();
            this._id = Page.idgen.GetNextID();
            var culture = System.Globalization.CultureInfo.InvariantCulture;
            this.Name = string.Format(culture, "Page-{0}", this._id + 1);
            this.Layers = new LayerList();
        }