/// <summary>
        /// Constructs a listener for changes to the deck traversal
        /// </summary>
        /// <param name="sender">The event queue for handling updates</param>
        /// <param name="presentation">The presentation</param>
        /// <param name="traversal">The deck traversal we care about </param>
        public DeckTraversalWebService(SendingQueue sender, PresentationModel presentation, DeckTraversalModel traversal)
        {
            this.m_Sender        = sender;
            this.m_Presentation  = presentation;
            this.m_DeckTraversal = traversal;

            // Create the deck object
            string deckName = "Untitled Deck";

            using (Synchronizer.Lock(this.m_DeckTraversal.SyncRoot))
            {
                using (Synchronizer.Lock(this.m_DeckTraversal.Deck))
                {
                    deckName = this.m_DeckTraversal.Deck.HumanName;
                }
            }
            SimpleWebDeck deck = new SimpleWebDeck();

            deck.Name = deckName;
            lock (WebService.Instance.GlobalModel) {
                WebService.Instance.GlobalModel.Decks.Add(deck);
            }
            WebService.Instance.UpdateModel();

            this.m_DeckWebService = new DeckWebService(this.m_Sender, this.m_Presentation, this.m_DeckTraversal.Deck);

            this.m_CurrentChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleCurrentChanged));
            this.m_DeckTraversal.Changed["Current"].Add(this.m_CurrentChangedDispatcher.Dispatcher);
        }
Exemple #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="sender">The network queue to send messages on</param>
        /// <param name="model">The presenter model</param>
        public StudentSubmissionNetworkService(SendingQueue sender, PresenterModel model)
        {
            this.m_Sender           = sender;
            this.m_Model            = model;
            this.m_SendingLock      = false;
            this.m_SendingLockTimer = new System.Timers.Timer();
            if (model.ViewerState != null)
            {
                using (Synchronizer.Lock(this.m_Model.ViewerState.SyncRoot))
                {
                    this.m_SendingLockTimer.Interval = this.m_Model.ViewerState.StudentSubmissionInterval * 1000;
                }
            }
            this.m_SendingLockTimer.Elapsed += new System.Timers.ElapsedEventHandler(SendingLockTimer_Elapsed);
            this.m_SendingLockTimer.Enabled  = false;

            // Setup the event listener for this
            this.m_SendChangeDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleSendSubmission));

            //FV: Not locking here resolves a lock order warning.
            //using( Synchronizer.Lock( this.m_Model.ViewerState.SyncRoot ) ) {
            this.m_Model.ViewerState.Changed["StudentSubmissionSignal"].Add(this.m_SendChangeDispatcher.Dispatcher);
            //}

            this.m_SubmissionIntervalDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleSubmissionIntervalChanged));
            this.m_Model.ViewerState.Changed["StudentSubmissionInterval"].Add(this.m_SubmissionIntervalDispatcher.Dispatcher);
        }
Exemple #3
0
            public StartupTabControl(Size size, Point location, int tabIndex, StartupForm stup, PresenterModel model, ControlEventQueue eventqueue)
            {
                this.SuspendLayout();
                this.m_Startup     = stup;
                this.m_Model       = model;
                this.ItemSize      = new System.Drawing.Size(52, 18);
                this.Location      = location;
                this.Name          = "tabControl";
                this.SelectedIndex = 0;
                this.Font          = Model.Viewer.ViewerStateModel.StringFont;
                this.Size          = size;
                this.TabIndex      = tabIndex;
                this.m_AdvancedTab = new AdvancedTab(this.m_Model);
                this.m_UDPTab      = new UDPTab(this.m_Model);
                this.m_UDPTab.Controls.Add(this.m_Startup.m_UDPPanel);
                this.Controls.Add(this.m_UDPTab);
                this.Controls.Add(this.m_AdvancedTab);

                this.m_AdvancedListener = new EventQueue.PropertyEventDispatcher(
                    this.m_Startup.m_EventQueue,
                    new PropertyEventHandler(this.HandleAdvancedChanged));
                this.m_Model.ViewerState.Changed["Advanced"].Add(this.m_AdvancedListener.Dispatcher);
                this.m_AdvancedListener.Dispatcher(this, null);

                this.ControlAdded += new ControlEventHandler(UDPTabAdded);

                this.ResumeLayout();
            }
