Exemple #1
0
        private void createImage()
        {
            Graphics g = this.CreateGraphics();

            img = mathExp.CreateIcon(g);
            g.Dispose();
        }
        public override void PaintValue(PaintValueEventArgs e)
        {
            rc = e.Bounds;
            ParameterValue dv = e.Context.Instance as ParameterValue;

            if (dv != null)
            {
                if (dv.DataIcon == null)
                {
                    IMathExpression mew = e.Value as IMathExpression;
                    if (mew != null)
                    {
                        dv.DataIcon = mew.CreateIcon(e.Graphics);
                    }
                }
                if (dv.DataIcon != null)
                {
                    e.Graphics.DrawImage(dv.DataIcon, e.Bounds);
                }
                e.Graphics.DrawString(dv.ToString(), f, br, (float)16, (float)1);
            }
            base.PaintValue(e);
        }