Ejemplo n.º 1
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Forcibly ends the task of finding projects begun by BeginFindProjects without waiting
		/// for it to complete normally.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public void ForceEndFindProjects()
		{
			if (m_projectFinder != null)
			{
				m_projectFinder.ForceStop();
				m_projectFinder = null;
			}
		}
Ejemplo n.º 2
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Used to populate the File Open dialog, this returns the names of the projects
		/// on the specified host.
		/// </summary>
		/// <param name="host">The host to search</param>
		/// <param name="foundProject">Callback that is invoked when a project is found
		/// (string parameter is the name of the project).</param>
		/// <param name="exceptionCallback">Callback to handle any exceptions that happen when
		/// getting the list of projects (parameter is the exception that occured).</param>
		/// <param name="showLocalProjects">true if we want to show local fwdata projects</param>
		/// ------------------------------------------------------------------------------------
		public void BeginFindProjects(string host, Action<string> foundProject,
			Action<Exception> exceptionCallback, bool showLocalProjects)
		{
			if (m_projectFinder != null)
				throw new InvalidOperationException("Can not start a new find projects before the previous one finishes.");
			m_projectFinder = new FwProjectFinder(host, foundProject, () => m_projectFinder = null,
				exceptionCallback, showLocalProjects, m_dirs.ProjectsDirectory);
		}