예제 #1
0
 public DeckMessage( Message parent, SerializedPacket p )
     : base(parent, p)
 {
     this.HumanName = SerializedPacket.DeserializeString( p.GetNextPart() );
     this.Disposition = (DeckDisposition)SerializedPacket.DeserializeLong( p.GetNextPart() );
     this.DeckBackgroundColor = SerializedPacket.DeserializeColor( p.GetNextPart() );
 }
예제 #2
0
 public SlideAssociationExtension(Guid slideId)
 {
     SlideID = slideId;
     DeckID = Guid.Empty;
     DeckType = DeckDisposition.Empty;
     SlideIndex = -1;
 }
 public DeckTraversalMessage(DeckTraversalModel traversal, bool addLocalRef)
     : base(traversal.Id)
 {
     if (addLocalRef)
         this.AddLocalRef( traversal );
     using( Synchronizer.Lock( traversal.SyncRoot ) ) {
         this.Group = traversal.Deck.Group;
         this.DeckId = traversal.Deck.Id;
         this.Dispositon = traversal.Deck.Disposition;
     }
 }
예제 #4
0
 public DeckMessage(DeckModel deck)
     : base(deck.Id)
 {
     this.AddLocalRef( deck );
     using(Synchronizer.Lock(deck.SyncRoot)) {
         this.Group = deck.Group;
         this.HumanName = deck.HumanName;
         this.Disposition = deck.Disposition;
         this.DeckBackgroundColor = deck.DeckBackgroundColor;
     }
 }
예제 #5
0
 public DeckMessage(DeckModel deck) : base(deck.Id)
 {
     this.AddLocalRef(deck);
     using (Synchronizer.Lock(deck.SyncRoot)) {
         this.Group                  = deck.Group;
         this.HumanName              = deck.HumanName;
         this.Disposition            = deck.Disposition;
         this.DeckBackgroundColor    = deck.DeckBackgroundColor;
         this.DeckBackgroundTemplate = deck.DeckBackgroundTemplate;
     }
 }
예제 #6
0
 public DeckTraversalMessage(DeckTraversalModel traversal, bool addLocalRef) : base(traversal.Id)
 {
     if (addLocalRef)
     {
         this.AddLocalRef(traversal);
     }
     using (Synchronizer.Lock(traversal.SyncRoot)) {
         this.Group      = traversal.Deck.Group;
         this.DeckId     = traversal.Deck.Id;
         this.Dispositon = traversal.Deck.Disposition;
     }
 }
예제 #7
0
 /// <summary>
 /// Constructor for this object
 /// </summary>
 /// <param name="id">The globally unique identifier for this deck</param>
 /// <param name="disposition"></param>
 /// <param name="humanName"></param>
 public DeckModel(Guid id, DeckDisposition disposition, string humanName, TableOfContentsModel toc, Hashtable slides, ImageHashtable sc, Hashtable ctsl)
 {
     this.m_Id                  = id;
     this.m_Disposition         = disposition;
     this.m_HumanName           = humanName;
     this.m_DeckBackgroundColor = Color.White;
     this.Filename              = "";
     this.Group                 = Group.AllParticipant;
     if (this.Disposition == DeckDisposition.StudentSubmission || this.Disposition == DeckDisposition.QuickPoll)
     {
         this.m_Dirty = true;
     }
     else
     {
         this.m_Dirty = false;
     }
     if (toc == null)
     {
         this.m_TableOfContents = new TableOfContentsModel();
     }
     else
     {
         this.m_TableOfContents = toc;
     }
     if (slides == null)
     {
         this.m_Slides = new Hashtable();
     }
     else
     {
         this.m_Slides = slides;
     }
     if (sc == null)
     {
         this.m_SlideContent = new ImageHashtable();
     }
     else
     {
         this.m_SlideContent = sc;
     }
     if (ctsl != null)
     {
         this.m_ContentToSlideLookup = ctsl;
     }
 }
예제 #8
0
        public SlideModel(Guid id, LocalId localId, SlideDisposition disposition, Rectangle bounds, Guid associationId)
            : this(id, localId, disposition, bounds)
        {
            this.m_AssociationId = associationId;

            //If this is a student submission, the associationID should be set.  In this case we
            //gather some extra information about the association slide and deck.
            if (!m_AssociationId.Equals(Guid.Empty))
            {
                PresentationModel pres = PresentationModel.CurrentPresentation;
                if (pres != null)
                {
                    PresentationModel.DeckTraversalCollection traversals;
                    traversals = pres.DeckTraversals;
                    foreach (DeckTraversalModel dtm in traversals)
                    {
                        DeckModel deck;
                        using (Synchronizer.Lock(dtm.SyncRoot)) {
                            deck = dtm.Deck;
                        }
                        Guid                 deckId;
                        DeckDisposition      deckDisp;
                        TableOfContentsModel toc;
                        using (Synchronizer.Lock(deck.SyncRoot)) {
                            deckId   = deck.Id;
                            deckDisp = deck.Disposition;
                            toc      = deck.TableOfContents;
                        }
                        TableOfContentsModel.Entry tocEntry = toc.GetEntryBySlideId(m_AssociationId);
                        if (tocEntry != null)
                        {
                            using (Synchronizer.Lock(tocEntry.SyncRoot)) {
                                m_AssociationSlideIndex = tocEntry.IndexInParent;
                            }
                            m_AssociationDeckDispostion = deckDisp;
                            m_AssociationDeckId         = deckId;
                            break;
                        }
                    }
                }
            }
        }
