Compare commits
23 Commits
stateful-c
...
hotfix/fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7df48ab322 | ||
|
|
80d970da35 | ||
|
|
2c7bf3e217 | ||
|
|
92f57a87bc | ||
|
|
da5528c7b2 | ||
|
|
c16f7cf68f | ||
|
|
5c2dea3ab4 | ||
|
|
e2f9dfec78 | ||
|
|
7fcf424b65 | ||
|
|
97be0f937c | ||
|
|
09056818df | ||
|
|
8d4f72c09d | ||
|
|
f51d310787 | ||
|
|
9e829c47ff | ||
|
|
f5d55ef405 | ||
|
|
0d44b2d840 | ||
|
|
1c04ab95c0 | ||
|
|
ddf4594c5e | ||
|
|
09f9e227b8 | ||
|
|
ec156f3dc6 | ||
|
|
24eb43239b | ||
|
|
335d17838c | ||
|
|
242c435ac7 |
@@ -13,9 +13,15 @@ using static SharedClientServer.JSONConvert;
|
||||
namespace Client
|
||||
{
|
||||
public delegate void LobbyJoinCallback(bool isHost);
|
||||
|
||||
public delegate void RandomWord(string word);
|
||||
public delegate void HandleIncomingMsg(string username, string msg);
|
||||
internal delegate void HandleIncomingPlayer(Lobby lobby);
|
||||
public delegate void CanvasDataReceived(double[][] coordinates, Color color);
|
||||
public delegate void CanvasReset();
|
||||
public delegate void LobbyCallback(int id);
|
||||
|
||||
|
||||
class Client : ObservableObject
|
||||
{
|
||||
|
||||
@@ -34,11 +40,16 @@ namespace Client
|
||||
public LobbyJoinCallback OnLobbyJoinSuccess;
|
||||
public Callback OnLobbiesReceivedAndWaitingForHost;
|
||||
public Callback OnServerDisconnect;
|
||||
public Callback OnLobbyUpdate;
|
||||
public LobbyCallback OnLobbyCreated;
|
||||
public LobbyCallback OnLobbyLeave;
|
||||
public RandomWord RandomWord;
|
||||
public HandleIncomingMsg IncomingMsg;
|
||||
public HandleIncomingPlayer IncomingPlayer;
|
||||
private ClientData data = ClientData.Instance;
|
||||
public CanvasDataReceived CanvasDataReceived;
|
||||
public CanvasReset CReset;
|
||||
public HandleIncomingPlayer UpdateUserScores;
|
||||
public Lobby[] Lobbies { get; set; }
|
||||
|
||||
public Client(string username)
|
||||
@@ -57,6 +68,7 @@ namespace Client
|
||||
this.tcpClient.EndConnect(ar);
|
||||
this.stream = tcpClient.GetStream();
|
||||
OnSuccessfullConnect?.Invoke();
|
||||
OnLobbyUpdate = updateGameLobby;
|
||||
SendMessage(JSONConvert.ConstructUsernameMessage(username));
|
||||
this.stream.BeginRead(buffer, 0, buffer.Length, new AsyncCallback(OnReadComplete),null);
|
||||
|
||||
@@ -72,6 +84,7 @@ namespace Client
|
||||
|
||||
if (ar == null || (!ar.IsCompleted) || (!this.stream.CanRead) || !this.tcpClient.Client.Connected)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
int amountReceived = stream.EndRead(ar);
|
||||
@@ -81,7 +94,6 @@ namespace Client
|
||||
throw new OutOfMemoryException("buffer too small");
|
||||
}
|
||||
|
||||
|
||||
Array.Copy(buffer, 0, totalBuffer, totalBufferReceived, amountReceived);
|
||||
totalBufferReceived += amountReceived;
|
||||
|
||||
@@ -129,7 +141,7 @@ namespace Client
|
||||
|
||||
if(textUsername != data.User.Username)
|
||||
{
|
||||
ViewModels.ViewModelGame.HandleIncomingMsg(textUsername, textMsg);
|
||||
IncomingMsg?.Invoke(textUsername, textMsg);
|
||||
}
|
||||
|
||||
//TODO display username and message in chat window
|
||||
@@ -147,6 +159,7 @@ namespace Client
|
||||
Lobbies = JSONConvert.GetLobbiesFromMessage(payload);
|
||||
OnLobbiesListReceived?.Invoke();
|
||||
OnLobbiesReceivedAndWaitingForHost?.Invoke();
|
||||
OnLobbyUpdate?.Invoke();
|
||||
break;
|
||||
case LobbyIdentifier.HOST:
|
||||
// we receive this when the server has made us a host of a new lobby
|
||||
@@ -156,7 +169,6 @@ namespace Client
|
||||
OnLobbyCreated?.Invoke(lobbyCreatedID);
|
||||
break;
|
||||
case LobbyIdentifier.JOIN_SUCCESS:
|
||||
|
||||
OnLobbyJoinSuccess?.Invoke(JSONConvert.GetLobbyJoinIsHost(payload));
|
||||
break;
|
||||
case LobbyIdentifier.LEAVE:
|
||||
@@ -179,7 +191,6 @@ namespace Client
|
||||
|
||||
case JSONConvert.CANVAS_WRITING:
|
||||
CanvasDataReceived?.Invoke(JSONConvert.getCoordinates(payload), JSONConvert.getCanvasDrawingColor(payload));
|
||||
// we hebben gedrawed, dus stuur dat we weer kunnen drawen
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -189,9 +200,11 @@ namespace Client
|
||||
case JSONConvert.RANDOMWORD:
|
||||
//Flag byte for receiving the random word.
|
||||
int lobbyId = JSONConvert.GetLobbyID(payload);
|
||||
string randomWord = JSONConvert.GetRandomWord(payload);
|
||||
|
||||
if(data.Lobby?.ID == lobbyId)
|
||||
ViewModels.ViewModelGame.HandleRandomWord(JSONConvert.GetRandomWord(payload));
|
||||
if (data.Lobby?.ID == lobbyId)
|
||||
RandomWord?.Invoke(randomWord);
|
||||
|
||||
break;
|
||||
default:
|
||||
Debug.WriteLine("[CLIENT] Received weird identifier: " + id);
|
||||
@@ -201,11 +214,25 @@ namespace Client
|
||||
|
||||
}
|
||||
|
||||
private void updateGameLobby()
|
||||
{
|
||||
Debug.WriteLine("[CLIENT] updating game lobby");
|
||||
foreach (var item in Lobbies)
|
||||
{
|
||||
Debug.WriteLine("[CLIENT] lobby data: {0}", item.Users.Count);
|
||||
if (item.ID == data.Lobby?.ID)
|
||||
{
|
||||
//IncomingPlayer?.Invoke(item);
|
||||
UpdateUserScores?.Invoke(item as Lobby);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public void SendMessage(byte[] message)
|
||||
{
|
||||
Debug.WriteLine("[CLIENT] sending message " + Encoding.ASCII.GetString(message));
|
||||
stream.BeginWrite(message, 0, message.Length, new AsyncCallback(OnWriteComplete), null);
|
||||
|
||||
}
|
||||
|
||||
private void OnWriteComplete(IAsyncResult ar)
|
||||
|
||||
@@ -61,6 +61,7 @@ namespace Client
|
||||
Debug.WriteLine("attempting to host game for " + ClientData.Instance.User.Username);
|
||||
client.SendMessage(JSONConvert.ConstructLobbyHostMessage());
|
||||
client.OnLobbyCreated = becomeHostForLobby;
|
||||
|
||||
}
|
||||
|
||||
private void becomeHostForLobby(int id)
|
||||
@@ -68,6 +69,7 @@ namespace Client
|
||||
Debug.WriteLine($"got host succes with data {id} ");
|
||||
wantToBeHost = true;
|
||||
wantToBeHostId = id;
|
||||
ClientData.Instance.User.Host = true;
|
||||
client.OnLobbiesReceivedAndWaitingForHost = hostLobbiesReceived;
|
||||
}
|
||||
|
||||
@@ -112,7 +114,7 @@ namespace Client
|
||||
|
||||
private void updateLobbies()
|
||||
{
|
||||
Debug.WriteLine("updating lobbies...");
|
||||
Debug.WriteLine("[VIEWMODEL] updating lobbies...");
|
||||
Lobby[] lobbiesArr = client.Lobbies;
|
||||
Application.Current.Dispatcher.Invoke(delegate
|
||||
{
|
||||
@@ -122,6 +124,11 @@ namespace Client
|
||||
foreach (Lobby l in lobbiesArr)
|
||||
{
|
||||
_lobbies.Add(l);
|
||||
Lobby clientLobby = ClientData.Instance.Lobby;
|
||||
if (l.ID == clientLobby?.ID)
|
||||
{
|
||||
clientLobby = l;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
using Client.Views;
|
||||
using Client.Views;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using SharedClientServer;
|
||||
using System;
|
||||
@@ -9,7 +8,6 @@ using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Timers;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
@@ -30,15 +28,10 @@ namespace Client.ViewModels
|
||||
private Timer queueTimer;
|
||||
|
||||
public static ObservableCollection<string> Messages { get; } = new ObservableCollection<string>();
|
||||
public ObservableCollection<string> Players { get; } = new ObservableCollection<string>();
|
||||
|
||||
private dynamic _payload;
|
||||
|
||||
public static string Word
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string _username;
|
||||
|
||||
public string _message;
|
||||
@@ -54,6 +47,13 @@ namespace Client.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
private string _randomWord;
|
||||
public string RandomWord
|
||||
{
|
||||
get { return _randomWord; }
|
||||
set { _randomWord = value; }
|
||||
}
|
||||
|
||||
public bool IsHost
|
||||
{
|
||||
get { return data.User.Host; }
|
||||
@@ -62,17 +62,6 @@ namespace Client.ViewModels
|
||||
public ViewModelGame(GameWindow window)
|
||||
{
|
||||
this.window = window;
|
||||
if (_payload == null)
|
||||
{
|
||||
_message = "";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
//_message = data.Message;
|
||||
//_username = data.User.Username;
|
||||
//Messages.Add($"{data.User.Username}: {Message}");
|
||||
}
|
||||
|
||||
buffer = new double[maxLines][];
|
||||
linesQueue = new Queue<double[][]>();
|
||||
@@ -81,6 +70,10 @@ namespace Client.ViewModels
|
||||
ButtonResetCanvas = new RelayCommand(CanvasResetLocal);
|
||||
data.Client.CanvasDataReceived = UpdateCanvasWithNewData;
|
||||
data.Client.CReset = CanvasResetData;
|
||||
data.Client.RandomWord = HandleRandomWord;
|
||||
data.Client.IncomingMsg = HandleIncomingMsg;
|
||||
data.Client.IncomingPlayer = HandleIncomingPlayer;
|
||||
data.Client.UpdateUserScores = UpdateUserScores;
|
||||
}
|
||||
|
||||
public ICommand OnKeyDown { get; set; }
|
||||
@@ -149,12 +142,16 @@ namespace Client.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public void Canvas_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
sendArrayFromQueue(sender, null);
|
||||
}
|
||||
|
||||
private void sendArrayFromQueue(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
|
||||
if (linesQueue.Count != 0)
|
||||
{
|
||||
Debug.WriteLine("[GAME] sending canvas data...");
|
||||
double[][] temp = linesQueue.Dequeue();
|
||||
data.Client.SendMessage(JSONConvert.ConstructDrawingCanvasData(temp,color));
|
||||
}
|
||||
@@ -213,32 +210,62 @@ namespace Client.ViewModels
|
||||
data.Client.SendMessage(JSONConvert.GetMessageToSend(JSONConvert.MESSAGE, _payload));
|
||||
}
|
||||
|
||||
/*
|
||||
* MISC make this a callback
|
||||
* Handles the incoming chat message from another client.
|
||||
*/
|
||||
public static void HandleIncomingMsg(string username, string message)
|
||||
public void HandleIncomingMsg(string username, string message)
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(delegate
|
||||
{
|
||||
Messages.Add($"{username}: {message}");
|
||||
});
|
||||
}
|
||||
public void LeaveGame(object sender, CancelEventArgs e)
|
||||
public void LeaveGame(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
Debug.WriteLine("Leaving...");
|
||||
data.Client.SendMessage(JSONConvert.ConstructLobbyLeaveMessage(data.Lobby.ID));
|
||||
}
|
||||
|
||||
/*
|
||||
* MISC make this a callback
|
||||
* Handles the random word that has been received from the server.
|
||||
*/
|
||||
public static void HandleRandomWord(string randomWord)
|
||||
public void HandleRandomWord(string randomWord)
|
||||
{
|
||||
Debug.WriteLine("[CLIENT] Reached the handle random word method!");
|
||||
Word = "NegerPik";
|
||||
Application.Current.Dispatcher.Invoke(delegate
|
||||
{
|
||||
RandomWord = randomWord;
|
||||
});
|
||||
}
|
||||
public void HandleIncomingPlayer(Lobby lobby)
|
||||
{
|
||||
Application.Current.Dispatcher.Invoke(delegate
|
||||
{
|
||||
Players.Clear();
|
||||
foreach (var item in lobby.Users)
|
||||
{
|
||||
Players.Add(item.Username + "\n" + item.Score);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void UpdateUserScores(Lobby newLobby) {
|
||||
Debug.WriteLine("[GAME] updating user scores");
|
||||
List<User> newUsers = newLobby.Users;
|
||||
// go over all users in current lobby
|
||||
foreach (User user in data.Lobby?.Users)
|
||||
{
|
||||
// check with all users in new lobby
|
||||
foreach (User newUser in newUsers)
|
||||
{
|
||||
// and update the score
|
||||
if (newUser.Username == user.Username)
|
||||
{
|
||||
Debug.WriteLine($"[GAME] setting score of {user.Username} to {newUser.Score}. it was {user.Score}");
|
||||
user.Score = newUser.Score;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// update all the scores in the player list
|
||||
HandleIncomingPlayer(newLobby);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,16 +22,9 @@
|
||||
<Grid Grid.Column="0" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<ListBox Name="PlayerList" ItemsSource="{Binding Path=Players}" Margin="10,0,0,10" FontSize="20"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="0" Grid.Column="1">
|
||||
@@ -44,19 +37,17 @@
|
||||
<Label Grid.Row="0" Grid.Column="0" VerticalAlignment="Center" FontSize="20" Content="Pick a color -->"/>
|
||||
<xctk:ColorPicker Name="ClrPcker_Background" SelectedColorChanged="ClrPcker_Background_SelectedColorChanged_1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Height="22" Width="100"/>
|
||||
|
||||
<Label Grid.Row="0" Grid.Column="2" FontSize="20" Content="" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
|
||||
|
||||
<Label Name="GuessWord" Grid.Row="0" Grid.Column="2" Content="{Binding Path=RandomWord, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"/>
|
||||
|
||||
<Button Name="CanvasReset" Click="CanvasReset_Click" Grid.Row="0" Grid.Column="3" Content="RESET"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="StartGame" Grid.Row="0" Grid.Column="2" Content="Start Game" FontSize="20" Command="{Binding ButtonStartGame}" IsEnabled="{Binding IsHost}"/>
|
||||
<Label Name="GuessWord" Grid.Row="0" Grid.Column="1" Content="{Binding Path=Word, UpdateSourceTrigger=PropertyChanged}" Margin="140,0,109,0"/>
|
||||
|
||||
<xctk:ColorPicker Name="ClrPcker_Background" SelectedColorChanged="ClrPcker_Background_SelectedColorChanged_1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" Height="22" Width="100"/>
|
||||
|
||||
|
||||
<Border Grid.Row="1" Grid.Column="1" Margin ="10,10,10,10" BorderBrush="Black" BorderThickness ="2.5">
|
||||
<Canvas Name="CanvasForPaint" MouseDown="CanvasForPaint_MouseDown" MouseMove="CanvasForPaint_MouseMove">
|
||||
<Canvas Name="CanvasForPaint" MouseDown="CanvasForPaint_MouseDown" MouseMove="CanvasForPaint_MouseMove" MouseUp="CanvasForPaint_MouseUp">
|
||||
<Canvas.Background>
|
||||
<SolidColorBrush Color="White" Opacity="0"/>
|
||||
</Canvas.Background>
|
||||
@@ -64,9 +55,9 @@
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<ListBox Name ="TextBox" ItemsSource="{Binding Path=Messages}" Margin="0,0,0,69"/>
|
||||
<ListBox Name ="TextBox" ItemsSource="{Binding Path=Messages}" Margin="0,0,10,69" />
|
||||
|
||||
<TextBox Name="ChatBox" Text="{Binding Message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,465,0,0">
|
||||
<TextBox Name="ChatBox" Text="{Binding Message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,465,10,0">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Return" Command="{Binding OnKeyDown}"/>
|
||||
</TextBox.InputBindings>
|
||||
|
||||
@@ -36,16 +36,6 @@ namespace Client.Views
|
||||
private void CanvasReset_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
CanvasForPaint.Children.Clear();
|
||||
|
||||
//FOR FUTURE USE, IF NECCESSARY
|
||||
//TEST.Children.Clear();
|
||||
|
||||
//foreach (UIElement child in CanvasForPaint.Children)
|
||||
//{
|
||||
// var xaml = System.Windows.Markup.XamlWriter.Save(child);
|
||||
// var deepCopy = System.Windows.Markup.XamlReader.Parse(xaml) as UIElement;
|
||||
// TEST.Children.Add(deepCopy);
|
||||
//}
|
||||
}
|
||||
|
||||
private void ClrPcker_Background_SelectedColorChanged_1(object sender, RoutedPropertyChangedEventArgs<Color?> e)
|
||||
@@ -53,5 +43,9 @@ namespace Client.Views
|
||||
viewModel.Color_Picker(e, this);
|
||||
}
|
||||
|
||||
private void CanvasForPaint_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
{
|
||||
viewModel.Canvas_MouseUp(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
<RowDefinition Height="60"/>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="100"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -22,8 +23,9 @@
|
||||
<Label Grid.Row="1" FontSize="30" Content="Enter a username:"/>
|
||||
<Label Grid.Row="2" FontSize="15" Content="(max amount of characters for the username is 10)"/>
|
||||
|
||||
<TextBox Name="usernameTextbox" Grid.Row="1" Grid.Column="1" MaxLength="10" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Left" Width="250"/>
|
||||
<Button Content="ENTER" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Width="100" Height="40" Click="Button_EnterUsername"/>
|
||||
<TextBox Name="usernameTextbox" Grid.Row="1" Grid.Column="1" MaxLength="69" FontSize="30" VerticalAlignment="Center" HorizontalAlignment="Left" Width="250"/>
|
||||
<Button Name="LoginButton" Content="ENTER" Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Width="100" Height="40" Click="Button_EnterUsername"/>
|
||||
|
||||
<Label Grid.Row="3" Grid.Column="0" Content="Tip of the century: base64 != UTF8!" FontSize="20" FontWeight="Bold"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using SharedClientServer;
|
||||
using Client.ViewModels;
|
||||
using SharedClientServer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
@@ -26,8 +27,12 @@ namespace Client.Views
|
||||
|
||||
private void Button_EnterUsername(object sender, RoutedEventArgs e)
|
||||
{
|
||||
User user = new User(usernameTextbox.Text);
|
||||
string name = usernameTextbox.Text;
|
||||
if (name == string.Empty) return;
|
||||
User user = new User(name);
|
||||
|
||||
Client client = new Client(user.Username);
|
||||
LoginButton.IsEnabled = false;
|
||||
client.OnSuccessfullConnect = () =>
|
||||
{
|
||||
// because we need to start the main window on a UI thread, we need to let the dispatcher handle it, which will execute the code on the ui thread
|
||||
@@ -41,6 +46,7 @@ namespace Client.Views
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,7 @@ namespace Server.Models
|
||||
throw new OutOfMemoryException("buffer is too small!");
|
||||
}
|
||||
|
||||
|
||||
// copy the received bytes into the buffer
|
||||
Array.Copy(buffer, 0, totalBuffer, totalBufferReceived, bytesReceived);
|
||||
// add the bytes we received to the total amount
|
||||
@@ -90,6 +91,7 @@ namespace Server.Models
|
||||
|
||||
|
||||
}
|
||||
|
||||
ar.AsyncWaitHandle.WaitOne();
|
||||
// start reading for a new message
|
||||
stream.BeginRead(buffer, 0, buffer.Length, new AsyncCallback(OnRead), null);
|
||||
@@ -232,6 +234,7 @@ namespace Server.Models
|
||||
ServerCommunication.INSTANCE.sendToAll(JSONConvert.ConstructLobbyListMessage(ServerCommunication.INSTANCE.lobbies.ToArray()));
|
||||
OnMessageReceivedOk = () =>
|
||||
{
|
||||
|
||||
serverCom.sendToAll(JSONConvert.GetMessageToSend(JSONConvert.RANDOMWORD, new
|
||||
{
|
||||
id = serverCom.GetLobbyForUser(User).ID,
|
||||
|
||||
@@ -4,6 +4,7 @@ using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Media;
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Text;
|
||||
|
||||
namespace Client
|
||||
{
|
||||
class Lobby : INotifyPropertyChanged
|
||||
internal class Lobby : INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user