static void FileRenamed(object sender, ProjectFileRenamedEventArgs e) { bool historyChanged = false; bool closedHistoryChanged = false; foreach (ProjectFileRenamedEventInfo args in e) { foreach (NavigationHistoryItem point in history) { DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint; historyChanged &= (dp != null && dp.HandleRenameEvent(args.OldName, args.NewName)); } foreach (NavigationHistoryItem point in history) { DocumentNavigationPoint cdp = point.NavigationPoint as DocumentNavigationPoint; closedHistoryChanged &= (cdp != null && cdp.HandleRenameEvent(args.OldName, args.NewName)); } } if (historyChanged) { OnHistoryChanged(); } if (closedHistoryChanged) { OnClosedHistoryChanged(); } }
static void FileRenamed(object sender, MonoDevelop.Projects.ProjectFileRenamedEventArgs args) { bool changed = false; foreach (NavigationHistoryItem point in history) { DocumentNavigationPoint dp = point.NavigationPoint as DocumentNavigationPoint; changed &= (dp != null && dp.HandleRenameEvent(args.OldName, args.NewName)); } if (changed) { OnHistoryChanged(); } }