Esempio n. 1
0
        private void picMap_MouseDown(object sender, MouseEventArgs e)
        {
            if (objPickList.Count != 0 && isCheck == false)
            {
                ObjectDraw objDraw = new ObjectDraw(objPickList[Y].Bmp, new Point(curPicMapX, curPicMapY));
                pointDrawObjectList.Add(objDraw);

                foreach (ObjectDraw obj in pointDrawObjectList)
                {
                    DrawImageToImage((Bitmap)picMap.Image, obj.Bm, obj.Point, new Rectangle(0, 0, obj.Bm.Width, obj.Bm.Height));
                }
                //DrawGrid();

                ObjectInFile obj2  = new ObjectInFile();
                Rectangle    rect2 = new Rectangle(curPicMapX, curPicMapY
                                                   , objPickList[Y].Bmp.Width, objPickList[Y].Bmp.Height);
                obj2.Name = objPickList[Y].Name.ToString();
                obj2.Rect = rect2;
                AddObject(obj2);
                currentDrawGrid = (Bitmap)picMap.Image;
            }
        }
Esempio n. 2
0
 void AddObject(ObjectInFile obj)
 {
     obj.index = listObj2.Count;
     listObj2.Add(obj);
 }