private void InkCanvas_StrokesReplaced(object sender, InkCanvasStrokesReplacedEventArgs e)
 {
     foreach (Stroke droppedStroke in (e.PreviousStrokes.Where(s => !e.NewStrokes.Contains(s)).ToList()))
     {
         if (ThisAddIn.instance.wire.isConnected && ThisAddIn.instance.wire.isInConversation)
             ThisAddIn.instance.wire.sendRawDirtyStroke(droppedStroke);
         foreach (StrokeCollection sc in strokeCollectionsForSlides.Values)
         {
             if (sc.Contains(droppedStroke))
                 sc.Remove(droppedStroke);
         }
         foreach (InkCanvas canvas in ActiveCanvasses)
             if (canvas.Strokes.Contains(droppedStroke))
                 canvas.Strokes.Remove(droppedStroke);
     }
     foreach (Stroke newStroke in (e.NewStrokes.Where(s => !e.NewStrokes.Contains(s)).ToList()))
     {
         if (ThisAddIn.instance.wire.isConnected && ThisAddIn.instance.wire.isInConversation)
             ThisAddIn.instance.wire.sendRawStroke(newStroke);
         foreach (InkCanvas canvas in ActiveCanvasses)
             if (!canvas.Strokes.Contains(newStroke))
                 canvas.Strokes.Add(newStroke);
         if (!strokeCollectionsForSlides[lastSlide].Contains(newStroke))
             strokeCollectionsForSlides[lastSlide].Add(newStroke);
     }
 }
 protected virtual new void OnStrokesReplaced(InkCanvasStrokesReplacedEventArgs e)
 {
 }
 protected virtual new void OnStrokesReplaced(InkCanvasStrokesReplacedEventArgs e)
 {
 }
Esempio n. 4
0
		protected virtual void OnStrokesReplaced(object sender, InkCanvasStrokesReplacedEventArgs e)
		{
			InkCanvasStrokesReplacedEventHandler handler = StrokesReplaced;
			if (handler != null)
				handler(this, e);
		}