Exemple #4
0
        public StudentNavigationTypeMenuItem(ControlEventQueue dispatcher, PresenterModel model)
            : base(dispatcher, model)
        {
            this.Text = Strings.StudentNavigationType;

            this.m_FullNavigation        = new MenuItem(Strings.FullNavigation);
            this.m_FullNavigation.Click += new EventHandler(m_FullNavigation_Click);
            this.MenuItems.Add(this.m_FullNavigation);

            this.m_VisitedSlidesNavigation        = new MenuItem(Strings.VisitedSlidesNavigation);
            this.m_VisitedSlidesNavigation.Click += new EventHandler(m_VisitedSlidesNavigation_Click);
            this.MenuItems.Add(this.m_VisitedSlidesNavigation);

            this.m_NoNavigation        = new MenuItem(Strings.NoNavigation);
            this.m_NoNavigation.Click += new EventHandler(m_NoNavigation_Click);
            this.MenuItems.Add(this.m_NoNavigation);
            this.m_HandleStudentNavChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleStudentNavChanged));
            using (Synchronizer.Lock(this.m_Model.Participant.SyncRoot)) {
                //Listen to changes in Student Nav Types for the current role, if it is an InstructorModel
                if (this.m_Role is InstructorModel)
                {
                    using (Synchronizer.Lock(this.m_Model.Participant.Role.SyncRoot)) {
                        ((InstructorModel)this.m_Role).Changed["StudentNavigationType"].Add(this.m_HandleStudentNavChangedDispatcher.Dispatcher);
                    }
                }
            }
            this.HandleStudentNavChanged(this, null);
            using (Synchronizer.Lock(this.m_Role)) {
                if (((InstructorModel)this.m_Role).StudentNavigationType == LinkedDeckTraversalModel.NavigationSelector.Full)
                {
                    this.m_FullNavigation.Checked = true;
                }
            }
        }
        public LinkedDeckTraversalModel(EventQueue dispatcher, Guid id, PresenterModel model, DeckTraversalModel linked)
            : base(id, linked.Deck)
        {
            this.m_EventQueue = dispatcher;
            this.m_Model      = model;
            this.m_Linked     = linked;
            // TODO: Evaluate whether we need to support other types of DeckTraversalModels.
            this.m_Unlinked = new SlideDeckTraversalModel(Guid.NewGuid(), linked.Deck);

            this.m_CurrentChangedDispatcher  = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleCurrentChanged));
            this.m_NextChangedDispatcher     = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleNextChanged));
            this.m_PreviousChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandlePreviousChanged));
            this.m_AbsoluteCurrentSlideIndexChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleAbsoluteCurrentSlideIndexChanged));

            // Set this.m_Active and register event listeners via UpdateMode.
            this.m_Mode = DeckTraversalSelector.Linked;
            this.UpdateMode(DeckTraversalSelector.Linked);

            // Since UpdateMode doesn't initialize the event listeners like the Mode setter does, we must do this.
            this.m_CurrentChangedDispatcher.Dispatcher(this, null);
            this.m_NextChangedDispatcher.Dispatcher(this, null);
            this.m_PreviousChangedDispatcher.Dispatcher(this, null);
            this.m_AbsoluteCurrentSlideIndexChangedDispatcher.Dispatcher(this, null);

            // Watch for changes to the current network association.
            // When we're associated with an Instructor, we must obey its ForcingStudentNavigationLock policy.
            this.m_NetworkAssociationChangedDispatcher           = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleNetworkAssociationChanged));
            this.m_NetworkAssociationRoleChangedDispatcher       = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleNetworkAssociationRoleChanged));
            this.m_ForcingStudentNavigationLockChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleForcingStudentNavigationLockChanged));
            this.m_Model.Network.Changed["Association"].Add(this.m_NetworkAssociationChangedDispatcher.Dispatcher);
            this.m_NetworkAssociationChangedDispatcher.Dispatcher(this, null);
        }
        public PresentationRadioButton(ControlEventQueue dispatcher, PresentationModel presentation, StartupForm stup, PresentationsPanel parent, int i, ClassroomModel classroom)
        {
            this.m_EventQueue         = dispatcher;
            this.m_Presentation       = presentation;
            this.Tag                  = presentation.Owner;
            this.m_Startup            = stup;
            this.Parent               = parent;
            this.m_PresentationsPanel = parent;
            this.m_Classroom          = classroom;
            this.Parent.Controls.Add(this);


            this.FlatStyle = FlatStyle.System;
            this.Font      = Model.Viewer.ViewerStateModel.StringFont1;
            this.index     = i;

            this.Location = new Point(10, (2 * this.Font.Height) * (this.index + 1));
            this.Size     = new Size(this.Parent.Width - 14, 2 * this.Font.Height);

            //If the role changes we should remove ourself from our parent.
            this.m_ViewerStateRoleListener = new EventQueue.PropertyEventDispatcher(this.m_Startup.m_EventQueue,
                                                                                    new PropertyEventHandler(this.HandleViewerStateRoleChanged));
            this.m_Startup.m_Model.ViewerState.Changed["iRole"].Add(this.m_ViewerStateRoleListener.Dispatcher);



            this.m_HumanNameChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleHumanNameChanged));
            this.Presentation.Changed["HumanName"].Add(this.m_HumanNameChangedDispatcher.Dispatcher);
            this.m_HumanNameChangedDispatcher.Dispatcher(this.Presentation, null);
            this.CheckedChanged += new EventHandler(HandlePresentationSelectionChanged);

            this.m_ConnectedChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleConnectedChanged));
            this.m_Classroom.Changed["Connected"].Add(this.m_ConnectedChangedDispatcher.Dispatcher);
            this.HandleConnectedChanged(this.m_Classroom, null);
        }
