void Load(string controlID) { if (openDia.ShowDialog() == System.Windows.Forms.DialogResult.OK) { SerializationHelper.CopyFile(openDia.FileName, Environment.CurrentDirectory + "\\Content\\TileMaps", true); string[] split = openDia.FileName.Split( new char[] { '\\', '/', '.' }, StringSplitOptions.RemoveEmptyEntries); switch (tilesSelected) { case true: { tileSheetFilePath = "TileMaps\\" + split[split.Length - 2]; tiles = Common.ContentBuilder.Load <Texture2D>(tileSheetFilePath); tileSheet.Texture = tiles; } break; case false: { normalMapFilePath = "TileMaps\\" + split[split.Length - 2]; normalMap = Common.ContentBuilder.Load <Texture2D>(normalMapFilePath); tileSheet.Texture = normalMap; } break; } HideLoadingTools(); if (OnLoadedTilemap != null) { OnLoadedTilemap(); } } }