예제 #1
0
 public TimelineEventInfo(TimelineSceneInfo sceneInfo)
 {
     this.num_timelines    = sceneInfo.uniqueDirectors.Count;
     this.min_duration     = sceneInfo.minDuration;
     this.max_duration     = sceneInfo.maxDuration;
     this.min_num_tracks   = sceneInfo.minNumTracks;
     this.max_num_tracks   = sceneInfo.maxNumTracks;
     this.recorded_percent = Math.Round(100.0 * (double)sceneInfo.numRecorded / (double)sceneInfo.numTracks, 1);
     foreach (KeyValuePair <string, int> current in from x in sceneInfo.trackCount
              where x.Value > 0
              select x)
     {
         this.track_info.Add(new TrackInfo
         {
             name    = current.Key,
             percent = Math.Round(100.0 * (double)current.Value / (double)sceneInfo.numTracks, 1)
         });
     }
     if (sceneInfo.userTrackTypesCount.Any <KeyValuePair <string, int> >())
     {
         this.most_popular_user_track = sceneInfo.userTrackTypesCount.First((KeyValuePair <string, int> x) => x.Value == sceneInfo.userTrackTypesCount.Values.Max()).Key;
     }
 }
예제 #2
0
        public TimelineEventInfo(TimelineSceneInfo sceneInfo)
        {
            num_timelines    = sceneInfo.uniqueDirectors.Count;
            min_duration     = sceneInfo.minDuration;
            max_duration     = sceneInfo.maxDuration;
            min_num_tracks   = sceneInfo.minNumTracks;
            max_num_tracks   = sceneInfo.maxNumTracks;
            recorded_percent = Math.Round(100.0 * sceneInfo.numRecorded / sceneInfo.numTracks, 1);

            foreach (KeyValuePair <string, int> kv in sceneInfo.trackCount.Where(x => x.Value > 0))
            {
                track_info.Add(new TrackInfo()
                {
                    name    = kv.Key,
                    percent = Math.Round(100.0 * kv.Value / sceneInfo.numTracks, 1)
                });
            }

            if (sceneInfo.userTrackTypesCount.Any())
            {
                most_popular_user_track = sceneInfo.userTrackTypesCount
                                          .First(x => x.Value == sceneInfo.userTrackTypesCount.Values.Max()).Key;
            }
        }
예제 #3
0
 public void OnPreprocessBuild(BuildReport report)
 {
     _timelineSceneInfo = new TimelineSceneInfo();
 }