Ejemplo n.º 1
0
 public GridMapClass(int row, int column)
 {
     this.row = row;
     this.column = column;
     MeshGrid = new SingleMeshClass[row,column];
 }
Ejemplo n.º 2
0
        public void InitGridMesh()
        {
            for (int r = 0; r < row; r++)
            {
                for (int c = 0; c < column; c++)
                {
                    SingleMeshClass mesh = new SingleMeshClass();
                    mesh.MeshID = r * Column + c + 1;
                    mesh.ParentGra = gra;
                    mesh.MeshSize = meshSize;
                    mesh.MeshPoint = gridPoint + new Size(c * meshSize.Width, r * meshSize.Height);
                    mesh.MeshState = MeshStates.COVER;
                    MeshGrid[r, c] = mesh;

                    mesh.MeshNearbyOpen += new SingleMeshClass.MeshEventHandler(OnMeshNearbyOpen);
                    mesh.MeshNearbyPressed += new SingleMeshClass.MeshEventHandler(OnMeshNearbyPressed);
                    mesh.MeshNearbyUp += new SingleMeshClass.MeshEventHandler(OnMeshNearbyUp);
                }
            }
        }