Exemplo n.º 1
0
        /// <summary>
        /// This should be used only if local node is instructor and if this slide is a student submission which is being
        /// sent to public displays.  In this case we want to add a few details about the slide and deck which are the basis
        /// for the student submission.  This will allow a presentation archive to be post-processed and reused much more easily.
        /// </summary>
        /// <param name="guid"></param>
        private void AddAssociationExtension(SlideModel slide)
        {
            SlideAssociationExtension ext = new SlideAssociationExtension(slide.AssociationId);

            ext.SlideIndex = slide.AssociationSlideIndex;
            ext.DeckID     = slide.AssociationDeckId;
            ext.DeckType   = slide.AssociationDeckDisposition;
            this.Extension = new ExtensionWrapper(ext, SlideAssociationExtension.ExtensionId);
        }
Exemplo n.º 2
0
 /// <summary>
 /// This should be used only if local node is instructor and if this slide is a student submission which is being
 /// sent to public displays.  In this case we want to add a few details about the slide and deck which are the basis
 /// for the student submission.  This will allow a presentation archive to be post-processed and reused much more easily.
 /// </summary>
 /// <param name="guid"></param>
 private void AddAssociationExtension(SlideModel slide)
 {
     SlideAssociationExtension ext = new SlideAssociationExtension(slide.AssociationId);
     ext.SlideIndex = slide.AssociationSlideIndex;
     ext.DeckID = slide.AssociationDeckId;
     ext.DeckType = slide.AssociationDeckDisposition;
     this.Extension = new ExtensionWrapper(ext, SlideAssociationExtension.ExtensionId);
 }
            public TocEntry(CP3Msgs.TableOfContentsEntryMessage tocem, Guid deckid, CP3.Model.Presentation.DeckDisposition disposition, Guid ssDeckId)
            {
                deckAssociation          = Guid.Empty;
                associationSlideId       = Guid.Empty;
                this.deckTypeAssociation = DeckTypeEnum.Undefined;
                slideAssociation         = -1;
                deckId = deckid;

                deckType = DeckTypeEnum.Presentation;

                if ((disposition & CP3.Model.Presentation.DeckDisposition.Whiteboard) != 0)
                {
                    deckType = DeckTypeEnum.Whiteboard;
                }
                if ((disposition & CP3.Model.Presentation.DeckDisposition.StudentSubmission) != 0)
                {
                    deckType = DeckTypeEnum.StudentSubmission;
                    if (!ssDeckId.Equals(Guid.Empty))
                    {
                        deckId = ssDeckId;
                    }
                }
                if ((disposition & CP3.Model.Presentation.DeckDisposition.QuickPoll) != 0)
                {
                    deckType = DeckTypeEnum.QuickPoll;
                }

                slideId = (Guid)tocem.Parent.TargetId;

                //Debug code:
                //if (slideId.Equals(new Guid("96c09fe9-f0be-4421-9cf4-7d26032382a1"))) {
                //    Debug.WriteLine("Found slide.");
                //}

                title     = ((CP3Msgs.SlideInformationMessage)tocem.Parent).Title;
                slideSize = ((CP3Msgs.SlideInformationMessage)tocem.Parent).Zoom;

                ///If this is Color.Empty then the slide will use the Deck background color.  If that one is also
                ///Color.Empty, then it will default to white.
                backgroundColor = ((CP3Msgs.SlideInformationMessage)tocem.Parent).SlideBackgroundColor;

                associationSlideId = ((CP3Msgs.SlideInformationMessage)tocem.Parent).AssociationSlideId;
                if (tocem.PathFromRoot.Length == 1)
                {
                    slideIndex = tocem.PathFromRoot[0]; //This is a zero-based index.
                }

                if (!associationSlideId.Equals(Guid.Empty))
                {
                    //About CP3 build 1603 we added a message extension to help map SS slides back to the source slide in the presentation.
                    CP3Msgs.SlideInformationMessage sim = (CP3Msgs.SlideInformationMessage)tocem.Parent;
                    if (sim.Extension != null)
                    {
                        CP3.Misc.ExtensionWrapper extw = sim.Extension as CP3.Misc.ExtensionWrapper;
                        if (extw != null)
                        {
                            if (extw.ExtensionType.Equals(CP3Msgs.SlideAssociationExtension.ExtensionId))
                            {
                                CP3Msgs.SlideAssociationExtension assnExt = (CP3Msgs.SlideAssociationExtension)(extw.ExtensionObject);
                                this.associationSlideId = assnExt.SlideID;
                                this.deckAssociation    = assnExt.DeckID;
                                this.slideAssociation   = assnExt.SlideIndex;
                                if ((assnExt.DeckType & CP3.Model.Presentation.DeckDisposition.StudentSubmission) != 0)
                                {
                                    this.deckTypeAssociation = DeckTypeEnum.StudentSubmission;
                                }
                                if ((assnExt.DeckType & CP3.Model.Presentation.DeckDisposition.Whiteboard) != 0)
                                {
                                    this.deckTypeAssociation = DeckTypeEnum.Whiteboard;
                                }
                                if ((assnExt.DeckType & CP3.Model.Presentation.DeckDisposition.QuickPoll) != 0)
                                {
                                    this.deckTypeAssociation = DeckTypeEnum.QuickPoll;
                                }
                                if (assnExt.DeckType == CP3.Model.Presentation.DeckDisposition.Empty)
                                {
                                    this.deckTypeAssociation = DeckTypeEnum.Presentation;
                                }
                            }
                        }
                    }
                }
            }