Exemplo n.º 1
0
        /// <summary>
        /// Handle when the quickpoll changes by disposing of the old service and recreating it
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void HandleStudentQuickPollChanged(object sender, PropertyEventArgs args)
        {
            if (this.m_StudentQuickPollNetworkService != null)
            {
                this.m_StudentQuickPollNetworkService.Dispose();
            }

            this.m_StudentQuickPollNetworkService = new StudentQuickPollNetworkService(this.m_Sender, this.m_Presentation);
        }
Exemplo n.º 2
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);
        }
        /// <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 );
        }
 public QuickPollResultCollectionHelper( StudentQuickPollNetworkService service )
     : base(service.m_Sender, service.m_QuickPoll, "QuickPollResults")
 {
     this.m_Service = service;
     base.Initialize();
 }
 public QuickPollResultCollectionHelper(StudentQuickPollNetworkService service)
     : base(service.m_Sender, service.m_QuickPoll, "QuickPollResults")
 {
     this.m_Service = service;
     base.Initialize();
 }
        /// <summary>
        /// Handle when the quickpoll changes by disposing of the old service and recreating it
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        private void HandleStudentQuickPollChanged( object sender, PropertyEventArgs args )
        {
            if( this.m_StudentQuickPollNetworkService != null ) {
                this.m_StudentQuickPollNetworkService.Dispose();
            }

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