Example #1
0
        public p4sLine2(rLine l)
        {
            double a, b, c, d;

            if (l.getBox(out a, out b, out c, out d))
            {
                mp = new mapping(a, b, c, d);
                // mp.mkZmEqual();
            }
            else
            {
                mp = new mapping();
            }

            MinimumSize = new Size(Convert.ToInt32(mp.w), Convert.ToInt32(mp.h));
            MaximumSize = new Size(Convert.ToInt32(mp.w), Convert.ToInt32(mp.h));
            AutoSize    = true;

            if (l == null)
            {
                ;
            }
            else if (l.pnts == null || l.pnts.Length < 1)
            {
                sl    = new sLine();
                sl.nm = l.nm;
            }
            else
            {
                sl    = new sLine();
                sl.nm = l.nm;
                mkSLine(l);
                Paint += sl._paint;
            }

            mkPan(sl);
        }
Example #2
0
        protected void mkPan(sLine l)
        {
            sl = l;

            if (l == null)
            {
                error  = "no any line!";
                Paint += _paint;
            }
            else if (l.ps == null || l.ps.Length < 1)
            {
                error  = String.Format("Line ’{0}’ is empty!", l.nm);
                Paint += _paint;
            }
            else
            {
                sl     = l;
                Paint += sl._paint;
            }


            BackColor = Color.Ivory;
            Dock      = DockStyle.Fill;
        }