diff --git a/zsirozas/Form1.Designer.cs b/zsirozas/Form1.Designer.cs index aa0aa29e9fef1f31f48f4b95ecab2ece86021077..e220aa59268b5455228130be8a7f08d8bf66dd47 100644 --- a/zsirozas/Form1.Designer.cs +++ b/zsirozas/Form1.Designer.cs @@ -435,6 +435,7 @@ namespace zsirozas this.listBoxUsers.Name = "listBoxUsers"; this.listBoxUsers.Size = new System.Drawing.Size(94, 329); this.listBoxUsers.TabIndex = 3; + this.listBoxUsers.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBoxUsers_MouseDoubleClick); // // listBoxRooms // @@ -445,6 +446,7 @@ namespace zsirozas this.listBoxRooms.Name = "listBoxRooms"; this.listBoxRooms.Size = new System.Drawing.Size(101, 329); this.listBoxRooms.TabIndex = 2; + this.listBoxRooms.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBoxRooms_MouseDoubleClick); // // label6 // diff --git a/zsirozas/Form1.cs b/zsirozas/Form1.cs index 385a3d258e99d62dbe37602a3e9705abc57b917c..95fb7f661b2ab90934d4c2491e8f5d1c6f9c72c7 100644 --- a/zsirozas/Form1.cs +++ b/zsirozas/Form1.cs @@ -202,9 +202,9 @@ namespace zsirozas void RefreshServerInfo() { - if (client.remoteServer.ServerInfo().bigRoom) + if (client.remoteServer.ServerInfo().bigRoom && false) { - throw new NotImplementedException(); + throw new NotImplementedException(); // todo kitalálni mit akartam ide } else { @@ -213,7 +213,7 @@ namespace zsirozas foreach (var roomID in rooms) { listBoxRooms.Items.Add(roomID); - //roomInfos.Add(roomID, client.remoteServer.RoomInfo(roomID)); + roomInfos.Add(roomID, client.remoteServer.RoomInfo(roomID)); } var users = client.remoteServer.ListUsers(); var userInfos = new Dictionary<string, UserInfo>(); @@ -222,8 +222,10 @@ namespace zsirozas listBoxUsers.Items.Add(userID); userInfos.Add(userID, client.remoteServer.UserInfo(userID)); } - lock (listBoxUsers.Tag) lock (listBoxOwnRoom.Tag) listBoxUsers.Tag = listBoxOwnRoom.Tag = userInfos; - lock (listBoxRooms.Tag) listBoxRooms.Tag = roomInfos; + //lock (listBoxUsers.Tag) lock (listBoxOwnRoom.Tag) //todo thread-safety? + listBoxUsers.Tag = listBoxOwnRoom.Tag = userInfos; + //lock (listBoxRooms.Tag) + listBoxRooms.Tag = roomInfos; //TODO: folytatni... } } @@ -329,7 +331,7 @@ namespace zsirozas { try { - client.remoteServer.RemoveUser(client.userID); + //client.remoteServer.RemoveUser(client.userID); //todo visszarakni amint nem fedi el a többi hibát } catch (Exception) { @@ -458,7 +460,7 @@ namespace zsirozas private void buttonRefreshServer_Click(object sender, EventArgs e) { - + RefreshServerInfo(); } private void buttonCreateRoom_Click(object sender, EventArgs e) diff --git a/zsirozas/Program.cs b/zsirozas/Program.cs index ba55bc94b8efc5796740f268e53e0952f73ec820..bda64e958ec99af5cc40981884a7486a07aea609 100644 --- a/zsirozas/Program.cs +++ b/zsirozas/Program.cs @@ -11,10 +11,8 @@ namespace zsirozas { if (args.Contains("--server")) { - //TODO: bigroom-ot feltételessé - //TODO: autostop-ot feltételessé - var srv = new GameServer(true || args.Contains("--bigroom"), args.Contains("--oneshot") || true); - new ServerWrapper(srv).Run(args.Contains("--signalr"), true); + var srv = new GameServer(args.Contains("--bigroom"), args.Contains("--oneshot")); + new ServerWrapper(srv).Run(args.Contains("--signalr"), !args.Contains("--notcp")); } else { diff --git a/zsirozas/SignalR-Transport.cs b/zsirozas/SignalR-Transport.cs index b8ce9f2cb174ad8695726293308893d45ad3c852..33cd53e147fb3b048882ef8297bc70b77a5dd33b 100644 --- a/zsirozas/SignalR-Transport.cs +++ b/zsirozas/SignalR-Transport.cs @@ -109,7 +109,7 @@ namespace zsirozas public void RegisterWrapper(ServerWrapper _wrapper) { - return; + return; //only actual game servers should have wrappers } public string[] ListRooms() @@ -174,7 +174,7 @@ namespace zsirozas public void ParseNextMessage(Stream s, object param) { - throw new NotImplementedException(); + throw new NotSupportedException("This is just a proxy to a real game server, you shouldn't want to feed it message streams."); } public object GameAction(string gameID, string userID, PlayerAction action, int cardID) @@ -215,7 +215,7 @@ namespace zsirozas /// </summary> public WrappedException WrapException(Exception ex) { - return new Microsoft.AspNet.SignalR.HubException(ex.Message); + return new WrappedException(ex.Message); } public string CreateUser(string name, ConnectionType type, object backTalk)