示例#1
0
文件: PoiPanel.cs 项目: misiek/foo
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            Debug.WriteLine(" *** CLICK *** " + this.poi.getName(), ToString());

            if (poiDialog == null)
                poiDialog = new PoiDialogPanel(poi);

            int width = (int) Math.Floor(mapPanel.Width * 0.8);
            int height = (int) Math.Floor(mapPanel.Height * 0.4);
            poiDialog.Size = new Size(width, height);

            int x = mapPanel.Width / 2 - poiDialog.Width / 2;
            int y = mapPanel.Height / 2 - poiDialog.Height / 2;
            poiDialog.Location = new Point(x, y);

            mapPanel.Controls.Add(poiDialog);
            poiDialog.BringToFront();
        }
示例#2
0
文件: PoiPanel.cs 项目: mitice/foo
        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            Debug.WriteLine(" *** CLICK *** " + this.poi.getName(), ToString());

            if (poiDialog == null)
            {
                poiDialog = new PoiDialogPanel(poi);
            }

            int width  = (int)Math.Floor(mapPanel.Width * 0.8);
            int height = (int)Math.Floor(mapPanel.Height * 0.4);

            poiDialog.Size = new Size(width, height);

            int x = mapPanel.Width / 2 - poiDialog.Width / 2;
            int y = mapPanel.Height / 2 - poiDialog.Height / 2;

            poiDialog.Location = new Point(x, y);

            mapPanel.Controls.Add(poiDialog);
            poiDialog.BringToFront();
        }