Zapis do pliku o tej samej nazwie

This commit is contained in:
Bartosz Chyży 2019-05-14 23:23:20 +02:00
parent 865921411e
commit b66c5378ef
2 changed files with 5 additions and 3 deletions

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<configuration> <configuration>
<appSettings> <appSettings>
<add key="imageFilePath" value="C:\Users\Bartek\Desktop\EEE\map1.bmp"/> <!--WYMAGANE ROZSZERZENIE TO .BMP! OTUPUT TO TEN SAM PLIK Z ROZSZERZENIEM .XML-->
<add key="outputFilePath" value="C:\Users\Bartek\Desktop\EEE\map1.xml"/> <add key="imageFilePath" value="C:\Users\Bartek\Desktop\EEE\mapa3.bmp"/>
<!--<add key="outputFilePath" value="C:\Users\Bartek\Desktop\EEE\map1.xml"/>-->
</appSettings> </appSettings>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />

View File

@ -11,6 +11,7 @@ namespace MapEditor
{ {
public static string ImageFilePath => ConfigurationManager.AppSettings["imageFilePath"]; public static string ImageFilePath => ConfigurationManager.AppSettings["imageFilePath"];
public static string OutputFilePath => ConfigurationManager.AppSettings["outputFilePath"]; //public static string OutputFilePath => ConfigurationManager.AppSettings["outputFilePath"];
public static string OutputFilePath => ImageFilePath.Replace(".bmp", ".xml");
} }
} }