1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00

Add & hook up empty OnLinePartAddition handler to NibriClient

This commit is contained in:
Starbeamrainbowlabs 2017-06-27 15:14:40 +01:00
parent ecbece8f22
commit 551ceeb17e
2 changed files with 14 additions and 2 deletions

View file

@ -6,7 +6,7 @@ using SBRL.Utilities;
namespace Nibriboard.Client.Messages namespace Nibriboard.Client.Messages
{ {
/// <summary> /// <summary>
/// Senyt by a client who's in the middle of drawing a line. /// Sent by a client who's in the middle of drawing a line.
/// Contains a collection of points that should be added to the line they're drawing. /// Contains a collection of points that should be added to the line they're drawing.
/// </summary> /// </summary>
public class LinePartMessage : Message public class LinePartMessage : Message

View file

@ -122,6 +122,8 @@ namespace Nibriboard.Client
manager = inManager; manager = inManager;
client = inClient; client = inClient;
manager.LineIncubator.OnLinePartAddition += handleLinePartAddition;
client.DataReceived += async (WebSocket clientSocket, string frame) => { client.DataReceived += async (WebSocket clientSocket, string frame) => {
try try
{ {
@ -446,6 +448,16 @@ namespace Nibriboard.Client
Send(clientNotification); Send(clientNotification);
} }
protected void handleLinePartAddition(object sender, LinePartEventArgs eventArgs)
{
// Ignore line part additions for ourselves and for clienst who aren't on the same plane as us
if(eventArgs.DrawingClient.Id == Id ||
eventArgs.DrawingClient.CurrentPlane != CurrentPlane)
return;
}
#endregion #endregion