Exemple #7
0
        public ImageSheetRenderer(SlideDisplayModel display, ImageSheetModel sheet) : base(display, sheet)
        {
            this.m_Sheet        = sheet;
            repaint_dispatcher_ = new EventQueue.PropertyEventDispatcher(this.SlideDisplay.EventQueue, this.Repaint);

            if (m_Sheet.Image == null)
            {
                // we are looking at a background image
                if (this.m_Sheet.Deck != null)
                {
                    this.m_Sheet.Deck.SlideContentAdded += new PropertyEventHandler(repaint_dispatcher_.Dispatcher);
                }
                else
                {
                    //FIXME: This happened a couple of times.  Ignoring it is not the best fix.
                    Trace.WriteLine("Warning: ImageSheetModel.Deck was found to be null when creating ImageSheetRenderer.");
                }
            }
            else
            {
                //we're looking at an ImageIt image
                this.m_Sheet.Changed["Bounds"].Add(new PropertyEventHandler(repaint_dispatcher_.Dispatcher));
                this.m_Sheet.Changed["Image"].Add(new PropertyEventHandler(repaint_dispatcher_.Dispatcher));
                this.SlideDisplay.Changed["Slide"].Add(new PropertyEventHandler(repaint_dispatcher_.Dispatcher));
            }
        }
Exemple #8
0
        /// <summary>
        /// Construct a new deck web service
        /// </summary>
        /// <param name="sender">The event handler </param>
        /// <param name="presentation">The presentation model</param>
        /// <param name="deck">The deck model</param>
        public DeckWebService(SendingQueue sender, PresentationModel presentation, DeckModel deck)
        {
            this.m_Sender       = sender;
            this.m_Presentation = presentation;
            this.m_Deck         = deck;

            this.m_SlideRemovedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleSlideRemoved));
            this.m_SlideAddedDispatcher   = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleSlideAdded));
