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(); } }
public override bool Equals(object o) { DocumentNavigationPoint dp = o as DocumentNavigationPoint; return(dp != null && ((doc != null && doc == dp.doc) || (FileName != FilePath.Null && FileName == dp.FileName))); }