/// <summary>
        /// If the user is determined to be a first time user, this function
        /// generates an initial index. This function blocks until the index
        /// is generated
        /// </summary>
        /// <returns>true means new user found</returns>
        public bool IsFirstTimeUser()
        {
            if (Directory.Exists(Properties.Settings.Instance.IndexPath))
            {
                return(false);
            }

            Logger.Instance.LogDebug("First time user. Generating initial index");

            m_form = new IndexGeneration();
            m_form.Show();

            m_fileExplorer = new FileExplorer(PluginManager.Instance.RegisteredFileExtensions);
            m_fileExplorer.Run(true);
            m_dlgtProgressHandler = new FileExplorerProgressHandler(m_form.ShowProgress);
            m_dlgtDoneHandler     = new FileExplorerDoneHandler(FirstTimeDone);
            m_fileExplorer.FileExplorerProgress += m_dlgtProgressHandler;
            m_fileExplorer.FileExplorerDone     += m_dlgtDoneHandler;
//			lock(m_firstTimeUserLock)
//			{
//              Monitor.Wait(m_firstTimeUserLock);
//			}

            return(true);
        }
        void FirstTimeDone()
        {
//          lock(m_firstTimeUserLock)
//          {
//              Monitor.Pulse(m_firstTimeUserLock);
//          }

            m_fileExplorer.FileExplorerProgress     -= m_dlgtProgressHandler;
            m_fileExplorer.FileExplorerDone         -= m_dlgtDoneHandler;
            m_form.Dispose(); m_form                 = null;
            m_fileExplorer.Dispose(); m_fileExplorer = null;
        }
        void FirstTimeDone()
        {
            //        	lock(m_firstTimeUserLock)
            //        	{
            //        		Monitor.Pulse(m_firstTimeUserLock);
            //        	}

            m_fileExplorer.FileExplorerProgress -= m_dlgtProgressHandler;
            m_fileExplorer.FileExplorerDone -= m_dlgtDoneHandler;
            m_form.Dispose(); m_form = null;
            m_fileExplorer.Dispose(); m_fileExplorer = null;
        }
        /// <summary>
        /// If the user is determined to be a first time user, this function
        /// generates an initial index. This function blocks until the index
        /// is generated
        /// </summary>
        /// <returns>true means new user found</returns>
        public bool IsFirstTimeUser()
        {
            if(Directory.Exists(Properties.Settings.Instance.IndexPath))
                return false;

            Logger.Instance.LogDebug("First time user. Generating initial index");

            m_form = new IndexGeneration();
            m_form.Show();

            m_fileExplorer = new FileExplorer(PluginManager.Instance.RegisteredFileExtensions);
            m_fileExplorer.Run(true);
            m_dlgtProgressHandler = new FileExplorerProgressHandler(m_form.ShowProgress);
            m_dlgtDoneHandler = new FileExplorerDoneHandler(FirstTimeDone);
            m_fileExplorer.FileExplorerProgress += m_dlgtProgressHandler;
            m_fileExplorer.FileExplorerDone += m_dlgtDoneHandler;
            //			lock(m_firstTimeUserLock)
            //			{
            //        		Monitor.Wait(m_firstTimeUserLock);
            //			}

            return true;
        }