Note that there are some explanatory texts on larger screens.

plurals
  1. POmap maker application
    primarykey
    data
    text
    <p>I have created a somewhat complete application which allows me to create a map (.txt file with information about all the points of the map), load it and draw it.</p> <p>My solution for this was, inside the windows forms application, to put a panel (since I need to be able to move on map) and inside that panel pictureboxes(since I want to put a background image and image on them) that represent points of map in size 50x50 pixels. The problem I am facing now is increased load time for my application, since I am loading pictures into the pictureboxes...</p> <p>Does anyone have any alternative suggestion to what I have been attempting? Visual representation might help:</p> <p><img src="https://i.stack.imgur.com/bvD0V.png" alt="NOTE: Pictureboxes only have background color here..."></p> <p>The code, as requested: (well, some of it)</p> <pre><code> private void Load_Map() { for (int i = Y - 12; i &lt; Y + 12; i++) { if ((i &gt;= 0) &amp; (i &lt; Int32.Parse(MP.Mheight))) { string Line = xline[i]; for (int j = X - 12; j &lt; X + 12; j++) { if ((j &gt;= 0) &amp; (j &lt; Int32.Parse(MP.Mwidth))) { int X = i * Int32.Parse(MP.Mwidth) + j; int Z = Int32.Parse(Line[j].ToString()); Map_Location[X] = Z; Color H = new Color(); Map_Point(j, i, Map_Height(Z, H), 50); } } } } } </code></pre> <p>Creating points:</p> <pre><code> private void Map_Point(int X, int Y, Color H, int Point_Size) { PictureBox MP = new PictureBox(); MP.Name = Map_Coordinates(X, Y); MP.Size = new Size(Point_Size, Point_Size); MP.Location = new Point(Y * (Point_Size + 1) + 4, X * (Point_Size + 1) + 4); MP.BackColor = H; Control MW = this.Controls["WorldMap"]; MW.Controls.Add(MP); } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload