コード例 #1
0
 private void ProcessCP3Message(CP3.Network.Messages.Message m)
 {
     if (m is CP3.Network.Messages.Presentation.DeckInformationMessage)
     {
         CP3.Network.Messages.Presentation.DeckInformationMessage dim = (CP3.Network.Messages.Presentation.DeckInformationMessage)m;
         if ((dim.Disposition == UW.ClassroomPresenter.Model.Presentation.DeckDisposition.Whiteboard) ||
             (dim.Disposition == UW.ClassroomPresenter.Model.Presentation.DeckDisposition.StudentSubmission) ||
             (dim.Disposition == UW.ClassroomPresenter.Model.Presentation.DeckDisposition.QuickPoll))
         {
             return;
         }
         if (!decks.ContainsKey(dim.TargetId))
         {
             Deck thisDeck = new Deck(dim);
             decks.Add(dim.TargetId, thisDeck);
             if (this.OnDeckFound != null)
             {
                 OnDeckFound(thisDeck);
             }
         }
     }
     else if (m is CP3.Network.Messages.Network.InstructorCurrentDeckTraversalChangedMessage)
     {
         CP3.Network.Messages.Network.InstructorCurrentDeckTraversalChangedMessage im = (CP3.Network.Messages.Network.InstructorCurrentDeckTraversalChangedMessage)m;
         if (((im.Dispositon & UW.ClassroomPresenter.Model.Presentation.DeckDisposition.Whiteboard) == 0) &&
             (!this.unnamedDecks.ContainsKey(im.DeckId)))
         {
             // This case captures all the decks, including cases where the deck is opened before
             // the start of archiving, and there are no slide transitions within the deck, but
             // one slide is shown.  These need to be manually matched since we don't know the deck name.
             // At the end of processing we merge these into the main decks collection.
             this.unnamedDecks.Add(im.DeckId, new Deck(im.DeckId));
         }
     }
 }
コード例 #2
0
 public Deck(CP3.Network.Messages.Presentation.DeckInformationMessage dim)
 {
     matched     = false;
     matchExt    = null;
     exactMatch  = false;
     deckGuid    = (Guid)dim.TargetId;
     slideCount  = 0;
     fileName    = dim.HumanName;
     slideTitles = null;
 }