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

            ln.pnts = rLine.GetPoints(Console.In, true);
            Application.Run(new msWnd(ln));
        }
Exemplo n.º 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);
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 6
0
 public w4line(rLine l)
 {
     rl      = l;
     Padding = new Padding(10);
 }