Exemplo n.º 1
0
 private void DrawViewReceivedImage(byte[] buffer)
 {
     try
     {
         DrawMessage  dm     = new DrawMessage(buffer);
         MemoryStream ms     = new MemoryStream(dm.imgdata);
         BitmapImage  result = new BitmapImage();
         result.SetSource(ms);
         ms.Close();
         Rectangle  rect = new Rectangle();
         ImageBrush ib   = new ImageBrush();
         ib.ImageSource = result;
         rect.Height    = result.PixelHeight;
         rect.Width     = result.PixelWidth;
         Canvas.SetTop(rect, dm.y);
         Canvas.SetLeft(rect, dm.x);
         rect.Fill = ib;
         paintcanvas.Children.Add(rect);
     }
     catch (Exception) { }
     finally
     {
         drawingclientobj.DrawStartReceiving();
     }
 }
Exemplo n.º 2
0
        private void send_draw_room_change_param()
        {
            DrawMessage sm = new DrawMessage();

            sm.DCommand = DrawCommand.Join;
            sm.strRoom  = roomselected_combo.SelectedItem.ToString();
            drawingclientobj.Send_Bytes(sm.ToByte());
        }