/// <summary></summary> /// <param name="tileset">Tileset type and data.</param> /// <param name="control">Where the grid will be attached.</param> /// <param name="input">Where is the data of tiles to be attached in the buttons of the grid.</param> public TilesetEditorOutput(ITileset tileset, Control control, TilesetEditorIntput input) : base(tileset, control) { this.input = input; if (tileset.GetType() == new Maker.XP_Tile().GetType()) { throw new ConvertException("Tileset cannot be XP because this class not contain the information of original image and the default is -1."); } SetUpGrid(); }
/// <summary>if the image is convertible to MV tileset.</summary> /// <param name="img">Image to be checked.</param> /// <returns>Return true if the image is convertible and false if not.</returns> protected virtual bool IsConvertible(Image img) { if (inputTileset.GetType() != typeof(Maker.XP_Tile)) { if (img.Width != inputTileset.SizeWidth() || img.Height != inputTileset.SizeHeight()) { System.Windows.Forms.MessageBox.Show(Vocab.GetText("sizeErrorMsg")); return(false); } } return(true); }