Use always the same xml writer settings
This commit is contained in:
1 parent
3b82d5c13c
commit
3a8acecd5c
7 files changed
+54
-63
No files matched your search
@@ -26,13 +26,6 @@ namespace VocaluxeLib.Profile
|
||||
{
|
||||
public class CProfile
|
||||
{
|
||||
private static readonly XmlWriterSettings _Settings = new XmlWriterSettings
|
||||
{
|
||||
Indent = true,
|
||||
Encoding = Encoding.UTF8,
|
||||
ConformanceLevel = ConformanceLevel.Document
|
||||
};
|
||||
|
||||
public int ID;
|
||||
|
||||
public string PlayerName;
|
||||
@@ -107,7 +100,7 @@ namespace VocaluxeLib.Profile
|
||||
public void SaveProfile()
|
||||
{
|
||||
if (String.IsNullOrEmpty(FilePath))
|
||||
FilePath = Path.Combine(CBase.Settings.GetDataPath(),CBase.Settings.GetFolderProfiles());
|
||||
FilePath = Path.Combine(CBase.Settings.GetDataPath(), CBase.Settings.GetFolderProfiles());
|
||||
if (FileName == String.Empty)
|
||||
{
|
||||
string filename = string.Empty;
|
||||
@@ -139,7 +132,7 @@ namespace VocaluxeLib.Profile
|
||||
XmlWriter writer;
|
||||
try
|
||||
{
|
||||
writer = XmlWriter.Create(Path.Combine(FilePath, FileName), _Settings);
|
||||
writer = XmlWriter.Create(Path.Combine(FilePath, FileName), CBase.Config.GetXMLSettings());
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user