/// <summary> /// Delete all ink and text annotations on a slide -- Presenter 2 /// </summary> /// <param name="rtel"></param> private void ReceiveClearScribble(ArchiveRTNav.RTEraseLayer rtel) { Int32 internalSlideIndex = slideMap.GetMapping(rtel.SlideIndex, rtel.DeckGuid); SlideOverlay overlay = slideDeck.GetOverlay(internalSlideIndex); if (overlay != null) { if (overlay.Scribble != null) { overlay.Scribble.Clear(); } if ((overlay.TextAnnotations != null) && (overlay.TextAnnotations.Count > 0)) { lock (overlay.TextAnnotations) { overlay.TextAnnotations.Clear(); } overlay.RefreshDynamicElements(); } } }
private void AcceptCP3Chunk(UW.ClassroomPresenter.Network.Chunking.Chunk chunk) { List <object> rtObjList = cp3Mgr.Accept(chunk); if ((rtObjList == null) || (rtObjList.Count == 0)) { if (cp3Mgr.WarningLog != null) { foreach (string s in cp3Mgr.WarningLog) { Debug.WriteLine(s); } cp3Mgr.WarningLog.Clear(); } FilterCP3RTUpdate(); return; } foreach (object rto in rtObjList) { if (rto is ArchiveRTNav.RTUpdate) { Debug.WriteLine("**CP3Mgr returns RtUpdate: " + ((RTUpdate)rto).ToString()); UpdateRTUpdate((RTUpdate)rto); FilterCP3RTUpdate(); } else if (rto is ArchiveRTNav.RTDrawStroke) { FilterRTDrawStroke((RTDrawStroke)rto); } else if (rto is ArchiveRTNav.RTDeleteStroke) { FilterRTDeleteStroke((RTDeleteStroke)rto); } else if (rto is ArchiveRTNav.RTTextAnnotation) { FilterRTTextAnnotation((RTTextAnnotation)rto); } else if (rto is ArchiveRTNav.RTImageAnnotation) { FilterRTImageAnnotation((RTImageAnnotation)rto); } else if ((rto is ArchiveRTNav.RTDeleteTextAnnotation)) { FilterRTDeleteTextAnnotation((RTDeleteTextAnnotation)rto); } else if ((rto is ArchiveRTNav.RTDeleteAnnotation)) { FilterRTDeleteAnnotation((RTDeleteAnnotation)rto); } else if (rto is ArchiveRTNav.RTEraseLayer) { ArchiveRTNav.RTEraseLayer rtel = (RTEraseLayer)rto; BufferChunk bc = new BufferChunk(Helpers.ObjectToByteArray(rtel)); enqueueMain(new WorkItem(bc, PacketType.ClearScribble, rtel.SlideIndex, rtel.DeckGuid)); } else if (rto is ArchiveRTNav.RTQuickPoll) { ArchiveRTNav.RTQuickPoll rtqp = (RTQuickPoll)rto; BufferChunk bc = new BufferChunk(Helpers.ObjectToByteArray(rtqp)); enqueueMain(new WorkItem(bc, PacketType.RTQuickPoll, rtqp.SlideIndex, rtqp.DeckGuid)); } else { Debug.WriteLine("CP3Manager returned unhandled archive type: " + rto.GetType().ToString()); } } }