//            this.m_SlideContentAddedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleSlideContentAdded));
//            this.m_DeckBackgroundChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleDeckBackgroundChanged));

            this.m_SlideWebServices = new Hashtable();

//            this.m_TableOfContentsWebService = new TableOfContentsWebService(this.m_Sender, this.m_Presentation, this.m_Deck);

            // Lock the deck so no content can be added between registering the event listeners and calling SendAllSlidesAndContent().
            using (Synchronizer.Lock(this.m_Presentation.SyncRoot))
            {
                using (Synchronizer.Lock(deck.SyncRoot))
                {
                    this.m_Deck.SlideRemoved += this.m_SlideRemovedDispatcher.Dispatcher;
                    this.m_Deck.SlideAdded   += this.m_SlideAddedDispatcher.Dispatcher;
//                    this.m_Deck.SlideContentAdded += this.m_SlideContentAddedDispatcher.Dispatcher;
//                    this.m_Deck.Changed["DeckBackgroundColor"].Add(this.m_DeckBackgroundChangedDispatcher.Dispatcher);
//                    this.m_Deck.Changed["DeckBackgroundTemplate"].Add(this.m_DeckBackgroundChangedDispatcher.Dispatcher);
                }
            }

            this.UpdateAllSlidesAndContent();
        }
 public OwnerSubItem(PresentationListViewItem parent) : base(parent, null)
 {
     this.m_Parent = parent;
     this.m_HumanNameChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Parent.m_EventQueue, new PropertyEventHandler(this.HandleHumanNameChanged));
     this.m_Parent.Presentation.Owner.Changed["HumanName"].Add(this.m_HumanNameChangedDispatcher.Dispatcher);
     this.m_HumanNameChangedDispatcher.Dispatcher(this, null);
 }
Exemple #10
0
 public ToggleSlideZoomMenuItem(ControlEventQueue dispatcher, PresenterModel model)
 {
     this.m_EventQueue            = dispatcher;
     this.m_Model                 = model;
     this.m_ZoomChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleZoomChanged));
     this.m_Adapter               = new WorkspaceModelAdapter(dispatcher, this, model);
     this.Text = Strings.ZoomSlide;
 }
Exemple #11
0
            /// <summary>
            /// Constructor
            /// </summary>
            /// <param name="dispatcher">The event queue</param>
            /// <param name="model">The model</param>
            protected ParticipantToolBarButton(ControlEventQueue dispatcher, PresenterModel model)
            {
                this.m_EventQueue = dispatcher;
                this.m_Model      = model;

                this.m_RoleChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleRoleChanged));
                this.m_Model.Participant.Changed["Role"].Add(this.m_RoleChangedDispatcher.Dispatcher);
            }
Exemple #12
0
                public ParticipantsSubItem(PresentationListViewItem parent) : base(parent, null)
                {
                    this.m_Parent = parent;

                    this.m_ParticipantsChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Parent.m_EventQueue, new PropertyEventHandler(this.HandleParticipantsChanged));
                    this.m_Parent.Presentation.Changed["Participants"].Add(this.m_ParticipantsChangedDispatcher.Dispatcher);
                    this.m_ParticipantsChangedDispatcher.Dispatcher(this.m_Parent.Presentation, null);
                }
Exemple #13
0
        /// <summary>
        /// Construct the sheet model
        /// </summary>
        /// <param name="sender">The event queue for async event handling</param>
        /// <param name="srcSheet">The source sheet model</param>
        /// <param name="dstSheet">The destination sheet model</param>
        /// <param name="selector">Unknown</param>
        public SheetMatch(EventQueue sender, SheetModel srcSheet, SheetModel dstSheet /*, SheetMessage.SheetCollection selector*/)
        {
            this.m_Sender      = sender;
            this.m_SourceSheet = srcSheet;
            this.m_DestSheet   = dstSheet;

            this.m_BoundsChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleBoundsChanged));
            this.m_SourceSheet.Changed["Bounds"].Add(this.m_BoundsChangedDispatcher.Dispatcher);
        }
