Merge branch 'master' of https://github.com/SemvdH/Csharp-eindproject
This commit is contained in:
@@ -101,7 +101,7 @@ namespace Client.ViewModels
|
|||||||
private void CanvasResetLocal()
|
private void CanvasResetLocal()
|
||||||
{
|
{
|
||||||
this.window.CanvasForPaint.Children.Clear();
|
this.window.CanvasForPaint.Children.Clear();
|
||||||
data.Client.SendMessage(JSONConvert.GetMessageToSend(JSONConvert.CANVAS, JSONConvert.CANVAS_RESET));
|
data.Client.SendMessage(JSONConvert.ConstructCanvasReset());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -194,7 +194,11 @@ namespace Client.ViewModels
|
|||||||
|
|
||||||
private void CanvasResetData()
|
private void CanvasResetData()
|
||||||
{
|
{
|
||||||
this.window.CanvasForPaint.Children.Clear();
|
Application.Current.Dispatcher.Invoke(delegate
|
||||||
|
{
|
||||||
|
this.window.CanvasForPaint.Children.Clear();
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ChatBox_KeyDown()
|
private void ChatBox_KeyDown()
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<Label Name="GuessWord" Grid.Row="0" Grid.Column="2" Content="{Binding Path=RandomWord, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="20"/>
|
<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"/>
|
<Button Name="CanvasReset" Command="{Binding ButtonResetCanvas}" Grid.Row="0" Grid.Column="3" Content="RESET"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -193,6 +193,15 @@ namespace SharedClientServer
|
|||||||
color = colorToSend
|
color = colorToSend
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static byte[] ConstructCanvasReset()
|
||||||
|
{
|
||||||
|
dynamic payload = new
|
||||||
|
{
|
||||||
|
canvasType = CANVAS_RESET
|
||||||
|
};
|
||||||
|
return GetMessageToSend(CANVAS, payload);
|
||||||
|
}
|
||||||
|
|
||||||
public static int GetCanvasMessageType(byte[] json)
|
public static int GetCanvasMessageType(byte[] json)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user