Exemple #1
0
        private void mmImportTiles_Click(object sender, EventArgs e)
        {
            if (fdImageOpen.ShowDialog() == DialogResult.OK)
              {
            Bitmap toSliceUp = LoadImageAs32ARGB(fdImageOpen.FileName);

            ImageImportForm iif = new ImageImportForm(toSliceUp, typeof(Tile), resourcePack, new CPImageToTile());
            if (iif.ShowDialog() == DialogResult.OK)
              tabControl1.SelectTab(tabPage1);

            toSliceUp.Dispose();
              }
        }
Exemple #2
0
        private void mmImportRoom_Click(object sender, EventArgs e)
        {
            if (fdImageOpen.ShowDialog() == DialogResult.OK)
              {
            Bitmap toSliceUp = LoadImageAs32ARGB(fdImageOpen.FileName);

            if (toSliceUp.Width != 208 ||
            toSliceUp.Height != 208)
            {
              MessageBox.Show("Input image for slicing into a Room must be exactly 208 x 208 pixels", "InSiDe", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
              ImageImportForm iif = new ImageImportForm(toSliceUp, typeof(Room), resourcePack, new CPImageToRoom());
              if (iif.ShowDialog() == DialogResult.OK)
            tabControl1.SelectTab(tabPage1);
            }

            toSliceUp.Dispose();
              }
        }