public object Clone()
        {
            PmsImageBoxWrapper pib = new PmsImageBoxWrapper();

            pib.Border     = this.Border;
            pib.BorderName = this.BorderName;
            if (null != this.Image)
            {
                pib.Image = this.Image.Clone() as Image;
            }
            if (null != ErrorImage)
            {
                pib.ErrorImage = this.ErrorImage.Clone() as Image;
            }
            pib.ExternDatas = new List <PMS.Libraries.ToolControls.Report.Elements.Util.ExternData>();
            pib.Mode        = this.Mode;
            foreach (ExternData ed in ExternDatas)
            {
                object value = ed.Value;
                if (null != value && value is ICloneable)
                {
                    value = ((ICloneable)value).Clone();
                }
                pib.ExternDatas.Add(new ExternData(ed.Key, value));
            }
            if (null != this.Border)
            {
                pib.Border = this.Border.Clone() as ElementBorder;
                pib.Border.OwnerElement = pib;
            }
            if (null != SourceField)
            {
                pib.SourceField = SourceField.Clone() as SourceField;
            }
            pib.DbField         = DbField;
            pib.Width           = this.Width;
            pib.Height          = this.Height;
            pib.HasLeftBorder   = this.HasLeftBorder;
            pib.HasTopBorder    = this.HasTopBorder;
            pib.HasRightBorder  = this.HasRightBorder;
            pib.HasBottomBorder = this.HasBottomBorder;
            pib.HasBorder       = this.HasBorder;
            pib.Location        = this.Location;
            pib.BackColor       = this.BackColor;
            pib.Visible         = Visible;
            pib.MESType         = MESType;
            pib.Name            = Name;
            if (null != ((IElement)this).ExtendObject)
            {
                ((IElement)pib).ExtendObject = ((IElement)this).ExtendObject.Clone() as ExtendObject;
            }

            return(pib);
        }
Beispiel #2
0
        /// <summary>
        /// 克隆
        /// </summary>
        /// <returns>对象</returns>
        public object Clone()
        {
            BarCodeWrapper bcw = new BarCodeWrapper();

            bcw.Name      = Name;
            bcw.AutoSize  = AutoSize;
            bcw.BackColor = BackColor;
            if (null != BackgroundImage)
            {
                bcw.BackgroundImage = BackgroundImage.Clone() as Image;
            }
            bcw.BackgroundImageLayout = BackgroundImageLayout;
            if (null != Border)
            {
                bcw.Border = Border.Clone() as ElementBorder;
                bcw.Border.OwnerElement = bcw;
            }
            bcw.BorderName = BorderName;
            if (null != ExternDatas)
            {
                bcw.ExternDatas = new List <ExternData>();
                foreach (ExternData ed in ExternDatas)
                {
                    object value = ed.Value;
                    if (null != value && value is ICloneable)
                    {
                        value = ((ICloneable)value).Clone();
                    }
                    bcw.ExternDatas.Add(new ExternData(ed.Key, value));
                }
            }
            if (null != Font)
            {
                bcw.Font = Font.Clone() as Font;
            }
            bcw.HasBorder       = HasBorder;
            bcw.HasBottomBorder = HasBottomBorder;
            bcw.HasLeftBorder   = HasLeftBorder;
            bcw.HasRightBorder  = HasRightBorder;
            bcw.HasTopBorder    = HasTopBorder;
            bcw.Height          = Height;
            bcw.HorizontalScale = HorizontalScale;
            bcw.Location        = Location;
            bcw.MESType         = MESType;
            bcw.MoveX           = MoveX;
            bcw.MoveY           = MoveY;
            bcw.Parent          = Parent;
            bcw.Text            = Text;
            bcw.VerticalScale   = VerticalScale;
            bcw.Width           = Width;
            if (null != SourceField)
            {
                bcw.SourceField = SourceField.Clone();
            }
            bcw.EnableMapping = EnableMapping;
            bcw.MappingTable  = MappingTable;
            bcw.Expression    = Expression;
            bcw.RealText      = RealText;
            bcw.IncludeLabel  = IncludeLabel;
            bcw.BarCodeAlign  = BarCodeAlign;
            bcw.BarCodeType   = BarCodeType;
            bcw.Visible       = Visible;
            bcw.MESType       = MESType;
            if (null != ((IElement)this).ExtendObject)
            {
                ((IElement)bcw).ExtendObject = ((IElement)this).ExtendObject.Clone() as ExtendObject;
            }
            return(bcw);
        }