예제 #9
0
 /// <summary>
 /// Constructor for this object
 /// </summary>
 /// <param name="id">The globally unique identifier for this deck</param>
 /// <param name="disposition"></param>
 /// <param name="humanName"></param>
 public DeckModel(Guid id, DeckDisposition disposition, string humanName, TableOfContentsModel toc, Hashtable slides, ImageHashtable sc, Hashtable ctsl)
 {
     this.m_Id = id;
     this.m_Disposition = disposition;
     this.m_HumanName = humanName;
     this.m_DeckBackgroundColor = Color.White;
     this.Filename = "";
     this.Group = Group.AllParticipant;
     if (this.Disposition == DeckDisposition.StudentSubmission || this.Disposition == DeckDisposition.QuickPoll) {
         this.m_Dirty = true;
     }
     else {
         this.m_Dirty = false;
     }
     if (toc == null) {
         this.m_TableOfContents = new TableOfContentsModel();
     }
     else {
         this.m_TableOfContents = toc;
     }
     if (slides == null) {
         this.m_Slides = new Hashtable();
     }
     else {
         this.m_Slides = slides;
     }
     if (sc == null) {
         this.m_SlideContent = new ImageHashtable();
     }
     else {
         this.m_SlideContent = sc;
     }
     if (ctsl != null) {
         this.m_ContentToSlideLookup = ctsl;
     }
 }
예제 #10
0
 public DeckModel(Guid id, DeckDisposition disposition, string humanName)
     : this(id, disposition, humanName, null, null, null, null)
 {
 }
예제 #11
0
 /// <summary>
 /// Constructor for this object
 /// </summary>
 /// <param name="id">The globally unique identifier for this deck</param>
 /// <param name="disposition">The disposition of this deck</param>
 public DeckModel(Guid id, DeckDisposition disposition)
     : this(id, disposition, null, null, null, null, null)
 {
 }
예제 #12
0
 public DeckModel(Guid id, DeckDisposition disposition, string humanName) : this(id, disposition, humanName, null, null, null, null)
 {
 }
예제 #13
0
 /// <summary>
 /// Constructor for this object
 /// </summary>
 /// <param name="id">The globally unique identifier for this deck</param>
 /// <param name="disposition">The disposition of this deck</param>
 public DeckModel(Guid id, DeckDisposition disposition) : this(id, disposition, null, null, null, null, null)
 {
 }
예제 #14
0
 public DeckMessage(Message parent, SerializedPacket p) : base(parent, p)
 {
     this.HumanName           = SerializedPacket.DeserializeString(p.GetNextPart());
     this.Disposition         = (DeckDisposition)SerializedPacket.DeserializeLong(p.GetNextPart());
     this.DeckBackgroundColor = SerializedPacket.DeserializeColor(p.GetNextPart());
 }
예제 #15
0
        public SlideModel(Guid id, LocalId localId, SlideDisposition disposition, Rectangle bounds, Guid associationId)
            : this(id, localId, disposition, bounds)
        {
            this.m_AssociationId = associationId;

            //If this is a student submission, the associationID should be set.  In this case we
            //gather some extra information about the association slide and deck.
            if (!m_AssociationId.Equals(Guid.Empty)) {
                PresentationModel pres = PresentationModel.CurrentPresentation;
                if (pres != null) {
                    PresentationModel.DeckTraversalCollection traversals;
                    using (Synchronizer.Lock(pres.SyncRoot)) {
                        traversals = PresentationModel.CurrentPresentation.DeckTraversals;
                    }
                    foreach (DeckTraversalModel dtm in traversals) {
                        DeckModel deck;
                        using (Synchronizer.Lock(dtm.SyncRoot)) {
                            deck = dtm.Deck;
                        }
                        Guid deckId;
                        DeckDisposition deckDisp;
                        TableOfContentsModel toc;
                        using (Synchronizer.Lock(deck.SyncRoot)) {
                            deckId = deck.Id;
                            deckDisp = deck.Disposition;
                            toc = deck.TableOfContents;
                        }
                        TableOfContentsModel.Entry tocEntry = toc.GetEntryBySlideId(m_AssociationId);
                        if (tocEntry != null) {
                            using (Synchronizer.Lock(tocEntry.SyncRoot)) {
                                m_AssociationSlideIndex = tocEntry.IndexInParent;
                            }
                            m_AssociationDeckDispostion = deckDisp;
                            m_AssociationDeckId = deckId;
                            break;
                        }
                    }
                }
            }
        }