Skip to content

Commit

Permalink
HouseID converted to string
Browse files Browse the repository at this point in the history
  • Loading branch information
JitteSochin committed Sep 28, 2016
1 parent f267827 commit 390e1ac
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions LayoutEdit/LayoutFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class LayoutFile
{
private string _filename; // Name of the file
private int _fileversion; // Version of the file
private Int64 _houseid; // Unique House ID
private string _houseid; // Unique House ID
private Int64 _houseversion; // Internal Identifier for House
private string _housetype; // House Type
private bool _fileloaded; // Do we have a file loaded?
Expand All @@ -37,7 +37,7 @@ public string FileName
}
public bool FileLoaded { get { return _fileloaded; } }
public int FileVersion { get { return (_fileloaded) ? _fileversion : 0; } }
public Int64 HouseID { get { return (_fileloaded) ? _houseid : 0; } }
public string HouseID { get { return (_fileloaded) ? _houseid : "0"; } }
public string HouseType { get { return _housetype; } }
public DateTime LastModified { get { return _lastModified; } set { _lastModified = value; } }
public LayoutFile()
Expand Down Expand Up @@ -85,12 +85,7 @@ private bool LoadFile(string FileName, bool GroupOnly = false, bool ClearCurrent
_houseversion = Int64.Parse(_input.Split(',')[0]);

_input = sr.ReadLine();
try
{
_houseid = Int64.Parse(_input.Split(',')[0]);
} catch (System.FormatException fe) {
_houseid = Int64.Parse(_input.Split(',')[0], System.Globalization.NumberStyles.HexNumber);
}
_houseid = _input.Split(',')[0];
}
else
{
Expand Down Expand Up @@ -184,7 +179,7 @@ public bool SaveFile(string FileName)
StreamWriter sw = new StreamWriter(FileName);
sw.WriteLine(_fileversion.ToString() + ",Version Number");
sw.WriteLine(_houseversion.ToString() + "," + _housetype);
sw.WriteLine(_houseid.ToString() + ", Unique House ID. ");
sw.WriteLine(_houseid + ", Unique House ID. ");
sw.WriteLine("//EQ2LayoutEditor");
string line;
foreach (DataRow dr in HouseItems.Rows)
Expand Down

0 comments on commit 390e1ac

Please sign in to comment.