Exemple #14
0
        /// <summary>
        /// Construct the renderer
        /// </summary>
        /// <param name="display">The SlideDisplayModel</param>
        /// <param name="sheet">The QuickPollSheetModel</param>
        public QuickPollSheetRenderer(SlideDisplayModel display, QuickPollSheetModel sheet) : base(display, sheet)
        {
            this.m_Sheet        = sheet;
            repaint_dispatcher_ = new EventQueue.PropertyEventDispatcher(SlideDisplay.EventQueue, this.Repaint);

            /// Add event listeners
            this.m_Sheet.QuickPoll.Changed["Updated"].Add(new PropertyEventHandler(this.repaint_dispatcher_.Dispatcher));
            this.SlideDisplay.Changed["Slide"].Add(new PropertyEventHandler(this.repaint_dispatcher_.Dispatcher));
        }
Exemple #15
0
        public InkSheetAdapter(SlideDisplayModel display, IAdaptee adaptee)
        {
            this.m_SlideDisplay = display;
            this.m_Adaptee      = adaptee;

            this.m_SlideChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_SlideDisplay.EventQueue, new PropertyEventHandler(this.HandleSlideChanged));
            this.m_SlideDisplay.Changed["Slide"].Add(this.m_SlideChangedDispatcher.Dispatcher);
            this.m_SlideChangedDispatcher.Dispatcher(this.m_SlideDisplay, null);
        }
        /// <summary>
        /// Constructor for the scripting network service
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="model"></param>
        /// <param name="diag"></param>
        public ScriptingNetworkService(SendingQueue sender, PresenterModel model)
        {
            this.Sender       = sender;
            this.m_Model      = model;
            this.m_Diagnostic = model.ViewerState.Diagnostic;

            // Set up the change listeners
            this.m_GenericChangeDispatcher = new EventQueue.PropertyEventDispatcher(this.Sender, new PropertyEventHandler(this.HandleGenericChange));
            this.m_Diagnostic.Changed["ExecuteRemoteScript"].Add(this.m_GenericChangeDispatcher.Dispatcher);
        }
Exemple #17
0
            /// <summary>
            /// Constructor
            /// </summary>
            /// <param name="dispatcher">The event queue</param>
            /// <param name="model">The model</param>
            public QuickPollToolBarButton(ControlEventQueue dispatcher, PresenterModel model)
                : base(dispatcher, model)
            {
                this.m_QuickPollChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue,
                                                                                           new PropertyEventHandler(this.HandleQuickPollChanged));
                base.InitializeRole();

                this.Enabled   = false;
                this.m_Adapter = new WorkspaceModelAdapter(this.m_EventQueue, this, this.m_Model);
            }
        /// <summary>
        /// Constructor for the web service.
        /// </summary>
        /// <param name="sender">The event queue to use.</param>
        /// <param name="presentation">The web performance model to listen to.</param>
        public WebPerformanceWebService(SendingQueue sender, WebPerformanceModel performance)
        {
            this.m_Sender         = sender;
            this.m_WebPerformance = performance;

            this.m_RequestSubmissionChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleRequestSubmissionChanged));
            this.m_WebPerformance.Changed["RequestSubmissionSignal"].Add(this.m_RequestSubmissionChangedDispatcher.Dispatcher);
            this.m_RequestLogChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleRequestLogChanged));
            this.m_WebPerformance.Changed["RequestLogSignal"].Add(this.m_RequestLogChangedDispatcher.Dispatcher);
        }
Exemple #19
0
        /// <summary>
        /// Construct a StudentPresentationNetworkService
        /// </summary>
        /// <param name="sender">The event queue to use</param>
        /// <param name="presentation">The PresentationModel to listen for changes to</param>
        public StudentPresentationNetworkService(SendingQueue sender, PresentationModel presentation)
        {
            this.m_Sender       = sender;
            this.m_Presentation = presentation;

            this.m_StudentQuickPollNetworkService = new StudentQuickPollNetworkService(this.m_Sender, this.m_Presentation);

            this.m_StudentQuickPollChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleStudentQuickPollChanged));
            this.m_Presentation.Changed["QuickPoll"].Add(this.m_StudentQuickPollChangedDispatcher.Dispatcher);
        }
