Exemplo n.º 1
0
        private static List <WBEvent> GetWBSequenceData(int second)
        {
            try
            {
                if (wbSequenceIndex == null)
                {
                    var buffer = FileApi.GetIndexFile(wbSequenceIndexFile);
                    wbSequenceIndexList = FileApi.GetIndexList(buffer);
                    wbSequenceIndex     = FileApi.GetWBIndex(wbSequenceIndexList);
                }

                TimeSpan       tspan  = TimeSpan.FromSeconds(second);
                List <WBEvent> events = FileApi.GetWBSequenceData(wbSequenceDataFile, wbSequenceIndexList, wbSequenceIndex, WBEvent.StreamSize, tspan);
                return(events);
            }
            catch (Exception)
            {
                return(null);
            }
        }
Exemplo n.º 2
0
        private static List <WBLine> GetWBImageData(int second)
        {
            try
            {
                if (wbImageIndex == null)
                {
                    var buffer = FileApi.GetIndexFile(wbImageIndexFile);
                    wbImageIndexList = FileApi.GetIndexList(buffer);
                    wbImageIndex     = FileApi.GetWBIndex(wbImageIndexList);
                }

                TimeSpan      tspan = TimeSpan.FromSeconds(second);
                List <WBLine> lines = FileApi.GetWBImageData(wbImageDataFile, wbImageIndexList, wbImageIndex, WBLine.StreamSize, tspan);
                return(lines);
            }
            catch (Exception)
            {
                return(null);
            }
        }