Ejemplo n.º 1
0
        /*   private void llMode_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
        }*/
        public void setupFolderWatched()
        {
            if (folderWatcher != null)
            {
                if (folderWatcher.folderWatched == getCurrentDirectory())
                    return;
                else
                    folderWatcher.disable();
            }

            if (cbWatchFolder.Checked)
                folderWatcher = new FolderWatcher(getCurrentDirectory(), folderChangesCallback);
        }
Ejemplo n.º 2
0
        private void folderChangesCallback(FolderWatcher callback)
        {
            Callbacks.raiseRegistedCallbacks(_onFileWatchEvent, new[] {callback});

            if (callback.folderWatched == getCurrentDirectory())    // if there is no parent form it means this is not being used any more
            {
                if (this.parentForm().isNull())
                {
                    folderWatcher.enabled = false;
                    "Directory Viewer not used anymore, so disabling it".info();
                }
                else
                    refreshDirectoryView();
            }
        }
 private void directory_CirCreationQueue__onFileWatchEvent(FolderWatcher folderWatcher)
 {
     if (folderWatcher.fileDeleted == "")
         processCirCreationQueue();
 }