fix connection establishment when loading files
This commit is contained in:
@@ -164,6 +164,8 @@ namespace PolyChat
|
|||||||
/// <param name="ip"></param>
|
/// <param name="ip"></param>
|
||||||
public void loadChats()
|
public void loadChats()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//load dir and create if non existant
|
//load dir and create if non existant
|
||||||
if (Directory.Exists("U:\\PolyChat\\Saves"))
|
if (Directory.Exists("U:\\PolyChat\\Saves"))
|
||||||
{
|
{
|
||||||
@@ -188,6 +190,7 @@ namespace PolyChat
|
|||||||
ip = ip.Substring(0, ip.Length - 4);
|
ip = ip.Substring(0, ip.Length - 4);
|
||||||
Debug.WriteLine("-" + ip + "-");
|
Debug.WriteLine("-" + ip + "-");
|
||||||
Debug.WriteLine(jsonArr);
|
Debug.WriteLine(jsonArr);
|
||||||
|
Connect(ip);
|
||||||
UIController.OnIncomingMessages(ip, jsonArr);
|
UIController.OnIncomingMessages(ip, jsonArr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,8 +156,13 @@ namespace PolyChat
|
|||||||
new ChatMessage(
|
new ChatMessage(
|
||||||
origin,
|
origin,
|
||||||
item["type"].ToString(),
|
item["type"].ToString(),
|
||||||
|
<<<<<<< Updated upstream
|
||||||
item["content"].ToString()//,
|
item["content"].ToString()//,
|
||||||
//DateTime.Parse(item["timestamp"].ToString())
|
//DateTime.Parse(item["timestamp"].ToString())
|
||||||
|
=======
|
||||||
|
item["content"].ToString(),
|
||||||
|
DateTime.Parse(item["timestamp"].ToString())
|
||||||
|
>>>>>>> Stashed changes
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ namespace PolyChat.Models
|
|||||||
public DateTime TimeStamp;
|
public DateTime TimeStamp;
|
||||||
public readonly bool Foreign;
|
public readonly bool Foreign;
|
||||||
|
|
||||||
|
|
||||||
|
public ChatMessage()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Create own Message (directly sent)
|
/// Create own Message (directly sent)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user