Exemplo n.º 1
0
        private void BtnDraw_Click(object sender, EventArgs e)
        {
            Graphics gr     = PnlMap.CreateGraphics();
            Pen      pen    = new Pen(Brushes.Black, 1);
            int      lines  = 10; // 10x10
            float    x      = 0f;
            float    y      = 0f;
            float    xSpace = PnlMap.Width / lines;
            float    ySpace = PnlMap.Height / lines;

            // lineas verticales
            for (int i = 0; i < lines + 1; i++)
            {
                gr.DrawLine(pen, x, y, x, PnlMap.Height);
                x += xSpace;
            }

            // lineas horizontales
            x = 0f;
            for (int i = 0; i < lines + 1; i++)
            {
                gr.DrawLine(pen, x, y, PnlMap.Width, y);
                y += ySpace;
            }
        }
Exemplo n.º 2
0
 protected void BtnDodaj_Click(object sender, EventArgs e)
 {
     PnlMap.Visible = true;
     ASP.controls_administration_map_ascx UcMap =
         (ASP.controls_administration_map_ascx)PnlMap.FindControl("UcMap");
     UcMap.MapId = 0;
     UcMap.DataBind();
 }
Exemplo n.º 3
0
 protected void GvMaps_SelectedIndexChanged(object sender, EventArgs e)
 {
     PnlMap.Visible = true;
     ASP.controls_administration_map_ascx UcMap =
         (ASP.controls_administration_map_ascx)PnlMap.FindControl("UcMap");
     UcMap.MapId = (int)GvMaps.SelectedValue;
     UcMap.DataBind();
 }