Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static class Program
- {
- public static Form1 form1;
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main()
- {
- Application.EnableVisualStyles();
- Application.SetCompatibleTextRenderingDefault(false);
- form1 = new Form1();
- Application.Run( form1);
- }
- and
- public Map(int map_x, int map_y, int map_tile_size)
- {
- this.map_map = new int[map_x, map_y];
- for (int i = 0; i < map_map.GetLength(0); i++)
- {
- for (int j = 0; j < map_map.GetLength(1); j++)
- {
- tile[i, j] = new PictureBox();
- tile[i, j].BackColor = System.Drawing.Color.Red;
- tile[i, j].Image = System.Drawing.Image.FromFile("../../Screenshot (189).png");
- tile[i, j].Location = new Point((i * map_tile_size) , (j * map_tile_size));
- tile[i, j].Size = new Size(map_tile_size, map_tile_size);
- tile[i, j].SizeMode = PictureBoxSizeMode.StretchImage;
- tile[i, j].Show();
- Program.form1.Controls.Add(tile[i, j]); <= THIS ONE HERE IWAS DOING ANNOYING
- Console.WriteLine(i + " " + j);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement