ConnectionFailedDialog -> Dialog for Success and Error Messages with heading, message and buttons/actions

This commit is contained in:
Patrick Hellebrand
2021-09-23 08:59:22 +02:00
parent 2b6d871a30
commit 44ef2f4cd2
7 changed files with 132 additions and 56 deletions

View File

@@ -10,6 +10,10 @@ using Newtonsoft.Json;
namespace PolyChat
{
// 10.1.211.26 Marc
// 10.1.218.90 Felix
// 10.4.141.77 Pat
class Controller
{
// Constants
@@ -30,10 +34,6 @@ namespace PolyChat
UIController = uiController;
OwnIP = getIP();
Serve();
//Connect("10.1.211.26"); // Marc
//Connect("10.1.218.90"); // Felix
//Connect("10.4.141.77"); // Pat
}
public void Connect(string ip)
@@ -45,9 +45,7 @@ namespace PolyChat
private void Serve()
{
Debug.WriteLine("--- Controller.Serve ---");
SocketIOServer server = new SocketIOServer(new SocketIOServerOption(
PORT
));
SocketIOServer server = new SocketIOServer(new SocketIOServerOption(PORT));
server.Start();
Debug.WriteLine("Port " + server.Option.Port);
Debug.WriteLine("Path " + server.Option.Path);
@@ -97,7 +95,7 @@ namespace PolyChat
Connections.Remove(IP);
UIController.OnChatPartnerDeleted(IP);
if(!wasConnected)
UIController.ShowConnectionError(IP, $"Connection to {IP} failed...");
UIController.ShowConnectionError("Connection close", IP, $"Connection to {IP} failed...");
}
public string getIP()