Exemplo n.º 1
0
        /// <summary>
        /// Adds a build file to the tree.
        /// </summary>
        /// <param name="projectName">The name of the project.</param>
        /// <param name="fileName">The build file name.</param>
        /// <param name="debug"><see langword="true"/> if the project's
        /// active configuration is debug; <see langword="false"/>
        /// otherwise.</param>
        public void AddBuildFile(string projectName, string fileName)
        {
            Debug.Assert(!InvokeRequired, "AddBuildFile InvokeRequired");

            if (File.Exists(fileName))
            {
                NAntBuildFile         buildFile = new NAntBuildFile(fileName);
                NAntBuildFileTreeNode node      = new NAntBuildFileTreeNode(projectName, buildFile);
                treeView.Nodes.Add(node);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Renames the build file.
        /// </summary>
        /// <param name="oldFileName">The filename to update.</param>
        /// <param name="newFileName">The updated filename.</param>
        public void RenameBuildFile(string oldFileName, string newFileName)
        {
            Debug.Assert(!InvokeRequired, "RenameBuildFile InvokeRequired");

            NAntBuildFileTreeNode node = FindMatchingNode(oldFileName);

            if (node != null)
            {
                node.FileName = Path.GetFileName(newFileName);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        /// Removes the specified build file from the
        /// tree view.</summary>
        public void RemoveBuildFile(string fileName)
        {
            Debug.Assert(!InvokeRequired, "RemoveBuildFile InvokeRequired");

            NAntBuildFileTreeNode node = FindMatchingNode(fileName);

            if (node != null)
            {
                node.Remove();
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// Updates the build file in the tree view.
        /// </summary>
        /// <param name="fileName">The build file name.</param>
        public void UpdateBuildFile(string fileName)
        {
            Debug.Assert(!InvokeRequired, "UpdateBuildFile InvokeRequired");

            NAntBuildFileTreeNode node = FindMatchingNode(fileName);

            if (node != null)
            {
                NAntBuildFile buildFile = new NAntBuildFile(fileName);
                node.BuildFile = buildFile;
            }
            else
            {
                AddBuildFile(String.Empty, fileName);
            }
        }
Exemplo n.º 5
0
		/// <summary>
		/// Adds a build file to the tree.
		/// </summary>
		/// <param name="projectName">The name of the project.</param>
		/// <param name="fileName">The build file name.</param>
		/// <param name="debug"><see langword="true"/> if the project's
		/// active configuration is debug; <see langword="false"/>
		/// otherwise.</param>
		public void AddBuildFile(string projectName, string fileName)
		{
			Debug.Assert(!InvokeRequired, "AddBuildFile InvokeRequired");

			if (File.Exists(fileName)) {
				NAntBuildFile buildFile = new NAntBuildFile(fileName);
				NAntBuildFileTreeNode node = new NAntBuildFileTreeNode(projectName, buildFile);
				treeView.Nodes.Add(node);
			}
		}