Merge remote-tracking branch 'origin/setupBranch' into setupBranch
This commit is contained in:
@@ -72,10 +72,10 @@ namespace Client
|
||||
Array.Copy(message, 1, payload, 0, message.Length - 1);
|
||||
switch (id)
|
||||
{
|
||||
case 0x01:
|
||||
case JSONConvert.LOGIN:
|
||||
// json log in username data
|
||||
break;
|
||||
case 0x02:
|
||||
case JSONConvert.MESSAGE:
|
||||
// json message data
|
||||
(string, string) combo = JSONConvert.GetUsernameAndMessage(payload);
|
||||
string textUsername = combo.Item1;
|
||||
@@ -84,11 +84,11 @@ namespace Client
|
||||
|
||||
break;
|
||||
|
||||
case 0x03:
|
||||
case JSONConvert.LOBBY:
|
||||
// lobby data
|
||||
//TODO fill lobby with the data received
|
||||
break;
|
||||
case 0x04:
|
||||
case JSONConvert.CANVAS:
|
||||
// canvas data
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.ComponentModel;
|
||||
using System.Text;
|
||||
using System.Windows.Input;
|
||||
using SharedClientServer;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Client
|
||||
{
|
||||
@@ -43,9 +44,6 @@ namespace Client
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_model == null)
|
||||
_model = new Model();
|
||||
|
||||
return _model;
|
||||
}
|
||||
|
||||
@@ -61,5 +59,10 @@ namespace Client
|
||||
get { return _lobbies; }
|
||||
set { _lobbies = value; }
|
||||
}
|
||||
|
||||
public void OnHostButtonClick()
|
||||
{
|
||||
Debug.WriteLine("Click host button");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition/>
|
||||
@@ -34,7 +34,6 @@
|
||||
<Label Grid.Row="0" Content="This client information:" FontSize="17"/>
|
||||
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Your username:" FontSize="15" VerticalAlignment="Center"/>
|
||||
<TextBox Name="usernameTextbox" Grid.Row="1" Grid.Column="1" MaxLength="10" FontSize="15" VerticalAlignment="Center"/>
|
||||
|
||||
<Label Grid.Row="2" Grid.Column="0" Content="Which color you want to be:" FontSize="15" VerticalAlignment="Center"/>
|
||||
<ComboBox Name="colorSelection" Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" FontSize="15">
|
||||
@@ -48,6 +47,7 @@
|
||||
</ComboBox>
|
||||
|
||||
<Label Grid.Row="3" Name="testLabel" FontSize="15" VerticalAlignment="Center"/>
|
||||
<Label Content="place username here" Grid.Column="1" HorizontalAlignment="Center" Margin="0,12,0,0" VerticalAlignment="Top" Grid.Row="1"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<RowDefinition Height="50"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="joinButton" Grid.Row="0" Content="join a selected lobby" Click="Button_Click" Width="200" Height="40" HorizontalAlignment="Left" Margin="10, 0, 0, 0"/>
|
||||
<Button Name="hostButton" Grid.Row="1" Content="host a new lobby" Command="{Binding ...}" Width="200" Height="40" HorizontalAlignment="left" Margin="10, 0, 0, 0"/>
|
||||
<Button Name="hostButton" Grid.Row="1" Content="host a new lobby" Command="{Binding Path=OnHostButtonClick}" Width="200" Height="40" HorizontalAlignment="left" Margin="10, 0, 0, 0"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace Client
|
||||
if(lobbySelected != null)
|
||||
{
|
||||
testLabel.Content = lobbySelected.ID;
|
||||
usernameTextbox.IsEnabled = false;
|
||||
colorSelection.IsEnabled = false;
|
||||
joinButton.IsEnabled = false;
|
||||
hostButton.IsEnabled = false;
|
||||
|
||||
Reference in New Issue
Block a user