Example #1
0
		void ProjectItemsEvents_ItemRenamed(ProjectItem projectItem, string oldName)
		{
			if (projectItem.WasConfiguration(oldName))
			{	
				// renamed from configuration file to something else
				_core.Unload(projectItem);
			}

			if (projectItem.IsConfiguration())
			{
				// If renamed to configuration file
				_core.Load(projectItem);
			}
			else
			{
				// Check if the new or old name triggers
				_core.TestTriggers(projectItem);

				// Combine path of current with oldFilename to get the full path
				var oldFullname = Path.GetDirectoryName(projectItem.FileNames[0]) + "\\" + oldName;
				_core.TestTriggers(projectItem.ContainingProject, oldFullname);
			}
		}