示例#1
0
        // Constructor
        public VsRawEncoder(long syncTimer) : base(syncTimer)
        {
            timeMaxLength  = 0;
            this.syncTimer = syncTimer;
            //
            // timer defines the time interval between two motions.
            //
            this.stimer = new System.Timers.Timer();
            ((System.ComponentModel.ISupportInitialize)(this.stimer)).BeginInit();
            this.stimer.Interval = 1000;
            this.stimer.Elapsed += new System.Timers.ElapsedEventHandler(this.process_MaxlengthStop);
            ((System.ComponentModel.ISupportInitialize)(this.stimer)).EndInit();
            this.stimer.Start();

            // convertor
            vsConvert = new VsEncodeConverter();
            vsConvert.Start();
            EncodeOut += new VsEncodeEventHandler(vsConvert.FrameIn);
        }
示例#2
0
        protected override void Dispose(bool disposing)
        {
            // stop timer
            timer.Stop();
            stimer.Stop();

            // stop convertor
            if (vsConvert != null)
            {
                vsConvert.Dispose();
                vsConvert = null;
            }

            // stop encoder
            if (vsEncoder != null)
            {
                vsEncoder.Dispose();
                vsEncoder = null;
            }

            base.Dispose(true);
        }
示例#3
0
        protected override void Dispose(bool disposing)
        {
            // stop timer
            timer.Stop();
            stimer.Stop();

            // stop convertor
            if (vsConvert != null)
            {
                vsConvert.Dispose();
                vsConvert = null;
            }

            // stop encoder
            if (vsEncoder != null)
            {
                vsEncoder.Dispose();
                vsEncoder = null;
            }

            base.Dispose(true);
        }
示例#4
0
        // Constructor
        public VsRawEncoder(long syncTimer):base(syncTimer)
        {
            timeMaxLength = 0;
            this.syncTimer = syncTimer;
            // 
            // timer defines the time interval between two motions. 
            // 
            this.stimer = new System.Timers.Timer();
            ((System.ComponentModel.ISupportInitialize)(this.stimer)).BeginInit();
            this.stimer.Interval = 1000;
            this.stimer.Elapsed += new System.Timers.ElapsedEventHandler(this.process_MaxlengthStop);
            ((System.ComponentModel.ISupportInitialize)(this.stimer)).EndInit();
            this.stimer.Start();

            // convertor
            vsConvert = new VsEncodeConverter();
            vsConvert.Start();
            EncodeOut += new VsEncodeEventHandler(vsConvert.FrameIn);
        }