protected override void Confirm(object sender, EventArgs e)
        {
            FileInfo level     = levelFile.File;
            FileInfo thumbnail = thumbnailFile.File;

            if (level?.Exists != true)
            {
                MessageBox.Show("The specified level file could not be found!", DIALOG_CAPTION_MISSING_FILE);
                return;
            }

            if (thumbnail?.Exists != true)
            {
                MessageBox.Show("The specified thumbnail file could not be found!", DIALOG_CAPTION_MISSING_FILE);
                return;
            }

            ResourceImporter.ImportFile(editor, level, "levels", out string levelPath);
            Data.file = levelPath;

            ResourceImporter.ImportFile(editor, thumbnail, "textures", out string thumbnailPath);
            Data.thumbnail = thumbnailPath;

            base.Confirm(sender, e);
        }
Beispiel #2
0
        protected override void Confirm(object sender, EventArgs e)
        {
            FileInfo file = textureFile.File;

            if (file?.Exists != true)
            {
                MessageBox.Show("The specified texture file could not be found!", DIALOG_CAPTION_MISSING_FILE);
                return;
            }

            ResourceImporter.ImportFile(editor, file, "textures", out string filePath);

            Data.file = filePath;

            base.Confirm(sender, e);
        }