Esempio n. 1
0
        public DirectoryPair(DirectoryItem left, DirectoryItem right, ConfigurationItem configurationItem)
        {
            Left  = left;
            Right = right;

            _configurationItem = configurationItem;

            LeftFileCollection  = new FileCollection(left, right, _configurationItem);
            RightFileCollection = new FileCollection(right, left, _configurationItem);

            Left.PropertyChanged  += DirectoryItem_PropertyChanged;
            Right.PropertyChanged += DirectoryItem_PropertyChanged;
        }
Esempio n. 2
0
        public FileCollection(DirectoryItem directory, DirectoryItem otherDirectory, ConfigurationItem configurationItem)
        {
            _directory      = directory;
            _otherDirectory = otherDirectory;

            _configurationItem = configurationItem;

            _configurationItem.EnabledSetting.PropertyChanged            += EnabledSetting_PropertyChanged;
            _configurationItem.IncludeDirectoriesSetting.PropertyChanged += IncludeDirectoriesSetting_PropertyChanged;
            _configurationItem.CopySettings.Settings.ToList().ForEach(s => s.PropertyChanged += CopySetting_PropertyChanged);
            _configurationItem.ViewSettings.Settings.ToList().ForEach(s => s.PropertyChanged += ViewSetting_PropertyChanged);

            directory.PropertyChanged      += Directory_PropertyChanged;
            otherDirectory.PropertyChanged += Directory_PropertyChanged;

            //Utilities.FileSystem.RegisterFileSystemWatcherEvents(directory.FileSystemWatcher, FileSystemWatcher_Changed);
            //Utilities.FileSystem.RegisterFileSystemWatcherEvents(otherDirectory.FileSystemWatcher, FileSystemWatcher_Changed);

            //_timer = new DispatcherTimer {Interval = TimeSpan.FromSeconds(1)};
            //_timer.Tick += Timer_Tick;
            //_timer.Start();
        }