示例#1
0
 public msWnd(rLine l) : base(l)
 {
     mouseDown      = false;
     pan.MouseDown += Form1_MouseDown;
     pan.MouseUp   += Form1_MouseUp;
     pan.MouseMove += Form1_MouseMove;
 }
示例#2
0
        static void Main()
        {
            rLine ln = new rLine("test real line");

            ln.pnts = rLine.GetPoints(Console.In, true);
            Application.Run(new msWnd(ln));
        }
示例#3
0
        public void mkSLine(rLine rl)
        {
            int x, y;

            sl.ps = new Point[rl.pnts.Length];

            for (int i = 0; i < rl.pnts.Length; i++)
            {
                mp.map(rl.pnts[i].X, rl.pnts[i].Y, out x, out y);
                sl.ps[i] = new Point(x, mp.h - y);
            }
        }
示例#4
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();
            }

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

            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);
        }
示例#5
0
        public w4rLine(rLine l) : base(l)
        {
            rl            = l;
            Padding       = new Padding(10);
            AutoSize      = true;
            StartPosition = FormStartPosition.CenterScreen;

            pan = new p4sLine2(rl);
            Controls.Add(pan);

            tb.ButtonSize = new System.Drawing.Size((int)(200 / 3), (int)(40));
            ToolBarButton Zoom_p = new ToolBarButton("Zoom +");
            ToolBarButton Zoom_m = new ToolBarButton("Zoom -");
            ToolBarButton Left   = new ToolBarButton("Left");
            ToolBarButton Right  = new ToolBarButton("Right");
            ToolBarButton Up     = new ToolBarButton("Up");
            ToolBarButton Down   = new ToolBarButton("Down");

            tb.Buttons.AddRange(new ToolBarButton[] { Zoom_p, Zoom_m, Left, Right, Up, Down });
            tb.Dock         = DockStyle.Top;
            tb.ButtonClick += ToolBarButtonClick;
            Controls.Add(tb);
        }
示例#6
0
 public w4line(rLine l)
 {
     rl      = l;
     Padding = new Padding(10);
 }