Exemple #20
0
 public InstructorMenuItem(ControlEventQueue dispatcher, PresenterModel model)
 {
     this.m_Model      = model;
     this.m_EventQueue = dispatcher;
     this.m_HandleRoleChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleRoleChanged));
     //Save a copy of the role
     this.m_Role = this.m_Model.Participant.Role;
     //Listen to changes in Role
     this.m_Model.Participant.Changed["Role"].Add(this.m_HandleRoleChangedDispatcher.Dispatcher);
 }
        /// <summary>
        /// Constructs a new QuickPollResultNetworkService
        /// </summary>
        /// <param name="sender">The message queue to use</param>
        /// <param name="presentation">The PresentationModel to associate this service with</param>
        /// <param name="poll">The QuickPollModel to associate this service with</param>
        /// <param name="result">The QuickPollResultModel to associate this service with</param>
        public QuickPollResultNetworkService(SendingQueue sender, PresentationModel presentation, QuickPollModel poll, QuickPollResultModel result)
        {
            this.m_Sender       = sender;
            this.m_Presentation = presentation;
            this.m_QuickPoll    = poll;
            this.m_Result       = result;

            // Listen to changes tot he ResultString
            this.m_ResultChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleResultChanged));
            this.m_Result.Changed["ResultString"].Add(this.m_ResultChangedDispatcher.Dispatcher);
        }
Exemple #22
0
            /// <summary>
            /// Constructor
            /// </summary>
            /// <param name="dispatcher">The event queue</param>
            /// <param name="model">The model</param>
            public LinkedNavigationToolBarButton(ControlEventQueue dispatcher, PresenterModel model) : base(dispatcher, model)
            {
                this.m_Model = model;

                // Listen for changes to the Role property
                this.m_RoleChangedDispatcher = new EventQueue.PropertyEventDispatcher(dispatcher, new PropertyEventHandler(this.HandleRoleChanged));
                this.m_Model.Participant.Changed["Role"].Add(this.m_RoleChangedDispatcher.Dispatcher);
                this.m_RoleChangedDispatcher.Dispatcher(this, null);

                this.Initialize();
            }
Exemple #23
0
            public ToolBarMenuItem(ControlEventQueue dispatcher, PresenterModel model, bool mode, string text)
                : base(text)
            {
                this.m_Model         = model;
                this.m_ClassmateMode = mode;

                this.m_ToolBarModeListener = new EventQueue.PropertyEventDispatcher(dispatcher,
                                                                                    new PropertyEventHandler(this.HandleToolBarModeChanged));
                this.m_Model.ViewerState.Changed["ClassmateMode"].Add(this.m_ToolBarModeListener.Dispatcher);
                this.m_ToolBarModeListener.Dispatcher(this, null);
            }
Exemple #24
0
        public DeckTraversalNetworkService(SendingQueue sender, PresentationModel presentation, DeckTraversalModel traversal)
        {
            this.m_Sender        = sender;
            this.m_Presentation  = presentation;
            this.m_DeckTraversal = traversal;

            this.m_DeckNetworkService = new DeckNetworkService(this.m_Sender, this.m_Presentation, this.m_DeckTraversal.Deck);

            this.m_CurrentChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Sender, new PropertyEventHandler(this.HandleCurrentChanged));
            this.m_DeckTraversal.Changed["Current"].Add(this.m_CurrentChangedDispatcher.Dispatcher);
        }
Exemple #25
0
            public SSWidthMenuItem(ControlEventQueue dispatcher, PresenterModel model, int width, string text)
                : base(text)
            {
                this.m_Model = model;
                this.m_Width = width;

                this.m_SSFilmStripWidthListener = new EventQueue.PropertyEventDispatcher(dispatcher,
                                                                                         new PropertyEventHandler(this.HandleSSFilmStripWidthChanged));
                this.m_Model.ViewerState.Changed["SSFilmStripWidth"].Add(this.m_SSFilmStripWidthListener.Dispatcher);
                this.m_SSFilmStripWidthListener.Dispatcher(this, null);
            }