Beispiel #3
0
        public IControlTranslator ToElement(bool transferChild)
        {
            PmsImageBoxWrapper pib = new PmsImageBoxWrapper();

            pib.Border     = this.Border;
            pib.BorderName = this.BorderName;
            if (null != this.Image)
            {
                pib.Image = this.Image.Clone() as Image;
            }
            if (null != ErrorImage)
            {
                pib.ErrorImage = this.ErrorImage.Clone() as Image;
            }
            pib.ExternDatas = new List <PMS.Libraries.ToolControls.Report.Elements.Util.ExternData>();
            pib.Mode        = this.Mode;
            foreach (ExternData data in ExternDatas)
            {
                object value = data.Value;
                if (null != value && value is ICloneable)
                {
                    value = ((ICloneable)value).Clone();
                }
                pib.ExternDatas.Add(new ExternData(data.Key, value));
            }
            if (null != this.Border)
            {
                pib.Border = this.Border.Clone() as ElementBorder;
                pib.Border.OwnerElement = pib;
            }
            if (null != SourceField)
            {
                pib.SourceField = SourceField.Clone() as SourceField;
            }
            if (_orginalFontSize > 0)
            {
                pib.Font = new Font(Font.FontFamily, _orginalFontSize);
            }
            else
            {
                pib.Font = new Font(this.Font.FontFamily, this.Font.Size);
            }
            pib.VerticalScale   = 1f;
            pib.HorizontalScale = 1f;
            pib.DbField         = DbField;
            pib.Visible         = Visible;
            pib.MESType         = MESType;
            pib.Name            = Name;
            if (_orginalHeight > 0)
            {
                pib.Height = this._orginalHeight;
            }
            else
            {
                pib.Height = this.Height;
            }
            if (_orginalWidth > 0)
            {
                pib.Width = _orginalWidth;
            }
            else
            {
                pib.Width = this.Width;
            }
            //pib.VerticalScale = this.VerticalScale;
            //pib.HorizontalScale = this.HorizontalScale;
            if (_orginalLocation != Point.Empty)
            {
                pib.Location = this._orginalLocation;
            }
            else
            {
                pib.Location = this.Location;
            }
            pib.HasLeftBorder   = this.HasLeftBorder;
            pib.HasTopBorder    = this.HasTopBorder;
            pib.HasRightBorder  = this.HasRightBorder;
            pib.HasBottomBorder = this.HasBottomBorder;
            pib.HasBorder       = this.HasBorder;
            pib.BackColor       = this.BackColor;
            if (null != ((IElement)this).ExtendObject)
            {
                ((IElement)pib).ExtendObject = ((IElement)this).ExtendObject.Clone() as ExtendObject;
            }

            return(pib);
        }
Beispiel #4
0
        public override object Clone()
        {
            PmsImageBox pib = new PmsImageBox();

            if (null != this.Border)
            {
                pib.Border = this.Border.Clone() as ElementBorder;
                pib.Border.OwnerElement = this;
            }
            pib.BorderName = this.BorderName;
            if (null != this.Image)
            {
                pib.Image = this.Image.Clone() as Image;
            }
            if (null != ErrorImage)
            {
                pib.ErrorImage = this.ErrorImage.Clone() as Image;
            }
            pib.ExternDatas = new List <PMS.Libraries.ToolControls.Report.Elements.Util.ExternData>();
            pib.Mode        = this.Mode;
            foreach (ExternData data in ExternDatas)
            {
                object value = data.Value;
                if (null != value && value is ICloneable)
                {
                    value = ((ICloneable)value).Clone();
                }
                pib.ExternDatas.Add(new ExternData(data.Key, value));
            }
            if (null != this.Border)
            {
                pib.Border = this.Border.Clone() as ElementBorder;
                pib.Border.OwnerElement = pib;
            }
            if (null != SourceField)
            {
                pib.SourceField = SourceField.Clone() as SourceField;
            }
            pib.DbField = this.DbField;
            if (null != Expression)
            {
                pib.Expression = Expression.Clone() as string;
            }
            pib.RealText        = this.RealText;
            pib.Width           = this.Width;
            pib.Height          = this.Height;
            pib.HasLeftBorder   = this.HasLeftBorder;
            pib.HasTopBorder    = this.HasTopBorder;
            pib.HasRightBorder  = this.HasRightBorder;
            pib.HasBottomBorder = this.HasBottomBorder;
            pib.HasBorder       = this.HasBorder;
            pib.Location        = this.Location;
            pib.BackColor       = this.BackColor;
            pib.Visible         = Visible;
            pib.MESType         = MESType;
            pib.Name            = Name;
            if (null != Tag)
            {
                if (Tag is ICloneable)
                {
                    pib.Tag = ((ICloneable)Tag).Clone();
                }
                else
                {
                    pib.Tag = Tag;
                }
            }

            if (null != ((IElement)this).ExtendObject)
            {
                ((IElement)pib).ExtendObject = ((IElement)this).ExtendObject.Clone() as ExtendObject;
            }

            return(pib);
        }
