private void btnAddField_Click(object sender, EventArgs e)
        {
            string rt = "";

            for (int i = 0; i < rotate.Text.Length; ++i)
            {
                rt += rotate.Text[i] == '.' ? ',' : rotate.Text[i];
            }
            wh.add(int.Parse(wpx.Text), int.Parse(wpy.Text), int.Parse(height.Text), int.Parse(width.Text), double.Parse(rt));
            draw();
            wpx.Text    = "";
            wpy.Text    = "";
            height.Text = "";
            width.Text  = "";
            rotate.Text = "0";
            send();
        }
Beispiel #2
0
 public FieldForm(ref WareHouse p, int index, WarehouseForm _f1)
 {
     InitializeComponent();
     f1                  = _f1;
     wh_backup           = p;
     _x                  = p.lf[index].x_coord;
     _y                  = p.lf[index].y_coord;
     _rotate             = p.lf[index].rotate;
     p.lf[index].x_coord = 0;
     p.lf[index].y_coord = 0;
     p.lf[index].rotate  = 0;
     _size               = Package.SIZE;
     wh.add(p.lf[index]);
     timer1.Enabled  = true;
     timer1.Interval = 200;
     pn            = new Panel();
     pn.MouseMove += Pn_MouseMove;
     pn.MouseDown += Pn_MouseDown;
     pn.MouseUp   += Pn_MouseUp;
     panel.Controls.Add(pn);
     draw();
 }