コード例 #1
0
ファイル: GeoTileDrawMgr.cs プロジェクト: xiaoyj/Space
 public GeoTileDrawMgr(GeoTile.GeoTileCallBack drawTileCallBack, GeoTile.GeoTileDrawMapLayer drawMapLayersDelegate)
 {
     this.m_DrawTileCallBack = drawTileCallBack;
     this.m_DrawMapLayersDelegate = drawMapLayersDelegate;
     this.m_RedrawTimer = new System.Windows.Forms.Timer();
     this.m_RedrawTimer.Interval = 0x37;
     this.m_RedrawTimer.Tick += new EventHandler(this.m_RedrawTimer_Tick);
     this.m_RedrawTimer.Start();
     this.m_RedrawTasks = new List<RedrawThreadPara>();
 }
コード例 #2
0
ファイル: GeoTileDrawMgr.cs プロジェクト: xiaoyj/Space
 private GeoTile GenerateOneTile(System.Drawing.Point point)
 {
     double num = ((double) ((point.X - (this.m_ClientRectangle.Width / 2)) + (TileWidth / 2))) / ((double) TileWidth);
     double num2 = ((double) ((point.Y - (this.m_ClientRectangle.Height / 2)) + (TileHeight / 2))) / ((double) TileHeight);
     int num3 = Convert.ToInt32(num);
     int num4 = Convert.ToInt32(num2);
     GeoTile tile = new GeoTile(num3.ToString() + "&" + num4.ToString(), TileWidth, TileHeight, point, this.m_TransformationForTiles, this.m_DrawGridLine);
     tile.Init();
     tile.DrawTileCallBack = this.m_DrawTileCallBack;
     tile.DrawTileMapLayer = this.m_DrawMapLayersDelegate;
     return tile;
 }
コード例 #3
0
ファイル: GeoTileDrawMgr.cs プロジェクト: xiaoyj/Space
 private void CombinEachTileRect(GeoTile geoTile, ref int left, ref int right, ref int top, ref int bottom)
 {
     if (left > geoTile.OriginalScreenRect.Left)
     {
         left = geoTile.OriginalScreenRect.Left;
     }
     if (right < geoTile.OriginalScreenRect.Right)
     {
         right = geoTile.OriginalScreenRect.Right;
     }
     if (top > geoTile.OriginalScreenRect.Top)
     {
         top = geoTile.OriginalScreenRect.Top;
     }
     if (bottom < geoTile.OriginalScreenRect.Bottom)
     {
         bottom = geoTile.OriginalScreenRect.Bottom;
     }
 }