Beispiel #1
0
        private void btnWSsave_Click(object sender, EventArgs e)
        {
            wh.AGVList.Clear();
            int noOfRacks        = Convert.ToInt32(numericUpDown3.Value);
            int noOfRacksperLine = Convert.ToInt32(numericUpDown4.Value);
            int noOfAgv          = Convert.ToInt32(numericUpDown5.Value);

            wh.CreateLines(noOfRacks, noOfRacksperLine);
            wh.AGVList.Clear();
            for (int i = 0; i < noOfAgv; i++)
            {
                AGV agv = new AGV(i, wh);
                wh.AGVList.Add(agv);
            }

            if (checkBoxSave.Checked)
            {
                CsvHandler csvh = new CsvHandler(wh);
                csvh.SaveWHSpecsToFile(numericUpDown3.Value.ToString(), numericUpDown4.Value.ToString(), numericUpDown5.Value.ToString());
            }


            this.Close();

            mainFormImage.BackgroundImage = wh.DrawAreas();
            mainFormImage.Refresh();

            iBlade.map.CreateMap("map", iBlade.wh.Width, iBlade.wh.Height);
            // wh.AGVList[0].ShortestPath(300, 299, "");

            //refresh the picture box when setting warehouse specificaions
            //iBlade mainForm = new iBlade();
            //mainForm.pbMain.Refresh();
        }
Beispiel #2
0
        private void btnWSsave_Click(object sender, EventArgs e)
        {
            int noOfRacks        = Convert.ToInt32(numericUpDown3.Value);
            int noOfRacksperLine = Convert.ToInt32(numericUpDown4.Value);
            int noOfAgv          = Convert.ToInt32(numericUpDown5.Value);

            wh.CreateLines(noOfRacks, noOfRacksperLine, mainFormImage);

            for (int i = 0; i < noOfAgv; i++)
            {
                AGV agv = new AGV(1197, 789, ++counter);
                //agv.LoadImage();
                wh.AGVList.Add(agv);
            }



            this.Close();
            mainFormImage.BackgroundImage = wh.DrawAreas();
            mainFormImage.Refresh();

            iBlade.map.CreateMap("map", iBlade.wh.Width, iBlade.wh.Height);
            // wh.AGVList[0].ShortestPath(300, 299, "");
        }