Ejemplo n.º 1
0
        public AutoConverter(DirectoryInfo root, MigotoData data, IUserInterface ui)
        {
            this.data            = data;
            this.ui              = ui;
            frameAnalysisWatcher = new FileSystemWatcher(root.FullName, "FrameAnalysis-*")
            {
                NotifyFilter        = NotifyFilters.DirectoryName,
                EnableRaisingEvents = true
            };
            frameAnalysisWatcher.Created += frameAnalyisCreated = IOHelpers.Handler <DirectoryInfo>(FrameAnalysisCreated);

            iniFileWatcher = new FileSystemWatcher(root.FullName, $"*{ConfigFile.Extension}")
            {
                NotifyFilter        = NotifyFilters.FileName,
                EnableRaisingEvents = true
            };
            iniFileWatcher.Created += configCreated = IOHelpers.Handler <FileInfo>(ConfigCreated);
            iniFileWatcher.Changed += configChanged = IOHelpers.Handler <FileInfo>(ConfigChanged);
        }