/// <summary>
        /// Construct.
        /// </summary>
        /// <param name="msMinDequeuePeriod">Minimum delay in milliseconds between dequeue events</param>
        /// <param name="scriptBitrate">Bits per second available in the current Windows Media script stream</param>
        public ScriptQueue(int msMinDequeuePeriod, int scriptBitrate, String baseUrl, String extent)
        {
            seenStudentSubmissions = new Hashtable();
            rtUpdate         = new RTUpdate();
            mainQueue        = new ArrayList();
            subQueue         = new ArrayList();
            lastSlideTime    = lastURLTime = lastScrollTime = DateTime.Now;
            lastEnqueueTime  = DateTime.MinValue;
            lastSlideIndex   = 0;
            lastDeckGuid     = Guid.Empty;
            minDequeuePeriod = msMinDequeuePeriod;

            this.scriptBitrate = scriptBitrate;
            maxBytesPerSecond  = scriptBitrate / 10; //theoretically we would divide by 8, but in practice we need a little extra safety factor.
            bwUpdateLockObject = new object();

            this.baseUrl = baseUrl;
            this.extent  = extent;
            lastUrl      = null;

            scEnqueueMutex     = new Mutex(false, "scEnqueue");
            DequeueThread      = new Thread(new ThreadStart(dequeueThread));
            DequeueThread.Name = "ScriptQueue dequeue thread";
            DequeueThread.SetApartmentState(ApartmentState.MTA); //Needed for WM interop
            DequeueThread.Start();
            LastRtUpdate = new RTUpdate();
            cp3Mgr       = new CP3Manager.CP3Manager();
        }
Exemple #2
0
        public SlideImageMgr(PresenterWireFormatType format, int width, int height)
        {
            this.format       = format;
            currentSlide      = new SlideReference();
            this.exportWidth  = width;
            this.exportHeight = height;

            //Set the default background colors
            if ((format == PresenterWireFormatType.CPCapability) ||
                (format == PresenterWireFormatType.CPNav))
            {
                currentSlide.SetBGColor(Color.PapayaWhip);
            }
            else
            {
                currentSlide.SetBGColor(Color.White);
            }

            if (format == PresenterWireFormatType.CP3)
            {
                cp3Mgr = new CP3Manager.CP3Manager();
            }

            slideImages   = new Hashtable();
            orgToResource = new Hashtable();
            nullSlide     = null;
        }