Exemple #26
0
            public DockMenuItem(ControlEventQueue dispatcher, PresenterModel model, DockStyle dock, string text)
                : base(text)
            {
                this.m_Model     = model;
                this.m_DockStyle = dock;

                this.m_FilmStripAlignmentListener = new EventQueue.PropertyEventDispatcher(dispatcher,
                                                                                           new PropertyEventHandler(this.HandleFilmStripAlignmentChanged));
                this.m_Model.ViewerState.Changed["FilmStripAlignment"].Add(this.m_FilmStripAlignmentListener.Dispatcher);
                this.m_FilmStripAlignmentListener.Dispatcher(this, null);
            }
Exemple #27
0
                public ParticipantsSubItem(ClassroomListViewItem parent) : base(parent, null)
                {
                    this.m_Parent = parent;

                    Debug.Assert(this.m_Parent.Classroom != null);
                    // Note: the parent's classroom is immutable.
                    this.m_ParticipantsChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_Parent.m_EventQueue,
                                                                                                  new PropertyEventHandler(this.HandleParticipantsChanged));
                    this.m_Parent.Classroom.Changed["Participants"].Add(this.m_ParticipantsChangedDispatcher.Dispatcher);
                    this.m_ParticipantsChangedDispatcher.Dispatcher(this.m_Parent.Classroom, null);
                }
        public TextSheetUndoService(EventQueue dispatcher, UndoModel undo, DeckModel deck, SlideModel slide, TextSheetModel sheet) : base(undo, deck, slide, sheet)
        {
            this.m_EventQueue             = dispatcher;
            this.m_SheetChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleSheetChanged));

            //Ignore any sheets with the Remote flag
            if ((sheet.Disposition & SheetDisposition.Remote) == 0)
            {
                this.Sheet.Changed["Text"].Add(this.m_SheetChangedDispatcher.Dispatcher);
                this.Sheet.Changed["Font"].Add(this.m_SheetChangedDispatcher.Dispatcher);
            }
        }
Exemple #29
0
        public TextSheetRenderer(SlideDisplayModel display, TextSheetModel sheet) : base(display, sheet)
        {
            this.m_Sheet = sheet;

            repaint_dispatcher_ = new EventQueue.PropertyEventDispatcher(SlideDisplay.EventQueue, this.Repaint);
            /// Add event listeners
            this.m_Sheet.Changed["Text"].Add(new PropertyEventHandler(this.repaint_dispatcher_.Dispatcher));
            this.m_Sheet.Changed["Font"].Add(new PropertyEventHandler(this.repaint_dispatcher_.Dispatcher));
            this.m_Sheet.Changed["Bounds"].Add(new PropertyEventHandler(this.repaint_dispatcher_.Dispatcher));
            this.m_Sheet.Changed["Color"].Add(new PropertyEventHandler(this.repaint_dispatcher_.Dispatcher));
            this.SlideDisplay.Changed["Slide"].Add(new PropertyEventHandler(this.repaint_dispatcher_.Dispatcher));
        }
Exemple #30
0
        public DeckUndoService(EventQueue dispatcher, UndoModel undo, DeckModel deck)
        {
            this.m_EventQueue = dispatcher;
            this.m_Undo       = undo;
            this.m_Deck       = deck;

            this.m_DeckChangedDispatcher = new EventQueue.PropertyEventDispatcher(this.m_EventQueue, new PropertyEventHandler(this.HandleDeckChanged));
            this.m_Deck.Changed["HumanName"].Add(this.m_DeckChangedDispatcher.Dispatcher);
            this.m_Deck.TableOfContents.Changed["Entries"].Add(this.m_DeckChangedDispatcher.Dispatcher);

            this.m_EntriesCollectionHelper = new EntriesCollectionHelper(this);
        }