Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }