Ejemplo n.º 1
0
        private List <VisualizerSession> GetVisualizerSessions(string mergedDirectory)
        {
            var result = new List <VisualizerSession>();

            var baseDirectory = Path.Combine(mergedDirectory, DetailsDataset.Folders[0]);

            var defaultVizConfigPath = Path.Combine(baseDirectory, "visualizer_config.json");

            if (File.Exists(defaultVizConfigPath))
            {
                var dateModified      = File.GetLastWriteTime(defaultVizConfigPath);
                var visualizerRunning = VisualizerLauncher.IsVisualizerRunningForConfig(defaultVizConfigPath);
                result.Add(new VisualizerSession("Default", defaultVizConfigPath, dateModified, !visualizerRunning));
            }

            var vizConfigFiles = Directory.EnumerateFiles(baseDirectory, "*-visualizer_config.json");

            foreach (var vizConfigPath in vizConfigFiles)
            {
                Console.WriteLine(vizConfigPath);
                var vizFileName = Path.GetFileName(vizConfigPath);
                var sessionName = vizFileName.Remove(vizFileName.LastIndexOf("-visualizer_config.json", StringComparison.Ordinal));
                Console.WriteLine(sessionName);

                var dateModified      = File.GetLastWriteTime(vizConfigPath);
                var visualizerRunning = VisualizerLauncher.IsVisualizerRunningForConfig(vizConfigPath);
                result.Add(new VisualizerSession(sessionName, vizConfigPath, dateModified, !visualizerRunning));
            }

            return(result);
        }
Ejemplo n.º 2
0
 public void UpdateVisualizerSessionStatus()
 {
     foreach (var session in VisualizerSessionsList)
     {
         var visualizerRunning = VisualizerLauncher.IsVisualizerRunningForConfig(session.ConfigPath);
         session.VisualizerNotRunning = !visualizerRunning;
     }
 }