Merge branch 'ConnectionController' of https://sourcecode.socialcoding.bosch.com/scm/~hpl2fe/polychat into ConnectionController

# Conflicts:
#	PolyChat/Controller.cs
This commit is contained in:
SCM6WE
2021-09-23 16:07:33 +02:00
2 changed files with 4 additions and 4 deletions

View File

@@ -28,8 +28,6 @@ namespace PolyChat
private readonly FileManager fileManager; private readonly FileManager fileManager;
// Props // Props
private Dictionary<string, Connection> Connections = new Dictionary<string, Connection>(); private Dictionary<string, Connection> Connections = new Dictionary<string, Connection>();
private string OwnName = "";
private string OwnIP;
/// <summary> /// <summary>
/// Initializes Controller with UI access /// Initializes Controller with UI access
@@ -39,7 +37,7 @@ namespace PolyChat
{ {
UIController = uiController; UIController = uiController;
fileManager = new FileManager(this); fileManager = new FileManager(this);
OwnIP = getIP(); //OwnIP = getIP();
fileManager.loadChats(); fileManager.loadChats();
Serve(); Serve();

View File

@@ -99,6 +99,8 @@ namespace PolyChat
{ {
string ip = IP.GetIPFromCode(dialog.getValue()); string ip = IP.GetIPFromCode(dialog.getValue());
Controller.Connect(ip); Controller.Connect(ip);
ChatPartner pa = Partners.FirstOrDefault(p => p.Code == ip);
if (pa == null)
Partners.Add(new ChatPartner( Partners.Add(new ChatPartner(
"Connecting...", "Connecting...",
ip ip