Beispiel #1
0
 private Action <String, byte[]> HandleReceiveDraw()
 {
     return((username, drawAsByteArray) =>
     {
         ChangeLastDrawAuthor(username);
         if (username != ourUsername)
         {
             List <DrawPath> receivedDraw = SerializablesHelper.FromByteArray <List <DrawPath> >(drawAsByteArray);
             DrawCanvasWidget.MakeNewDraw(receivedDraw);
         }
     });
 }
Beispiel #2
0
 private async void SendDrawButton_Click(object sender, EventArgs e)
 {
     byte[] allPathsInByteArray = SerializablesHelper.ToByteArray <List <DrawPath> >(DrawCanvasWidget.DrawPaths);
     await learningHubChatService.SendDraw(ourUsername, allPathsInByteArray);
 }