public PresenterManager(RtpManager rtpMgr, MainForm mainform)
        {
            eventLog      = new EventLog("WMG", ".", "WMGCore");
            this.mainform = mainform;
            rtpManager    = rtpMgr;
            rtpManager.OnPresentationStreamAdded   += new RtpManager.PresentationStreamAddedHandler(PresentationStreamAdded);
            rtpManager.OnPresentationStreamRemoved += new RtpManager.PresentationStreamRemovedHandler(PresentationStreamRemoved);

            RestoreConfig();

            BeaconTimeout          = new TimeSpan(0, 0, 10);
            livenessMonitor        = new BeaconPacketSet();
            maintenanceThread      = null;
            LastSlideTime          = DateTime.Now;
            scriptQueue            = null;
            presenterListenThreads = new ArrayList();
            StopListeningNow       = false;
            DefaultScriptBitrate   = 10000;

            StartMaintenanceThread();

            // Set initial state of presenter integration,
            // start the presenter listener, if appropriate.
            SetInitialPresenterState();
        }
 private void stopScriptQueue()
 {
     if (scriptQueue != null)
     {
         scriptQueue.Dispose();
         scriptQueue = null;
     }
 }
        private void startScriptQueue(int bitrate)
        {
            if (scriptQueue != null)
            {
                scriptQueue.Dispose();
                scriptQueue = null;
            }

            scriptQueue                    = new ScriptQueue(100, bitrate, baseURL, imageExtent);
            scriptQueue.OnDequeue         += new ScriptQueue.dequeueHandler(ScriptDequeueHandler);
            scriptQueue.OnEnqueue         += new ScriptQueue.enqueueHandler(ScriptEnqueueHandler);
            scriptQueue.OnSlideTransition += new ScriptQueue.slideTransitionHandler(ScriptSlideTransitionHandler);
        }