Ejemplo n.º 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();
     }
 }
Ejemplo n.º 2
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");
     }
 }