コード例 #1
0
        /// <inheritdoc/>
        public override void GetData()
        {
            base.GetData();
            if (!String.IsNullOrEmpty(DataColumn))
            {
                // reset the image
                Image      = null;
                FImageData = null;

                object data = Report.GetColumnValueNullable(DataColumn);
                if (data is byte[])
                {
                    FImageData = (byte[])data;
                    // if autosize is on, load the image.
                    if (SizeMode == PictureBoxSizeMode.AutoSize)
                    {
                        ForceLoadImage();
                    }
                }
                else if (data is Image)
                {
                    Image = data as Image;
                }
            }
        }
コード例 #2
0
ファイル: PictureObject.cs プロジェクト: Berbatistic/Forky-1
        /// <inheritdoc/>
        public override void GetData()
        {
            base.GetData();
            if (!String.IsNullOrEmpty(DataColumn))
            {
                // reset the image
                Image     = null;
                imageData = null;

                object data = Report.GetColumnValueNullable(DataColumn);
                if (data is byte[])
                {
                    SetImageData((byte[])data);
                }
                else if (data is Image)
                {
                    Image = data as Image;
                }
                else if (data is string)
                {
                    ImageLocation = data.ToString();
                }
            }
        }