Example #1
0
 public TileLoad(Image img, Point input)
 {
     openFileDialog1 = new OpenFileDialog();
     if (openFileDialog1.ShowDialog() == DialogResult.OK)
     {
         layers = new List <int[]>();
         string[] lines = File.ReadAllLines(openFileDialog1.FileName);
         loading(lines);
         TileForm2 form = new TileForm2(img, input, new Point(cols, rows));
         updateLayers(ref form);
         form.ShowDialog();
     }
 }
Example #2
0
 public void updateLayers(ref TileForm2 form)
 {
     for (int a = 0; a < layers.Count; a++)
     {
         form.l.Add(new TileLayers("layer", form.input, form.output, form.scale, form.img));
         form.loadMe(form.l[form.l.Count - 1].name);
         for (int b = 0; b < layers[a].Count(); b++)
         {
             form.l[form.l.Count - 1].loadUpdateTileSet(b, layers[a][b]);
         }
     }
     form.loadDrawMe();
 }
Example #3
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (int.TryParse(textBox1.Text, out inRow) && int.TryParse(textBox2.Text, out inCol) &&
         int.TryParse(textBox3.Text, out outRow) && int.TryParse(textBox4.Text, out outCol))
     {
         TileForm2 f = new TileForm2(img, new Point(inCol, inRow), new Point(outCol, outRow));
         f.ShowDialog();
     }
     else
     {
         MessageBox.Show("make sure the textfields are numbers");
     }
 }