From 0f6244ded7fbf4c6fdc33dd28af442ef97c75b50 Mon Sep 17 00:00:00 2001 From: AdAstra-LD <76622070+AdAstra-LD@users.noreply.github.com> Date: Sun, 5 Jun 2022 13:28:56 +0200 Subject: [PATCH] Fixed compile errors --- DS_Map/Main Window.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DS_Map/Main Window.cs b/DS_Map/Main Window.cs index 18c0379..399b013 100644 --- a/DS_Map/Main Window.cs +++ b/DS_Map/Main Window.cs @@ -3660,7 +3660,7 @@ namespace DSPRE { return; } - currentMapFile.ImportBuildings(new FileStream(ib.FileName, FileMode.Open)); + currentMapFile.ImportBuildings(File.ReadAllBytes(ib.FileName)); FillBuildingsBox(); if (buildingsListBox.Items.Count > 0) buildingsListBox.SelectedIndex = 0; @@ -4192,7 +4192,7 @@ namespace DSPRE { return; } - currentMapFile.ImportPermissions(new FileStream(ip.FileName, FileMode.Open)); + currentMapFile.ImportPermissions(File.ReadAllBytes(ip.FileName)); DrawSmallCollision(); DrawSmallTypeCollision(); @@ -4392,7 +4392,7 @@ namespace DSPRE { return; } - currentMapFile.ImportTerrain(new FileStream(it.FileName, FileMode.Open)); + currentMapFile.ImportTerrain(File.ReadAllBytes(it.FileName)); TerrainSizeTXT.Text = currentMapFile.bdhc.Length.ToString() + " B"; MessageBox.Show("Terrain settings imported successfully!", "", MessageBoxButtons.OK, MessageBoxIcon.Information); } @@ -4419,7 +4419,7 @@ namespace DSPRE { return; } - currentMapFile.ImportSoundPlates(new FileStream(it.FileName, FileMode.Open)); + currentMapFile.ImportSoundPlates(File.ReadAllBytes(it.FileName)); BGSSizeTXT.Text = currentMapFile.bgs.Length.ToString() + " B"; MessageBox.Show("BackGround Sound data imported successfully!", "", MessageBoxButtons.OK, MessageBoxIcon.Information); }