Beispiel #5
0
        public IControlTranslator ToElement(bool transferChild)
        {
            QRCodeWrapper bcw = new QRCodeWrapper();

            bcw.Name      = Name;
            bcw.AutoSize  = AutoSize;
            bcw.BackColor = BackColor;
            if (null != BackgroundImage)
            {
                bcw.BackgroundImage = BackgroundImage.Clone() as Image;
            }
            bcw.BackgroundImageLayout = BackgroundImageLayout;
            if (null != Border)
            {
                bcw.Border = Border.Clone() as ElementBorder;
                bcw.Border.OwnerElement = bcw;
            }
            bcw.BorderName = BorderName;
            if (null != ExternDatas)
            {
                bcw.ExternDatas = new List <ExternData>();
                foreach (ExternData ed in ExternDatas)
                {
                    object value = ed.Value;
                    if (null != value && value is ICloneable)
                    {
                        value = ((ICloneable)value).Clone();
                    }
                    bcw.ExternDatas.Add(new ExternData(ed.Key, value));
                }
            }
            bcw.Font            = Font.Clone() as Font;
            bcw.HasBorder       = HasBorder;
            bcw.HasBottomBorder = HasBottomBorder;
            bcw.HasLeftBorder   = HasLeftBorder;
            bcw.HasRightBorder  = HasRightBorder;
            bcw.HasTopBorder    = HasTopBorder;
            // bcw.Height = Height;
            bcw.HorizontalScale = 1f;
            //bcw.Location = Location;
            bcw.MESType = MESType;
            bcw.MoveX   = MoveX;
            bcw.MoveY   = MoveY;
            //bcw.Parent = Parent;
            bcw.Text          = Text;
            bcw.VerticalScale = 1f;
            bcw.Visible       = Visible;
            bcw.MESType       = MESType;
            //bcw.Width = Width;
            if (null != SourceField)
            {
                bcw.SourceField = SourceField.Clone();
            }

            if (_orginalHeight > 0)
            {
                bcw.Height = this._orginalHeight;
            }
            else
            {
                bcw.Height = this.Height;
            }
            if (_orginalWidth > 0)
            {
                bcw.Width = _orginalWidth;
            }
            else
            {
                bcw.Width = this.Width;
            }
            //label.VerticalScale = this.VerticalScale;
            //label.HorizontalScale = this.HorizontalScale;
            if (_orginalLocation != Point.Empty)
            {
                bcw.Location = this._orginalLocation;
            }
            else
            {
                bcw.Location = this.Location;
            }

            bcw.EnableMapping   = EnableMapping;
            bcw.MappingTable    = MappingTable;
            bcw.Expression      = Expression;
            bcw.RealText        = RealText;
            bcw.IncludeLabel    = IncludeLabel;
            bcw.CorrectionLevel = CorrectionLevel;
            bcw.EncodedMode     = EncodedMode;

            if (null != ((IElement)this).ExtendObject)
            {
                bcw.ExtendObject = ((IElement)this).ExtendObject.Clone() as ExtendObject;
            }

            return(bcw);
        }