using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace MapEd { public partial class NewForm : Form { private int tileSize = 8; public NewForm() { InitializeComponent(); } public int TileSize { get { return tileSize; } } public Tuple MapSize { get { return new Tuple((int)mapHeight.Value, (int)mapWidth.Value); } } public string TileMap { get { return tilemap.Text; } } private void OnSelect(object sender, EventArgs e) { OpenFileDialog fsel = new OpenFileDialog(); fsel.Filter = "PNG Files (*.png)|*.png|All Files (*.*)|*.*"; if (fsel.ShowDialog() == DialogResult.OK) { tilemap.Text = fsel.FileName; okButton.Enabled = true; } } private void OnCancel(object sender, EventArgs e) { DialogResult = DialogResult.Cancel; Close(); } private void OnOK(object sender, EventArgs e) { DialogResult = DialogResult.OK; Close(); } private void On8x8(object sender, EventArgs e) { tileSize = 8; } private void On16x16(object sender, EventArgs e) { tileSize = 16; } } }