コード例 #1
0
ファイル: Draw_Node_AGV.cs プロジェクト: opti75/SDI_M2_1F
 public void ReceivePathInfo(int index, ref stPath tempPath)
 {   // 가지고 있는 index번의 경로 구조체 정보를 tempPath에 복사
     tempPath.targetIndex = dqPath[index].targetIndex;
     tempPath.pathCnt     = dqPath[index].pathCnt;
     for (int i = 0; i < dqPath[index].pathCnt; i++)
     {
         tempPath.path[i].linkedIndex = dqPath[index].path[i].linkedIndex;
         tempPath.path[i].line        = dqPath[index].path[i].line;
         tempPath.path[i].vel         = dqPath[index].path[i].vel;
     }
 }
コード例 #2
0
ファイル: Draw_Node_AGV.cs プロジェクト: opti75/SDI_M2_1F
        public stPath t1Path, n1Path;      // t1Path : 현재 경로, n1Path : 다음 경로


        public Draw_Node_AGV(Form1 CS_Main)
        {
            Main = CS_Main;
            Main.ImageNode.Location = new Point(0, 0);
            //Main.Pic_Map.Location = new Point(0, 0);

            /*
             * Main.Form_Map_Setting.PB_Map.Location = new Point(7, 128);
             * Main.Pic_Map.Location = new Point(7, 128);
             */
            for (int i = 0; i < Form1.LGV_NUM; i++)
            {
                ImageAGV[i]           = new DoubleBufferedPictureBox();
                ImageAGV[i].Width     = 45;
                ImageAGV[i].Height    = 45;
                ImageAGV[i].Parent    = Main.ImageNode;
                ImageAGV[i].BackColor = Color.Transparent;//투명 하게
                BitAGV[i]             = new Bitmap(ImageAGV[i].Width, ImageAGV[i].Height);
                //BitAGV[i].MakeTransparent(Color.Transparent);
                temp[i] = Graphics.FromImage(BitAGV[i]);
                temp[i].FillRectangle(Brush, 0, 0, ImageAGV[i].Width, ImageAGV[i].Height);
            }

            //레이어 기능
            Main.ImageNode.BackColor = Color.Transparent;//투명 하게
            Main.ImageNode.Parent    = Main.Pic_Map;
            //------------------------------------------------------------
            dqPath        = new stPath[MAXNODE];
            dqNode        = new stNode[MAXNODE];
            dqSubPath     = new stSubPath[MAXNODE];
            stAGVPosition = new AGVPosition();

            for (int i = 0; i < MAXNODE; i++)
            {
                dqPath[i]    = new stPath();
                dqNode[i]    = new stNode();
                dqSubPath[i] = new stSubPath();
                t1Path       = new stPath();
                n1Path       = new stPath();
                t1Node       = new stNode();
                n1Node       = new stNode();
            }

            BitNodePath = new Bitmap(Main.ImageNode.Width, Main.ImageNode.Height);
            //BitNodePath.MakeTransparent(Color.Transparent);
            //BitNodePath_Traffic.MakeTransparent(Color.Transparent);
        }