Beispiel #1
0
        /// <summary>
        /// Load timecodes from a timecode file
        /// WARNING, it cleans the previous frame list and builds a new one
        /// </summary>
        /// <param name="tcFile">the filename of the timecodes</param>
        /// <param name="accuracy">the number of decimal digits</param>
        public void LoadTimecodes(String tcFile, Boolean writeDump, Int32 accuracy)
        {
            _FrameList.Clear();
            _FrameStatsList.Clear();
            _FrameSectionList.Clear();
            TimeCodeParser tcparser = new TimeCodeParser();

            tcparser.ParseTimecodes(tcFile, this, writeDump);
            _AssumedFramerate       = tcparser.AssumedFrameRate;
            _TimecodesVersionLoaded = tcparser.TimecodesFileVersion;
            CalculateStats(accuracy);
            _HasTimeCodes = true;
        }
Beispiel #2
0
 private void refreshMap(Boolean resize)
 {
     if (resize)
     {
         Int32 newSteps = Convert.ToInt32(Convert.ToDouble(vfl.Count) / Convert.ToDouble(picMap.Width) + 0.5);
         Int32 oldSteps = trackMap.Maximum + 1;
         Int32 oldValue = trackMap.Value;
         Int32 newValue = Convert.ToInt32(Convert.ToDouble(newSteps * oldValue) / Convert.ToDouble(oldSteps));
         trackMap.Minimum = 0;
         trackMap.Maximum = newSteps - 1;
         trackMap.Value   = newValue;
     }
     lblMapFrames.Text = String.Format("({0} - {1})", (trackMap.Value * picMap.Width), ((trackMap.Value + 1) * picMap.Width));
     if (picMap.Image != null)
     {
         picMap.Image.Dispose();
     }
     picMap.Image = TimeCodeParser.GetMapBitmap(picMap.Width, picMap.Height, vfl, trackMap.Value);
 }