Пример #1
0
        private void Panel_Product_SizeChanged(object sender, EventArgs e)
        {
            m_hcLine = new HorizontalCenterLine()
            {
                Height   = 4,
                Width    = _pb.Width,
                Left     = 0,
                Top      = _pb.Height / 2 - 2,
                PenColor = Color.Green,
            };

            bitmap = new Bitmap(_pb.Width, _pb.Height);
        }
Пример #2
0
        /// <summary>
        ///
        /// </summary>
        private void Init()
        {
            this.AllowDrop = true;
            _pb            = new PictureBox();
            this.Controls.Add(_pb);
            _pb.Dock = DockStyle.Fill;
            // _pb.Paint += new System.Windows.Forms.PaintEventHandler(this.pictureBox1_Paint);

            _pb.SendToBack();
            m_hcLine = new HorizontalCenterLine()
            {
                Height   = 4,
                Width    = _pb.Width,
                Left     = 0,
                Top      = _pb.Height / 2 - 2,
                PenColor = Color.Green,
            };
            bitmap = new Bitmap(_pb.Width, _pb.Height);
            m_pen  = new Pen(Color.Green, 3);
            _pb.Refresh();
            this.SizeChanged += Panel_Product_SizeChanged;
        }