示例#1
0
        public PuntosInteres()
        {
            InitializeComponent();

            // cargar y agregar
            Datos = new PostgresDataAccess.DataAccess();
            Pi    = Datos.ObtenerPuntosInteres();
            int i = 0;

            foreach (PostgresDataAccess.PuntoInteres p in Pi)
            {
                RadioButton r = new RadioButton();
                r.Name            = r.Text = p.RadioText;
                r.Location        = new Point(6, 19 + r.Size.Height * i++);
                r.CheckedChanged += new EventHandler(radioButton_CheckedChanged);
                groupTipo.Controls.Add(r);
                groupZoom.Location  = new Point(groupZoom.Location.X, groupZoom.Location.Y + r.Size.Height + 1);
                btnMostrar.Location = new Point(btnMostrar.Location.X, btnMostrar.Location.Y + r.Size.Height + 1);
                this.Height        += 10;
            }
        }